Skip to content

Commit e787874

Browse files
author
Arto Kinnunen
authored
Init MAC MTU size based on driver MTU size (ARMmbed#2397)
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`.
1 parent bf8e89e commit e787874

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/MAC/IEEE802_15_4/sw_mac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ mac_api_t *ns_sw_mac_create(int8_t rf_driver_id, mac_description_storage_size_t
102102

103103
// Set default MTU size to 127 unless it is too much for PHY driver
104104
if (driver->phy_driver->phy_MTU > MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE) {
105-
this->phyMTU = MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE;
106-
} else {
107105
this->phyMTU = driver->phy_driver->phy_MTU;
106+
} else {
107+
this->phyMTU = MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE;
108108
}
109109

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

0 commit comments

Comments
 (0)