diff options
author | David Spinadel <david.spinadel@intel.com> | 2014-06-02 09:59:49 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-06-24 15:04:14 +0300 |
commit | 0564679bb6e750dc6d441f6d67e95c0590fa3f80 (patch) | |
tree | 100777418fc1c9b9c0781f988231a3a80e4df48e /drivers/net/wireless/iwlwifi/mvm/scan.c | |
parent | 14ca0f389c11f9e845a3e10a834c6412af279ccd (diff) | |
download | op-kernel-dev-0564679bb6e750dc6d441f6d67e95c0590fa3f80.zip op-kernel-dev-0564679bb6e750dc6d441f6d67e95c0590fa3f80.tar.gz |
iwlwifi: mvm: use ksize to memset scan_command
Use ksize to get scan command size instead of calculating it, to
avoid nasty bugs.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 4b6c7d4..df8f3eb 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -325,9 +325,7 @@ int iwl_mvm_scan_request(struct iwl_mvm *mvm, IWL_DEBUG_SCAN(mvm, "Handling mac80211 scan request\n"); mvm->scan_status = IWL_MVM_SCAN_OS; - memset(cmd, 0, sizeof(struct iwl_scan_cmd) + - mvm->fw->ucode_capa.max_probe_length + - (MAX_NUM_SCAN_CHANNELS * sizeof(struct iwl_scan_channel))); + memset(cmd, 0, ksize(cmd)); cmd->channel_count = (u8)req->n_channels; cmd->quiet_time = cpu_to_le16(IWL_ACTIVE_QUIET_TIME); |