diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2015-03-30 15:09:24 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-04-29 13:12:49 +0300 |
commit | 83c415fd89486ab2992f728337c812b7264f7459 (patch) | |
tree | 5d1e6a83e9c5a97ee40a7385397f8430715893b0 | |
parent | 9954b37c4ab362ea015f2ee674bb46eca09fa559 (diff) | |
download | linux-83c415fd89486ab2992f728337c812b7264f7459.tar.xz |
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: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index e39f2d12965f..cbed9f31758c 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -808,10 +808,7 @@ static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif, { struct iwl_host_cmd hcmd = { .id = SCAN_OFFLOAD_REQUEST_CMD, - .len = { sizeof(struct iwl_scan_req_lmac) + - sizeof(struct iwl_scan_channel_cfg_lmac) * - mvm->fw->ucode_capa.n_scan_channels + - sizeof(struct iwl_scan_probe_req), }, + .len = { iwl_mvm_scan_size(mvm), }, .data = { mvm->scan_cmd, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, }, }; @@ -925,10 +922,7 @@ static int iwl_mvm_sched_scan_lmac(struct iwl_mvm *mvm, { struct iwl_host_cmd hcmd = { .id = SCAN_OFFLOAD_REQUEST_CMD, - .len = { sizeof(struct iwl_scan_req_lmac) + - sizeof(struct iwl_scan_channel_cfg_lmac) * - mvm->fw->ucode_capa.n_scan_channels + - sizeof(struct iwl_scan_probe_req), }, + .len = { iwl_mvm_scan_size(mvm), }, .data = { mvm->scan_cmd, }, .dataflags = { IWL_HCMD_DFL_NOCOPY, }, }; |