]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mwifiex: add bss mode TLV to extended scan command
authorAniket Nagarnaik <aniketn@marvell.com>
Thu, 16 Jul 2015 15:05:21 +0000 (08:05 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Jul 2015 15:09:47 +0000 (18:09 +0300)
We are setting BSS mode as ANY so that firmware will provide
all types of scan entries.

Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwifiex/fw.h
drivers/net/wireless/mwifiex/scan.c

index 98269bfd2b31e083ce78907ebaf11a7a0ddf087e..cff38ad129aad93fa8f63c7a8636afc80b51eb96 100644 (file)
@@ -179,6 +179,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
 #define TLV_TYPE_CHANNEL_STATS      (PROPRIETARY_TLV_BASE_ID + 198)
 #define TLV_BTCOEX_WL_AGGR_WINSIZE  (PROPRIETARY_TLV_BASE_ID + 202)
 #define TLV_BTCOEX_WL_SCANTIME      (PROPRIETARY_TLV_BASE_ID + 203)
+#define TLV_TYPE_BSS_MODE           (PROPRIETARY_TLV_BASE_ID + 206)
 
 #define MWIFIEX_TX_DATA_BUF_SIZE_2K        2048
 
@@ -1434,6 +1435,11 @@ struct host_cmd_ds_802_11_scan_ext {
        u8    tlv_buffer[1];
 } __packed;
 
+struct mwifiex_ie_types_bss_mode {
+       struct mwifiex_ie_types_header  header;
+       u8 bss_mode;
+} __packed;
+
 struct mwifiex_ie_types_bss_scan_rsp {
        struct mwifiex_ie_types_header header;
        u8 bssid[ETH_ALEN];
index baf9715ddc1034bc58e6ec4cea367caa670b571c..ef2bef8399c2424873fd0ae4b5b0fee9c5e358e4 100644 (file)
@@ -823,6 +823,7 @@ mwifiex_config_scan(struct mwifiex_private *priv,
        int i;
        u8 ssid_filter;
        struct mwifiex_ie_types_htcap *ht_cap;
+       struct mwifiex_ie_types_bss_mode *bss_mode;
 
        /* The tlv_buf_len is calculated for each scan command.  The TLVs added
           in this routine will be preserved since the routine that sends the
@@ -968,6 +969,15 @@ mwifiex_config_scan(struct mwifiex_private *priv,
        else
                *max_chan_per_scan = MWIFIEX_DEF_CHANNELS_PER_SCAN_CMD;
 
+       if (adapter->ext_scan) {
+               bss_mode = (struct mwifiex_ie_types_bss_mode *)tlv_pos;
+               bss_mode->header.type = cpu_to_le16(TLV_TYPE_BSS_MODE);
+               bss_mode->header.len = cpu_to_le16(sizeof(bss_mode->bss_mode));
+               bss_mode->bss_mode = scan_cfg_out->bss_mode;
+               tlv_pos += sizeof(bss_mode->header) +
+                          le16_to_cpu(bss_mode->header.len);
+       }
+
        /* If the input config or adapter has the number of Probes set,
           add tlv */
        if (num_probes) {