summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/300-pending_work.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-06-14 21:36:05 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-06-14 21:36:05 +0000
commit3bb2e382f6836e36724e0654a04b106bafc9cd71 (patch)
tree33246f60a2335f2d0a7a6c86dc975a447d376f5f /package/mac80211/patches/300-pending_work.patch
parenteb1c7a641f92531c42e63ad00542d31c02de20b7 (diff)
ath9k: fix an invalid pointer access in the tx path
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32376 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/300-pending_work.patch')
-rw-r--r--package/mac80211/patches/300-pending_work.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 73190796fa..9044396dc8 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -523,3 +523,53 @@
}
#endif
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -214,6 +214,7 @@ struct ath_frame_info {
+ enum ath9k_key_type keytype;
+ u8 keyix;
+ u8 retries;
++ bool short_preamble;
+ };
+
+ struct ath_buf_state {
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_
+ struct ieee80211_tx_rate *rates;
+ const struct ieee80211_rate *rate;
+ struct ieee80211_hdr *hdr;
++ struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu);
+ int i;
+ u8 rix = 0;
+
+@@ -957,8 +958,7 @@ static void ath_buf_set_rate(struct ath_
+ rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info);
+ info->rtscts_rate = rate->hw_value;
+
+- if (tx_info->control.vif &&
+- tx_info->control.vif->bss_conf.use_short_preamble)
++ if (fi->short_preamble)
+ info->rtscts_rate |= rate->hw_value_short;
+
+ for (i = 0; i < 4; i++) {
+@@ -1779,6 +1779,11 @@ static void setup_frame_info(struct ieee
+ struct ath_frame_info *fi = get_frame_info(skb);
+ struct ath_node *an = NULL;
+ enum ath9k_key_type keytype;
++ bool short_preamble = false;
++
++ if (tx_info->control.vif &&
++ tx_info->control.vif->bss_conf.use_short_preamble)
++ short_preamble = true;
+
+ keytype = ath9k_cmn_get_hw_crypto_keytype(skb);
+
+@@ -1794,6 +1799,7 @@ static void setup_frame_info(struct ieee
+ fi->keyix = ATH9K_TXKEYIX_INVALID;
+ fi->keytype = keytype;
+ fi->framelen = framelen;
++ fi->short_preamble = short_preamble;
+ }
+
+ u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate)