Add uip_clear_buf() macro and replace all instances of uip_len = 0; with it
This commit is contained in:
parent
cb09689846
commit
1784338b2e
30 changed files with 92 additions and 84 deletions
|
@ -342,7 +342,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
|
||||
/* In sniffer or sneezr mode we don't ever send anything */
|
||||
if ((usbstick_mode.sendToRf == 0) || (usbstick_mode.sneeze != 0)) {
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
#if !RF230BB
|
||||
usb_eth_stat.txbad++;
|
||||
#endif
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -375,7 +375,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
#if !RF230BB
|
||||
usb_eth_stat.txbad++;
|
||||
#endif
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
return;
|
||||
} else {
|
||||
|
||||
|
@ -409,7 +409,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
#if UIP_CONF_SIMPLE_JACKDAW_ADDR_TRANS
|
||||
else {
|
||||
//Not addressed to us
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
@ -422,7 +422,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
#if !RF230BB
|
||||
usb_eth_stat.txbad++;
|
||||
#endif
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
return;
|
||||
}
|
||||
PRINTF(" translated OK\n\r");
|
||||
|
@ -463,7 +463,7 @@ void mac_ethernetToLowpan(uint8_t * ethHeader)
|
|||
#if !RF230BB
|
||||
usb_eth_stat.txok++;
|
||||
#endif
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
|
||||
}
|
||||
|
||||
|
@ -543,7 +543,7 @@ void mac_LowpanToEthernet(void)
|
|||
#if !RF230BB
|
||||
usb_eth_stat.rxok++;
|
||||
#endif
|
||||
uip_len = 0;
|
||||
uip_clear_buf();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue