aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-04-17 02:47:00 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-18 07:36:29 -0400
commit63b77bf489881747c5118476918cc8c29378ee63 (patch)
treedd5326ef97e0e40425862a8ec348fe98252da4a5 /drivers/net/wireless
parentd557894106f71cc23c9d053876d0c367c285950f (diff)
iwlwifi: dvm: don't send zeroed LQ cmd
When the stations are being restored because of unassoc RXON, the LQ cmd may not have been initialized because it is initialized only after association. Sending zeroed LQ_CMD makes the fw unhappy: it raises SYSASSERT_2078. Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> [move zero_lq and make static const] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/sta.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/sta.c b/drivers/net/wireless/iwlwifi/dvm/sta.c
index b775769f8322..db183b44e038 100644
--- a/drivers/net/wireless/iwlwifi/dvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/dvm/sta.c
@@ -695,6 +695,7 @@ void iwl_clear_ucode_stations(struct iwl_priv *priv,
695void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) 695void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
696{ 696{
697 struct iwl_addsta_cmd sta_cmd; 697 struct iwl_addsta_cmd sta_cmd;
698 static const struct iwl_link_quality_cmd zero_lq = {};
698 struct iwl_link_quality_cmd lq; 699 struct iwl_link_quality_cmd lq;
699 int i; 700 int i;
700 bool found = false; 701 bool found = false;
@@ -733,7 +734,9 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
733 else 734 else
734 memcpy(&lq, priv->stations[i].lq, 735 memcpy(&lq, priv->stations[i].lq,
735 sizeof(struct iwl_link_quality_cmd)); 736 sizeof(struct iwl_link_quality_cmd));
736 send_lq = true; 737
738 if (!memcmp(&lq, &zero_lq, sizeof(lq)))
739 send_lq = true;
737 } 740 }
738 spin_unlock_bh(&priv->sta_lock); 741 spin_unlock_bh(&priv->sta_lock);
739 ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC); 742 ret = iwl_send_add_sta(priv, &sta_cmd, CMD_SYNC);