Date:2010-07-12 21:16:22 (8 years 4 months ago)
Author:nbd
Commit:372c8c5e681428d331d44a08fdc4e9921090c8fb
Message:mac80211: improve reliability of the keymiss handling fix, add another aggregation leak fix

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22152 3c298f89-4303-0410-b956-a3cf2f4a3e73
Files: package/mac80211/patches/525-ath9k_handle_keymiss.patch (1 diff)
package/mac80211/patches/540-ath9k_aggr_fix.patch (1 diff)

Change Details

package/mac80211/patches/525-ath9k_handle_keymiss.patch
11--- a/drivers/net/wireless/ath/ath9k/mac.c
22+++ b/drivers/net/wireless/ath/ath9k/mac.c
3@@ -701,6 +701,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
4         rs->rs_flags |= ATH9K_RX_DELIM_CRC_POST;
5     if (ads.ds_rxstatus8 & AR_DecryptBusyErr)
6         rs->rs_flags |= ATH9K_RX_DECRYPT_BUSY;
7+ if (ads.ds_rxstatus8 & AR_KeyMiss)
8+ rs->rs_keyix = ATH9K_RXKEYIX_INVALID;
3@@ -713,6 +713,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
4             rs->rs_status |= ATH9K_RXERR_DECRYPT;
5         else if (ads.ds_rxstatus8 & AR_MichaelErr)
6             rs->rs_status |= ATH9K_RXERR_MIC;
7+ else if (ads.ds_rxstatus8 & AR_KeyMiss)
8+ rs->rs_status |= ATH9K_RXERR_DECRYPT;
9     }
910
10     if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) {
11         if (ads.ds_rxstatus8 & AR_CRCErr)
11     return 0;
1212--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
1313+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
14@@ -578,6 +578,9 @@ int ath9k_hw_process_rxdesc_edma(struct
15     if (rxsp->status11 & AR_DecryptBusyErr)
16         rxs->rs_flags |= ATH9K_RX_DECRYPT_BUSY;
14@@ -589,7 +589,8 @@ int ath9k_hw_process_rxdesc_edma(struct
15             rxs->rs_status |= ATH9K_RXERR_DECRYPT;
16         } else if (rxsp->status11 & AR_MichaelErr) {
17             rxs->rs_status |= ATH9K_RXERR_MIC;
18- }
19+ } else if (rxsp->status11 & AR_KeyMiss)
20+ rxs->rs_status |= ATH9K_RXERR_DECRYPT;
21     }
1722
18+ if (rxsp->status11 & AR_KeyMiss)
19+ rxs->rs_keyix = ATH9K_RXKEYIX_INVALID;
20+
21     if ((rxsp->status11 & AR_RxFrameOK) == 0) {
22         if (rxsp->status11 & AR_CRCErr) {
23             rxs->rs_status |= ATH9K_RXERR_CRC;
23     return 0;
package/mac80211/patches/540-ath9k_aggr_fix.patch
1--- a/drivers/net/wireless/ath/ath9k/xmit.c
2@@ -329,7 +329,6 @@ static void ath_tx_complete_aggr(struct
3     int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
4     bool rc_update = true;
5     struct ieee80211_tx_rate rates[4];
6- unsigned long flags;
7
8     skb = bf->bf_mpdu;
9     hdr = (struct ieee80211_hdr *)skb->data;
10@@ -346,9 +345,21 @@ static void ath_tx_complete_aggr(struct
11     if (!sta) {
12         rcu_read_unlock();
13
14- spin_lock_irqsave(&sc->tx.txbuflock, flags);
15- list_splice_tail_init(bf_q, &sc->tx.txbuf);
16- spin_unlock_irqrestore(&sc->tx.txbuflock, flags);
17+ INIT_LIST_HEAD(&bf_head);
18+ while (bf) {
19+ bf_next = bf->bf_next;
20+
21+ bf->bf_state.bf_type |= BUF_XRETRY;
22+ if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) ||
23+ !bf->bf_stale || bf_next != NULL)
24+ list_move_tail(&bf->list, &bf_head);
25+
26+ ath_tx_rc_status(bf, ts, 0, 0, false);
27+ ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
28+ 0, 0);
29+
30+ bf = bf_next;
31+ }
32         return;
33     }
34

Archive Download the corresponding diff file



interactive