提交 1fb90260 编写于 作者: J Johannes Berg

mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into drivers

mac80211 currently sets WIPHY_FLAG_SUPPORTS_SCHED_SCAN based on whether
the start_sched_scan operation is supported or not, but that will not
be correct for all drivers, we're adding scheduled scan to the iwlmvm
driver but it depends on firmware support.

Therefore, move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into the drivers
so that they can control it regardless of implementing the operation.

This currently only affects the TI drivers since they're the only ones
implementing scheduled scan (in a mac80211 driver.)
Acked-by: NLuciano Coelho <luca@coelho.fi>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 e133fae2
...@@ -5623,7 +5623,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) ...@@ -5623,7 +5623,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
wl->hw->wiphy->max_remain_on_channel_duration = 5000; wl->hw->wiphy->max_remain_on_channel_duration = 5000;
wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD | wl->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD |
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
/* make sure all our channels fit in the scanned_ch bitmask */ /* make sure all our channels fit in the scanned_ch bitmask */
BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) + BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
......
...@@ -892,9 +892,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -892,9 +892,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (!local->ops->remain_on_channel) if (!local->ops->remain_on_channel)
local->hw.wiphy->max_remain_on_channel_duration = 5000; local->hw.wiphy->max_remain_on_channel_duration = 5000;
if (local->ops->sched_scan_start)
local->hw.wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
/* mac80211 based drivers don't support internal TDLS setup */ /* mac80211 based drivers don't support internal TDLS setup */
if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)
local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP; local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册