Merge pull request #1052 from simonduq/packetbuf-cleanup

Packetbuf cleanup
This commit is contained in:
George Oikonomou 2015-05-09 22:30:21 +01:00
commit bd5e35c968
18 changed files with 44 additions and 35 deletions

View file

@ -402,14 +402,18 @@ sicslowmac_dataRequest(void)
frame_create_params_t params;
frame_result_t result;
#if NETSTACK_CONF_WITH_RIME
/* Save the msduHandle in a global variable. */
msduHandle = packetbuf_attr(PACKETBUF_ATTR_PACKET_ID);
#endif
/* Build the FCF. */
params.fcf.frameType = DATAFRAME;
params.fcf.securityEnabled = false;
params.fcf.framePending = false;
#if NETSTACK_CONF_WITH_RIME
params.fcf.ackRequired = packetbuf_attr(PACKETBUF_ATTR_RELIABLE);
#endif
params.fcf.panIdCompression = false;
/* Insert IEEE 802.15.4 (2003) version bit. */

View file

@ -1073,8 +1073,10 @@ rf230_transmit(unsigned short payload_len)
if (tx_result==RADIO_TX_OK) {
RIMESTATS_ADD(lltx);
#if NETSTACK_CONF_WITH_RIME
if(packetbuf_attr(PACKETBUF_ATTR_RELIABLE))
RIMESTATS_ADD(ackrx); //ack was requested and received
#endif
#if RF230_INSERTACK
/* Not PAN broadcast to FFFF, and ACK was requested and received */
if (!((buffer[5]==0xff) && (buffer[6]==0xff)) && (buffer[0]&(1<<6)))