1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 00:11:16 +01:00

gnrc/gomach : Move GNRC_GOMACH_T2U_RETYR_THRESHOLD to 'CONFIG_'

This commit is contained in:
Akshai M 2020-05-19 18:36:13 +05:30
parent b9773263c0
commit 89360577a0
2 changed files with 4 additions and 4 deletions

View File

@ -332,8 +332,8 @@ extern "C" {
* This macro defines the maximum t2u attempts before dropping the data packet
* in GoMacH.
*/
#ifndef GNRC_GOMACH_T2U_RETYR_THRESHOLD
#define GNRC_GOMACH_T2U_RETYR_THRESHOLD (2U)
#ifndef CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD
#define CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD (2U)
#endif
/**

View File

@ -1211,7 +1211,7 @@ static void gomach_t2u_wait_preamble_ack(gnrc_netif_t *netif)
netif->mac.tx.t2u_retry_counter++;
/* If we reach the maximum t2u retry limit, release the data packet. */
if (netif->mac.tx.t2u_retry_counter >= GNRC_GOMACH_T2U_RETYR_THRESHOLD) {
if (netif->mac.tx.t2u_retry_counter >= CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD) {
LOG_DEBUG("[GOMACH] t2u failed: no preamble-ACK.\n");
netif->mac.tx.t2u_retry_counter = 0;
netif->mac.tx.t2u_state = GNRC_GOMACH_T2U_END;
@ -1309,7 +1309,7 @@ static void _t2u_data_tx_fail(gnrc_netif_t *netif)
{
netif->mac.tx.t2u_retry_counter++;
/* If we meet t2u retry limit, release the packet. */
if (netif->mac.tx.t2u_retry_counter >= GNRC_GOMACH_T2U_RETYR_THRESHOLD) {
if (netif->mac.tx.t2u_retry_counter >= CONFIG_GNRC_GOMACH_T2U_RETYR_THRESHOLD) {
LOG_DEBUG("[GOMACH] t2u send data failed on channel %d,"
" drop packet.\n", netif->mac.tx.current_neighbor->pub_chanseq);
gnrc_pktbuf_release(netif->mac.tx.packet);