[PATCH wireless v2 2/4] wifi: nxpwifi: stop AP TX after preparing channel switch
From: Zhao Li
Date: Wed Nov 18 2026 - 13:35:52 EST
A channel switch with block_tx set disables the carrier and TX queues
before the CSA management IEs are installed. If installing them fails,
the request is rejected but TX stays stopped.
Stop TX only after the IEs are installed.
Found by code review. Compile-tested with W=1.
Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Zhao Li <enderaoelyther@xxxxxxxxx>
---
No new W=1, sparse or smatch warnings.
AI assistance was used.
drivers/net/wireless/nxp/nxpwifi/cfg80211.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
index 5b8fb37c3f3d..a9cee7e602f0 100644
--- a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
+++ b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
@@ -3117,12 +3117,6 @@ nxpwifi_cfg80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
&priv->dfs_chandef))
return -EINVAL;
- if (params->block_tx) {
- netif_carrier_off(priv->netdev);
- nxpwifi_stop_net_dev_queue(priv->netdev, priv->adapter);
- priv->uap_stop_tx = true;
- }
-
ret = nxpwifi_del_mgmt_ies(priv);
if (ret)
nxpwifi_dbg(priv->adapter, ERROR,
@@ -3139,6 +3133,12 @@ nxpwifi_cfg80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
memcpy(&priv->ap_update_info.beacon, ¶ms->beacon_after,
sizeof(priv->ap_update_info.beacon));
+ if (params->block_tx) {
+ netif_carrier_off(priv->netdev);
+ nxpwifi_stop_net_dev_queue(priv->netdev, priv->adapter);
+ priv->uap_stop_tx = true;
+ }
+
chsw_msec = max(params->count * priv->bss_cfg.beacon_period, 100);
nxpwifi_queue_delayed_wiphy_work(priv->adapter,
--
2.56.1