b43: fix reloading config settings after channel changes or hostapd restart (#8033)
[openwrt.git] / package / mac80211 / patches / 572-ath9k_sw_retry_reduce.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -247,13 +247,16 @@ static void ath_tid_drain(struct ath_sof
4 }
5
6 static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
7 - struct sk_buff *skb)
8 + struct sk_buff *skb, int count)
9 {
10 struct ath_frame_info *fi = get_frame_info(skb);
11 struct ieee80211_hdr *hdr;
12 + int prev = fi->retries;
13
14 TX_STAT_INC(txq->axq_qnum, a_retries);
15 - if (fi->retries++ > 0)
16 + fi->retries += count;
17 +
18 + if (prev > 0)
19 return;
20
21 hdr = (struct ieee80211_hdr *)skb->data;
22 @@ -358,6 +361,7 @@ static void ath_tx_complete_aggr(struct
23 int nframes;
24 u8 tidno;
25 bool clear_filter;
26 + int i, retries;
27
28 skb = bf->bf_mpdu;
29 hdr = (struct ieee80211_hdr *)skb->data;
30 @@ -366,6 +370,10 @@ static void ath_tx_complete_aggr(struct
31
32 memcpy(rates, tx_info->control.rates, sizeof(rates));
33
34 + retries = ts->ts_longretry + 1;
35 + for (i = 0; i < ts->ts_rateindex; i++)
36 + retries += rates[i].count;
37 +
38 rcu_read_lock();
39
40 sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
41 @@ -449,7 +457,8 @@ static void ath_tx_complete_aggr(struct
42 } else if (fi->retries < ATH_MAX_SW_RETRIES) {
43 if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
44 !an->sleeping)
45 - ath_tx_set_retry(sc, txq, bf->bf_mpdu);
46 + ath_tx_set_retry(sc, txq, bf->bf_mpdu,
47 + retries);
48
49 clear_filter = true;
50 txpending = 1;
51 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
52 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
53 @@ -535,7 +535,7 @@ struct ath_ant_comb {
54 #define DEFAULT_CACHELINE 32
55 #define ATH_REGCLASSIDS_MAX 10
56 #define ATH_CABQ_READY_TIME 80 /* % of beacon interval */
57 -#define ATH_MAX_SW_RETRIES 10
58 +#define ATH_MAX_SW_RETRIES 20
59 #define ATH_CHAN_MAX 255
60
61 #define ATH_TXPOWER_MAX 100 /* .5 dBm units */
This page took 0.046743 seconds and 5 git commands to generate.