Commit 83c415fd authored by Luciano Coelho's avatar Luciano Coelho Committed by Emmanuel Grumbach

iwlwifi: mvm: always use iwl_mvm_scan_size to calculate the scan size

We have a function (iwl_mvm_scan_size()) that can calculate the scan
size for both UMAC and LMAC scans.  Use that function instead of
calculating manually for LMAC scan and sched scan.
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 9954b37c
...@@ -808,10 +808,7 @@ static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ...@@ -808,10 +808,7 @@ static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
{ {
struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = {
.id = SCAN_OFFLOAD_REQUEST_CMD, .id = SCAN_OFFLOAD_REQUEST_CMD,
.len = { sizeof(struct iwl_scan_req_lmac) + .len = { iwl_mvm_scan_size(mvm), },
sizeof(struct iwl_scan_channel_cfg_lmac) *
mvm->fw->ucode_capa.n_scan_channels +
sizeof(struct iwl_scan_probe_req), },
.data = { mvm->scan_cmd, }, .data = { mvm->scan_cmd, },
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
}; };
...@@ -925,10 +922,7 @@ static int iwl_mvm_sched_scan_lmac(struct iwl_mvm *mvm, ...@@ -925,10 +922,7 @@ static int iwl_mvm_sched_scan_lmac(struct iwl_mvm *mvm,
{ {
struct iwl_host_cmd hcmd = { struct iwl_host_cmd hcmd = {
.id = SCAN_OFFLOAD_REQUEST_CMD, .id = SCAN_OFFLOAD_REQUEST_CMD,
.len = { sizeof(struct iwl_scan_req_lmac) + .len = { iwl_mvm_scan_size(mvm), },
sizeof(struct iwl_scan_channel_cfg_lmac) *
mvm->fw->ucode_capa.n_scan_channels +
sizeof(struct iwl_scan_probe_req), },
.data = { mvm->scan_cmd, }, .data = { mvm->scan_cmd, },
.dataflags = { IWL_HCMD_DFL_NOCOPY, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment