* [PATCH mt76 v2 0/4] wifi: mt76: mt7996: rx filter fixes and improvements.
@ 2025-04-30 23:22 Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories Rory Little
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Rory Little @ 2025-04-30 23:22 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee; +Cc: shayne.chen, sean.wang, linux-wireless
The previous series introduced a compiler warning in the first patch,
due to an unused return value. This series fixes that.
v2:
- Catch and return error value from mt7996_init_radio_phy_debugfs.
Rory Little (4):
wifi: mt76: mt7996: Add per-radio phy debugfs directories.
wifi: mt76: mt7996: Add debugfs file for rxfilter.
wifi: mt76: mt7996: Refactor of rx filter logic.
wifi: mt76: mt7996: Allow monitor enable if phy is already running.
.../wireless/mediatek/mt76/mt7996/debugfs.c | 78 +++++++++++
.../net/wireless/mediatek/mt76/mt7996/main.c | 125 +++++++++---------
.../wireless/mediatek/mt76/mt7996/mt7996.h | 9 +-
3 files changed, 151 insertions(+), 61 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories.
2025-04-30 23:22 [PATCH mt76 v2 0/4] wifi: mt76: mt7996: rx filter fixes and improvements Rory Little
@ 2025-04-30 23:22 ` Rory Little
2025-05-07 6:06 ` kernel test robot
2025-04-30 23:22 ` [PATCH mt76 v2 2/4] wifi: mt76: mt7996: Add debugfs file for rxfilter Rory Little
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Rory Little @ 2025-04-30 23:22 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee; +Cc: shayne.chen, sean.wang, linux-wireless
These can be used instead of reporting just from the first phy, or using
one file for all phys, as has been done previously.
Signed-off-by: Rory Little <rory@candelatech.com>
---
.../wireless/mediatek/mt76/mt7996/debugfs.c | 25 +++++++++++++++++++
.../wireless/mediatek/mt76/mt7996/mt7996.h | 2 ++
2 files changed, 27 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
index 4a28db17a287..3548b2bd9b72 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
@@ -842,9 +842,28 @@ mt7996_rf_regval_set(void *data, u64 val)
DEFINE_DEBUGFS_ATTRIBUTE(fops_rf_regval, mt7996_rf_regval_get,
mt7996_rf_regval_set, "0x%08llx\n");
+static int
+mt7996_init_radio_phy_debugfs(struct mt7996_phy *phy)
+{
+ struct dentry *dir;
+ char fname[12];
+
+ snprintf(fname, sizeof(fname), "radio_phy%d", phy->mt76->band_idx);
+ dir = debugfs_create_dir(fname, phy->dev->debugfs_dir);
+
+ if (IS_ERR_OR_NULL(dir))
+ return -ENOMEM;
+
+ phy->debugfs_dir = dir;
+
+ return 0;
+}
+
int mt7996_init_debugfs(struct mt7996_dev *dev)
{
+ int err;
struct dentry *dir;
+ struct mt7996_phy *phy;
dir = mt76_register_debugfs_fops(&dev->mphy, NULL);
if (!dir)
@@ -877,6 +896,12 @@ int mt7996_init_debugfs(struct mt7996_dev *dev)
dev->debugfs_dir = dir;
+ mt7996_for_each_phy(dev, phy) {
+ err = mt7996_init_radio_phy_debugfs(phy);
+ if (err)
+ return err;
+ }
+
return 0;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
index 43e646ed6094..3300b7c8e4d2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
@@ -296,6 +296,8 @@ struct mt7996_phy {
bool has_aux_rx;
bool counter_reset;
+
+ struct dentry *debugfs_dir;
};
struct mt7996_dev {
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mt76 v2 2/4] wifi: mt76: mt7996: Add debugfs file for rxfilter.
2025-04-30 23:22 [PATCH mt76 v2 0/4] wifi: mt76: mt7996: rx filter fixes and improvements Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories Rory Little
@ 2025-04-30 23:22 ` Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 3/4] wifi: mt76: mt7996: Refactor of rx filter logic Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 4/4] wifi: mt76: mt7996: Allow monitor enable if phy is already running Rory Little
3 siblings, 0 replies; 7+ messages in thread
From: Rory Little @ 2025-04-30 23:22 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee; +Cc: shayne.chen, sean.wang, linux-wireless
Will report both control registers, and list both the raw u32 value as
well as reporting each flag in plain text.
Signed-off-by: Rory Little <rory@candelatech.com>
---
.../wireless/mediatek/mt76/mt7996/debugfs.c | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
index 3548b2bd9b72..7703db507fe6 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
@@ -842,6 +842,48 @@ mt7996_rf_regval_set(void *data, u64 val)
DEFINE_DEBUGFS_ATTRIBUTE(fops_rf_regval, mt7996_rf_regval_get,
mt7996_rf_regval_set, "0x%08llx\n");
+static int
+mt7996_rxfilter_show(struct seq_file *file, void *data)
+{
+ struct mt7996_phy *phy = file->private;
+
+ mutex_lock(&phy->dev->mt76.mutex);
+
+ seq_printf(file, "CR: 0x%08x\n", phy->rxfilter);
+
+#define MT7996_RFCR_PRINT(flag) do { \
+ if (phy->rxfilter & MT_WF_RFCR_##flag) \
+ seq_printf(file, #flag "\n"); \
+ } while (0)
+
+ MT7996_RFCR_PRINT(DROP_STBC_MULTI);
+ MT7996_RFCR_PRINT(DROP_FCSFAIL);
+ MT7996_RFCR_PRINT(DROP_PROBEREQ);
+ MT7996_RFCR_PRINT(DROP_MCAST);
+ MT7996_RFCR_PRINT(DROP_BCAST);
+ MT7996_RFCR_PRINT(DROP_MCAST_FILTERED);
+ MT7996_RFCR_PRINT(DROP_A3_MAC);
+ MT7996_RFCR_PRINT(DROP_A3_BSSID);
+ MT7996_RFCR_PRINT(DROP_A2_BSSID);
+ MT7996_RFCR_PRINT(DROP_OTHER_BEACON);
+ MT7996_RFCR_PRINT(DROP_FRAME_REPORT);
+ MT7996_RFCR_PRINT(DROP_CTL_RSV);
+ MT7996_RFCR_PRINT(DROP_CTS);
+ MT7996_RFCR_PRINT(DROP_RTS);
+ MT7996_RFCR_PRINT(DROP_DUPLICATE);
+ MT7996_RFCR_PRINT(DROP_OTHER_BSS);
+ MT7996_RFCR_PRINT(DROP_OTHER_UC);
+ MT7996_RFCR_PRINT(DROP_OTHER_TIM);
+ MT7996_RFCR_PRINT(DROP_NDPA);
+ MT7996_RFCR_PRINT(DROP_UNWANTED_CTL);
+
+ mutex_unlock(&phy->dev->mt76.mutex);
+
+ return 0;
+}
+
+DEFINE_SHOW_ATTRIBUTE(mt7996_rxfilter);
+
static int
mt7996_init_radio_phy_debugfs(struct mt7996_phy *phy)
{
@@ -854,6 +896,8 @@ mt7996_init_radio_phy_debugfs(struct mt7996_phy *phy)
if (IS_ERR_OR_NULL(dir))
return -ENOMEM;
+ debugfs_create_file("rxfilter", 0400, dir, phy, &mt7996_rxfilter_fops);
+
phy->debugfs_dir = dir;
return 0;
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mt76 v2 3/4] wifi: mt76: mt7996: Refactor of rx filter logic.
2025-04-30 23:22 [PATCH mt76 v2 0/4] wifi: mt76: mt7996: rx filter fixes and improvements Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 2/4] wifi: mt76: mt7996: Add debugfs file for rxfilter Rory Little
@ 2025-04-30 23:22 ` Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 4/4] wifi: mt76: mt7996: Allow monitor enable if phy is already running Rory Little
3 siblings, 0 replies; 7+ messages in thread
From: Rory Little @ 2025-04-30 23:22 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee; +Cc: shayne.chen, sean.wang, linux-wireless
The existing logic for configuring the rx filter is hard to follow and
contained at least one sneaky bug: since mt7996_set_monitor(_, false) is
only called when a monitor is removed, MT_WF_RFCR_DROP_OTHER_UC would
not be configured on a fresh boot. This meant that the rxfilter was too
verbose until a monitor had been added and removed. This refactor hopes
to avoid sequence-of-action bugs like this by:
1. Placing all logic that directly alters the rx filter in one function,
so that state does not need to be tracked across methods.
2. Explicitly tracking all values sent to the control registers within
the radio phy, for easier debugging.
3. Realizing the rx filter control registers freshly every time that
mt7996_phy_set_rxfilter() is called.
In order to perform goals (1) and (3), new state needed to be added
to the radio phy to remember the mac80211 rxfilter flags that had been
requested, and to track if the radio is acting as a monitor.
Since the existing MT76_FILTER macro could not handle all cases where
the rxfilter needs to be configured, it was not used here.
Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Rory Little <rory@candelatech.com>
---
.../wireless/mediatek/mt76/mt7996/debugfs.c | 15 ++-
.../net/wireless/mediatek/mt76/mt7996/main.c | 114 +++++++++---------
.../wireless/mediatek/mt76/mt7996/mt7996.h | 7 +-
3 files changed, 77 insertions(+), 59 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
index 7703db507fe6..0c840a251929 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
@@ -849,12 +849,14 @@ mt7996_rxfilter_show(struct seq_file *file, void *data)
mutex_lock(&phy->dev->mt76.mutex);
- seq_printf(file, "CR: 0x%08x\n", phy->rxfilter);
+ seq_printf(file, "CR: 0x%08x\n", phy->rxfilter.cr);
-#define MT7996_RFCR_PRINT(flag) do { \
- if (phy->rxfilter & MT_WF_RFCR_##flag) \
+#define __MT7996_RXFILTER_PRINT(reg, flag) do { \
+ if (phy->rxfilter.reg & (flag)) \
seq_printf(file, #flag "\n"); \
} while (0)
+#define MT7996_RFCR_PRINT(flag) __MT7996_RXFILTER_PRINT(cr, MT_WF_RFCR_##flag)
+#define MT7996_RFCR1_PRINT(flag) __MT7996_RXFILTER_PRINT(cr1, MT_WF_RFCR1_##flag)
MT7996_RFCR_PRINT(DROP_STBC_MULTI);
MT7996_RFCR_PRINT(DROP_FCSFAIL);
@@ -877,6 +879,13 @@ mt7996_rxfilter_show(struct seq_file *file, void *data)
MT7996_RFCR_PRINT(DROP_NDPA);
MT7996_RFCR_PRINT(DROP_UNWANTED_CTL);
+ seq_printf(file, "\nCR1: 0x%08x\n", phy->rxfilter.cr1);
+ MT7996_RFCR1_PRINT(DROP_ACK);
+ MT7996_RFCR1_PRINT(DROP_BF_POLL);
+ MT7996_RFCR1_PRINT(DROP_BA);
+ MT7996_RFCR1_PRINT(DROP_CFEND);
+ MT7996_RFCR1_PRINT(DROP_CFACK);
+
mutex_unlock(&phy->dev->mt76.mutex);
return 0;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index 91c64e3a0860..cbc9826320a7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -391,25 +391,60 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
static void mt7996_phy_set_rxfilter(struct mt7996_phy *phy)
{
struct mt7996_dev *dev = phy->dev;
- u32 ctl_flags = MT_WF_RFCR1_DROP_ACK |
- MT_WF_RFCR1_DROP_BF_POLL |
- MT_WF_RFCR1_DROP_BA |
- MT_WF_RFCR1_DROP_CFEND |
- MT_WF_RFCR1_DROP_CFACK;
- u32 filter = phy->rxfilter;
-
- if (filter & MT_WF_RFCR_DROP_OTHER_UC) {
- filter |= MT_WF_RFCR_DROP_CTS |
- MT_WF_RFCR_DROP_RTS |
- MT_WF_RFCR_DROP_CTL_RSV |
- MT_WF_RFCR_DROP_FCSFAIL;
- }
+ u32 supported_flags = 0;
+
+ /* Initially reset the filter */
+ phy->rxfilter.cr = 0;
+ phy->rxfilter.cr1 = 0;
+
+ /* The following HW flags should never be set here:
+ * MT_WF_RFCR_DROP_OTHER_BSS
+ * MT_WF_RFCR_DROP_OTHER_BEACON
+ * MT_WF_RFCR_DROP_FRAME_REPORT
+ * MT_WF_RFCR_DROP_PROBEREQ
+ * MT_WF_RFCR_DROP_MCAST_FILTERED
+ * MT_WF_RFCR_DROP_MCAST
+ * MT_WF_RFCR_DROP_BCAST
+ * MT_WF_RFCR_DROP_DUPLICATE
+ * MT_WF_RFCR_DROP_A2_BSSID
+ * MT_WF_RFCR_DROP_UNWANTED_CTL
+ * MT_WF_RFCR_DROP_STBC_MULTI
+ */
- mt76_wr(dev, MT_WF_RFCR(phy->mt76->band_idx), filter);
- if (filter & MT_WF_RFCR_DROP_CTL_RSV)
- mt76_set(dev, MT_WF_RFCR1(phy->mt76->band_idx), ctl_flags);
- else
- mt76_clear(dev, MT_WF_RFCR1(phy->mt76->band_idx), ctl_flags);
+ supported_flags |= FIF_OTHER_BSS;
+ if (!(phy->mac80211_rxfilter_flags & FIF_OTHER_BSS))
+ phy->rxfilter.cr |= MT_WF_RFCR_DROP_OTHER_TIM |
+ MT_WF_RFCR_DROP_A3_MAC |
+ MT_WF_RFCR_DROP_A3_BSSID;
+
+ supported_flags |= FIF_FCSFAIL;
+ if (!(phy->mac80211_rxfilter_flags & FIF_FCSFAIL))
+ phy->rxfilter.cr |= MT_WF_RFCR_DROP_FCSFAIL;
+
+ supported_flags |= FIF_CONTROL;
+ if (!(phy->mac80211_rxfilter_flags & FIF_CONTROL))
+ phy->rxfilter.cr |= MT_WF_RFCR_DROP_CTS |
+ MT_WF_RFCR_DROP_RTS |
+ MT_WF_RFCR_DROP_CTL_RSV;
+
+ if (!phy->monitor_enabled)
+ phy->rxfilter.cr |= MT_WF_RFCR_DROP_CTS |
+ MT_WF_RFCR_DROP_RTS |
+ MT_WF_RFCR_DROP_CTL_RSV |
+ MT_WF_RFCR_DROP_FCSFAIL |
+ MT_WF_RFCR_DROP_OTHER_UC;
+
+ if (!((phy->mac80211_rxfilter_flags & FIF_CONTROL) || phy->monitor_enabled))
+ phy->rxfilter.cr1 |= MT_WF_RFCR1_DROP_ACK |
+ MT_WF_RFCR1_DROP_BF_POLL |
+ MT_WF_RFCR1_DROP_BA |
+ MT_WF_RFCR1_DROP_CFEND |
+ MT_WF_RFCR1_DROP_CFACK;
+
+ phy->mac80211_rxfilter_flags &= supported_flags;
+
+ mt76_wr(dev, MT_WF_RFCR(phy->mt76->band_idx), phy->rxfilter.cr);
+ mt76_wr(dev, MT_WF_RFCR1(phy->mt76->band_idx), phy->rxfilter.cr1);
}
static void mt7996_set_monitor(struct mt7996_phy *phy, bool enabled)
@@ -419,13 +454,10 @@ static void mt7996_set_monitor(struct mt7996_phy *phy, bool enabled)
if (!phy)
return;
- if (enabled == !(phy->rxfilter & MT_WF_RFCR_DROP_OTHER_UC))
+ if (enabled == phy->monitor_enabled)
return;
- if (!enabled)
- phy->rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
- else
- phy->rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
+ phy->monitor_enabled = enabled;
mt76_rmw_field(dev, MT_DMA_DCR0(phy->mt76->band_idx),
MT_DMA_DCR0_RXD_G5_EN, enabled);
@@ -620,46 +652,18 @@ static void mt7996_configure_filter(struct ieee80211_hw *hw,
{
struct mt7996_dev *dev = mt7996_hw_dev(hw);
struct mt7996_phy *phy;
- u32 filter_mask = 0, filter_set = 0;
u32 flags = 0;
-#define MT76_FILTER(_flag, _hw) do { \
- flags |= *total_flags & FIF_##_flag; \
- filter_mask |= (_hw); \
- filter_set |= !(flags & FIF_##_flag) * (_hw); \
- } while (0)
-
mutex_lock(&dev->mt76.mutex);
- MT76_FILTER(OTHER_BSS, MT_WF_RFCR_DROP_OTHER_TIM |
- MT_WF_RFCR_DROP_A3_MAC |
- MT_WF_RFCR_DROP_A3_BSSID);
-
- MT76_FILTER(FCSFAIL, MT_WF_RFCR_DROP_FCSFAIL);
-
- MT76_FILTER(CONTROL, MT_WF_RFCR_DROP_CTS |
- MT_WF_RFCR_DROP_RTS |
- MT_WF_RFCR_DROP_CTL_RSV);
-
- *total_flags = flags;
-
mt7996_for_each_phy(dev, phy) {
- phy->rxfilter &= ~(MT_WF_RFCR_DROP_OTHER_BSS |
- MT_WF_RFCR_DROP_OTHER_BEACON |
- MT_WF_RFCR_DROP_FRAME_REPORT |
- MT_WF_RFCR_DROP_PROBEREQ |
- MT_WF_RFCR_DROP_MCAST_FILTERED |
- MT_WF_RFCR_DROP_MCAST |
- MT_WF_RFCR_DROP_BCAST |
- MT_WF_RFCR_DROP_DUPLICATE |
- MT_WF_RFCR_DROP_A2_BSSID |
- MT_WF_RFCR_DROP_UNWANTED_CTL |
- MT_WF_RFCR_DROP_STBC_MULTI |
- filter_mask);
- phy->rxfilter |= filter_set;
+ phy->mac80211_rxfilter_flags = *total_flags;
mt7996_phy_set_rxfilter(phy);
+ flags |= phy->mac80211_rxfilter_flags;
}
+ *total_flags = flags;
+
mutex_unlock(&dev->mt76.mutex);
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
index 3300b7c8e4d2..2b2108f96255 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
@@ -273,7 +273,12 @@ struct mt7996_phy {
u8 throttle_state;
u32 throttle_temp[2]; /* 0: critical high, 1: maximum */
- u32 rxfilter;
+ bool monitor_enabled;
+ u32 mac80211_rxfilter_flags;
+ struct {
+ u32 cr;
+ u32 cr1;
+ } rxfilter; /* Rx filter control registers */
u64 omac_mask;
u16 noise;
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH mt76 v2 4/4] wifi: mt76: mt7996: Allow monitor enable if phy is already running.
2025-04-30 23:22 [PATCH mt76 v2 0/4] wifi: mt76: mt7996: rx filter fixes and improvements Rory Little
` (2 preceding siblings ...)
2025-04-30 23:22 ` [PATCH mt76 v2 3/4] wifi: mt76: mt7996: Refactor of rx filter logic Rory Little
@ 2025-04-30 23:22 ` Rory Little
3 siblings, 0 replies; 7+ messages in thread
From: Rory Little @ 2025-04-30 23:22 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee; +Cc: shayne.chen, sean.wang, linux-wireless
This path was being skipped if, for example, a monitor was created on
a phy which already contained a station.
Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Signed-off-by: Rory Little <rory@candelatech.com>
---
drivers/net/wireless/mediatek/mt76/mt7996/main.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index cbc9826320a7..16314fdc090c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -478,13 +478,14 @@ static int mt7996_add_interface(struct ieee80211_hw *hw,
for (i = 0; i < MT7996_MAX_RADIOS; i++) {
struct mt7996_phy *phy = dev->radio_phy[i];
- if (!phy || !(wdev->radio_mask & BIT(i)) ||
- test_bit(MT76_STATE_RUNNING, &phy->mt76->state))
+ if (!phy || !(wdev->radio_mask & BIT(i)))
continue;
- err = mt7996_run(phy);
- if (err)
- goto out;
+ if (!test_bit(MT76_STATE_RUNNING, &phy->mt76->state)) {
+ err = mt7996_run(phy);
+ if (err)
+ goto out;
+ }
if (vif->type == NL80211_IFTYPE_MONITOR)
mt7996_set_monitor(phy, true);
--
2.45.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories.
2025-04-30 23:22 ` [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories Rory Little
@ 2025-05-07 6:06 ` kernel test robot
2025-05-07 20:57 ` Rory Little
0 siblings, 1 reply; 7+ messages in thread
From: kernel test robot @ 2025-05-07 6:06 UTC (permalink / raw)
To: Rory Little, nbd, lorenzo, ryder.lee
Cc: oe-kbuild-all, shayne.chen, sean.wang, linux-wireless
Hi Rory,
kernel test robot noticed the following build warnings:
[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.15-rc5 next-20250506]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Rory-Little/wifi-mt76-mt7996-Add-per-radio-phy-debugfs-directories/20250501-072345
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20250430232225.3943242-2-rory%40candelatech.com
patch subject: [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories.
config: openrisc-allyesconfig (https://download.01.org/0day-ci/archive/20250507/202505071352.R4Bb2GN1-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505071352.R4Bb2GN1-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505071352.R4Bb2GN1-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c: In function 'mt7996_init_debugfs':
>> drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c:851:52: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
851 | snprintf(fname, sizeof(fname), "radio_phy%d", phy->mt76->band_idx);
| ^
In function 'mt7996_init_radio_phy_debugfs',
inlined from 'mt7996_init_debugfs' at drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c:900:9:
drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c:851:9: note: 'snprintf' output between 11 and 13 bytes into a destination of size 12
851 | snprintf(fname, sizeof(fname), "radio_phy%d", phy->mt76->band_idx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/snprintf +851 drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
841
842 DEFINE_DEBUGFS_ATTRIBUTE(fops_rf_regval, mt7996_rf_regval_get,
843 mt7996_rf_regval_set, "0x%08llx\n");
844
845 static int
846 mt7996_init_radio_phy_debugfs(struct mt7996_phy *phy)
847 {
848 struct dentry *dir;
849 char fname[12];
850
> 851 snprintf(fname, sizeof(fname), "radio_phy%d", phy->mt76->band_idx);
852 dir = debugfs_create_dir(fname, phy->dev->debugfs_dir);
853
854 if (IS_ERR_OR_NULL(dir))
855 return -ENOMEM;
856
857 phy->debugfs_dir = dir;
858
859 return 0;
860 }
861
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories.
2025-05-07 6:06 ` kernel test robot
@ 2025-05-07 20:57 ` Rory Little
0 siblings, 0 replies; 7+ messages in thread
From: Rory Little @ 2025-05-07 20:57 UTC (permalink / raw)
To: nbd, lorenzo, ryder.lee; +Cc: shayne.chen, sean.wang, linux-wireless
> kernel test robot noticed the following build warnings:
My apologies for letting these slip through again. Before I resubmit a
V3 - in hindsight dumping debugfs additions in with a refactor and two
bugfixes was probably poor form on my part. Are there any parts of this
series that are wanted upstream, and should I break those out into
individual patches?
- Rory
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-05-07 20:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 23:22 [PATCH mt76 v2 0/4] wifi: mt76: mt7996: rx filter fixes and improvements Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 1/4] wifi: mt76: mt7996: Add per-radio phy debugfs directories Rory Little
2025-05-07 6:06 ` kernel test robot
2025-05-07 20:57 ` Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 2/4] wifi: mt76: mt7996: Add debugfs file for rxfilter Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 3/4] wifi: mt76: mt7996: Refactor of rx filter logic Rory Little
2025-04-30 23:22 ` [PATCH mt76 v2 4/4] wifi: mt76: mt7996: Allow monitor enable if phy is already running Rory Little
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox