Skip to contentSkip to conversation

mac80211: driver can remain on channel if not using chan_ctx

PATCH New [email protected] 1 participant 1 message Mar 12, 2020 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: driver can remain on channel if not using chan_ctx

From: Yan-Hsuan Chuang <[email protected]>

Some of the drivers are not using channel context, but let the stack to control/switch channels instead. For such cases, driver can still remain on channel because the mac80211 stack actually supports it.

The stack will check if the driver is using chan_ctx and has ops->remain_on_channel been hooked. Otherwise it will start its ROC work to remain on channel. So, even if the driver is not using chan_ctx, the driver is still capable of doing remain on channel.

---
 net/mac80211/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/main.c +1 -1
index 944e86da5c65..fcb0e6e6b4dd 100644
@@ -576,7 +576,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
 			WIPHY_FLAG_REPORTS_OBSS |
 			WIPHY_FLAG_OFFCHAN_TX;
 
-	if (ops->remain_on_channel)
+	if (!use_chanctx || ops->remain_on_channel)
 		wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
 
 	wiphy->features |= NL80211_FEATURE_SK_TX_STATUS |
Signature · 1 line
2.17.1