diff --git a/include/nuttx/wireless/ieee802154/ieee802154_mac.h b/include/nuttx/wireless/ieee802154/ieee802154_mac.h index 838f7fcafd..76880ebf29 100644 --- a/include/nuttx/wireless/ieee802154/ieee802154_mac.h +++ b/include/nuttx/wireless/ieee802154/ieee802154_mac.h @@ -356,7 +356,7 @@ struct ieee802154_addr_s { uint16_t saddr; /* short address */ uint8_t eaddr[8]; /* extended address */ - }; + } u; }; #define IEEE802154_ADDRSTRLEN 22 /* (2*2+1+8*2, PPPP/EEEEEEEEEEEEEEEE) */ @@ -430,7 +430,7 @@ struct ieee802154_data_req_s uint8_t ack_tx : 1; /* Acknowledge TX? */ uint8_t gts_tx : 1; /* 1=GTS used for TX, 0=CAP used for TX */ uint8_t indirect_tx : 1; /* Should indirect transmission be used? */ - }; + } msdu_flags; #ifdef CONFIG_IEEE802154_SECURITY /* Security information if enabled */ @@ -566,8 +566,8 @@ struct ieee802154_pend_addr_s uint8_t reserved_3 : 1; /* Reserved bit */ uint8_t num_ext_addr : 3; /* Number of extended addresses pending */ uint8_t reserved_7 : 1; /* Reserved bit */ - }; - }; + } pa_addr; + } u; struct ieee802154_addr_s addr[7]; /* Array of at most 7 addresses */ }; diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index 8dc2e87b3f..ee057dcec1 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -482,7 +482,7 @@ int mac802154_req_data(MACHANDLE mac, FAR struct ieee802154_data_req_s *req) * 5.1.6.4 [1] pg. 118. */ - mhr.frame_ctrl |= (req->ack_tx << IEEE802154_FRAMECTRL_SHIFT_ACKREQ); + mhr.frame_ctrl |= (req->msdu_flags.ack_tx << IEEE802154_FRAMECTRL_SHIFT_ACKREQ); /* If the destination address is present, copy the PAN ID and one of the * addresses, depending on mode, into the MHR . @@ -603,7 +603,7 @@ int mac802154_req_data(MACHANDLE mac, FAR struct ieee802154_data_req_s *req) * [1] pg. 118. */ - if (req->gts_tx) + if (req->msdu_flags.gts_tx) { /* TODO: Support GTS transmission. This should just change where we link * the transaction. Instead of going in the CSMA transaction list, it @@ -622,7 +622,7 @@ int mac802154_req_data(MACHANDLE mac, FAR struct ieee802154_data_req_s *req) * described in 5.1.5 and 5.1.6.3. [1] */ - if (req->indirect_tx) + if (req->msdu_flags.indirect_tx) { /* If the TxOptions parameter specifies that an indirect transmission * is required and if the device receiving this primitive is not a @@ -642,13 +642,13 @@ int mac802154_req_data(MACHANDLE mac, FAR struct ieee802154_data_req_s *req) { /* Override the setting since it wasn't valid */ - req->indirect_tx = 0; + req->msgu_flags.indirect_tx = 0; } } /* If this is a direct transmission not during a GTS */ - if (!req->indirect_tx) + if (!req->msdu_flags.indirect_tx) { /* Link the transaction into the CSMA transaction list */