wlcore: enable sched scan while connected
authorVictor Goldenshtein <victorg@ti.com>
Thu, 14 Jun 2012 06:47:40 +0000 (09:47 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 10 Jul 2012 16:10:12 +0000 (12:10 -0400)
New wl12xx firmware supports scheduled scans also while connected.
Stop blocking sched scan requests when connected and add a quirk to
block in hardware that don't support it (currently wl18xx doesn't).

This requires FW version 6/7.3.10.2.112 for single-role and
6/7.5.6.0.25 for multi-role.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wl18xx/main.c
drivers/net/wireless/ti/wlcore/scan.c
drivers/net/wireless/ti/wlcore/wlcore.h

index 5e583be8f67463c126b5f9c5969eab3b5c36e806..16847eccfe807343b45057fb738d1d43eac52a46 100644 (file)
@@ -609,6 +609,7 @@ static int wl18xx_identify_chip(struct wl1271 *wl)
                wl->quirks |= WLCORE_QUIRK_NO_ELP |
                              WLCORE_QUIRK_RX_BLOCKSIZE_ALIGN |
                              WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN |
+                             WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN |
                              WLCORE_QUIRK_TX_PAD_LAST_FRAME;
                break;
        case CHIP_ID_185x_PG10:
index d9daed53ceb72c7d6712fdfdf6cc5b732963ae1e..5702d99d8c973fa318b86561e490a870db709df3 100644 (file)
@@ -766,7 +766,8 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif)
        if (wlvif->bss_type != BSS_TYPE_STA_BSS)
                return -EOPNOTSUPP;
 
-       if (test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
+       if ((wl->quirks & WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN) &&
+           test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
                return -EBUSY;
 
        start = kzalloc(sizeof(*start), GFP_KERNEL);
index e796974df59bc16729e81309d45cb99d4c00d260..216bdb0f2756ea4d7899a9df60eb1d1687fd4f53 100644 (file)
@@ -437,6 +437,9 @@ wlcore_set_ht_cap(struct wl1271 *wl, enum ieee80211_band band,
 /* extra header space is required for TKIP */
 #define WLCORE_QUIRK_TKIP_HEADER_SPACE         BIT(8)
 
+/* Some firmwares not support sched scans while connected */
+#define WLCORE_QUIRK_NO_SCHED_SCAN_WHILE_CONN  BIT(9)
+
 /* TODO: move to the lower drivers when all usages are abstracted */
 #define CHIP_ID_1271_PG10              (0x4030101)
 #define CHIP_ID_1271_PG20              (0x4030111)