Skip to content

Commit

Permalink
Add MAC TX active FLAG to active before write function return value.
Browse files Browse the repository at this point in the history
Change-Id: I819c207058c7379d9f4e00bb7574e71aac76b3c3
  • Loading branch information
Juha Heiskanen committed Aug 28, 2018
1 parent 08d3e12 commit c2bc561
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/MAC/IEEE802_15_4/mac_pd_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,21 @@ int8_t mac_plme_cca_req(protocol_interface_rf_mac_setup_s *rf_mac_setup) {
dev_driver_tx_buffer_s *tx_buf = &rf_mac_setup->dev_driver_tx_buffer;
phy_device_driver_s *dev_driver = rf_mac_setup->dev_driver->phy_driver;


rf_mac_setup->macRfRadioTxActive = true;
if (dev_driver->arm_net_virtual_tx_cb) {
if (dev_driver->tx(tx_buf->buf, tx_buf->len, 1, PHY_LAYER_PAYLOAD) == 0) {
rf_mac_setup->macRfRadioTxActive = true;
timer_mac_start(rf_mac_setup, MAC_TX_TIMEOUT, NWKTX_TIMEOUT_PERIOD); /*Start Timeout timer for virtual packet loss*/
} else {
rf_mac_setup->macRfRadioTxActive = false;
mac_data_interface_tx_to_cb(rf_mac_setup);
}
return 0;
}

if (dev_driver->tx(tx_buf->buf, tx_buf->len, 1, PHY_LAYER_PAYLOAD) == 0) {
rf_mac_setup->macRfRadioTxActive = true;
return 0;
}
rf_mac_setup->macRfRadioTxActive = false;
return -1;
}

Expand Down

0 comments on commit c2bc561

Please sign in to comment.