Commit 7c4f744d authored by Ryder Lee's avatar Ryder Lee Committed by Felix Fietkau

mt76: avoid rx reorder buffer overflow

Enlarge slot to support 11ax 256 BA (256 MPDUs in an AMPDU)
Signed-off-by: default avatarChih-Min Chen <chih-min.chen@mediatek.com>
Signed-off-by: default avatarRyder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 1245fe6a
...@@ -152,8 +152,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames) ...@@ -152,8 +152,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
struct ieee80211_sta *sta; struct ieee80211_sta *sta;
struct mt76_rx_tid *tid; struct mt76_rx_tid *tid;
bool sn_less; bool sn_less;
u16 seqno, head, size; u16 seqno, head, size, idx;
u8 ackp, idx; u8 ackp;
__skb_queue_tail(frames, skb); __skb_queue_tail(frames, skb);
...@@ -239,7 +239,7 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames) ...@@ -239,7 +239,7 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
} }
int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno, int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno,
u16 ssn, u8 size) u16 ssn, u16 size)
{ {
struct mt76_rx_tid *tid; struct mt76_rx_tid *tid;
...@@ -264,7 +264,7 @@ EXPORT_SYMBOL_GPL(mt76_rx_aggr_start); ...@@ -264,7 +264,7 @@ EXPORT_SYMBOL_GPL(mt76_rx_aggr_start);
static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid) static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
{ {
u8 size = tid->size; u16 size = tid->size;
int i; int i;
spin_lock_bh(&tid->lock); spin_lock_bh(&tid->lock);
......
...@@ -244,8 +244,8 @@ struct mt76_rx_tid { ...@@ -244,8 +244,8 @@ struct mt76_rx_tid {
struct delayed_work reorder_work; struct delayed_work reorder_work;
u16 head; u16 head;
u8 size; u16 size;
u8 nframes; u16 nframes;
u8 num; u8 num;
...@@ -798,7 +798,7 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx, ...@@ -798,7 +798,7 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx,
void mt76_set_stream_caps(struct mt76_dev *dev, bool vht); void mt76_set_stream_caps(struct mt76_dev *dev, bool vht);
int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid, int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid,
u16 ssn, u8 size); u16 ssn, u16 size);
void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid); void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid);
void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid, void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment