Skip to content

Commit 42122b7

Browse files
author
Juha Heiskanen
committed
Added support to report Driver if FHSS return unknow neighbor error.
1 parent eb5ba30 commit 42122b7

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

source/MAC/IEEE802_15_4/mac_defines.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ typedef enum mac_event_t {
3737
MAC_TIMER_ACK,
3838
MAC_TIMER_CCA,
3939
MAC_TX_FAIL,
40-
MAC_TX_TIMEOUT
40+
MAC_TX_TIMEOUT,
41+
MAC_UNKNOWN_DESTINATION,
4142
} mac_event_t;
4243

4344
typedef enum mac_tx_status_type_t {

source/MAC/IEEE802_15_4/mac_mcps_sap.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,8 @@ static void mac_common_data_confirmation_handle (protocol_interface_rf_mac_setup
13591359
//Enable Radio
13601360
mac_mlme_mac_radio_enable(rf_mac_setup);
13611361
buf->status = MLME_TRANSACTION_EXPIRED;
1362+
} else if (m_event == MAC_UNKNOWN_DESTINATION) {
1363+
buf->status = MLME_UNAVAILABLE_KEY;
13621364
}
13631365
}
13641366
}

source/MAC/IEEE802_15_4/mac_pd_sap.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ void mac_pd_sap_state_machine(protocol_interface_rf_mac_setup_s *rf_mac_setup)
254254
if (tx_handle_retval == -3) {
255255
mac_tx_done_state_set(rf_mac_setup, MAC_CCA_FAIL);
256256
return;
257+
} else if (tx_handle_retval == -2) {
258+
mac_tx_done_state_set(rf_mac_setup, MAC_UNKNOWN_DESTINATION);
259+
return;
257260
}
258261
}
259262
if (mac_plme_cca_req(rf_mac_setup) != 0) {
@@ -361,6 +364,9 @@ static int8_t mac_data_interface_tx_done_cb(protocol_interface_rf_mac_setup_s *r
361364
if (tx_handle_retval == -3) {
362365
mac_tx_done_state_set(rf_ptr, MAC_CCA_FAIL);
363366
return -3;
367+
} else if (tx_handle_retval == -2) {
368+
mac_tx_done_state_set(rf_ptr, MAC_UNKNOWN_DESTINATION);
369+
return -2;
364370
}
365371
}
366372
}

0 commit comments

Comments
 (0)