mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
mac80211: notify the driver upon BAR Rx
When we receive a BAR, this typically means that our peer doesn't hear our Block-Acks or that we can't hear its frames. Either way, it is a good indication that the link is in a bad condition. This is why it can serve as a probe to the driver. Use the event_callback callback for this. Since more events with the same data will be added in the feature, the structure that describes the data attached to the event is called in a generic name: ieee80211_ba_event. This also means that from now on, the event_callback can't sleep. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
6e70d560ff
commit
6382246e89
2 changed files with 26 additions and 2 deletions
|
|
@ -2427,6 +2427,9 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames)
|
|||
struct {
|
||||
__le16 control, start_seq_num;
|
||||
} __packed bar_data;
|
||||
struct ieee80211_event event = {
|
||||
.type = BAR_RX_EVENT,
|
||||
};
|
||||
|
||||
if (!rx->sta)
|
||||
return RX_DROP_MONITOR;
|
||||
|
|
@ -2442,6 +2445,9 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames)
|
|||
return RX_DROP_MONITOR;
|
||||
|
||||
start_seq_num = le16_to_cpu(bar_data.start_seq_num) >> 4;
|
||||
event.u.ba.tid = tid;
|
||||
event.u.ba.ssn = start_seq_num;
|
||||
event.u.ba.sta = &rx->sta->sta;
|
||||
|
||||
/* reset session timer */
|
||||
if (tid_agg_rx->timeout)
|
||||
|
|
@ -2454,6 +2460,8 @@ ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx, struct sk_buff_head *frames)
|
|||
start_seq_num, frames);
|
||||
spin_unlock(&tid_agg_rx->reorder_lock);
|
||||
|
||||
drv_event_callback(rx->local, rx->sdata, &event);
|
||||
|
||||
kfree_skb(skb);
|
||||
return RX_QUEUED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue