Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d76250b authored by Avraham Stern's avatar Avraham Stern Committed by Johannes Berg
Browse files

nl80211: support beacon report scanning



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: default avatarAssaf Krauss <assaf.krauss@intel.com>
Signed-off-by: default avatarDavid Spinadel <david.spinadel@intel.com>
Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent f1724b02
Loading
Loading
Loading
Loading
+14 −3
Original line number Diff line number Diff line
@@ -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;
	}

+5 −1
Original line number Diff line number Diff line
@@ -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;
		wil->radio_wdev = wil->wdev;
	}
+10 −2
Original line number Diff line number Diff line
@@ -850,10 +850,14 @@ int wil_reset(struct wil6210_priv *wil, bool load_fw)
	mutex_unlock(&wil->wmi_mutex);

	if (wil->scan_request) {
		struct cfg80211_scan_info info = {
			.aborted = true,
		};

		wil_dbg_misc(wil, "Abort scan_request 0x%p\n",
			     wil->scan_request);
		del_timer_sync(&wil->scan_timer);
		cfg80211_scan_done(wil->scan_request, true);
		cfg80211_scan_done(wil->scan_request, &info);
		wil->scan_request = NULL;
	}

@@ -1049,10 +1053,14 @@ int __wil_down(struct wil6210_priv *wil)
	(void)wil_p2p_stop_discovery(wil);

	if (wil->scan_request) {
		struct cfg80211_scan_info info = {
			.aborted = true,
		};

		wil_dbg_misc(wil, "Abort scan_request 0x%p\n",
			     wil->scan_request);
		del_timer_sync(&wil->scan_timer);
		cfg80211_scan_done(wil->scan_request, true);
		cfg80211_scan_done(wil->scan_request, &info);
		wil->scan_request = NULL;
	}

+5 −1
Original line number Diff line number Diff line
@@ -252,8 +252,12 @@ void wil_p2p_search_expired(struct work_struct *work)
	mutex_unlock(&wil->mutex);

	if (started) {
		struct cfg80211_scan_info info = {
			.aborted = false,
		};

		mutex_lock(&wil->p2p_wdev_mutex);
		cfg80211_scan_done(wil->scan_request, 0);
		cfg80211_scan_done(wil->scan_request, &info);
		wil->scan_request = NULL;
		wil->radio_wdev = wil->wdev;
		mutex_unlock(&wil->p2p_wdev_mutex);
+5 −3
Original line number Diff line number Diff line
@@ -426,15 +426,17 @@ static void wmi_evt_scan_complete(struct wil6210_priv *wil, int id,
{
	if (wil->scan_request) {
		struct wmi_scan_complete_event *data = d;
		bool aborted = (data->status != WMI_SCAN_SUCCESS);
		struct cfg80211_scan_info info = {
			.aborted = (data->status != WMI_SCAN_SUCCESS),
		};

		wil_dbg_wmi(wil, "SCAN_COMPLETE(0x%08x)\n", data->status);
		wil_dbg_misc(wil, "Complete scan_request 0x%p aborted %d\n",
			     wil->scan_request, aborted);
			     wil->scan_request, info.aborted);

		del_timer_sync(&wil->scan_timer);
		mutex_lock(&wil->p2p_wdev_mutex);
		cfg80211_scan_done(wil->scan_request, aborted);
		cfg80211_scan_done(wil->scan_request, &info);
		wil->radio_wdev = wil->wdev;
		mutex_unlock(&wil->p2p_wdev_mutex);
		wil->scan_request = NULL;
Loading