Skip to content

Commit

Permalink
Added support to report Driver if FHSS return unknow neighbor error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Heiskanen committed Aug 16, 2018
1 parent eb5ba30 commit 42122b7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/MAC/IEEE802_15_4/mac_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ typedef enum mac_event_t {
MAC_TIMER_ACK,
MAC_TIMER_CCA,
MAC_TX_FAIL,
MAC_TX_TIMEOUT
MAC_TX_TIMEOUT,
MAC_UNKNOWN_DESTINATION,
} mac_event_t;

typedef enum mac_tx_status_type_t {
Expand Down
2 changes: 2 additions & 0 deletions source/MAC/IEEE802_15_4/mac_mcps_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,6 +1359,8 @@ static void mac_common_data_confirmation_handle (protocol_interface_rf_mac_setup
//Enable Radio
mac_mlme_mac_radio_enable(rf_mac_setup);
buf->status = MLME_TRANSACTION_EXPIRED;
} else if (m_event == MAC_UNKNOWN_DESTINATION) {
buf->status = MLME_UNAVAILABLE_KEY;
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions source/MAC/IEEE802_15_4/mac_pd_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ void mac_pd_sap_state_machine(protocol_interface_rf_mac_setup_s *rf_mac_setup)
if (tx_handle_retval == -3) {
mac_tx_done_state_set(rf_mac_setup, MAC_CCA_FAIL);
return;
} else if (tx_handle_retval == -2) {
mac_tx_done_state_set(rf_mac_setup, MAC_UNKNOWN_DESTINATION);
return;
}
}
if (mac_plme_cca_req(rf_mac_setup) != 0) {
Expand Down Expand Up @@ -361,6 +364,9 @@ static int8_t mac_data_interface_tx_done_cb(protocol_interface_rf_mac_setup_s *r
if (tx_handle_retval == -3) {
mac_tx_done_state_set(rf_ptr, MAC_CCA_FAIL);
return -3;
} else if (tx_handle_retval == -2) {
mac_tx_done_state_set(rf_ptr, MAC_UNKNOWN_DESTINATION);
return -2;
}
}
}
Expand Down

0 comments on commit 42122b7

Please sign in to comment.