[][MT76][Fix mt7915 Air-Monitor issue]
[Description]
Fix support for 16 station monitor simultaneously.
[Release-log]
Change-Id: Ib7e08b48f21b1f80b5ba6dc99047ad42a4278e1c
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7428324
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
index 7f91f5c..2db295a 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/1002-wifi-mt76-mt7915-air-monitor-support.patch
@@ -8,9 +8,9 @@
mt7915/mac.c | 4 +
mt7915/main.c | 3 +
mt7915/mt7915.h | 34 +++++
- mt7915/vendor.c | 359 ++++++++++++++++++++++++++++++++++++++++++++++
+ mt7915/vendor.c | 361 ++++++++++++++++++++++++++++++++++++++++++++++
mt7915/vendor.h | 38 +++++
- 6 files changed, 440 insertions(+)
+ 6 files changed, 442 insertions(+)
diff --git a/mt76_connac_mcu.h b/mt76_connac_mcu.h
index 1321445..411911c 100644
@@ -64,7 +64,7 @@
+#ifdef CONFIG_MTK_VENDOR
+#define MT7915_AIR_MONITOR_MAX_ENTRY 16
-+#define MT7915_AIR_MONITOR_MAX_GROUP MT7915_AIR_MONITOR_MAX_ENTRY >> 2
++#define MT7915_AIR_MONITOR_MAX_GROUP MT7915_AIR_MONITOR_MAX_ENTRY >> 1
+
+struct mt7915_air_monitor_group {
+ bool enable;
@@ -117,7 +117,7 @@
index 98fd9c2..b94d787 100644
--- a/mt7915/vendor.c
+++ b/mt7915/vendor.c
-@@ -430,6 +430,353 @@ out:
+@@ -430,6 +430,355 @@ out:
return err;
}
@@ -265,8 +265,10 @@
+ group = &(amnt_ctrl->group[i]);
+ if (group->used[0] == 0)
+ j = 0;
-+ else
++ else if (group->used[1] == 0)
+ j = 1;
++ else
++ continue;
+
+ group->enable = 1;
+ group->used[j] = 1;
@@ -471,7 +473,7 @@
static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
{
.info = {
-@@ -442,6 +789,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
+@@ -442,6 +791,18 @@ static const struct wiphy_vendor_command mt7915_vendor_commands[] = {
.dumpit = mt7915_vendor_csi_ctrl_dump,
.policy = csi_ctrl_policy,
.maxattr = MTK_VENDOR_ATTR_CSI_CTRL_MAX,