wil6210: add support for discovery mode during scan

Add support for discovery mode during scan. When discovery mode
is active, station transmits special beacons while scanning.
This can optimize the scan mainly when there is only one AP/PCP
around.
Discovery mode is implicitly used by firmware during P2P search.
Since there is currently no use case where user space has a
reason to directly control discovery mode, we expose it only
through a debugfs flag.
Also fix name confusion in the wmi_scan_type enumeration.
The type previously called WMI_LONG_SCAN is actually
WMI_ACTIVE_SCAN.

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>
Bu işleme şunda yer alıyor:
Lior David
2016-03-01 19:18:08 +02:00
işlemeyi yapan: Kalle Valo
ebeveyn 5852742148
işleme 74997a53d2
4 değiştirilmiş dosya ile 17 ekleme ve 3 silme

Dosyayı Görüntüle

@@ -319,6 +319,7 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
mod_timer(&wil->scan_timer, jiffies + WIL6210_SCAN_TO);
memset(&cmd, 0, sizeof(cmd));
cmd.cmd.scan_type = WMI_ACTIVE_SCAN;
cmd.cmd.num_channels = 0;
n = min(request->n_channels, 4U);
for (i = 0; i < n; i++) {
@@ -346,6 +347,11 @@ static int wil_cfg80211_scan(struct wiphy *wiphy,
if (rc)
goto out;
if (wil->discovery_mode && cmd.cmd.scan_type == WMI_ACTIVE_SCAN) {
cmd.cmd.discovery_mode = 1;
wil_dbg_misc(wil, "active scan with discovery_mode=1\n");
}
rc = wmi_send(wil, WMI_START_SCAN_CMDID, &cmd, sizeof(cmd.cmd) +
cmd.cmd.num_channels * sizeof(cmd.cmd.channel_list[0]));