iwlwifi: mvm: fix scan config command size
authorBeker Ayala <ayala.beker@intel.com>
Sun, 2 Jun 2019 10:55:44 +0000 (13:55 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 6 Sep 2019 12:31:12 +0000 (15:31 +0300)
Use the actual length of channels array and not the max capable length.

Signed-off-by: Beker Ayala <ayala.beker@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/scan.c

index c284e69..5999b4e 100644 (file)
@@ -1205,7 +1205,7 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
                cmd_size = sizeof(struct iwl_scan_config);
        else
                cmd_size = sizeof(struct iwl_scan_config_v1);
-       cmd_size += mvm->fw->ucode_capa.n_scan_channels;
+       cmd_size += num_channels;
 
        cfg = kzalloc(cmd_size, GFP_KERNEL);
        if (!cfg)