From: Johannes Berg Date: Tue, 16 Nov 2010 19:51:04 +0000 (-0800) Subject: iwlagn: remove powersave warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=67158b67cea0c92dba1dda74cde926d149cc1a2e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iwlagn: remove powersave warning Through races, a packet may be enqueued for transmission to a station while that station is going to sleep, in which case the warning here triggers. Instead of warning, check the condition -- if this packet is not a PS-poll response then we still enqueue it but it will be rejected by the device since the station is marked as asleep. Signed-off-by: Johannes Berg Signed-off-by: Wey-Yi Guy --- diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 07bbc915529a..e8bd0b311946 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -567,8 +567,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) if (sta) sta_priv = (void *)sta->drv_priv; - if (sta_priv && sta_priv->asleep) { - WARN_ON(!(info->flags & IEEE80211_TX_CTL_PSPOLL_RESPONSE)); + if (sta_priv && sta_priv->asleep && + (info->flags & IEEE80211_TX_CTL_PSPOLL_RESPONSE)) { /* * This sends an asynchronous command to the device, * but we can rely on it being processed before the