aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2013-06-12 10:44:49 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-06-12 15:06:57 -0400
commit8cdbab7f07e82f26c48adcc761391c1c7ff339ff (patch)
treeeb820eb32a6bcf5d2f8f079f019bc73021f35ff5 /drivers/net/wireless/iwlegacy
parentc6af8074fd3654b2a8d7b31304d686519b062e14 (diff)
iwl4965: workaround for firmware frame tx rejection
Firmware can reject to transmit frame on passive channel, when it did not yet received any frame with valid CRC on that channel. Workaround this problem in the driver. Tested-by: Jake Edge <jake@lwn.net> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c18
-rw-r--r--drivers/net/wireless/iwlegacy/common.c11
2 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 9a95045c97b6..1c44bb59f6c8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -588,6 +588,11 @@ il4965_pass_packet_to_mac80211(struct il_priv *il, struct ieee80211_hdr *hdr,
588 return; 588 return;
589 } 589 }
590 590
591 if (unlikely(test_bit(IL_STOP_REASON_PASSIVE, &il->stop_reason))) {
592 il_wake_queues_by_reason(il, IL_STOP_REASON_PASSIVE);
593 D_INFO("Woke queues - frame received on passive channel\n");
594 }
595
591 /* In case of HW accelerated crypto and bad decryption, drop */ 596 /* In case of HW accelerated crypto and bad decryption, drop */
592 if (!il->cfg->mod_params->sw_crypto && 597 if (!il->cfg->mod_params->sw_crypto &&
593 il_set_decrypted_flag(il, hdr, ampdu_status, stats)) 598 il_set_decrypted_flag(il, hdr, ampdu_status, stats))
@@ -2806,6 +2811,19 @@ il4965_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb)
2806 return; 2811 return;
2807 } 2812 }
2808 2813
2814 /*
2815 * Firmware will not transmit frame on passive channel, if it not yet
2816 * received some valid frame on that channel. When this error happen
2817 * we have to wait until firmware will unblock itself i.e. when we
2818 * note received beacon or other frame. We unblock queues in
2819 * il4965_pass_packet_to_mac80211 or in il_mac_bss_info_changed.
2820 */
2821 if (unlikely((status & TX_STATUS_MSK) == TX_STATUS_FAIL_PASSIVE_NO_RX) &&
2822 il->iw_mode == NL80211_IFTYPE_STATION) {
2823 il_stop_queues_by_reason(il, IL_STOP_REASON_PASSIVE);
2824 D_INFO("Stopped queues - RX waiting on passive channel\n");
2825 }
2826
2809 spin_lock_irqsave(&il->sta_lock, flags); 2827 spin_lock_irqsave(&il->sta_lock, flags);
2810 if (txq->sched_retry) { 2828 if (txq->sched_retry) {
2811 const u32 scd_ssn = il4965_get_scd_ssn(tx_resp); 2829 const u32 scd_ssn = il4965_get_scd_ssn(tx_resp);
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index e9a3cbc409ae..3195aad440dd 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -5307,6 +5307,17 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
5307 D_MAC80211("BSSID %pM\n", bss_conf->bssid); 5307 D_MAC80211("BSSID %pM\n", bss_conf->bssid);
5308 5308
5309 /* 5309 /*
5310 * On passive channel we wait with blocked queues to see if
5311 * there is traffic on that channel. If no frame will be
5312 * received (what is very unlikely since scan detects AP on
5313 * that channel, but theoretically possible), mac80211 associate
5314 * procedure will time out and mac80211 will call us with NULL
5315 * bssid. We have to unblock queues on such condition.
5316 */
5317 if (is_zero_ether_addr(bss_conf->bssid))
5318 il_wake_queues_by_reason(il, IL_STOP_REASON_PASSIVE);
5319
5320 /*
5310 * If there is currently a HW scan going on in the background, 5321 * If there is currently a HW scan going on in the background,
5311 * then we need to cancel it, otherwise sometimes we are not 5322 * then we need to cancel it, otherwise sometimes we are not
5312 * able to authenticate (FIXME: why ?) 5323 * able to authenticate (FIXME: why ?)