History

mac80211: driver can remain on channel if not using chan_ctx

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.

Yan-Hsuan Chuang committed 6 years ago

Commit 8fa180b1 parent 306b79e1 file · +1 −1Browse files

Unified · Split

net/mac80211/main.c+1−1
@@ -576,7 +576,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, · 575 unmodified lines
576 WIPHY_FLAG_REPORTS_OBSS |576 WIPHY_FLAG_REPORTS_OBSS |
577 WIPHY_FLAG_OFFCHAN_TX;577 WIPHY_FLAG_OFFCHAN_TX;
578 578
579 if (ops->remain_on_channel)579 if (!use_chanctx || ops->remain_on_channel)
580 wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;580 wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
581 581
582 wiphy->features |= NL80211_FEATURE_SK_TX_STATUS |582 wiphy->features |= NL80211_FEATURE_SK_TX_STATUS |