mac80211: Add support for beacon report radio measurement
Add the following to support beacon report radio measurement with the measurement mode field set to passive or active: 1. Propagate the required scan duration to the device 2. Report the scan start time (in terms of TSF) 3. Report each BSS's detection time (also in terms of TSF) TSF times refer to the BSS that the interface that requested the scan is connected to. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Avraham Stern <avraham.stern@intel.com> [changed ath9k/10k, at76c59x-usb, iwlegacy, wl1251 and wlcore to match the new API] Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
1d76250bd3
commit
7947d3e075
@@ -1305,10 +1305,14 @@ il_send_scan_abort(struct il_priv *il)
|
||||
static void
|
||||
il_complete_scan(struct il_priv *il, bool aborted)
|
||||
{
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = aborted,
|
||||
};
|
||||
|
||||
/* check if scan was requested from mac80211 */
|
||||
if (il->scan_request) {
|
||||
D_SCAN("Complete scan in mac80211\n");
|
||||
ieee80211_scan_completed(il->hw, aborted);
|
||||
ieee80211_scan_completed(il->hw, &info);
|
||||
}
|
||||
|
||||
il->scan_vif = NULL;
|
||||
|
@@ -94,10 +94,14 @@ static int iwl_send_scan_abort(struct iwl_priv *priv)
|
||||
|
||||
static void iwl_complete_scan(struct iwl_priv *priv, bool aborted)
|
||||
{
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = aborted,
|
||||
};
|
||||
|
||||
/* check if scan was requested from mac80211 */
|
||||
if (priv->scan_request) {
|
||||
IWL_DEBUG_SCAN(priv, "Complete scan in mac80211\n");
|
||||
ieee80211_scan_completed(priv->hw, aborted);
|
||||
ieee80211_scan_completed(priv->hw, &info);
|
||||
}
|
||||
|
||||
priv->scan_type = IWL_SCAN_NORMAL;
|
||||
|
@@ -391,13 +391,16 @@ void iwl_mvm_rx_lmac_scan_complete_notif(struct iwl_mvm *mvm,
|
||||
ieee80211_sched_scan_stopped(mvm->hw);
|
||||
mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED;
|
||||
} else if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) {
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = aborted,
|
||||
};
|
||||
|
||||
IWL_DEBUG_SCAN(mvm, "Regular scan %s, EBS status %s (FW)\n",
|
||||
aborted ? "aborted" : "completed",
|
||||
iwl_mvm_ebs_status_str(scan_notif->ebs_status));
|
||||
|
||||
mvm->scan_status &= ~IWL_MVM_SCAN_REGULAR;
|
||||
ieee80211_scan_completed(mvm->hw,
|
||||
scan_notif->status == IWL_SCAN_OFFLOAD_ABORTED);
|
||||
ieee80211_scan_completed(mvm->hw, &info);
|
||||
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
|
||||
del_timer(&mvm->scan_timer);
|
||||
} else {
|
||||
@@ -1430,7 +1433,11 @@ void iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm,
|
||||
|
||||
/* if the scan is already stopping, we don't need to notify mac80211 */
|
||||
if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_REGULAR) {
|
||||
ieee80211_scan_completed(mvm->hw, aborted);
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = aborted,
|
||||
};
|
||||
|
||||
ieee80211_scan_completed(mvm->hw, &info);
|
||||
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
|
||||
del_timer(&mvm->scan_timer);
|
||||
} else if (mvm->scan_uid_status[uid] == IWL_MVM_SCAN_SCHED) {
|
||||
@@ -1564,7 +1571,11 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
|
||||
|
||||
uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_REGULAR);
|
||||
if (uid >= 0) {
|
||||
ieee80211_scan_completed(mvm->hw, true);
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = true,
|
||||
};
|
||||
|
||||
ieee80211_scan_completed(mvm->hw, &info);
|
||||
mvm->scan_uid_status[uid] = 0;
|
||||
}
|
||||
uid = iwl_mvm_scan_uid_by_status(mvm, IWL_MVM_SCAN_SCHED);
|
||||
@@ -1585,8 +1596,13 @@ void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
|
||||
mvm->scan_uid_status[i] = 0;
|
||||
}
|
||||
} else {
|
||||
if (mvm->scan_status & IWL_MVM_SCAN_REGULAR)
|
||||
ieee80211_scan_completed(mvm->hw, true);
|
||||
if (mvm->scan_status & IWL_MVM_SCAN_REGULAR) {
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = true,
|
||||
};
|
||||
|
||||
ieee80211_scan_completed(mvm->hw, &info);
|
||||
}
|
||||
|
||||
/* Sched scan will be restarted by mac80211 in
|
||||
* restart_hw, so do not report if FW is about to be
|
||||
@@ -1629,8 +1645,13 @@ out:
|
||||
*/
|
||||
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
|
||||
del_timer(&mvm->scan_timer);
|
||||
if (notify)
|
||||
ieee80211_scan_completed(mvm->hw, true);
|
||||
if (notify) {
|
||||
struct cfg80211_scan_info info = {
|
||||
.aborted = true,
|
||||
};
|
||||
|
||||
ieee80211_scan_completed(mvm->hw, &info);
|
||||
}
|
||||
} else if (notify) {
|
||||
ieee80211_sched_scan_stopped(mvm->hw);
|
||||
mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_DISABLED;
|
||||
|
Reference in New Issue
Block a user