iwlwifi: mvm: rs: add sanity check when sending LQ command
authorGregory Greenman <gregory.greenman@intel.com>
Thu, 30 Nov 2017 03:16:16 +0000 (05:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Tue, 5 Dec 2017 19:01:42 +0000 (21:01 +0200)
When sending LQ command, verify the rate scaling is not in firmware.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/utils.c

index 280edf8..b7fc1b9 100644 (file)
@@ -912,7 +912,9 @@ int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool init)
                .data = { lq, },
        };
 
-       if (WARN_ON(lq->sta_id == IWL_MVM_INVALID_STA))
+       if (WARN_ON(lq->sta_id == IWL_MVM_INVALID_STA ||
+                   fw_has_capa(&mvm->fw->ucode_capa,
+                               IWL_UCODE_TLV_CAPA_TLC_OFFLOAD)))
                return -EINVAL;
 
        return iwl_mvm_send_cmd(mvm, &cmd);