Lines Matching refs:tid_agg_rx

1079 static inline bool ieee80211_rx_reorder_ready(struct tid_ampdu_rx *tid_agg_rx,  in ieee80211_rx_reorder_ready()  argument
1082 struct sk_buff_head *frames = &tid_agg_rx->reorder_buf[index]; in ieee80211_rx_reorder_ready()
1086 if (tid_agg_rx->reorder_buf_filtered && in ieee80211_rx_reorder_ready()
1087 tid_agg_rx->reorder_buf_filtered & BIT_ULL(index)) in ieee80211_rx_reorder_ready()
1101 struct tid_ampdu_rx *tid_agg_rx, in ieee80211_release_reorder_frame() argument
1105 struct sk_buff_head *skb_list = &tid_agg_rx->reorder_buf[index]; in ieee80211_release_reorder_frame()
1109 lockdep_assert_held(&tid_agg_rx->reorder_lock); in ieee80211_release_reorder_frame()
1114 if (!ieee80211_rx_reorder_ready(tid_agg_rx, index)) { in ieee80211_release_reorder_frame()
1120 tid_agg_rx->stored_mpdu_num--; in ieee80211_release_reorder_frame()
1128 if (tid_agg_rx->reorder_buf_filtered) in ieee80211_release_reorder_frame()
1129 tid_agg_rx->reorder_buf_filtered &= ~BIT_ULL(index); in ieee80211_release_reorder_frame()
1130 tid_agg_rx->head_seq_num = ieee80211_sn_inc(tid_agg_rx->head_seq_num); in ieee80211_release_reorder_frame()
1134 struct tid_ampdu_rx *tid_agg_rx, in ieee80211_release_reorder_frames() argument
1140 lockdep_assert_held(&tid_agg_rx->reorder_lock); in ieee80211_release_reorder_frames()
1142 while (ieee80211_sn_less(tid_agg_rx->head_seq_num, head_seq_num)) { in ieee80211_release_reorder_frames()
1143 index = tid_agg_rx->head_seq_num % tid_agg_rx->buf_size; in ieee80211_release_reorder_frames()
1144 ieee80211_release_reorder_frame(sdata, tid_agg_rx, index, in ieee80211_release_reorder_frames()
1161 struct tid_ampdu_rx *tid_agg_rx, in ieee80211_sta_reorder_release() argument
1166 lockdep_assert_held(&tid_agg_rx->reorder_lock); in ieee80211_sta_reorder_release()
1169 index = tid_agg_rx->head_seq_num % tid_agg_rx->buf_size; in ieee80211_sta_reorder_release()
1170 if (!ieee80211_rx_reorder_ready(tid_agg_rx, index) && in ieee80211_sta_reorder_release()
1171 tid_agg_rx->stored_mpdu_num) { in ieee80211_sta_reorder_release()
1177 for (j = (index + 1) % tid_agg_rx->buf_size; j != index; in ieee80211_sta_reorder_release()
1178 j = (j + 1) % tid_agg_rx->buf_size) { in ieee80211_sta_reorder_release()
1179 if (!ieee80211_rx_reorder_ready(tid_agg_rx, j)) { in ieee80211_sta_reorder_release()
1184 !time_after(jiffies, tid_agg_rx->reorder_time[j] + in ieee80211_sta_reorder_release()
1189 for (i = (index + 1) % tid_agg_rx->buf_size; i != j; in ieee80211_sta_reorder_release()
1190 i = (i + 1) % tid_agg_rx->buf_size) in ieee80211_sta_reorder_release()
1191 __skb_queue_purge(&tid_agg_rx->reorder_buf[i]); in ieee80211_sta_reorder_release()
1195 ieee80211_release_reorder_frame(sdata, tid_agg_rx, j, in ieee80211_sta_reorder_release()
1201 tid_agg_rx->head_seq_num = in ieee80211_sta_reorder_release()
1202 (tid_agg_rx->head_seq_num + in ieee80211_sta_reorder_release()
1206 } else while (ieee80211_rx_reorder_ready(tid_agg_rx, index)) { in ieee80211_sta_reorder_release()
1207 ieee80211_release_reorder_frame(sdata, tid_agg_rx, index, in ieee80211_sta_reorder_release()
1209 index = tid_agg_rx->head_seq_num % tid_agg_rx->buf_size; in ieee80211_sta_reorder_release()
1212 if (tid_agg_rx->stored_mpdu_num) { in ieee80211_sta_reorder_release()
1213 j = index = tid_agg_rx->head_seq_num % tid_agg_rx->buf_size; in ieee80211_sta_reorder_release()
1215 for (; j != (index - 1) % tid_agg_rx->buf_size; in ieee80211_sta_reorder_release()
1216 j = (j + 1) % tid_agg_rx->buf_size) { in ieee80211_sta_reorder_release()
1217 if (ieee80211_rx_reorder_ready(tid_agg_rx, j)) in ieee80211_sta_reorder_release()
1223 if (!tid_agg_rx->removed) in ieee80211_sta_reorder_release()
1224 mod_timer(&tid_agg_rx->reorder_timer, in ieee80211_sta_reorder_release()
1225 tid_agg_rx->reorder_time[j] + 1 + in ieee80211_sta_reorder_release()
1228 del_timer(&tid_agg_rx->reorder_timer); in ieee80211_sta_reorder_release()
1238 struct tid_ampdu_rx *tid_agg_rx, in ieee80211_sta_manage_reorder_buf() argument
1250 spin_lock(&tid_agg_rx->reorder_lock); in ieee80211_sta_manage_reorder_buf()
1256 if (unlikely(tid_agg_rx->auto_seq)) { in ieee80211_sta_manage_reorder_buf()
1257 tid_agg_rx->auto_seq = false; in ieee80211_sta_manage_reorder_buf()
1258 tid_agg_rx->ssn = mpdu_seq_num; in ieee80211_sta_manage_reorder_buf()
1259 tid_agg_rx->head_seq_num = mpdu_seq_num; in ieee80211_sta_manage_reorder_buf()
1262 buf_size = tid_agg_rx->buf_size; in ieee80211_sta_manage_reorder_buf()
1263 head_seq_num = tid_agg_rx->head_seq_num; in ieee80211_sta_manage_reorder_buf()
1269 if (unlikely(!tid_agg_rx->started)) { in ieee80211_sta_manage_reorder_buf()
1274 tid_agg_rx->started = true; in ieee80211_sta_manage_reorder_buf()
1291 ieee80211_release_reorder_frames(sdata, tid_agg_rx, in ieee80211_sta_manage_reorder_buf()
1297 index = mpdu_seq_num % tid_agg_rx->buf_size; in ieee80211_sta_manage_reorder_buf()
1300 if (ieee80211_rx_reorder_ready(tid_agg_rx, index)) { in ieee80211_sta_manage_reorder_buf()
1311 if (mpdu_seq_num == tid_agg_rx->head_seq_num && in ieee80211_sta_manage_reorder_buf()
1312 tid_agg_rx->stored_mpdu_num == 0) { in ieee80211_sta_manage_reorder_buf()
1314 tid_agg_rx->head_seq_num = in ieee80211_sta_manage_reorder_buf()
1315 ieee80211_sn_inc(tid_agg_rx->head_seq_num); in ieee80211_sta_manage_reorder_buf()
1321 __skb_queue_tail(&tid_agg_rx->reorder_buf[index], skb); in ieee80211_sta_manage_reorder_buf()
1323 tid_agg_rx->reorder_time[index] = jiffies; in ieee80211_sta_manage_reorder_buf()
1324 tid_agg_rx->stored_mpdu_num++; in ieee80211_sta_manage_reorder_buf()
1325 ieee80211_sta_reorder_release(sdata, tid_agg_rx, frames); in ieee80211_sta_manage_reorder_buf()
1329 spin_unlock(&tid_agg_rx->reorder_lock); in ieee80211_sta_manage_reorder_buf()
1343 struct tid_ampdu_rx *tid_agg_rx; in ieee80211_rx_reorder_ampdu() local
1363 tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]); in ieee80211_rx_reorder_ampdu()
1364 if (!tid_agg_rx) { in ieee80211_rx_reorder_ampdu()
1385 if (tid_agg_rx->timeout) in ieee80211_rx_reorder_ampdu()
1386 tid_agg_rx->last_rx = jiffies; in ieee80211_rx_reorder_ampdu()
1402 if (ieee80211_sta_manage_reorder_buf(rx->sdata, tid_agg_rx, skb, in ieee80211_rx_reorder_ampdu()
3205 struct tid_ampdu_rx *tid_agg_rx; in ieee80211_rx_h_ctrl() local
3235 tid_agg_rx = rcu_dereference(rx->sta->ampdu_mlme.tid_rx[tid]); in ieee80211_rx_h_ctrl()
3236 if (!tid_agg_rx) in ieee80211_rx_h_ctrl()
3245 if (tid_agg_rx->timeout) in ieee80211_rx_h_ctrl()
3246 mod_timer(&tid_agg_rx->session_timer, in ieee80211_rx_h_ctrl()
3247 TU_TO_EXP_TIME(tid_agg_rx->timeout)); in ieee80211_rx_h_ctrl()
3249 spin_lock(&tid_agg_rx->reorder_lock); in ieee80211_rx_h_ctrl()
3251 ieee80211_release_reorder_frames(rx->sdata, tid_agg_rx, in ieee80211_rx_h_ctrl()
3253 spin_unlock(&tid_agg_rx->reorder_lock); in ieee80211_rx_h_ctrl()
4236 struct tid_ampdu_rx *tid_agg_rx; in ieee80211_release_reorder_timeout() local
4246 tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]); in ieee80211_release_reorder_timeout()
4247 if (!tid_agg_rx) in ieee80211_release_reorder_timeout()
4252 spin_lock(&tid_agg_rx->reorder_lock); in ieee80211_release_reorder_timeout()
4253 ieee80211_sta_reorder_release(sta->sdata, tid_agg_rx, &frames); in ieee80211_release_reorder_timeout()
4254 spin_unlock(&tid_agg_rx->reorder_lock); in ieee80211_release_reorder_timeout()
4274 struct tid_ampdu_rx *tid_agg_rx; in ieee80211_mark_rx_ba_filtered_frames() local
4299 tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]); in ieee80211_mark_rx_ba_filtered_frames()
4300 if (!tid_agg_rx) in ieee80211_mark_rx_ba_filtered_frames()
4303 spin_lock_bh(&tid_agg_rx->reorder_lock); in ieee80211_mark_rx_ba_filtered_frames()
4309 release = (tid_agg_rx->head_seq_num + tid_agg_rx->buf_size) % in ieee80211_mark_rx_ba_filtered_frames()
4311 ieee80211_release_reorder_frames(sta->sdata, tid_agg_rx, in ieee80211_mark_rx_ba_filtered_frames()
4314 tid_agg_rx->head_seq_num = ssn; in ieee80211_mark_rx_ba_filtered_frames()
4316 ieee80211_release_reorder_frames(sta->sdata, tid_agg_rx, ssn, in ieee80211_mark_rx_ba_filtered_frames()
4322 diff = (tid_agg_rx->head_seq_num - ssn) & IEEE80211_SN_MASK; in ieee80211_mark_rx_ba_filtered_frames()
4323 if (diff >= tid_agg_rx->buf_size) { in ieee80211_mark_rx_ba_filtered_frames()
4324 tid_agg_rx->reorder_buf_filtered = 0; in ieee80211_mark_rx_ba_filtered_frames()
4331 for (i = 0; i < tid_agg_rx->buf_size; i++) { in ieee80211_mark_rx_ba_filtered_frames()
4332 int index = (ssn + i) % tid_agg_rx->buf_size; in ieee80211_mark_rx_ba_filtered_frames()
4334 tid_agg_rx->reorder_buf_filtered &= ~BIT_ULL(index); in ieee80211_mark_rx_ba_filtered_frames()
4336 tid_agg_rx->reorder_buf_filtered |= BIT_ULL(index); in ieee80211_mark_rx_ba_filtered_frames()
4340 ieee80211_sta_reorder_release(sta->sdata, tid_agg_rx, &frames); in ieee80211_mark_rx_ba_filtered_frames()
4343 spin_unlock_bh(&tid_agg_rx->reorder_lock); in ieee80211_mark_rx_ba_filtered_frames()