Skip to content

Commit 137199b

Browse files
andrei-menzopolkartben
authored andcommitted
drivers: ieee802154: fix mcxw ieee802154 driver
Fix mcxw_cca function. Remove not used / not implemented caps. Select counter as dependency. Signed-off-by: Andrei Menzopol <[email protected]>
1 parent 67af404 commit 137199b

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

drivers/ieee802154/Kconfig.mcxw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ menuconfig IEEE802154_MCXW
77
bool "NXP MCXW series IEEE 802.15.4 Driver"
88
default y
99
depends on DT_HAS_NXP_MCXW_IEEE802154_ENABLED
10-
depends on COUNTER
10+
select COUNTER
1111

1212
if IEEE802154_MCXW
1313

drivers/ieee802154/ieee802154_mcxw.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ static int mcxw_cca(const struct device *dev)
862862

863863
k_sem_take(&mcxw_radio->cca_wait, K_FOREVER);
864864

865-
return (mcxw_radio->tx_status == OT_ERROR_CHANNEL_ACCESS_FAILURE) ? -EBUSY : 0;
865+
return (mcxw_radio->tx_status > 0) ? -EBUSY : 0;
866866
}
867867

868868
static int mcxw_set_channel(const struct device *dev, uint16_t channel)
@@ -1195,9 +1195,6 @@ static int mcxw_configure(const struct device *dev, enum ieee802154_config_type
11951195
case IEEE802154_CONFIG_EVENT_HANDLER:
11961196
break;
11971197

1198-
case IEEE802154_OPENTHREAD_CONFIG_MAX_EXTRA_CCA_ATTEMPTS:
1199-
break;
1200-
12011198
default:
12021199
return -EINVAL;
12031200
}
@@ -1229,8 +1226,7 @@ static enum ieee802154_hw_caps mcxw_get_capabilities(const struct device *dev)
12291226
IEEE802154_HW_TX_RX_ACK | IEEE802154_HW_RX_TX_ACK | IEEE802154_HW_ENERGY_SCAN |
12301227
IEEE802154_HW_TXTIME | IEEE802154_HW_RXTIME | IEEE802154_HW_SLEEP_TO_TX |
12311228
IEEE802154_RX_ON_WHEN_IDLE | IEEE802154_HW_TX_SEC |
1232-
IEEE802154_OPENTHREAD_HW_MULTIPLE_CCA | IEEE802154_HW_SELECTIVE_TXCHANNEL |
1233-
IEEE802154_OPENTHREAD_HW_CST;
1229+
IEEE802154_HW_SELECTIVE_TXCHANNEL;
12341230
return caps;
12351231
}
12361232

0 commit comments

Comments
 (0)