Re: [PATCH v2] nl80211: Add info to scan results to support beacon report

2016-07-05 Thread Luca Coelho
On Tue, 2016-07-05 at 17:10 +0300, Luca Coelho wrote:
> From: Avraham Stern 
> 
> Beacon report radio measurement requires reporting observed BSSs
> on the channels specified in the beacon request. If the measurement
> mode is set to passive or active, it requires actually performing a
> scan (passive or active, accordingly), and reporting the time that
> the scan was started and the time each beacon/probe was received
> (both in terms of TSF of the BSS of the requesting AP). If the
> request mode is table, this information is optional.
> In addition, the radio measurement request specifies the channel
> dwell time for the measurement.
> 
> In order to use scan for beacon report when the mode is active or
> passive, add a parameter to scan request that specifies the
> channel dwell time, and add scan start time and beacon received time
> to scan results information.
> 
> Supporting beacon report is required for Multi Band Operation (MBO).
> 
> Signed-off-by: Assaf Krauss 
> Signed-off-by: David Spinadel 
> Signed-off-by: Avraham Stern 
> Signed-off-by: Luca Coelho 
> ---

Forgot to say, the non-mac80211 driver changes are just compiled-
tested.

--
Luca.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] nl80211: Add info to scan results to support beacon report

2016-07-05 Thread Luca Coelho
From: Avraham Stern 

Beacon report radio measurement requires reporting observed BSSs
on the channels specified in the beacon request. If the measurement
mode is set to passive or active, it requires actually performing a
scan (passive or active, accordingly), and reporting the time that
the scan was started and the time each beacon/probe was received
(both in terms of TSF of the BSS of the requesting AP). If the
request mode is table, this information is optional.
In addition, the radio measurement request specifies the channel
dwell time for the measurement.

In order to use scan for beacon report when the mode is active or
passive, add a parameter to scan request that specifies the
channel dwell time, and add scan start time and beacon received time
to scan results information.

Supporting beacon report is required for Multi Band Operation (MBO).

Signed-off-by: Assaf Krauss 
Signed-off-by: David Spinadel 
Signed-off-by: Avraham Stern 
Signed-off-by: Luca Coelho 
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c | 17 +++--
 drivers/net/wireless/ath/wil6210/cfg80211.c|  6 +++-
 drivers/net/wireless/ath/wil6210/main.c| 12 +--
 drivers/net/wireless/ath/wil6210/p2p.c |  6 +++-
 drivers/net/wireless/ath/wil6210/wmi.c |  8 +++--
 .../broadcom/brcm80211/brcmfmac/cfg80211.c |  6 +++-
 drivers/net/wireless/intersil/orinoco/scan.c   | 12 +--
 drivers/net/wireless/marvell/libertas/cfg.c| 11 --
 drivers/net/wireless/marvell/mwifiex/cmdevt.c  | 12 +--
 drivers/net/wireless/marvell/mwifiex/main.c|  6 +++-
 drivers/net/wireless/marvell/mwifiex/scan.c| 12 +--
 drivers/net/wireless/rndis_wlan.c  | 10 --
 drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c  | 11 --
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c  | 12 +--
 drivers/staging/wlan-ng/cfg80211.c |  5 ++-
 include/net/cfg80211.h | 40 ++---
 include/uapi/linux/nl80211.h   | 42 ++
 net/mac80211/scan.c|  9 +++--
 net/wireless/core.c|  4 +--
 net/wireless/core.h| 12 +++
 net/wireless/nl80211.c | 27 ++
 net/wireless/scan.c| 18 ++
 net/wireless/trace.h   | 33 -
 23 files changed, 279 insertions(+), 52 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c 
b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 4e11ba0..ef5b40e 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -859,7 +859,11 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl_vif 
*vif, u8 reason,
struct ath6kl *ar = vif->ar;
 
if (vif->scan_req) {
-   cfg80211_scan_done(vif->scan_req, true);
+   struct cfg80211_scan_info info = {
+   .aborted = true,
+   };
+
+   cfg80211_scan_done(vif->scan_req, &info);
vif->scan_req = NULL;
}
 
@@ -1069,6 +1073,9 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy,
 void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, bool aborted)
 {
struct ath6kl *ar = vif->ar;
+   struct cfg80211_scan_info info = {
+   .aborted = aborted,
+   };
int i;
 
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status%s\n", __func__,
@@ -1089,7 +1096,7 @@ void ath6kl_cfg80211_scan_complete_event(struct 
ath6kl_vif *vif, bool aborted)
}
 
 out:
-   cfg80211_scan_done(vif->scan_req, aborted);
+   cfg80211_scan_done(vif->scan_req, &info);
vif->scan_req = NULL;
 }
 
@@ -3614,7 +3621,11 @@ void ath6kl_cfg80211_vif_stop(struct ath6kl_vif *vif, 
bool wmi_ready)
}
 
if (vif->scan_req) {
-   cfg80211_scan_done(vif->scan_req, true);
+   struct cfg80211_scan_info info = {
+   .aborted = true,
+   };
+
+   cfg80211_scan_done(vif->scan_req, &info);
vif->scan_req = NULL;
}
 
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c 
b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 62bf933..f0e1175 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -1369,7 +1369,11 @@ static void wil_cfg80211_stop_p2p_device(struct wiphy 
*wiphy,
mutex_lock(&wil->mutex);
started = wil_p2p_stop_discovery(wil);
if (started && wil->scan_request) {
-   cfg80211_scan_done(wil->scan_request, 1);
+   struct cfg80211_scan_info info = {
+   .aborted = true,
+   };
+
+   cfg80211_scan_done(wil->scan_request, &info);
wil->scan_request = NULL;