aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/wmi.c
diff options
context:
space:
mode:
authorLior David <qca_liord@qca.qualcomm.com>2016-03-01 12:18:13 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2016-03-07 04:43:20 -0500
commit4332cac17b5c0cb80d8b99fda33a0faad3238b0e (patch)
tree15e1bccbb368f770b360b4a1653c811a1dca65a2 /drivers/net/wireless/ath/wil6210/wmi.c
parente6d68341e7286386451adf14cebb635a52b0effe (diff)
wil6210: P2P_DEVICE virtual interface support
Added support for the P2P_DEVICE virtual interface. This interface is intended for P2P management operations such as discovery and GO negotiation. Normally it is implemented by drivers to allow a separate interface for P2P management with its own MAC address, but for 11ad drivers it is needed to support P2P search, since it cannot otherwise be separated from normal scan. Since we only support a single interface/MAC address, we can't easily separate between primary and P2P_DEVICE interfaces. For example when a management packet arrives we can't tell for which interface it is intended. To work around this, we store a pointer to the interface where the last "radio operation" was triggered such as scan or remain on channel, and we forward management packets and scan results to this interface. 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/wmi.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/wmi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 4a1cdd256ef2..f0761758fac7 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -380,8 +380,10 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len)
380 wil_err(wil, "cfg80211_inform_bss_frame() failed\n"); 380 wil_err(wil, "cfg80211_inform_bss_frame() failed\n");
381 } 381 }
382 } else { 382 } else {
383 cfg80211_rx_mgmt(wil->wdev, freq, signal, 383 mutex_lock(&wil->p2p_wdev_mutex);
384 cfg80211_rx_mgmt(wil->radio_wdev, freq, signal,
384 (void *)rx_mgmt_frame, d_len, 0); 385 (void *)rx_mgmt_frame, d_len, 0);
386 mutex_unlock(&wil->p2p_wdev_mutex);
385 } 387 }
386} 388}
387 389
@@ -408,7 +410,10 @@ static void wmi_evt_scan_complete(struct wil6210_priv *wil, int id,
408 wil->scan_request, aborted); 410 wil->scan_request, aborted);
409 411
410 del_timer_sync(&wil->scan_timer); 412 del_timer_sync(&wil->scan_timer);
413 mutex_lock(&wil->p2p_wdev_mutex);
411 cfg80211_scan_done(wil->scan_request, aborted); 414 cfg80211_scan_done(wil->scan_request, aborted);
415 wil->radio_wdev = wil->wdev;
416 mutex_unlock(&wil->p2p_wdev_mutex);
412 wil->scan_request = NULL; 417 wil->scan_request = NULL;
413 } else { 418 } else {
414 wil_err(wil, "SCAN_COMPLETE while not scanning\n"); 419 wil_err(wil, "SCAN_COMPLETE while not scanning\n");