ieee802.15.4: Fix some forbidden C11 syntax.

This commit is contained in:
Gregory Nutt 2017-04-17 11:47:33 -06:00
parent 6d3ec6e4a4
commit 1d1d633e6f
2 changed files with 9 additions and 9 deletions

View File

@ -356,7 +356,7 @@ struct ieee802154_addr_s
{ {
uint16_t saddr; /* short address */ uint16_t saddr; /* short address */
uint8_t eaddr[8]; /* extended address */ uint8_t eaddr[8]; /* extended address */
}; } u;
}; };
#define IEEE802154_ADDRSTRLEN 22 /* (2*2+1+8*2, PPPP/EEEEEEEEEEEEEEEE) */ #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 ack_tx : 1; /* Acknowledge TX? */
uint8_t gts_tx : 1; /* 1=GTS used for TX, 0=CAP used for 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? */ uint8_t indirect_tx : 1; /* Should indirect transmission be used? */
}; } msdu_flags;
#ifdef CONFIG_IEEE802154_SECURITY #ifdef CONFIG_IEEE802154_SECURITY
/* Security information if enabled */ /* Security information if enabled */
@ -566,8 +566,8 @@ struct ieee802154_pend_addr_s
uint8_t reserved_3 : 1; /* Reserved bit */ uint8_t reserved_3 : 1; /* Reserved bit */
uint8_t num_ext_addr : 3; /* Number of extended addresses pending */ uint8_t num_ext_addr : 3; /* Number of extended addresses pending */
uint8_t reserved_7 : 1; /* Reserved bit */ uint8_t reserved_7 : 1; /* Reserved bit */
}; } pa_addr;
}; } u;
struct ieee802154_addr_s addr[7]; /* Array of at most 7 addresses */ struct ieee802154_addr_s addr[7]; /* Array of at most 7 addresses */
}; };

View File

@ -482,7 +482,7 @@ int mac802154_req_data(MACHANDLE mac, FAR struct ieee802154_data_req_s *req)
* 5.1.6.4 [1] pg. 118. * 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 /* If the destination address is present, copy the PAN ID and one of the
* addresses, depending on mode, into the MHR . * 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. * [1] pg. 118.
*/ */
if (req->gts_tx) if (req->msdu_flags.gts_tx)
{ {
/* TODO: Support GTS transmission. This should just change where we link /* TODO: Support GTS transmission. This should just change where we link
* the transaction. Instead of going in the CSMA transaction list, it * 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] * 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 /* If the TxOptions parameter specifies that an indirect transmission
* is required and if the device receiving this primitive is not a * 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 */ /* 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 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 */ /* Link the transaction into the CSMA transaction list */