Skip to content

Commit 618a191

Browse files
author
Juha Heiskanen
committed
Wi-SUN Expedite forward state update
At Expedite forward state ETX update, NUD and Probe process are blocked.
1 parent 4371462 commit 618a191

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

source/6LoWPAN/adaptation_interface.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,15 @@ void lowpan_adaptation_expedite_forward_enable(protocol_interface_info_entry_t *
12421242
lowpan_adaptation_high_priority_state_enable(cur, interface_ptr);
12431243
}
12441244

1245+
bool lowpan_adaptation_expedite_forward_state_get(protocol_interface_info_entry_t *cur)
1246+
{
1247+
fragmenter_interface_t *interface_ptr = lowpan_adaptation_interface_discover(cur->id);
1248+
if (!interface_ptr || !interface_ptr->last_rx_high_priority) {
1249+
return false;
1250+
}
1251+
return true;
1252+
}
1253+
12451254
void lowpan_adaptation_interface_slow_timer(protocol_interface_info_entry_t *cur)
12461255
{
12471256
fragmenter_interface_t *interface_ptr = lowpan_adaptation_interface_discover(cur->id);

source/6LoWPAN/lowpan_adaptation_interface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ int8_t lowpan_adaptation_indirect_queue_params_set(struct protocol_interface_inf
6464

6565
void lowpan_adaptation_expedite_forward_enable(struct protocol_interface_info_entry *cur);
6666

67+
bool lowpan_adaptation_expedite_forward_state_get(struct protocol_interface_info_entry *cur);
68+
6769
void lowpan_adaptation_interface_slow_timer(struct protocol_interface_info_entry *cur);
6870

6971
#endif /* LOWPAN_ADAPTATION_INTERFACE_H_ */

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,6 +2204,11 @@ static bool ws_neighbor_entry_nud_notify(mac_neighbor_table_entry_t *entry_ptr,
22042204
return false;
22052205
}
22062206

2207+
if (lowpan_adaptation_expedite_forward_state_get(cur)) {
2208+
//Do not send any probe or NUD when Expedite forward state is enabled
2209+
return false;
2210+
}
2211+
22072212
ws_bootsrap_create_ll_address(ll_address, entry_ptr->mac64);
22082213

22092214
if (time_from_start > WS_NEIGHBOR_NUD_TIMEOUT) {

source/6LoWPAN/ws/ws_llc_data_service.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,11 @@ static void ws_llc_mac_confirm_cb(const mac_api_t *api, const mcps_data_conf_t *
490490
}
491491

492492
if (neighbor_info.ws_neighbor && neighbor_info.neighbor && neighbor_info.neighbor->link_lifetime == WS_NEIGHBOR_LINK_TIMEOUT) {
493-
etx_transm_attempts_update(interface->id, 1 + data->tx_retries, success, neighbor_info.neighbor->index, neighbor_info.neighbor->mac64);
494-
//TODO discover RSL from Enchanced ACK Header IE elements
493+
494+
if (!base->high_priority_mode) {
495+
//Update ETX only when High priority state is not activated
496+
etx_transm_attempts_update(interface->id, 1 + data->tx_retries, success, neighbor_info.neighbor->index, neighbor_info.neighbor->mac64);
497+
}
495498
ws_utt_ie_t ws_utt;
496499
if (ws_wh_utt_read(conf_data->headerIeList, conf_data->headerIeListLength, &ws_utt)) {
497500
//UTT header

test/nanostack/unittest/stub/adaptation_interface_stub.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,8 @@ void lowpan_adaptation_expedite_forward_enable(struct protocol_interface_info_en
121121
{
122122

123123
}
124+
125+
bool lowpan_adaptation_expedite_forward_state_get(protocol_interface_info_entry_t *cur)
126+
{
127+
return false;
128+
}

0 commit comments

Comments
 (0)