Skip to content

Commit 1396436

Browse files
ryderlee1110gregkh
authored andcommitted
mt76: avoid rx reorder buffer overflow
[ 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]>
1 parent 35fde8a commit 1396436

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/net/wireless/mediatek/mt76/agg-rx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
154154
struct ieee80211_sta *sta;
155155
struct mt76_rx_tid *tid;
156156
bool sn_less;
157-
u16 seqno, head, size;
158-
u8 ackp, idx;
157+
u16 seqno, head, size, idx;
158+
u8 ackp;
159159

160160
__skb_queue_tail(frames, skb);
161161

@@ -240,7 +240,7 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames)
240240
}
241241

242242
int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno,
243-
u16 ssn, u8 size)
243+
u16 ssn, u16 size)
244244
{
245245
struct mt76_rx_tid *tid;
246246

@@ -264,7 +264,7 @@ EXPORT_SYMBOL_GPL(mt76_rx_aggr_start);
264264

265265
static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
266266
{
267-
u8 size = tid->size;
267+
u16 size = tid->size;
268268
int i;
269269

270270
cancel_delayed_work(&tid->reorder_work);

drivers/net/wireless/mediatek/mt76/mt76.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ struct mt76_rx_tid {
193193
struct delayed_work reorder_work;
194194

195195
u16 head;
196-
u8 size;
197-
u8 nframes;
196+
u16 size;
197+
u16 nframes;
198198

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

@@ -537,7 +537,7 @@ int mt76_get_survey(struct ieee80211_hw *hw, int idx,
537537
void mt76_set_stream_caps(struct mt76_dev *dev, bool vht);
538538

539539
int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid,
540-
u16 ssn, u8 size);
540+
u16 ssn, u16 size);
541541
void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tid);
542542

543543
void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid,

0 commit comments

Comments
 (0)