iwlwifi: mvm: Add support for Energy based scan (EBS)
This patch enables Energy Based Scan (EBS) - intended to detect energy on 5 GHz band channels. Passive scan on this band takes up to 2.64 sec assuming 110mSec per-channel * 24 channels. EBS is designed to detect energy on channels with intensive Wifi activity as well as those where only beacons are transmitted. EBS completes sampling all channels within shortest beacon frame transmission time. Total EBS duration is about 100 msec (typical beacon interval). Detecting Wifi activity on 5 GHz band channels can significantly reduce scan duration thus saving time and power. EBS failure reported by FW disables EBS for current connection. It is re-enabled upon new connection attempt on any WLAN interface. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:

committed by
Emmanuel Grumbach

parent
ae397472f6
commit
e820c2da7e
@@ -570,9 +570,13 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
|
||||
/* scan status must be locked for proper checking */
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
IWL_DEBUG_SCAN(mvm, "Scheduled scan completed, status %s\n",
|
||||
IWL_DEBUG_SCAN(mvm,
|
||||
"Scheduled scan completed, status %s EBS status %s:%d\n",
|
||||
scan_notif->status == IWL_SCAN_OFFLOAD_COMPLETED ?
|
||||
"completed" : "aborted");
|
||||
"completed" : "aborted", scan_notif->ebs_status ==
|
||||
IWL_SCAN_EBS_SUCCESS ? "success" : "failed",
|
||||
scan_notif->ebs_status);
|
||||
|
||||
|
||||
/* only call mac80211 completion if the stop was initiated by FW */
|
||||
if (mvm->scan_status == IWL_MVM_SCAN_SCHED) {
|
||||
@@ -580,6 +584,8 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm,
|
||||
ieee80211_sched_scan_stopped(mvm->hw);
|
||||
}
|
||||
|
||||
mvm->last_ebs_successful = !scan_notif->ebs_status;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -916,6 +922,11 @@ int iwl_mvm_sched_scan_start(struct iwl_mvm *mvm,
|
||||
scan_req.flags |= cpu_to_le16(IWL_SCAN_OFFLOAD_FLAG_PASS_ALL);
|
||||
}
|
||||
|
||||
if (mvm->last_ebs_successful &&
|
||||
mvm->fw->ucode_capa.flags & IWL_UCODE_TLV_FLAGS_EBS_SUPPORT)
|
||||
scan_req.flags |=
|
||||
cpu_to_le16(IWL_SCAN_OFFLOAD_FLAG_EBS_ACCURATE_MODE);
|
||||
|
||||
return iwl_mvm_send_cmd_pdu(mvm, SCAN_OFFLOAD_REQUEST_CMD, CMD_SYNC,
|
||||
sizeof(scan_req), &scan_req);
|
||||
}
|
||||
|
Reference in New Issue
Block a user