mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
ieee802154: Fixes setting devmode logic
This commit is contained in:
@@ -1545,7 +1545,6 @@ static void mac802154_sfevent(FAR const struct ieee802154_radiocb_s *radiocb,
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
mac802154_unlock(priv)
|
||||
}
|
||||
|
||||
|
||||
@@ -824,7 +824,7 @@ static inline void mac802154_setdevmode(FAR struct ieee802154_privmac_s *priv,
|
||||
enum ieee802154_devmode_e mode)
|
||||
{
|
||||
priv->devmode = mode;
|
||||
priv->radio->setattr(priv->radio, IEEE802154_ATTR_MAC_RX_ON_WHEN_IDLE,
|
||||
priv->radio->setattr(priv->radio, IEEE802154_ATTR_MAC_DEVMODE,
|
||||
(FAR const union ieee802154_attr_u *)&mode);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,11 +147,11 @@ int mac802154_req_start(MACHANDLE mac, FAR struct ieee802154_start_req_s *req)
|
||||
|
||||
if (req->pancoord)
|
||||
{
|
||||
priv->devmode = IEEE802154_DEVMODE_PANCOORD;
|
||||
mac802154_setdevmode(priv, IEEE802154_DEVMODE_PANCOORD);
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->devmode = IEEE802154_DEVMODE_COORD;
|
||||
mac802154_setdevmode(priv, IEEE802154_DEVMODE_COORD);
|
||||
}
|
||||
|
||||
priv->sfspec.pancoord = req->pancoord;
|
||||
|
||||
Reference in New Issue
Block a user