OLD | NEW |
1 /* | 1 /* |
2 * HT handling | 2 * HT handling |
3 * | 3 * |
4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> | 4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> |
5 * Copyright 2002-2005, Instant802 Networks, Inc. | 5 * Copyright 2002-2005, Instant802 Networks, Inc. |
6 * Copyright 2005-2006, Devicescape Software, Inc. | 6 * Copyright 2005-2006, Devicescape Software, Inc. |
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> | 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> |
9 * Copyright 2007-2010, Intel Corporation | 9 * Copyright 2007-2010, Intel Corporation |
10 * | 10 * |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 int i; | 49 int i; |
50 | 50 |
51 for (i = 0; i < tid_rx->buf_size; i++) | 51 for (i = 0; i < tid_rx->buf_size; i++) |
52 dev_kfree_skb(tid_rx->reorder_buf[i]); | 52 dev_kfree_skb(tid_rx->reorder_buf[i]); |
53 kfree(tid_rx->reorder_buf); | 53 kfree(tid_rx->reorder_buf); |
54 kfree(tid_rx->reorder_time); | 54 kfree(tid_rx->reorder_time); |
55 kfree(tid_rx); | 55 kfree(tid_rx); |
56 } | 56 } |
57 | 57 |
58 void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | 58 void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, |
59 » » » » u16 initiator, u16 reason, bool tx) | 59 » » » » u16 initiator, u16 reason) |
60 { | 60 { |
61 struct ieee80211_local *local = sta->local; | 61 struct ieee80211_local *local = sta->local; |
62 struct tid_ampdu_rx *tid_rx; | 62 struct tid_ampdu_rx *tid_rx; |
63 | 63 |
64 lockdep_assert_held(&sta->ampdu_mlme.mtx); | 64 lockdep_assert_held(&sta->ampdu_mlme.mtx); |
65 | 65 |
66 tid_rx = sta->ampdu_mlme.tid_rx[tid]; | 66 tid_rx = sta->ampdu_mlme.tid_rx[tid]; |
67 | 67 |
68 if (!tid_rx) | 68 if (!tid_rx) |
69 return; | 69 return; |
70 | 70 |
71 rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], NULL); | 71 rcu_assign_pointer(sta->ampdu_mlme.tid_rx[tid], NULL); |
72 | 72 |
73 #ifdef CONFIG_MAC80211_HT_DEBUG | 73 #ifdef CONFIG_MAC80211_HT_DEBUG |
74 printk(KERN_DEBUG "Rx BA session stop requested for %pM tid %u\n", | 74 printk(KERN_DEBUG "Rx BA session stop requested for %pM tid %u\n", |
75 sta->sta.addr, tid); | 75 sta->sta.addr, tid); |
76 #endif /* CONFIG_MAC80211_HT_DEBUG */ | 76 #endif /* CONFIG_MAC80211_HT_DEBUG */ |
77 | 77 |
78 if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, | 78 if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP, |
79 &sta->sta, tid, NULL)) | 79 &sta->sta, tid, NULL)) |
80 printk(KERN_DEBUG "HW problem - can not stop rx " | 80 printk(KERN_DEBUG "HW problem - can not stop rx " |
81 "aggregation for tid %d\n", tid); | 81 "aggregation for tid %d\n", tid); |
82 | 82 |
83 /* check if this is a self generated aggregation halt */ | 83 /* check if this is a self generated aggregation halt */ |
84 » if (initiator == WLAN_BACK_RECIPIENT && tx) | 84 » if (initiator == WLAN_BACK_RECIPIENT) |
85 ieee80211_send_delba(sta->sdata, sta->sta.addr, | 85 ieee80211_send_delba(sta->sdata, sta->sta.addr, |
86 tid, 0, reason); | 86 tid, 0, reason); |
87 | 87 |
88 del_timer_sync(&tid_rx->session_timer); | 88 del_timer_sync(&tid_rx->session_timer); |
89 | 89 |
90 call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); | 90 call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); |
91 } | 91 } |
92 | 92 |
93 void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | 93 void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, |
94 » » » » u16 initiator, u16 reason, bool tx) | 94 » » » » u16 initiator, u16 reason) |
95 { | 95 { |
96 mutex_lock(&sta->ampdu_mlme.mtx); | 96 mutex_lock(&sta->ampdu_mlme.mtx); |
97 » ___ieee80211_stop_rx_ba_session(sta, tid, initiator, reason, tx); | 97 » ___ieee80211_stop_rx_ba_session(sta, tid, initiator, reason); |
98 mutex_unlock(&sta->ampdu_mlme.mtx); | 98 mutex_unlock(&sta->ampdu_mlme.mtx); |
99 } | 99 } |
100 | 100 |
101 /* | 101 /* |
102 * After accepting the AddBA Request we activated a timer, | 102 * After accepting the AddBA Request we activated a timer, |
103 * resetting it after each frame that arrives from the originator. | 103 * resetting it after each frame that arrives from the originator. |
104 */ | 104 */ |
105 static void sta_rx_agg_session_timer_expired(unsigned long data) | 105 static void sta_rx_agg_session_timer_expired(unsigned long data) |
106 { | 106 { |
107 /* not an elegant detour, but there is no choice as the timer passes | 107 /* not an elegant detour, but there is no choice as the timer passes |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 if (timeout) | 301 if (timeout) |
302 mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); | 302 mod_timer(&tid_agg_rx->session_timer, TU_TO_EXP_TIME(timeout)); |
303 | 303 |
304 end: | 304 end: |
305 mutex_unlock(&sta->ampdu_mlme.mtx); | 305 mutex_unlock(&sta->ampdu_mlme.mtx); |
306 | 306 |
307 end_no_lock: | 307 end_no_lock: |
308 ieee80211_send_addba_resp(sta->sdata, sta->sta.addr, tid, | 308 ieee80211_send_addba_resp(sta->sdata, sta->sta.addr, tid, |
309 dialog_token, status, 1, buf_size, timeout); | 309 dialog_token, status, 1, buf_size, timeout); |
310 } | 310 } |
OLD | NEW |