Skip to content

Commit

Permalink
mt76: avoid rx reorder buffer overflow
Browse files Browse the repository at this point in the history
[ Upstream commit 7c4f744 ]

Enlarge slot to support 11ax 256 BA (256 MPDUs in an AMPDU)

Signed-off-by: Chih-Min Chen <[email protected]>
Signed-off-by: Ryder Lee <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
ryderlee1110 authored and gregkh committed Jun 22, 2020
1 parent 095e7a6 commit 5deaa24
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions drivers/net/wireless/mediatek/mt76/agg-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
struct ieee80211_sta *sta;
struct mt76_rx_tid *tid;
bool sn_less;
u16 seqno, head, size;
u8 ackp, idx;
u16 seqno, head, size, idx;
u8 ackp;

__skb_queue_tail(frames, skb);

Expand Down Expand Up @@ -230,7 +230,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,
u16 ssn, u8 size)
u16 ssn, u16 size)
{
struct mt76_rx_tid *tid;

Expand All @@ -254,7 +254,7 @@ EXPORT_SYMBOL_GPL(mt76_rx_aggr_start);

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;

cancel_delayed_work(&tid->reorder_work);
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/mediatek/mt76/mt76.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ struct mt76_rx_tid {
struct delayed_work reorder_work;

u16 head;
u8 size;
u8 nframes;
u16 size;
u16 nframes;

u8 started:1, stopped:1, timer_pending:1;

Expand Down Expand Up @@ -723,7 +723,7 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx,
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,
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_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid,
Expand Down

0 comments on commit 5deaa24

Please sign in to comment.