blob: 5e0d81fddfb9cd75e1648c8b21c0c456289b95b7 [file] [log] [blame]
From c931d9454ecfce777ac68071d4687f1ebb302917 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Mon, 7 Mar 2022 19:32:29 +0800
Subject: [PATCH 5/6] mt76: mt7915: fix MBSS index condition in DBDC mode
MT7915_MAX_INTERFACES is per-band declartion.
Signed-off-by: Evelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: Bo Jiao <bo.jiao@mediatek.com>
---
mt76.h | 2 +-
mt7915/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mt76.h b/mt76.h
index d5f8650f..6e528e42 100644
--- a/mt76.h
+++ b/mt76.h
@@ -732,7 +732,7 @@ struct mt76_dev {
u32 wcid_mask[DIV_ROUND_UP(MT76_N_WCIDS, 32)];
u32 wcid_phy_mask[DIV_ROUND_UP(MT76_N_WCIDS, 32)];
- u32 vif_mask;
+ u64 vif_mask;
struct mt76_wcid global_wcid;
struct mt76_wcid __rcu *wcid[MT76_N_WCIDS];
diff --git a/mt7915/main.c b/mt7915/main.c
index c3f44d80..3111217b 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -205,7 +205,7 @@ static int mt7915_add_interface(struct ieee80211_hw *hw,
phy->monitor_vif = vif;
mvif->mt76.idx = ffs(~dev->mt76.vif_mask) - 1;
- if (mvif->mt76.idx >= MT7915_MAX_INTERFACES) {
+ if (mvif->mt76.idx >= MT7915_MAX_INTERFACES * (dev->dbdc_support + 1)) {
ret = -ENOSPC;
goto out;
}
--
2.18.0