diff --git a/wireless/ieee802154/mac802154.c b/wireless/ieee802154/mac802154.c index b161c57f1e..af54acbaf6 100644 --- a/wireless/ieee802154/mac802154.c +++ b/wireless/ieee802154/mac802154.c @@ -1096,7 +1096,7 @@ static void mac802154_rx_dataframe(FAR struct ieee802154_privmac_s *priv, priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Release the MAC */ @@ -1514,7 +1514,7 @@ MACHANDLE mac802154_create(FAR struct ieee802154_radio_s *radiodev) /* Allow exclusive access to the dedicated command transaction */ - sem_init(&mac->op_sem, 0, 1); + sem_init(&mac->opsem, 0, 1); /* Setup watchdog for extraction timeout */ diff --git a/wireless/ieee802154/mac802154_assoc.c b/wireless/ieee802154/mac802154_assoc.c index 494f6d519c..cd33e382d7 100644 --- a/wireless/ieee802154/mac802154_assoc.c +++ b/wireless/ieee802154/mac802154_assoc.c @@ -100,7 +100,7 @@ int mac802154_req_associate(MACHANDLE mac, * needs access to the MAC in order to unlock it. */ - ret = mac802154_takesem(&priv->op_sem, true); + ret = mac802154_takesem(&priv->opsem, true); if (ret < 0) { return ret; @@ -114,7 +114,7 @@ int mac802154_req_associate(MACHANDLE mac, ret = mac802154_takesem(&priv->exclsem, true); if (ret < 0) { - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); return ret; } @@ -170,7 +170,7 @@ int mac802154_req_associate(MACHANDLE mac, { iob_free(iob); mac802154_givesem(&priv->exclsem); - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); return ret; } @@ -441,7 +441,7 @@ void mac802154_txdone_assocreq(FAR struct ieee802154_privmac_s *priv, priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Release the MAC, call the callback, get exclusive access again */ @@ -573,7 +573,7 @@ void mac802154_txdone_datareq_assoc(FAR struct ieee802154_privmac_s *priv, priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Release the MAC, call the callback, get exclusive access again */ @@ -763,7 +763,7 @@ void mac802154_rx_assocresp(FAR struct ieee802154_privmac_s *priv, priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Notify the next highest layer of the association status */ @@ -806,7 +806,7 @@ static void mac802154_timeout_assoc(FAR struct ieee802154_privmac_s *priv) /* We are no longer performing the association operation */ priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Release the MAC */ diff --git a/wireless/ieee802154/mac802154_internal.h b/wireless/ieee802154/mac802154_internal.h index ad3c23cc43..99fffc6282 100644 --- a/wireless/ieee802154/mac802154_internal.h +++ b/wireless/ieee802154/mac802154_internal.h @@ -232,8 +232,8 @@ typedef void (*mac802154_worker_t)(FAR struct ieee802154_privmac_s *priv); struct ieee802154_privmac_s { - FAR struct ieee802154_radio_s *radio; /* Contained IEEE802.15.4 radio dev */ - FAR struct mac802154_maccb_s *cb; /* Head of a list of MAC callbacks */ + FAR struct ieee802154_radio_s *radio; /* Contained IEEE802.15.4 radio dev */ + FAR struct mac802154_maccb_s *cb; /* Head of a list of MAC callbacks */ FAR struct mac802154_radiocb_s radiocb; /* Interface to bind to radio */ sem_t exclsem; /* Support exclusive access */ @@ -244,9 +244,9 @@ struct ieee802154_privmac_s * condition where you need to have more than one command frame simultaneously */ - sem_t op_sem; /* Exclusive operations */ - enum mac802154_operation_e curr_op; /* The current overall operation */ - enum ieee802154_cmdid_e curr_cmd; /* Type of the current cmd */ + sem_t opsem; /* Exclusive operations */ + enum mac802154_operation_e curr_op; /* The current overall operation */ + enum ieee802154_cmdid_e curr_cmd; /* Type of the current cmd */ FAR struct ieee802154_txdesc_s *cmd_desc; /* TX descriptor for current cmd */ /* Pre-allocated notifications to be passed to the registered callback. These diff --git a/wireless/ieee802154/mac802154_poll.c b/wireless/ieee802154/mac802154_poll.c index 12a0f26726..ecc74fbd9b 100644 --- a/wireless/ieee802154/mac802154_poll.c +++ b/wireless/ieee802154/mac802154_poll.c @@ -98,7 +98,7 @@ int mac802154_req_poll(MACHANDLE mac, FAR struct ieee802154_poll_req_s *req) * needs access to the MAC in order to unlock it. */ - ret = mac802154_takesem(&priv->op_sem, true); + ret = mac802154_takesem(&priv->opsem, true); if (ret < 0) { return ret; @@ -109,7 +109,7 @@ int mac802154_req_poll(MACHANDLE mac, FAR struct ieee802154_poll_req_s *req) ret = mac802154_takesem(&priv->exclsem, true); if (ret < 0) { - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); return ret; } @@ -122,7 +122,7 @@ int mac802154_req_poll(MACHANDLE mac, FAR struct ieee802154_poll_req_s *req) if (ret < 0) { mac802154_givesem(&priv->exclsem); - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); return ret; } @@ -219,7 +219,7 @@ void mac802154_txdone_datareq_poll(FAR struct ieee802154_privmac_s *priv, priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Release the MAC, call the callback, get exclusive access again */ @@ -280,7 +280,7 @@ void mac802154_timeout_poll(FAR struct ieee802154_privmac_s *priv) /* We are no longer performing the association operation */ priv->curr_op = MAC802154_OP_NONE; priv->cmd_desc = NULL; - mac802154_givesem(&priv->op_sem); + mac802154_givesem(&priv->opsem); /* Release the MAC */