]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iwlwifi: mvm: set status before calling iwl_mvm_send_cmd_status()
authorLuca Coelho <luciano.coelho@intel.com>
Sat, 2 Sep 2017 08:25:40 +0000 (11:25 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 8 Sep 2017 08:50:30 +0000 (11:50 +0300)
We always must set the status to what we consider success before
calling iwl_mvm_send_cmd_status() (also iwl_mvm_send_cmd_pdu_status()
which calls it).  Fix a few places where initialization is missing.

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

index 50983615dce673c6a96365a34ddc3fe9ae3cfa70..774122fed454fbb4d1d109a18a53634baf6f83e2 100644 (file)
@@ -555,7 +555,7 @@ static int iwl_mvm_lmac_scan_abort(struct iwl_mvm *mvm)
        struct iwl_host_cmd cmd = {
                .id = SCAN_OFFLOAD_ABORT_CMD,
        };
-       u32 status;
+       u32 status = CAN_ABORT_STATUS;
 
        ret = iwl_mvm_send_cmd_status(mvm, &cmd, &status);
        if (ret)
index 8876c2abc440ea9fd5e698f1ac6cc45e0d05848f..4d907f60bce9f22ba0acf6169023aacd79f9bb75 100644 (file)
@@ -529,6 +529,7 @@ int iwl_mvm_ctdp_command(struct iwl_mvm *mvm, u32 op, u32 state)
 
        lockdep_assert_held(&mvm->mutex);
 
+       status = 0;
        ret = iwl_mvm_send_cmd_pdu_status(mvm, WIDE_ID(PHY_OPS_GROUP,
                                                       CTDP_CONFIG_CMD),
                                          sizeof(cmd), &cmd, &status);