linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryder Lee <ryder.lee@mediatek.com>
To: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Shayne Chen <shayne.chen@mediatek.com>,
	YF Luo <yf.luo@mediatek.com>,
	Yiwei Chung <yiwei.chung@mediatek.com>,
	Chih-Min Chen <chih-min.chen@mediatek.com>,
	Evelyn Tsai <evelyn.tsai@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>,
	<linux-wireless@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	Ryder Lee <ryder.lee@mediatek.com>
Subject: [PATCH v1 01/16] mt76: avoid rx reorder buffer overflow
Date: Sat, 11 Apr 2020 06:51:16 +0800	[thread overview]
Message-ID: <749e0b262ffe77a854d9d78b6eb833db77c96541.1586558901.git.ryder.lee@mediatek.com> (raw)
In-Reply-To: <cover.1586558901.git.ryder.lee@mediatek.com>

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

Signed-off-by: Chih-Min Chen <chih-min.chen@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/agg-rx.c | 8 ++++----
 drivers/net/wireless/mediatek/mt76/mt76.h   | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/agg-rx.c b/drivers/net/wireless/mediatek/mt76/agg-rx.c
index f77f03530259..acdbe6f8248d 100644
--- a/drivers/net/wireless/mediatek/mt76/agg-rx.c
+++ b/drivers/net/wireless/mediatek/mt76/agg-rx.c
@@ -152,8 +152,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);
 
@@ -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,
-		       u16 ssn, u8 size)
+		       u16 ssn, u16 size)
 {
 	struct mt76_rx_tid *tid;
 
@@ -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)
 {
-	u8 size = tid->size;
+	u16 size = tid->size;
 	int i;
 
 	spin_lock_bh(&tid->lock);
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index e31d98a4f88f..36fe163889b8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -244,8 +244,8 @@ struct mt76_rx_tid {
 	struct delayed_work reorder_work;
 
 	u16 head;
-	u8 size;
-	u8 nframes;
+	u16 size;
+	u16 nframes;
 
 	u8 num;
 
@@ -794,7 +794,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,
-- 
2.18.0

  reply	other threads:[~2020-04-10 22:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 22:51 [PATCH v1 00/16] Add MediaTek IEEE 802.11ax devices - MT7915E Ryder Lee
2020-04-10 22:51 ` Ryder Lee [this message]
2020-04-10 22:51 ` [PATCH v1 02/16] mt76: add support for HE RX rate reporting Ryder Lee
2020-04-10 22:51 ` [PATCH v1 03/16] mt76: add Rx stats support for radiotap Ryder Lee
2020-04-10 22:51 ` [PATCH v1 04/16] mt76: adjust wcid size to support new 802.11ax generation Ryder Lee
2020-04-10 22:51 ` [PATCH v1 05/16] mt76: add HE phy modes and hardware queue Ryder Lee
2020-04-10 22:51 ` [PATCH v1 06/16] mt76: add mac80211 driver for MT7915 PCIe-based chipsets Ryder Lee
2020-04-10 22:51 ` [PATCH v1 07/16] mt76: mt7915: implement HE per-rate tx power support Ryder Lee
2020-04-10 22:51 ` [PATCH v1 08/16] mt76: mt7915: add offloading Tx AMSDU support Ryder Lee
2020-04-10 22:51 ` [PATCH v1 09/16] mt76: mt7915: register HE capabilities for each interface Ryder Lee
2020-04-10 22:51 ` [PATCH v1 10/16] mt76: mt7915: add HE bss_conf support for interfaces Ryder Lee
2020-04-10 22:51 ` [PATCH v1 11/16] mt76: mt7915: add HE capabilities support for peers Ryder Lee
2020-04-10 22:51 ` [PATCH v1 12/16] mt76: mt7915: add Rx radiotap header support Ryder Lee
2020-04-10 22:51 ` [PATCH v1 13/16] mt76: mt7915: add .sta_add_debugfs support Ryder Lee
2020-04-10 22:51 ` [PATCH v1 14/16] mt76: mt7915: add .sta_statistics support Ryder Lee
2020-04-10 22:51 ` [PATCH v1 15/16] mt76: mt7915: set peer Tx fixed rate through debugfs Ryder Lee
2020-04-10 22:51 ` [PATCH v1 16/16] mt76: mt7915: enable firmware module debug support Ryder Lee
2020-04-14  6:48 ` [PATCH v1 00/16] Add MediaTek IEEE 802.11ax devices - MT7915E Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=749e0b262ffe77a854d9d78b6eb833db77c96541.1586558901.git.ryder.lee@mediatek.com \
    --to=ryder.lee@mediatek.com \
    --cc=chih-min.chen@mediatek.com \
    --cc=evelyn.tsai@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=yf.luo@mediatek.com \
    --cc=yiwei.chung@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).