diff options
author | Avraham Stern <avraham.stern@intel.com> | 2018-05-03 08:02:16 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2018-08-31 04:38:32 -0400 |
commit | 3baf7528d6f832b28622d1ddadd2e47f6c2b5e08 (patch) | |
tree | 3f16dd258294a7105376024ef9865f31f9db8f61 /drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |
parent | 1a19c139be18ed4d6d681049cc48586fae070120 (diff) |
iwlwifi: mvm: Send LQ command as async when necessary
The parameter that indicated whether the LQ command should be sent
as sync or async was removed, causing the LQ command to be sent as
sync from interrupt context (e.g. from the RX path). This resulted
in a kernel warning: "scheduling while atomic" and failing to send
the LQ command, which ultimately leads to a queue hang.
Fix it by adding back the required parameter to send the command as
sync only when it is allowed.
Fixes: d94c5a820d10 ("iwlwifi: mvm: open BA session only when sta is authorized")
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index b002a7afb5f5..6a5349401aa9 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -900,20 +900,19 @@ int iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue, | |||
900 | 900 | ||
901 | /** | 901 | /** |
902 | * iwl_mvm_send_lq_cmd() - Send link quality command | 902 | * iwl_mvm_send_lq_cmd() - Send link quality command |
903 | * @init: This command is sent as part of station initialization right | 903 | * @sync: This command can be sent synchronously. |
904 | * after station has been added. | ||
905 | * | 904 | * |
906 | * The link quality command is sent as the last step of station creation. | 905 | * The link quality command is sent as the last step of station creation. |
907 | * This is the special case in which init is set and we call a callback in | 906 | * This is the special case in which init is set and we call a callback in |
908 | * this case to clear the state indicating that station creation is in | 907 | * this case to clear the state indicating that station creation is in |
909 | * progress. | 908 | * progress. |
910 | */ | 909 | */ |
911 | int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool init) | 910 | int iwl_mvm_send_lq_cmd(struct iwl_mvm *mvm, struct iwl_lq_cmd *lq, bool sync) |
912 | { | 911 | { |
913 | struct iwl_host_cmd cmd = { | 912 | struct iwl_host_cmd cmd = { |
914 | .id = LQ_CMD, | 913 | .id = LQ_CMD, |
915 | .len = { sizeof(struct iwl_lq_cmd), }, | 914 | .len = { sizeof(struct iwl_lq_cmd), }, |
916 | .flags = init ? 0 : CMD_ASYNC, | 915 | .flags = sync ? 0 : CMD_ASYNC, |
917 | .data = { lq, }, | 916 | .data = { lq, }, |
918 | }; | 917 | }; |
919 | 918 | ||