Skip to content

Commit

Permalink
Init MAC MTU size based on driver MTU size (ARMmbed#2397)
Browse files Browse the repository at this point in the history
Initialise MAC MTU size based on driver MTU size. In simulator MTU
size was not properly updated to adaptation_interface by using
`mac802_15_4Mode` change as adaptation_interface was already created
in `arm_nwk_interface_lowpan_init`.
  • Loading branch information
Arto Kinnunen authored Jul 15, 2020
1 parent bf8e89e commit e787874
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/MAC/IEEE802_15_4/sw_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ mac_api_t *ns_sw_mac_create(int8_t rf_driver_id, mac_description_storage_size_t

// Set default MTU size to 127 unless it is too much for PHY driver
if (driver->phy_driver->phy_MTU > MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE) {
this->phyMTU = MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE;
} else {
this->phyMTU = driver->phy_driver->phy_MTU;
} else {
this->phyMTU = MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE;
}

mac_store.setup = mac_mlme_data_base_allocate(mac_store.dev_driver->phy_driver->PHY_MAC, mac_store.dev_driver, storage_sizes, this->phyMTU);
Expand Down

0 comments on commit e787874

Please sign in to comment.