aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-03-11 22:02:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-16 15:20:41 -0400
commit4fdec031b9169b3c17938b9c4168f099f457169c (patch)
tree77da6da42162ab2dccaf87e10ffe94ccd1b5a3ca /drivers/net
parent3f60ebc9d6291863652d564bacc430629271e6a9 (diff)
ath9k: fix BUG_ON triggered by PAE frames
When I initially stumbled upon sequence number problems with PAE frames in ath9k, I submitted a patch to remove all special cases for PAE frames and let them go through the normal transmit path. Out of concern about crypto incompatibility issues, this change was merged instead: commit 6c8afef551fef87a3bf24f8a74c69a7f2f72fc82 Author: Sujith <Sujith.Manoharan@atheros.com> Date: Tue Feb 9 10:07:00 2010 +0530 ath9k: Fix sequence numbers for PAE frames After a lot of testing, I'm able to reliably trigger a driver crash on rekeying with current versions with this change in place. It seems that the driver does not support sending out regular MPDUs with the same TID while an A-MPDU session is active. This leads to duplicate entries in the TID Tx buffer, which hits the following BUG_ON in ath_tx_addto_baw(): index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno); cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1); BUG_ON(tid->tx_buf[cindex] != NULL); I believe until we actually have a reproducible case of an incompatibility with another AP using no PAE special cases, we should simply get rid of this mess. This patch completely fixes my crash issues in STA mode and makes it stay connected without throughput drops or connectivity issues even when the AP is configured to a very short group rekey interval. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index b2c8207f7bc1..294b486bc3ed 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1353,25 +1353,6 @@ static enum ath9k_pkt_type get_hw_packet_type(struct sk_buff *skb)
1353 return htype; 1353 return htype;
1354} 1354}
1355 1355
1356static bool is_pae(struct sk_buff *skb)
1357{
1358 struct ieee80211_hdr *hdr;
1359 __le16 fc;
1360
1361 hdr = (struct ieee80211_hdr *)skb->data;
1362 fc = hdr->frame_control;
1363
1364 if (ieee80211_is_data(fc)) {
1365 if (ieee80211_is_nullfunc(fc) ||
1366 /* Port Access Entity (IEEE 802.1X) */
1367 (skb->protocol == cpu_to_be16(ETH_P_PAE))) {
1368 return true;
1369 }
1370 }
1371
1372 return false;
1373}
1374
1375static int get_hw_crypto_keytype(struct sk_buff *skb) 1356static int get_hw_crypto_keytype(struct sk_buff *skb)
1376{ 1357{
1377 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 1358 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -1696,7 +1677,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf,
1696 goto tx_done; 1677 goto tx_done;
1697 } 1678 }
1698 1679
1699 if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) { 1680 if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
1700 /* 1681 /*
1701 * Try aggregation if it's a unicast data frame 1682 * Try aggregation if it's a unicast data frame
1702 * and the destination is HT capable. 1683 * and the destination is HT capable.