diff mbox series

[3/8] mt76: mt7615: add mt7663 support to mt7615_mcu_set_tx_ba

Message ID 5708ec66f5b2a8ed55f53a0bb3e43bfb6808835b.1582243031.git.lorenzo@kernel.org
State New
Headers show
Series [1/8] mt76: mt7615: introduce mt7615_register_map | expand

Commit Message

Lorenzo Bianconi Feb. 21, 2020, 12:07 a.m. UTC
Extend mt7615_mcu_set_tx_ba routine in order to support mt7663e driver

Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Co-developed-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index 7218a3041ead..1b8c8da56b84 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -1746,7 +1746,9 @@  int mt7615_mcu_set_tx_ba(struct mt7615_dev *dev,
 	wtbl_ba->sn = add ? cpu_to_le16(params->ssn) : 0;
 	wtbl_ba->ba_en = add;
 
-	if (add) {
+	if (is_mt7663(&dev->mt76)) {
+		wtbl_ba->ba_winsize = cpu_to_le16(params->buf_size);
+	} else if (add) {
 		u8 idx, ba_range[] = { 4, 8, 12, 24, 36, 48, 54, 64 };
 
 		for (idx = 7; idx > 0; idx--) {