summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210/p2p.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-04-26 14:41:38 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2016-04-26 14:57:45 +0300
commit321a000bfadd5535089a198b42d714a8bf8469b7 (patch)
treea9a1487f125f2adcace71b6d0b7cca8c6e8fa5eb /drivers/net/wireless/ath/wil6210/p2p.c
parent290206fa7e04ea4c1620aea2624e4d998bc27a0a (diff)
downloadlinux-321a000bfadd5535089a198b42d714a8bf8469b7.tar.xz
wil6210: support regular scan on P2P_DEVICE interface
P2P search can only run on the social channel (channel 2). When issuing a scan request on the P2P_DEVICE interface, driver ignored the channels argument and always performed a P2P search. Fix this by checking the channels argument, if it is not specified (meaning full scan) or if a non-social channel was specified, perform a regular scan and not a P2P search. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com> Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/p2p.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/p2p.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/p2p.c b/drivers/net/wireless/ath/wil6210/p2p.c
index 2c1b8958180e..1c9153894dca 100644
--- a/drivers/net/wireless/ath/wil6210/p2p.c
+++ b/drivers/net/wireless/ath/wil6210/p2p.c
@@ -22,6 +22,12 @@
#define P2P_SEARCH_DURATION_MS 500
#define P2P_DEFAULT_BI 100
+bool wil_p2p_is_social_scan(struct cfg80211_scan_request *request)
+{
+ return (request->n_channels == 1) &&
+ (request->channels[0]->hw_value == P2P_DMG_SOCIAL_CHANNEL);
+}
+
void wil_p2p_discovery_timer_fn(ulong x)
{
struct wil6210_priv *wil = (void *)x;