Changeset 32376


Ignore:
Timestamp:
2012-06-14T23:36:05+02:00 (6 years ago)
Author:
nbd
Message:

ath9k: fix an invalid pointer access in the tx path

Location:
trunk/package/mac80211/patches
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/mac80211/patches/300-pending_work.patch

    r32018 r32376  
    524524 #endif 
    525525  
     526--- a/drivers/net/wireless/ath/ath9k/ath9k.h 
     527+++ b/drivers/net/wireless/ath/ath9k/ath9k.h 
     528@@ -214,6 +214,7 @@ struct ath_frame_info { 
     529        enum ath9k_key_type keytype; 
     530        u8 keyix; 
     531        u8 retries; 
     532+       bool short_preamble; 
     533 }; 
     534  
     535 struct ath_buf_state { 
     536--- a/drivers/net/wireless/ath/ath9k/xmit.c 
     537+++ b/drivers/net/wireless/ath/ath9k/xmit.c 
     538@@ -938,6 +938,7 @@ static void ath_buf_set_rate(struct ath_ 
     539        struct ieee80211_tx_rate *rates; 
     540        const struct ieee80211_rate *rate; 
     541        struct ieee80211_hdr *hdr; 
     542+       struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu); 
     543        int i; 
     544        u8 rix = 0; 
     545  
     546@@ -957,8 +958,7 @@ static void ath_buf_set_rate(struct ath_ 
     547        rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info); 
     548        info->rtscts_rate = rate->hw_value; 
     549  
     550-       if (tx_info->control.vif && 
     551-           tx_info->control.vif->bss_conf.use_short_preamble) 
     552+       if (fi->short_preamble) 
     553                info->rtscts_rate |= rate->hw_value_short; 
     554  
     555        for (i = 0; i < 4; i++) { 
     556@@ -1779,6 +1779,11 @@ static void setup_frame_info(struct ieee 
     557        struct ath_frame_info *fi = get_frame_info(skb); 
     558        struct ath_node *an = NULL; 
     559        enum ath9k_key_type keytype; 
     560+       bool short_preamble = false; 
     561+ 
     562+       if (tx_info->control.vif && 
     563+           tx_info->control.vif->bss_conf.use_short_preamble) 
     564+               short_preamble = true; 
     565  
     566        keytype = ath9k_cmn_get_hw_crypto_keytype(skb); 
     567  
     568@@ -1794,6 +1799,7 @@ static void setup_frame_info(struct ieee 
     569                fi->keyix = ATH9K_TXKEYIX_INVALID; 
     570        fi->keytype = keytype; 
     571        fi->framelen = framelen; 
     572+       fi->short_preamble = short_preamble; 
     573 } 
     574  
     575 u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) 
  • trunk/package/mac80211/patches/512-ath9k_channelbw_debugfs.patch

    r32002 r32376  
    11--- a/drivers/net/wireless/ath/ath9k/ath9k.h 
    22+++ b/drivers/net/wireless/ath/ath9k/ath9k.h 
    3 @@ -620,6 +620,7 @@ struct ath_softc { 
     3@@ -621,6 +621,7 @@ struct ath_softc { 
    44        struct ieee80211_hw *hw; 
    55        struct device *dev; 
     
    99        struct survey_info survey[ATH9K_NUM_CHANNELS]; 
    1010  
    11 @@ -687,6 +688,7 @@ struct ath_softc { 
     11@@ -688,6 +689,7 @@ struct ath_softc { 
    1212        struct dfs_pattern_detector *dfs_detector; 
    1313 }; 
  • trunk/package/mac80211/patches/530-ath9k_limit_qlen.patch

    r32002 r32376  
    11--- a/drivers/net/wireless/ath/ath9k/ath9k.h 
    22+++ b/drivers/net/wireless/ath/ath9k/ath9k.h 
    3 @@ -243,6 +243,7 @@ struct ath_atx_tid { 
     3@@ -244,6 +244,7 @@ struct ath_atx_tid { 
    44        struct ath_node *an; 
    55        struct ath_atx_ac *ac; 
     
    99        u16 seq_start; 
    1010        u16 seq_next; 
    11 @@ -289,6 +290,9 @@ struct ath_tx_control { 
     11@@ -290,6 +291,9 @@ struct ath_tx_control { 
    1212  *  (axq_qnum). 
    1313  */ 
     
    7575        TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw); 
    7676        bf->bf_lastbf = bf; 
    77 @@ -1873,22 +1886,11 @@ error: 
     77@@ -1879,22 +1892,11 @@ error: 
    7878  
    7979 /* FIXME: tx power */ 
     
    100100        if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) { 
    101101                /* 
    102 @@ -1920,6 +1922,7 @@ int ath_tx_start(struct ieee80211_hw *hw 
     102@@ -1926,6 +1928,7 @@ int ath_tx_start(struct ieee80211_hw *hw 
    103103        struct ieee80211_vif *vif = info->control.vif; 
    104104        struct ath_softc *sc = hw->priv; 
     
    108108        int frmlen = skb->len + FCS_LEN; 
    109109        int q; 
    110 @@ -1962,6 +1965,24 @@ int ath_tx_start(struct ieee80211_hw *hw 
     110@@ -1968,6 +1971,24 @@ int ath_tx_start(struct ieee80211_hw *hw 
    111111  
    112112        setup_frame_info(hw, skb, frmlen); 
     
    133133         * At this point, the vif, hw_key and sta pointers in the tx control 
    134134         * info are no longer valid (overwritten by the ath_frame_info data. 
    135 @@ -1976,7 +1997,7 @@ int ath_tx_start(struct ieee80211_hw *hw 
     135@@ -1982,7 +2003,7 @@ int ath_tx_start(struct ieee80211_hw *hw 
    136136                txq->stopped = true; 
    137137        } 
  • trunk/package/mac80211/patches/540-ath9k_extra_leds.patch

    r32002 r32376  
    11--- a/drivers/net/wireless/ath/ath9k/ath9k.h 
    22+++ b/drivers/net/wireless/ath/ath9k/ath9k.h 
    3 @@ -507,6 +507,9 @@ static inline u16 ath9k_btcoex_aggr_limi 
     3@@ -508,6 +508,9 @@ static inline u16 ath9k_btcoex_aggr_limi 
    44 #ifdef CONFIG_MAC80211_LEDS 
    55 void ath_init_leds(struct ath_softc *sc); 
     
    1111 static inline void ath_init_leds(struct ath_softc *sc) 
    1212 { 
    13 @@ -620,6 +623,13 @@ struct ath9k_vif_iter_data { 
     13@@ -621,6 +624,13 @@ struct ath9k_vif_iter_data { 
    1414        int nadhocs;   /* number of adhoc vifs */ 
    1515 }; 
     
    2525        struct ieee80211_hw *hw; 
    2626        struct device *dev; 
    27 @@ -661,9 +671,8 @@ struct ath_softc { 
     27@@ -662,9 +672,8 @@ struct ath_softc { 
    2828        struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; 
    2929  
Note: See TracChangeset for help on using the changeset viewer.