b43: fix reloading config settings after channel changes or hostapd restart (#8033)
[openwrt.git] / package / mac80211 / patches / 520-mac80211_minstrel_ht_aggr_delay.patch
1 --- a/net/mac80211/rc80211_minstrel_ht.c
2 +++ b/net/mac80211/rc80211_minstrel_ht.c
3 @@ -355,10 +355,12 @@ minstrel_downgrade_rate(struct minstrel_
4 }
5
6 static void
7 -minstrel_aggr_check(struct minstrel_priv *mp, struct ieee80211_sta *pubsta, struct sk_buff *skb)
8 +minstrel_aggr_check(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
9 + struct ieee80211_sta *pubsta, struct sk_buff *skb)
10 {
11 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
12 struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
13 + unsigned long t1, t2;
14 u16 tid;
15
16 if (unlikely(!ieee80211_is_data_qos(hdr->frame_control)))
17 @@ -374,6 +376,12 @@ minstrel_aggr_check(struct minstrel_priv
18 if (skb_get_queue_mapping(skb) == IEEE80211_AC_VO)
19 return;
20
21 + t1 = mi->last_aggr_start_time[tid];
22 + t2 = t1 + msecs_to_jiffies(5000);
23 + if (unlikely(time_in_range(jiffies, t1, t2)))
24 + return;
25 +
26 + mi->last_aggr_start_time[tid] = jiffies;
27 ieee80211_start_tx_ba_session(pubsta, tid, 5000);
28 }
29
30 @@ -452,7 +460,7 @@ minstrel_ht_tx_status(void *priv, struct
31
32 if (time_after(jiffies, mi->stats_update + (mp->update_interval / 2 * HZ) / 1000)) {
33 minstrel_ht_update_stats(mp, mi);
34 - minstrel_aggr_check(mp, sta, skb);
35 + minstrel_aggr_check(mp, mi, sta, skb);
36 }
37 }
38
39 --- a/net/mac80211/rc80211_minstrel_ht.h
40 +++ b/net/mac80211/rc80211_minstrel_ht.h
41 @@ -109,6 +109,8 @@ struct minstrel_ht_sta {
42
43 /* MCS rate group info and statistics */
44 struct minstrel_mcs_group_data groups[MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS];
45 +
46 + unsigned long last_aggr_start_time[IEEE80211_QOS_CTL_TID_MASK + 1];
47 };
48
49 struct minstrel_ht_sta_priv {
This page took 0.043652 seconds and 5 git commands to generate.