aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2014-03-12 05:37:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-03-13 14:57:26 -0400
commit5998be879719384af2014b79697eed6e38ee2706 (patch)
treeebbe73b9ba77942e7fef6fb0e111b42525696951
parent105ff411c96c52c67261efbe245f0947d39ebce7 (diff)
ath9k: Fix sequence number assignment for non-data frames
Since commit 558ff225de80ac95b132d3a115ddadcd64498b4f (ath9k: fix ps-poll responses under a-mpdu sessions) non-data frames would have gotten a sequence number from a TIDs sequence counter instead of using the global sequence counter. This can lead to instable connections. To fix this only select the correct TID if we are processing a data frame. Furthermore, prevent non-data frames to get a sequence number from a TID sequence counter by adding a check to ath_tx_setup_buffer. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index f042a18c8495..55897d508a76 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2063,7 +2063,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
2063 2063
2064 ATH_TXBUF_RESET(bf); 2064 ATH_TXBUF_RESET(bf);
2065 2065
2066 if (tid) { 2066 if (tid && ieee80211_is_data_present(hdr->frame_control)) {
2067 fragno = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG; 2067 fragno = le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG;
2068 seqno = tid->seq_next; 2068 seqno = tid->seq_next;
2069 hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT); 2069 hdr->seq_ctrl = cpu_to_le16(tid->seq_next << IEEE80211_SEQ_SEQ_SHIFT);
@@ -2186,7 +2186,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
2186 txq->stopped = true; 2186 txq->stopped = true;
2187 } 2187 }
2188 2188
2189 if (txctl->an) 2189 if (txctl->an && ieee80211_is_data_present(hdr->frame_control))
2190 tid = ath_get_skb_tid(sc, txctl->an, skb); 2190 tid = ath_get_skb_tid(sc, txctl->an, skb);
2191 2191
2192 if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) { 2192 if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) {