mwifiex: use maximum ssid length as 0xfe for p2p
authorAniket Nagarnaik <aniketn@marvell.com>
Thu, 16 Jul 2015 15:05:22 +0000 (08:05 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 21 Jul 2015 15:09:49 +0000 (18:09 +0300)
0xfe is basically a magic number used to ask firmware match
provided string in a SSID. In this case, firmware will
return scan results containing"DIRECT-" string.

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/scan.c

index ef2bef8399c2424873fd0ae4b5b0fee9c5e358e4..ef8da8ebcbab4ee5af196c4ec854b178c3b81322 100644 (file)
@@ -909,6 +909,10 @@ mwifiex_config_scan(struct mwifiex_private *priv,
                                wildcard_ssid_tlv->max_ssid_length =
                                                        IEEE80211_MAX_SSID_LEN;
 
+                       if (!memcmp(user_scan_in->ssid_list[i].ssid,
+                                   "DIRECT-", 7))
+                               wildcard_ssid_tlv->max_ssid_length = 0xfe;
+
                        memcpy(wildcard_ssid_tlv->ssid,
                               user_scan_in->ssid_list[i].ssid, ssid_len);