]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into drivers
authorJohannes Berg <johannes.berg@intel.com>
Wed, 21 Aug 2013 09:24:01 +0000 (11:24 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 23 Aug 2013 10:02:26 +0000 (12:02 +0200)
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: Luciano Coelho <luca@coelho.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/ti/wlcore/main.c
net/mac80211/main.c

index d1b19c38a907ddba1d5dfe4106e8caa2ce49315c..38995f90040dea19b50d9c46ea2d4c8b7dc1b41b 100644 (file)
@@ -5623,7 +5623,8 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
        wl->hw->wiphy->max_remain_on_channel_duration = 5000;
 
        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 */
        BUILD_BUG_ON(ARRAY_SIZE(wl1271_channels) +
index 25eb35b01938e9e91d5dfd75adcee8acb030036c..21d5d44444d04c82fc73c9fd6dee3f58ab56e512 100644 (file)
@@ -892,9 +892,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
        if (!local->ops->remain_on_channel)
                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 */
        if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)
                local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP;