mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Remove unused flag SICSLOWPAN_CONF_ACK_ALL. Include packetbuf attribute PACKETBUF_ATTR_RELIABLE only when RIME is compiled.
This commit is contained in:
parent
2059be3a43
commit
bb76bb8beb
@ -262,8 +262,8 @@ uip_over_mesh_send(void)
|
||||
if(BUF->proto == UIP_PROTO_TCP) {
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_ERELIABLE, 1);
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_RELIABLE, 1);
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
/* packetbuf_set_attr(PACKETBUF_ATTR_PACKET_TYPE, PACKETBUF_ATTR_PACKET_TYPE_STREAM);*/
|
||||
}
|
||||
|
||||
|
@ -1336,11 +1336,6 @@ send_packet(linkaddr_t *dest)
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER,(void*)&uip_lladdr);
|
||||
#endif
|
||||
|
||||
/* Force acknowledge from sender (test hardware autoacks) */
|
||||
#if SICSLOWPAN_CONF_ACK_ALL
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_RELIABLE, 1);
|
||||
#endif
|
||||
|
||||
/* Provide a callback function to receive the result of
|
||||
a packet transmission. */
|
||||
NETSTACK_LLSEC.send(&packet_sent, NULL);
|
||||
|
@ -499,7 +499,6 @@ send_packet(mac_callback_t mac_callback, void *mac_callback_ptr,
|
||||
uint8_t got_strobe_ack = 0;
|
||||
int len;
|
||||
uint8_t is_broadcast = 0;
|
||||
uint8_t is_reliable = 0;
|
||||
uint8_t is_known_receiver = 0;
|
||||
uint8_t collisions;
|
||||
int transmit_len;
|
||||
@ -546,11 +545,6 @@ send_packet(mac_callback_t mac_callback, void *mac_callback_ptr,
|
||||
packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[1]);
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
}
|
||||
is_reliable = packetbuf_attr(PACKETBUF_ATTR_RELIABLE)
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
|| packetbuf_attr(PACKETBUF_ATTR_ERELIABLE)
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
;
|
||||
|
||||
if(!packetbuf_attr(PACKETBUF_ATTR_IS_CREATED_AND_SECURED)) {
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_MAC_ACK, 1);
|
||||
|
@ -453,8 +453,6 @@ send_packet(void)
|
||||
packetbuf_addr(PACKETBUF_ADDR_RECEIVER)->u8[1]);
|
||||
#endif /* NETSTACK_CONF_WITH_IPV6 */
|
||||
}
|
||||
/* is_reliable = packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
|
||||
packetbuf_attr(PACKETBUF_ATTR_ERELIABLE);*/
|
||||
len = NETSTACK_FRAMER.create();
|
||||
strobe_len = len + sizeof(struct cxmac_hdr);
|
||||
if(len < 0 || strobe_len > (int)sizeof(strobe)) {
|
||||
@ -624,8 +622,9 @@ send_packet(void)
|
||||
/* If we have received the strobe ACK, and we are sending a packet
|
||||
that will need an upper layer ACK (as signified by the
|
||||
PACKETBUF_ATTR_RELIABLE packet attribute), we keep the radio on. */
|
||||
if(got_strobe_ack && (packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
|
||||
if(got_strobe_ack && (
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
packetbuf_attr(PACKETBUF_ATTR_RELIABLE) ||
|
||||
packetbuf_attr(PACKETBUF_ATTR_ERELIABLE) ||
|
||||
#endif /* NETSTACK_CONF_WITH_RIME */
|
||||
packetbuf_attr(PACKETBUF_ATTR_PACKET_TYPE) ==
|
||||
|
@ -242,7 +242,6 @@ parse(void)
|
||||
}
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (linkaddr_t *)&frame.src_addr);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_PENDING, frame.fcf.frame_pending);
|
||||
/* packetbuf_set_attr(PACKETBUF_ATTR_RELIABLE, frame.fcf.ack_required);*/
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_PACKET_ID, frame.seq);
|
||||
|
||||
#if LLSEC802154_SECURITY_LEVEL
|
||||
|
@ -106,7 +106,9 @@ send_packet(mac_callback_t sent, void *ptr)
|
||||
params.fcf.frame_type = FRAME802154_DATAFRAME;
|
||||
params.fcf.security_enabled = 0;
|
||||
params.fcf.frame_pending = 0;
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
params.fcf.ack_required = packetbuf_attr(PACKETBUF_ATTR_RELIABLE);
|
||||
#endif
|
||||
params.fcf.panid_compression = 0;
|
||||
|
||||
/* Insert IEEE 802.15.4 (2003) version bit. */
|
||||
|
@ -309,10 +309,10 @@ enum {
|
||||
PACKETBUF_ATTR_IS_CREATED_AND_SECURED,
|
||||
|
||||
/* Scope 1 attributes: used between two neighbors only. */
|
||||
PACKETBUF_ATTR_RELIABLE,
|
||||
PACKETBUF_ATTR_PACKET_ID,
|
||||
PACKETBUF_ATTR_PACKET_TYPE,
|
||||
#if NETSTACK_CONF_WITH_RIME
|
||||
PACKETBUF_ATTR_RELIABLE,
|
||||
PACKETBUF_ATTR_REXMIT,
|
||||
PACKETBUF_ATTR_MAX_REXMIT,
|
||||
PACKETBUF_ATTR_NUM_REXMIT,
|
||||
|
@ -409,7 +409,9 @@ sicslowmac_dataRequest(void)
|
||||
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. */
|
||||
|
@ -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)))
|
||||
|
@ -109,7 +109,6 @@ parse(void)
|
||||
}
|
||||
packetbuf_set_addr(PACKETBUF_ADDR_SENDER, (linkaddr_t *)&frame.src_addr);
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_PENDING, frame.fcf.frame_pending);
|
||||
/* packetbuf_set_attr(PACKETBUF_ATTR_RELIABLE, frame.fcf.ack_required);*/
|
||||
packetbuf_set_attr(PACKETBUF_ATTR_PACKET_ID, frame.seq);
|
||||
|
||||
PRINTF("15.4-IN: %2X", frame.fcf.frame_type);
|
||||
|
@ -191,8 +191,6 @@ typedef unsigned short uip_stats_t;
|
||||
#define CHANNEL_802_15_4 26
|
||||
/* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */
|
||||
#define RF230_CONF_AUTOACK 1
|
||||
/* Request 802.15.4 ACK on all packets sent (else autoretry). This is primarily for testing. */
|
||||
#define SICSLOWPAN_CONF_ACK_ALL 0
|
||||
/* 1 + Number of auto retry attempts 0-15 (0 implies don't use extended TX_ARET_ON mode) */
|
||||
#define RF230_CONF_FRAME_RETRIES 2
|
||||
/* Number of csma retry attempts 0-5 in extended tx mode (7 does immediate tx with no csma) */
|
||||
|
@ -206,8 +206,6 @@ typedef unsigned short uip_stats_t;
|
||||
#define RADIO_CONF_CALIBRATE_INTERVAL 256
|
||||
/* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */
|
||||
#define RF230_CONF_AUTOACK 1
|
||||
/* Request 802.15.4 ACK on all packets sent (else autoretry). This is primarily for testing. */
|
||||
#define SICSLOWPAN_CONF_ACK_ALL 0
|
||||
/* Number of auto retry attempts+1, 1-16. Set zero to disable extended TX_ARET_ON mode with CCA) */
|
||||
#define RF230_CONF_FRAME_RETRIES 3
|
||||
/* Number of CSMA attempts 0-7. 802.15.4 2003 standard max is 5. */
|
||||
|
@ -284,9 +284,6 @@ typedef unsigned short uip_stats_t;
|
||||
#define RADIO_CONF_CALIBRATE_INTERVAL 256
|
||||
/* AUTOACK receive mode gives better rssi measurements, even if ACK is never requested */
|
||||
#define RF230_CONF_AUTOACK 1
|
||||
/* Request 802.15.4 ACK on all packets sent by sicslowpan.c (else autoretry) */
|
||||
/* Broadcasts will be duplicated by the retry count, since no one will ACK them! */
|
||||
#define SICSLOWPAN_CONF_ACK_ALL 0
|
||||
/* 1 + Number of auto retry attempts 0-15 (0 implies don't use extended TX_ARET_ON mode with CCA) */
|
||||
#define RF230_CONF_FRAME_RETRIES 2
|
||||
/* CCA theshold energy -91 to -61 dBm (default -77). Set this smaller than the expected minimum rssi to avoid packet collisions */
|
||||
|
Loading…
Reference in New Issue
Block a user