* [PATCH] wifi: mac80211: fix monitor mode frame capture for real chanctx drivers
From: 傅继晗 @ 2026-03-08 16:45 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless, linux-kernel, stable, 傅继晗
Commit 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx drivers")
removed the fallback path in ieee80211_monitor_start_xmit() for when
the monitor interface has no channel context assigned. This broke frame
capture and injection for drivers that implement real channel context
ops (as opposed to the ieee80211_emulate_* helpers), such as the mt76
family, when a monitor interface runs alongside another interface
(e.g. managed mode).
In that scenario the (virtual) monitor sdata does not get a chanctx of
its own, even though there is an active one from the other interface.
Before the simplification the code fell back to local->_oper_chandef;
after it, the code goes straight to fail_rcu and silently drops every
injected frame.
Commit d594cc6f2c58 ("wifi: mac80211: restore non-chanctx injection
behaviour") restored the fallback for drivers using emulate_chanctx,
but explicitly left real chanctx drivers unfixed.
Fix this by falling back to the first entry in local->chanctx_list
when the monitor vif has no chanctx and the driver uses real channel
contexts. This is analogous to how ieee80211_hw_conf_chan() already
uses the same pattern.
Tested on MT7921AU (mt76) USB adapter:
- v6.13: managed + monitor coexistence restored (0 -> 37 frames/5s)
- v6.19: managed + monitor coexistence restored (0 -> 39 frames/5s)
- v7.0-rc2: managed + monitor coexistence restored (0 -> 33 frames/5s)
Cc: stable@vger.kernel.org
Fixes: 0a44dfc07074 ("wifi: mac80211: simplify non-chanctx drivers")
Link: https://github.com/morrownr/USB-WiFi/issues/682
Signed-off-by: 傅继晗 <fjhhz1997@gmail.com>
---
net/mac80211/tx.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8cdbd41..56eaf9a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2396,12 +2396,28 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
rcu_dereference(tmp_sdata->vif.bss_conf.chanctx_conf);
}
- if (chanctx_conf)
+ if (chanctx_conf) {
chandef = &chanctx_conf->def;
- else if (local->emulate_chanctx)
+ } else if (local->emulate_chanctx) {
chandef = &local->hw.conf.chandef;
- else
- goto fail_rcu;
+ } else {
+ /*
+ * For real chanctx drivers (e.g. mt76), the monitor
+ * interface may not have a chanctx assigned when running
+ * concurrently with another interface. Fall back to any
+ * active chanctx so that injection can still work on the
+ * operating channel.
+ */
+ struct ieee80211_chanctx *ctx;
+
+ ctx = list_first_entry_or_null(&local->chanctx_list,
+ struct ieee80211_chanctx,
+ list);
+ if (ctx)
+ chandef = &ctx->conf.def;
+ else
+ goto fail_rcu;
+ }
/*
* If driver/HW supports IEEE80211_CHAN_CAN_MONITOR we still
--
2.43.0
^ permalink raw reply related
* Re: [PATCH] wifi: b43: use register definitions in nphy_op_software_rfkill
From: Michael Büsch @ 2026-03-08 15:50 UTC (permalink / raw)
To: Joshua Peisach
Cc: linux-wireless, b43-dev, Francesco Dolcini, Johan Hovold,
Johannes Berg
In-Reply-To: <20260307170135.167460-1-jpeisach@ubuntu.com>
[-- Attachment #1: Type: text/plain, Size: 370 bytes --]
On Sat, 7 Mar 2026 12:01:35 -0500
Joshua Peisach <jpeisach@ubuntu.com> wrote:
> Replaces uses of hardcoded register addresses with proper definitions,
> for readability.
>
> Signed-off-by: Joshua Peisach <jpeisach@ubuntu.com>
Looks good to me. Generates the same object code.
Acked-by: Michael Büsch <m@bues.ch>
--
Michael Büsch
https://bues.ch/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH wireless-next] wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work()
From: Lorenzo Bianconi @ 2026-03-08 13:28 UTC (permalink / raw)
To: Lachlan Hodges; +Cc: Johannes Berg, linux-wireless
In-Reply-To: <jv2kdsru66rktkm6bwq3ww5wshubjtv36le5xk4ziedocc72gp@psssohaoamus>
[-- Attachment #1: Type: text/plain, Size: 542 bytes --]
> > + rcu_read_lock();
> > + sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
> > + if (sta) {
> > + unsigned long removed_links = sdata->u.mgd.removed_links;
> > + unsigned int link_id;
> > +
> > + for_each_set_bit(link_id, &removed_links,
> > + IEEE80211_MLD_MAX_NUM_LINKS)
> > + ieee80211_sta_free_link(sta, link_id);
> > + }
> > + rcu_read_unlock();
> > +
>
> Could use scoped_guard(rcu) instead?
I do not have a strong opinion here.
@Johannes: Which one do you prefer?
Regards,
Lorenzo
>
> lachlan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply
* [PATCH mt76] wifi: mmt76: mt7996: Decrement sta counter removing the link in mt7996_mac_reset_sta_iter()
From: Lorenzo Bianconi @ 2026-03-08 13:25 UTC (permalink / raw)
To: Felix Fietkau, Ryder Lee, Shayne Chen, Sean Wang,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: linux-wireless, linux-arm-kernel, linux-mediatek,
Lorenzo Bianconi
Decrement the phy station counter in mt7996_mac_reset_sta_iter routine
destroying the station link.
Fixes: ace5d3b6b49e8 ("wifi: mt76: mt7996: improve hardware restart reliability")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index a415cc610eeec8cb160aeac8219f421742d75bad..6591c07a147a5fdce7a8f7ff13da7f9eb136b002 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -2361,6 +2361,7 @@ mt7996_mac_reset_sta_iter(void *data, struct ieee80211_sta *sta)
for (i = 0; i < ARRAY_SIZE(msta->link); i++) {
struct mt7996_sta_link *msta_link = NULL;
+ struct mt7996_phy *phy;
msta_link = rcu_replace_pointer(msta->link[i], msta_link,
lockdep_is_held(&dev->mt76.mutex));
@@ -2368,6 +2369,10 @@ mt7996_mac_reset_sta_iter(void *data, struct ieee80211_sta *sta)
continue;
mt7996_mac_sta_deinit_link(dev, msta_link);
+ phy = __mt7996_phy(dev, msta_link->wcid.phy_idx);
+ if (phy)
+ phy->mt76->num_sta--;
+
if (msta_link != &msta->deflink)
kfree_rcu(msta_link, rcu_head);
}
---
base-commit: 030eea77accf40477be540445fc5a5be52d810a3
change-id: 20260308-mt7996_mac_reset_vif_iter-fix-28e272a8f10e
Best regards,
--
Lorenzo Bianconi <lorenzo@kernel.org>
^ permalink raw reply related
* [PATCH] wifi: rtlwifi: rtl8192d: fix typo in H2C wait counter names
From: Jaime Saguillo Revilla @ 2026-03-08 11:18 UTC (permalink / raw)
To: pkshih; +Cc: linux-wireless, linux-kernel, Jaime Saguillo Revilla
Rename local variables in rtl92d_fill_h2c_cmd()
from wait_writeh2c_limmit/wait_h2c_limmit
to wait_writeh2c_limit/wait_h2c_limit.
No functional change.
Signed-off-by: Jaime Saguillo Revilla <jaime.saguillo@gmail.com>
---
.../wireless/realtek/rtlwifi/rtl8192d/fw_common.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
index aa54dbde6ea8..a255a5061d77 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
@@ -212,9 +212,9 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw,
struct rtl_priv *rtlpriv = rtl_priv(hw);
u8 boxcontent[4], boxextcontent[2];
u16 box_reg = 0, box_extreg = 0;
- u8 wait_writeh2c_limmit = 100;
+ u8 wait_writeh2c_limit = 100;
bool bwrite_success = false;
- u8 wait_h2c_limmit = 100;
+ u8 wait_h2c_limit = 100;
u32 h2c_waitcounter = 0;
bool isfw_read = false;
unsigned long flag;
@@ -261,8 +261,8 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw,
}
while (!bwrite_success) {
- wait_writeh2c_limmit--;
- if (wait_writeh2c_limmit == 0) {
+ wait_writeh2c_limit--;
+ if (wait_writeh2c_limit == 0) {
pr_err("Write H2C fail because no trigger for FW INT!\n");
break;
}
@@ -278,8 +278,8 @@ void rtl92d_fill_h2c_cmd(struct ieee80211_hw *hw,
isfw_read = _rtl92d_check_fw_read_last_h2c(hw, boxnum);
while (!isfw_read) {
- wait_h2c_limmit--;
- if (wait_h2c_limmit == 0) {
+ wait_h2c_limit--;
+ if (wait_h2c_limit == 0) {
rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
"Waiting too long for FW read clear HMEBox(%d)!\n",
boxnum);
--
2.34.1
^ permalink raw reply related
* Re: [PATCH wireless-next] wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work()
From: Lachlan Hodges @ 2026-03-08 7:34 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: Johannes Berg, linux-wireless
In-Reply-To: <20260307-mac80211-reconf-remove-sta-link-v1-1-efe58070cd36@kernel.org>
> + rcu_read_lock();
> + sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
> + if (sta) {
> + unsigned long removed_links = sdata->u.mgd.removed_links;
> + unsigned int link_id;
> +
> + for_each_set_bit(link_id, &removed_links,
> + IEEE80211_MLD_MAX_NUM_LINKS)
> + ieee80211_sta_free_link(sta, link_id);
> + }
> + rcu_read_unlock();
> +
Could use scoped_guard(rcu) instead?
lachlan
^ permalink raw reply
* [PATCH wireless-next] wifi: mac80211: Remove deleted sta links in ieee80211_ml_reconf_work()
From: Lorenzo Bianconi @ 2026-03-07 18:45 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Lorenzo Bianconi
Delete stale station links announced in the reconfiguration IE
transmitted by the AP in the beacon frames.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
net/mac80211/mlme.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 5ecd3d1b172df70c6e447351c89f956b6d873c20..00ffc6b355b8d9b4cc078a887199c637c8224992 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -7058,6 +7058,7 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy,
container_of(work, struct ieee80211_sub_if_data,
u.mgd.ml_reconf_work.work);
u16 new_valid_links, new_active_links, new_dormant_links;
+ struct sta_info *sta;
int ret;
if (!sdata->u.mgd.removed_links)
@@ -7093,6 +7094,18 @@ static void ieee80211_ml_reconf_work(struct wiphy *wiphy,
}
}
+ rcu_read_lock();
+ sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
+ if (sta) {
+ unsigned long removed_links = sdata->u.mgd.removed_links;
+ unsigned int link_id;
+
+ for_each_set_bit(link_id, &removed_links,
+ IEEE80211_MLD_MAX_NUM_LINKS)
+ ieee80211_sta_free_link(sta, link_id);
+ }
+ rcu_read_unlock();
+
new_dormant_links = sdata->vif.dormant_links & ~sdata->u.mgd.removed_links;
ret = ieee80211_vif_set_links(sdata, new_valid_links,
---
base-commit: 97492c019da4b62df83255e968b23b81c0315530
change-id: 20260307-mac80211-reconf-remove-sta-link-a47fa95ea7a7
Best regards,
--
Lorenzo Bianconi <lorenzo@kernel.org>
^ permalink raw reply related
* Re: [PATCH 02/19] wifi: mt76: mt7925: pass WCID indices to bss_basic_tlv()
From: kernel test robot @ 2026-03-07 17:59 UTC (permalink / raw)
To: Sean Wang, nbd, lorenzo.bianconi
Cc: oe-kbuild-all, linux-wireless, linux-mediatek, Sean Wang
In-Reply-To: <20260306232238.2039675-3-sean.wang@kernel.org>
Hi Sean,
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 v7.0-rc2 next-20260306]
[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/Sean-Wang/wifi-mt76-mt7925-pass-mlink-to-sta_amsdu_tlv/20260307-073047
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20260306232238.2039675-3-sean.wang%40kernel.org
patch subject: [PATCH 02/19] wifi: mt76: mt7925: pass WCID indices to bss_basic_tlv()
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20260308/202603080115.kvbVwfTB-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260308/202603080115.kvbVwfTB-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/202603080115.kvbVwfTB-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c: In function 'mt7925_mcu_add_bss_info':
>> drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:2867:13: warning: variable 'sta_wlan_idx' set but not used [-Wunused-but-set-variable]
2867 | u16 sta_wlan_idx;
| ^~~~~~~~~~~~
vim +/sta_wlan_idx +2867 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
2856
2857 int mt7925_mcu_add_bss_info(struct mt792x_phy *phy,
2858 struct ieee80211_chanctx_conf *ctx,
2859 struct ieee80211_bss_conf *link_conf,
2860 struct ieee80211_link_sta *link_sta,
2861 int enable)
2862 {
2863 struct mt792x_vif *mvif = (struct mt792x_vif *)link_conf->vif->drv_priv;
2864 struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
2865 struct mt792x_link_sta *mlink_bc;
2866 struct mt792x_link_sta *mlink;
> 2867 u16 sta_wlan_idx;
2868
2869 sta_wlan_idx = mvif->sta.deflink.wcid.idx;
2870
2871 mlink_bc = mt792x_sta_to_link(&mvif->sta, mconf->link_id);
2872
2873 if (link_sta) {
2874 struct mt792x_sta *msta = (void *)link_sta->sta->drv_priv;
2875
2876 mlink = mt792x_sta_to_link(msta, link_sta->link_id);
2877 if (WARN_ON(!mlink))
2878 return -1;
2879 } else {
2880 mlink = &mconf->vif->sta.deflink;
2881 }
2882
2883 return mt7925_mcu_add_bss_info_sta(phy, ctx, link_conf, link_sta,
2884 mlink_bc->wcid.idx, mlink->wcid.idx, enable);
2885 }
2886
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [PATCH] wifi: b43: use register definitions in nphy_op_software_rfkill
From: Joshua Peisach @ 2026-03-07 17:01 UTC (permalink / raw)
To: linux-wireless, b43-dev
Cc: Johan Hovold, Francesco Dolcini, Johannes Berg, Joshua Peisach
Replaces uses of hardcoded register addresses with proper definitions,
for readability.
Signed-off-by: Joshua Peisach <jpeisach@ubuntu.com>
---
drivers/net/wireless/broadcom/b43/phy_n.c | 26 +++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
index bbc30cbad..22359bd9d 100644
--- a/drivers/net/wireless/broadcom/b43/phy_n.c
+++ b/drivers/net/wireless/broadcom/b43/phy_n.c
@@ -6566,19 +6566,19 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,
b43_radio_mask(dev, 0x09, ~0x2);
- b43_radio_write(dev, 0x204D, 0);
- b43_radio_write(dev, 0x2053, 0);
- b43_radio_write(dev, 0x2058, 0);
- b43_radio_write(dev, 0x205E, 0);
- b43_radio_mask(dev, 0x2062, ~0xF0);
- b43_radio_write(dev, 0x2064, 0);
-
- b43_radio_write(dev, 0x304D, 0);
- b43_radio_write(dev, 0x3053, 0);
- b43_radio_write(dev, 0x3058, 0);
- b43_radio_write(dev, 0x305E, 0);
- b43_radio_mask(dev, 0x3062, ~0xF0);
- b43_radio_write(dev, 0x3064, 0);
+ b43_radio_write(dev, B2056_TX0 | B2056_TX_PADA_BOOST_TUNE, 0);
+ b43_radio_write(dev, B2056_TX0 | B2056_TX_PADG_BOOST_TUNE, 0);
+ b43_radio_write(dev, B2056_TX0 | B2056_TX_PGAA_BOOST_TUNE, 0);
+ b43_radio_write(dev, B2056_TX0 | B2056_TX_PGAG_BOOST_TUNE, 0);
+ b43_radio_mask(dev, B2056_TX0 | B2056_TX_MIXA_BOOST_TUNE, ~0xF0);
+ b43_radio_write(dev, B2056_TX0 | B2056_TX_MIXG_BOOST_TUNE, 0);
+
+ b43_radio_write(dev, B2056_TX1 | B2056_TX_PADA_BOOST_TUNE, 0);
+ b43_radio_write(dev, B2056_TX1 | B2056_TX_PADG_BOOST_TUNE, 0);
+ b43_radio_write(dev, B2056_TX1 | B2056_TX_PGAA_BOOST_TUNE, 0);
+ b43_radio_write(dev, B2056_TX1 | B2056_TX_PGAG_BOOST_TUNE, 0);
+ b43_radio_mask(dev, B2056_TX1 | B2056_TX_MIXA_BOOST_TUNE, ~0xF0);
+ b43_radio_write(dev, B2056_TX1 | B2056_TX_MIXG_BOOST_TUNE, 0);
}
} else {
if (phy->rev >= 19) {
--
2.51.0
^ permalink raw reply related
* [PATCH mt76] wifi: mt76: mt7996: Switch deflink to seclink only if link lookup does not fail
From: Lorenzo Bianconi @ 2026-03-07 13:59 UTC (permalink / raw)
To: Felix Fietkau, Ryder Lee, Shayne Chen, Sean Wang,
Matthias Brugger, AngeloGioacchino Del Regno
Cc: linux-wireless, linux-arm-kernel, linux-mediatek,
Lorenzo Bianconi
Do not switch default link to the secondary link in
mt7996_mac_sta_remove_links routine if the lookup for the secondary
msta_link fails.
Fixes: d7e5444f9eb02 ("wifi: mt76: mt7996: Switch to the secondary link if the default one is removed")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7996/main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index e1e51c9a0767be5a15dae48d627fb45b6f12af21..00e0e5915afe32b70205f1128f32a07ac02223e8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -1122,21 +1122,22 @@ mt7996_mac_sta_remove_links(struct mt7996_dev *dev, struct ieee80211_vif *vif,
mphy->num_sta--;
if (msta->deflink_id == link_id) {
- if (msta->seclink_id == msta->deflink_id) {
+ msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
+ if (msta->seclink_id == link_id) {
/* no secondary link available */
- msta->deflink_id = IEEE80211_LINK_UNSPECIFIED;
msta->seclink_id = msta->deflink_id;
} else {
struct mt7996_sta_link *msta_seclink;
/* switch to the secondary link */
- msta->deflink_id = msta->seclink_id;
msta_seclink = mt76_dereference(
msta->link[msta->seclink_id],
mdev);
- if (msta_seclink)
+ if (msta_seclink) {
+ msta->deflink_id = msta->seclink_id;
mt7996_sta_init_txq_wcid(sta,
msta_seclink->wcid.idx);
+ }
}
} else if (msta->seclink_id == link_id) {
msta->seclink_id = msta->deflink_id;
---
base-commit: 030eea77accf40477be540445fc5a5be52d810a3
change-id: 20260307-mt7996-sta-sec-link-fix-7d6d49e56eb4
Best regards,
--
Lorenzo Bianconi <lorenzo@kernel.org>
^ permalink raw reply related
* Re: [PATCH 02/19] wifi: mt76: mt7925: pass WCID indices to bss_basic_tlv()
From: kernel test robot @ 2026-03-07 13:45 UTC (permalink / raw)
To: Sean Wang, nbd, lorenzo.bianconi
Cc: oe-kbuild-all, linux-wireless, linux-mediatek, Sean Wang
In-Reply-To: <20260306232238.2039675-3-sean.wang@kernel.org>
Hi Sean,
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 v7.0-rc2 next-20260306]
[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/Sean-Wang/wifi-mt76-mt7925-pass-mlink-to-sta_amsdu_tlv/20260307-073047
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20260306232238.2039675-3-sean.wang%40kernel.org
patch subject: [PATCH 02/19] wifi: mt76: mt7925: pass WCID indices to bss_basic_tlv()
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260307/202603071400.xCvjvPoG-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260307/202603071400.xCvjvPoG-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/202603071400.xCvjvPoG-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c: In function 'mt7925_mcu_add_bss_info':
>> drivers/net/wireless/mediatek/mt76/mt7925/mcu.c:2867:13: warning: variable 'sta_wlan_idx' set but not used [-Wunused-but-set-variable]
2867 | u16 sta_wlan_idx;
| ^~~~~~~~~~~~
vim +/sta_wlan_idx +2867 drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
2856
2857 int mt7925_mcu_add_bss_info(struct mt792x_phy *phy,
2858 struct ieee80211_chanctx_conf *ctx,
2859 struct ieee80211_bss_conf *link_conf,
2860 struct ieee80211_link_sta *link_sta,
2861 int enable)
2862 {
2863 struct mt792x_vif *mvif = (struct mt792x_vif *)link_conf->vif->drv_priv;
2864 struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
2865 struct mt792x_link_sta *mlink_bc;
2866 struct mt792x_link_sta *mlink;
> 2867 u16 sta_wlan_idx;
2868
2869 sta_wlan_idx = mvif->sta.deflink.wcid.idx;
2870
2871 mlink_bc = mt792x_sta_to_link(&mvif->sta, mconf->link_id);
2872
2873 if (link_sta) {
2874 struct mt792x_sta *msta = (void *)link_sta->sta->drv_priv;
2875
2876 mlink = mt792x_sta_to_link(msta, link_sta->link_id);
2877 if (WARN_ON(!mlink))
2878 return -1;
2879 } else {
2880 mlink = &mconf->vif->sta.deflink;
2881 }
2882
2883 return mt7925_mcu_add_bss_info_sta(phy, ctx, link_conf, link_sta,
2884 mlink_bc->wcid.idx, mlink->wcid.idx, enable);
2885 }
2886
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* New Shipment Notifications
From: DHL Express @ 2026-03-07 13:24 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 514 bytes --]
Dear Customer,
Your DHL shipment is ready for dispatch, or there was a failed delivery attempt. Please track your shipment and take any necessary steps to ensure successful delivery.
You can find the shipment information in the attached file.
We look forward to assisting you with your shipping needs!
If you need to contact us in the meantime, please get in touch with our customer service.
Sincerely,
Your MyDHL+ Team
Please do not reply to this email – the inbox is not checked regularly.
[-- Attachment #2: Shipment Notification 1.pdf --]
[-- Type: application/pdf, Size: 98916 bytes --]
^ permalink raw reply
* Re: [PATCH 00/18] wifi: mt76: mt7925: add MT7927 (Filogic 380) support
From: Sean Wang @ 2026-03-07 7:08 UTC (permalink / raw)
To: Javier Tia
Cc: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh,
linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
Hi Javier,
On Fri, Mar 6, 2026 at 6:33 PM Javier Tia <floss@jetm.me> wrote:
>
> This series adds support for the MediaTek MT7927 (Filogic 380) combo
> WiFi 7 + BT 5.4 module to the mt7925 driver. The MT7927 uses PCI ID
> 14c3:7927 (some hardware reports 14c3:6639) and shares the mt7925
> firmware interface but requires different DMA ring layout, IRQ mapping,
> chip initialization, and power management handling.
>
> Tested hardware:
> - ASUS ROG Crosshair X870E Hero (BT 0489:e13a, WiFi 14c3:6639)
> - ASUS ProArt X870E-Creator WiFi (BT 0489:e13a / 13d3:3588, WiFi 14c3:6639)
> - ASUS ROG Strix X870E-E (BT 0489:e13a, WiFi 14c3:7927)
> - Gigabyte X870E Aorus Master X3D (BT 0489:e10f, WiFi 14c3:7927)
> - Gigabyte Z790 AORUS MASTER X (BT 0489:e10f, WiFi 14c3:7927)
> - Lenovo Legion Pro 7 16ARX9 (BT 0489:e0fa, WiFi 14c3:7927)
> - TP-Link Archer TBE550E PCIe (BT 0489:e116, WiFi 14c3:7927)
> - EDUP EP-MT7927BE M.2 card (WiFi 14c3:7927)
> - Foxconn/Azurewave M.2 modules (WiFi 14c3:6639)
> - AMD RZ738 reference design (WiFi 14c3:0738)
>
Thanks for coordinating the work and delivering the driver.
> Tested on Arch Linux, CachyOS, EndeavourOS, Fedora (Bazzite), NixOS,
> openSUSE Tumbleweed, and Ubuntu across kernels 6.13-6.19.
>
> What works:
> - WiFi 7 with EHT 320MHz on 2.4/5/6 GHz bands
> - 320MHz data path verified at 841 Mbps (iperf3 -t30 -P8)
> - PCIe initialization with CBTOP remap and MT7927-specific DMA layout
> - Runtime power management and suspend/resume (S3)
> - DBDC (dual-band concurrent) mode
> - Explicit band_idx assignment for stable 5GHz/6GHz operation
> - ASPM disabled for MT7927 to prevent throughput collapse
>
> Known limitations (planned as follow-up series):
> - MLO (Multi-Link Operation): tested working on 5GHz+2.4GHz STR
> (776 Mbps) but requires additional patches for link lifetime
> and error handling. Sean Wang's series [1] addresses these;
> MLO support will be submitted as a follow-up on top of that.
>
> [1] https://lore.kernel.org/linux-wireless/20260306232238.2039675-1-sean.wang@kernel.org/
> - TX retransmissions: elevated retry rate on all bands, firmware-side
> rate adaptation issue not addressable in the driver.
>
> Patches 1-11 bring up the basic driver (chip ID, firmware, DMA, init,
> power management, 320MHz MCS, mac_reset guard, IRQ map, probe fix).
> Patch 12 advertises EHT 320MHz capabilities, guarded by is_mt7927().
> Patches 13-14 fix DMASHDL PM wake and disable ASPM.
> Patch 15 adds 320MHz bandwidth handling in RXV/TXS status reporting.
> Patch 16 fixes stale pointer comparisons in change_vif_links.
> Patch 17 assigns explicit band_idx for stable 5GHz/6GHz operation.
> Patch 18 adds the missing 320MHz case in bss_rlm_tlv() so firmware
> receives the correct bandwidth when associated to a 320MHz BSS.
>
> The WiFi firmware ships as part of the linux-firmware package
> (mediatek/mt6639/ directory - the firmware uses the mobile SoC codename).
>
> To: linux-wireless@vger.kernel.org
> To: Felix Fietkau <nbd@nbd.name>
> To: Lorenzo Bianconi <lorenzo@kernel.org>
> To: Ryder Lee <ryder.lee@mediatek.com>
> To: Shayne Chen <shayne.chen@mediatek.com>
> To: Sean Wang <sean.wang@mediatek.com>
> To: Matthias Brugger <matthias.bgg@gmail.com>
> To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> To: Deren Wu <deren.wu@mediatek.com>
> To: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mediatek@lists.infradead.org
> Tested-by: Marcin FM <marcin@lgic.pl>
> Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
> Tested-by: George Salukvadze <giosal90@gmail.com>
> Tested-by: Evgeny Kapusta <3193631@gmail.com>
> Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
> Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
> Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
> Tested-by: Thibaut François <tibo@humeurlibre.fr>
> Tested-by: 张旭涵 <Loong.0x00@gmail.com>
>
> Signed-off-by: Javier Tia <floss@jetm.me>
> ---
> Javier Tia (18):
> wifi: mt76: mt7925: add MT7927 chip ID helpers
> wifi: mt76: mt7925: add MT7927 firmware paths and PCI device IDs
> wifi: mt76: mt7925: add MT7927 CBTOP remap and chip initialization
> wifi: mt76: mt7925: add MT7927 DMA ring layout, IRQ map, and prefetch
> wifi: mt76: mt7925: skip CLR_OWN in mt7925e_mcu_init for MT7927
> wifi: mt76: mt7925: add MT7927 power management, DBDC, and CNM fixes
> wifi: mt76: mt7925: use irq_map fields instead of MT_INT_RX_DONE_ALL
> wifi: mt76: mt7925: guard mac_reset against MT7927 DMA destruction
> wifi: mt76: mt7925: populate EHT 320MHz MCS map in sta_rec
> wifi: mt76: mt7925: enable MT7927 runtime power management
> wifi: mt76: mt7925: fix uninitialized is_mt7927_hw in probe
> wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band
> wifi: mt76: mt7925: restore FW_DWLD_BYPASS_DMASHDL in MT7927 PM wake path
> wifi: mt76: mt7925: disable ASPM for MT7927 to fix throughput collapse
> wifi: mt76: mt7925: handle 320MHz bandwidth in RXV and TXS
> wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links
> wifi: mt76: mt7925: fix MT7927 band_idx for stable 5GHz/6GHz operation
> wifi: mt76: mt7925: add 320MHz bandwidth to bss_rlm_tlv
>
The patchset should be ordered so that common changes (e.g., enabling
320 MHz support) are added first,
while chip-specific changes are introduced later (e.g.,
MT7927-specific IRQ, DMA, and hardware initialization sequences).
Before introducing chip-specific logic, try to make the functions
generic enough so that other chips can reuse them in the same way.
Checks such as is_mt7927 and duplicated function should only be added
if they cannot be avoided
The more code we can reuse across chips, the fewer maintenance
concerns there will be, and we can focus more effort on the
chip-specific parts.
Please reorganize the patchset order as follows:
1. Common patches that can be reused by other chipsets (now or in the
future) should come first we don't need to mention mt7927
"wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links"
"wifi: mt76: mt7925: add 320MHz bandwidth to bss_rlm_tlv"
"wifi: mt76: mt7925: handle 320MHz bandwidth in RXV and TXS"
"wifi: mt76: mt7925: populate EHT 320MHz MCS map in sta_rec"
"wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band"
Here we can add a helper like is_320MHz_supported() and then advertise
EHT 320MHz capabilities, but do not need to mention is_mt7927() yet.
2. Then introduce MT7927-related changes
wifi: mt76: mt7925: add MT7927 chip ID helpers
Keep the MCU part of "wifi: mt76: mt7925: add MT7927 firmware paths
and PCI device IDs" but leave enabling the PCI device table for the
last patch.
3. IRQ handling
Combine
wifi: mt76: mt7925: use irq_map fields instead of MT_INT_RX_DONE_ALL
the IRQ part of wifi: mt76: mt7925: add MT7927 DMA ring layout, IRQ
map, and prefetch
into one patch about irq_map handling, trying to reuse mt7925_irq as
much as possible.
4. DMA handling
Combine
the DMA part of "wifi: mt76: mt7925: add MT7927 DMA ring layout, IRQ
map, and prefetch"
"wifi: mt76: mt7925: restore FW_DWLD_BYPASS_DMASHDL in MT7927 PM wake path"
into one patch about DMA handling, trying to reuse mt7925_dma_init as
much as possible.
5. Hardware initialization
Combine
"wifi: mt76: mt7925: add MT7927 CBTOP remap and chip initialization"
"wifi: mt76: mt7925: fix uninitialized is_mt7927_hw in probe"
"wifi: mt76: mt7925: skip CLR_OWN in mt7925e_mcu_init for MT7927"
"wifi: mt76: mt7925: add MT7927 power management, DBDC, and CNM fixes"
into one or more patches focused on pure hardware initialization in
logical order. If the register definition is used by MT7927, add
MT7927_ as the prefix.
6. Band index fix
"wifi: mt76: mt7925: fix MT7927 band_idx for stable 5GHz/6GHz operation"
This is worth introducing helper functions and using them instead of
implementing the logic inline.
7. Low power support
Combine
"wifi: mt76: mt7925: enable MT7927 runtime power management"
"wifi: mt76: mt7925: disable ASPM for MT7927 to fix throughput collapse"
into one or more patches related to enabling or disabling low power support.
8. Final patch
The last patch should enable the MT7927 PCI device table.
> drivers/net/wireless/mediatek/mt76/mt76_connac.h | 8 +-
> drivers/net/wireless/mediatek/mt76/mt7925/init.c | 12 +
> drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 9 +
> drivers/net/wireless/mediatek/mt76/mt7925/main.c | 72 +++++-
> drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 59 ++++-
> drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 12 +
> drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 248 ++++++++++++++++++++-
> .../net/wireless/mediatek/mt76/mt7925/pci_mac.c | 13 +-
> .../net/wireless/mediatek/mt76/mt7925/pci_mcu.c | 19 +-
> drivers/net/wireless/mediatek/mt76/mt792x.h | 6 +
> drivers/net/wireless/mediatek/mt76/mt792x_dma.c | 26 ++-
> drivers/net/wireless/mediatek/mt76/mt792x_regs.h | 30 +++
> 12 files changed, 479 insertions(+), 35 deletions(-)
> ---
> base-commit: 97492c019da4b62df83255e968b23b81c0315530
> change-id: 20260305-mt7927-wifi-support-02f9738a3962
>
> Best regards,
> --
> Javier Tia <floss@jetm.me>
>
>
^ permalink raw reply
* [wireless:for-next] BUILD SUCCESS 6dccbc9f3e1d38565dff7730d2b7d1e8b16c9b09
From: kernel test robot @ 2026-03-07 5:25 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless.git for-next
branch HEAD: 6dccbc9f3e1d38565dff7730d2b7d1e8b16c9b09 wifi: cfg80211: cancel pmsr_free_wk in cfg80211_pmsr_wdev_down
elapsed time: 1037m
configs tested: 226
configs skipped: 4
The following configs have been built successfully.
More configs may be tested in the coming days.
tested configs:
alpha allnoconfig gcc-15.2.0
alpha allyesconfig gcc-15.2.0
alpha defconfig gcc-15.2.0
arc allmodconfig clang-16
arc allmodconfig gcc-15.2.0
arc allnoconfig gcc-15.2.0
arc allyesconfig clang-23
arc allyesconfig gcc-15.2.0
arc defconfig gcc-15.2.0
arc randconfig-001-20260307 gcc-14.3.0
arc randconfig-001-20260307 gcc-15.2.0
arc randconfig-002-20260307 gcc-14.3.0
arc randconfig-002-20260307 gcc-15.2.0
arm allnoconfig clang-23
arm allnoconfig gcc-15.2.0
arm allyesconfig clang-16
arm allyesconfig gcc-15.2.0
arm clps711x_defconfig clang-23
arm defconfig gcc-15.2.0
arm randconfig-001-20260307 clang-23
arm randconfig-001-20260307 gcc-15.2.0
arm randconfig-002-20260307 gcc-15.2.0
arm randconfig-003-20260307 gcc-13.4.0
arm randconfig-003-20260307 gcc-15.2.0
arm randconfig-004-20260307 gcc-11.5.0
arm randconfig-004-20260307 gcc-15.2.0
arm64 allmodconfig clang-19
arm64 allmodconfig clang-23
arm64 allnoconfig gcc-15.2.0
arm64 defconfig gcc-15.2.0
arm64 randconfig-001-20260307 gcc-8.5.0
arm64 randconfig-002-20260307 gcc-11.5.0
arm64 randconfig-002-20260307 gcc-8.5.0
arm64 randconfig-003-20260307 gcc-15.2.0
arm64 randconfig-003-20260307 gcc-8.5.0
arm64 randconfig-004-20260307 gcc-8.5.0
csky allmodconfig gcc-15.2.0
csky allnoconfig gcc-15.2.0
csky defconfig gcc-15.2.0
csky randconfig-001-20260307 gcc-15.2.0
csky randconfig-001-20260307 gcc-8.5.0
csky randconfig-002-20260307 gcc-15.2.0
csky randconfig-002-20260307 gcc-8.5.0
hexagon allmodconfig clang-17
hexagon allmodconfig gcc-15.2.0
hexagon allnoconfig clang-23
hexagon allnoconfig gcc-15.2.0
hexagon defconfig gcc-15.2.0
hexagon randconfig-001-20260307 clang-23
hexagon randconfig-001-20260307 gcc-15.2.0
hexagon randconfig-002-20260307 clang-23
hexagon randconfig-002-20260307 gcc-15.2.0
i386 allmodconfig clang-20
i386 allnoconfig gcc-14
i386 allnoconfig gcc-15.2.0
i386 allyesconfig clang-20
i386 buildonly-randconfig-001-20260307 gcc-14
i386 buildonly-randconfig-002-20260307 gcc-14
i386 buildonly-randconfig-003-20260307 gcc-12
i386 buildonly-randconfig-003-20260307 gcc-14
i386 buildonly-randconfig-004-20260307 clang-20
i386 buildonly-randconfig-004-20260307 gcc-14
i386 buildonly-randconfig-005-20260307 gcc-14
i386 buildonly-randconfig-006-20260307 clang-20
i386 buildonly-randconfig-006-20260307 gcc-14
i386 defconfig gcc-15.2.0
i386 randconfig-001-20260307 clang-20
i386 randconfig-002-20260307 clang-20
i386 randconfig-003-20260307 clang-20
i386 randconfig-004-20260307 clang-20
i386 randconfig-005-20260307 clang-20
i386 randconfig-006-20260307 clang-20
i386 randconfig-007-20260307 clang-20
i386 randconfig-011-20260307 clang-20
i386 randconfig-011-20260307 gcc-14
i386 randconfig-012-20260307 clang-20
i386 randconfig-012-20260307 gcc-14
i386 randconfig-013-20260307 clang-20
i386 randconfig-013-20260307 gcc-14
i386 randconfig-014-20260307 clang-20
i386 randconfig-014-20260307 gcc-14
i386 randconfig-015-20260307 gcc-14
i386 randconfig-016-20260307 gcc-14
i386 randconfig-017-20260307 gcc-14
loongarch allmodconfig clang-19
loongarch allmodconfig clang-23
loongarch allnoconfig clang-23
loongarch allnoconfig gcc-15.2.0
loongarch defconfig clang-19
loongarch randconfig-001-20260307 gcc-15.2.0
loongarch randconfig-002-20260307 gcc-15.2.0
m68k allmodconfig gcc-15.2.0
m68k allnoconfig gcc-15.2.0
m68k allyesconfig clang-16
m68k allyesconfig gcc-15.2.0
m68k defconfig clang-19
microblaze allnoconfig gcc-15.2.0
microblaze allyesconfig gcc-15.2.0
microblaze defconfig clang-19
mips allmodconfig gcc-15.2.0
mips allnoconfig gcc-15.2.0
mips allyesconfig gcc-15.2.0
nios2 allmodconfig clang-23
nios2 allmodconfig gcc-11.5.0
nios2 allnoconfig clang-23
nios2 allnoconfig gcc-11.5.0
nios2 defconfig clang-19
nios2 randconfig-001-20260307 gcc-10.5.0
nios2 randconfig-001-20260307 gcc-15.2.0
nios2 randconfig-002-20260307 gcc-15.2.0
nios2 randconfig-002-20260307 gcc-8.5.0
openrisc allmodconfig clang-23
openrisc allmodconfig gcc-15.2.0
openrisc allnoconfig clang-23
openrisc allnoconfig gcc-15.2.0
openrisc defconfig gcc-15.2.0
parisc allmodconfig gcc-15.2.0
parisc allnoconfig clang-23
parisc allnoconfig gcc-15.2.0
parisc allyesconfig clang-19
parisc allyesconfig gcc-15.2.0
parisc defconfig gcc-15.2.0
parisc randconfig-001-20260307 gcc-12.5.0
parisc randconfig-002-20260307 gcc-12.5.0
parisc randconfig-002-20260307 gcc-8.5.0
parisc64 defconfig clang-19
powerpc allmodconfig gcc-15.2.0
powerpc allnoconfig clang-23
powerpc allnoconfig gcc-15.2.0
powerpc randconfig-001-20260307 gcc-12.5.0
powerpc randconfig-001-20260307 gcc-8.5.0
powerpc randconfig-002-20260307 gcc-11.5.0
powerpc randconfig-002-20260307 gcc-12.5.0
powerpc64 randconfig-001-20260307 gcc-12.5.0
powerpc64 randconfig-001-20260307 gcc-8.5.0
powerpc64 randconfig-002-20260307 gcc-12.5.0
riscv allmodconfig clang-23
riscv allnoconfig clang-23
riscv allnoconfig gcc-15.2.0
riscv allyesconfig clang-16
riscv defconfig gcc-15.2.0
riscv randconfig-001-20260307 clang-23
riscv randconfig-002-20260307 clang-23
s390 allmodconfig clang-18
s390 allmodconfig clang-19
s390 allnoconfig clang-23
s390 allyesconfig gcc-15.2.0
s390 defconfig gcc-15.2.0
s390 randconfig-001-20260307 clang-23
s390 randconfig-002-20260307 clang-23
sh allmodconfig gcc-15.2.0
sh allnoconfig clang-23
sh allnoconfig gcc-15.2.0
sh allyesconfig clang-19
sh allyesconfig gcc-15.2.0
sh defconfig gcc-14
sh randconfig-001-20260307 clang-23
sh randconfig-002-20260307 clang-23
sparc allnoconfig clang-23
sparc allnoconfig gcc-15.2.0
sparc defconfig gcc-15.2.0
sparc randconfig-001-20260307 gcc-15.2.0
sparc randconfig-001-20260307 gcc-8.5.0
sparc randconfig-002-20260307 gcc-11.5.0
sparc randconfig-002-20260307 gcc-8.5.0
sparc64 allmodconfig clang-23
sparc64 defconfig gcc-14
sparc64 randconfig-001-20260307 clang-23
sparc64 randconfig-001-20260307 gcc-8.5.0
sparc64 randconfig-002-20260307 gcc-8.5.0
um allmodconfig clang-19
um allnoconfig clang-23
um allyesconfig gcc-14
um allyesconfig gcc-15.2.0
um defconfig gcc-14
um i386_defconfig gcc-14
um randconfig-001-20260307 gcc-14
um randconfig-001-20260307 gcc-8.5.0
um randconfig-002-20260307 clang-23
um randconfig-002-20260307 gcc-8.5.0
um x86_64_defconfig gcc-14
x86_64 allmodconfig clang-20
x86_64 allnoconfig clang-20
x86_64 allnoconfig clang-23
x86_64 allyesconfig clang-20
x86_64 buildonly-randconfig-001-20260307 clang-20
x86_64 buildonly-randconfig-001-20260307 gcc-14
x86_64 buildonly-randconfig-002-20260307 clang-20
x86_64 buildonly-randconfig-002-20260307 gcc-14
x86_64 buildonly-randconfig-003-20260307 clang-20
x86_64 buildonly-randconfig-003-20260307 gcc-14
x86_64 buildonly-randconfig-004-20260307 clang-20
x86_64 buildonly-randconfig-005-20260307 clang-20
x86_64 buildonly-randconfig-006-20260307 clang-20
x86_64 buildonly-randconfig-006-20260307 gcc-14
x86_64 defconfig gcc-14
x86_64 kexec clang-20
x86_64 randconfig-001-20260307 gcc-14
x86_64 randconfig-002-20260307 gcc-14
x86_64 randconfig-003-20260307 gcc-14
x86_64 randconfig-004-20260307 gcc-14
x86_64 randconfig-005-20260307 gcc-14
x86_64 randconfig-006-20260307 gcc-14
x86_64 randconfig-011-20260307 gcc-14
x86_64 randconfig-012-20260307 gcc-14
x86_64 randconfig-013-20260307 gcc-14
x86_64 randconfig-014-20260307 gcc-14
x86_64 randconfig-015-20260307 gcc-14
x86_64 randconfig-016-20260307 gcc-14
x86_64 randconfig-071-20260307 gcc-14
x86_64 randconfig-072-20260307 gcc-14
x86_64 randconfig-073-20260307 gcc-14
x86_64 randconfig-074-20260307 gcc-14
x86_64 randconfig-075-20260307 gcc-14
x86_64 randconfig-076-20260307 gcc-14
x86_64 rhel-9.4 clang-20
x86_64 rhel-9.4-bpf gcc-14
x86_64 rhel-9.4-func clang-20
x86_64 rhel-9.4-kselftests clang-20
x86_64 rhel-9.4-kunit gcc-14
x86_64 rhel-9.4-ltp gcc-14
x86_64 rhel-9.4-rust clang-20
xtensa allnoconfig clang-23
xtensa allnoconfig gcc-15.2.0
xtensa randconfig-001-20260307 gcc-8.5.0
xtensa randconfig-002-20260307 gcc-8.5.0
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* [wireless-next:for-next] BUILD SUCCESS 97492c019da4b62df83255e968b23b81c0315530
From: kernel test robot @ 2026-03-07 5:04 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git for-next
branch HEAD: 97492c019da4b62df83255e968b23b81c0315530 wifi: mwifiex: drop redundant device reference
elapsed time: 1108m
configs tested: 196
configs skipped: 4
The following configs have been built successfully.
More configs may be tested in the coming days.
tested configs:
alpha allnoconfig gcc-15.2.0
alpha allyesconfig gcc-15.2.0
alpha defconfig gcc-15.2.0
arc allmodconfig clang-16
arc allmodconfig gcc-15.2.0
arc allnoconfig gcc-15.2.0
arc allyesconfig clang-23
arc allyesconfig gcc-15.2.0
arc defconfig gcc-15.2.0
arc randconfig-001-20260307 gcc-15.2.0
arc randconfig-002-20260307 gcc-15.2.0
arm allnoconfig clang-23
arm allnoconfig gcc-15.2.0
arm allyesconfig clang-16
arm allyesconfig gcc-15.2.0
arm clps711x_defconfig clang-23
arm defconfig gcc-15.2.0
arm randconfig-001-20260307 gcc-15.2.0
arm randconfig-002-20260307 gcc-15.2.0
arm randconfig-003-20260307 gcc-15.2.0
arm randconfig-004-20260307 gcc-15.2.0
arm u8500_defconfig gcc-15.2.0
arm64 allmodconfig clang-19
arm64 allmodconfig clang-23
arm64 allnoconfig gcc-15.2.0
arm64 defconfig gcc-15.2.0
arm64 randconfig-001-20260307 gcc-8.5.0
arm64 randconfig-002-20260307 gcc-8.5.0
arm64 randconfig-003-20260307 gcc-8.5.0
arm64 randconfig-004-20260307 gcc-8.5.0
csky allmodconfig gcc-15.2.0
csky allnoconfig gcc-15.2.0
csky defconfig gcc-15.2.0
csky randconfig-001-20260307 gcc-8.5.0
csky randconfig-002-20260307 gcc-8.5.0
hexagon allmodconfig gcc-15.2.0
hexagon allnoconfig clang-23
hexagon allnoconfig gcc-15.2.0
hexagon defconfig gcc-15.2.0
hexagon randconfig-001-20260307 gcc-15.2.0
hexagon randconfig-002-20260307 gcc-15.2.0
i386 allmodconfig clang-20
i386 allnoconfig gcc-14
i386 allnoconfig gcc-15.2.0
i386 allyesconfig clang-20
i386 buildonly-randconfig-001-20260307 gcc-14
i386 buildonly-randconfig-002-20260307 gcc-14
i386 buildonly-randconfig-003-20260307 gcc-14
i386 buildonly-randconfig-004-20260307 gcc-14
i386 buildonly-randconfig-005-20260307 gcc-14
i386 buildonly-randconfig-006-20260307 gcc-14
i386 defconfig gcc-15.2.0
i386 randconfig-001-20260307 clang-20
i386 randconfig-002-20260307 clang-20
i386 randconfig-003-20260307 clang-20
i386 randconfig-004-20260307 clang-20
i386 randconfig-005-20260307 clang-20
i386 randconfig-006-20260307 clang-20
i386 randconfig-007-20260307 clang-20
i386 randconfig-011-20260307 gcc-14
i386 randconfig-012-20260307 gcc-14
i386 randconfig-013-20260307 gcc-14
i386 randconfig-014-20260307 gcc-14
i386 randconfig-015-20260307 gcc-14
i386 randconfig-016-20260307 gcc-14
i386 randconfig-017-20260307 gcc-14
loongarch allmodconfig clang-23
loongarch allnoconfig clang-23
loongarch allnoconfig gcc-15.2.0
loongarch defconfig clang-19
loongarch randconfig-001-20260307 gcc-15.2.0
loongarch randconfig-002-20260307 gcc-15.2.0
m68k allmodconfig gcc-15.2.0
m68k allnoconfig gcc-15.2.0
m68k allyesconfig clang-16
m68k allyesconfig gcc-15.2.0
m68k defconfig clang-19
microblaze allnoconfig gcc-15.2.0
microblaze allyesconfig gcc-15.2.0
microblaze defconfig clang-19
mips allmodconfig gcc-15.2.0
mips allnoconfig gcc-15.2.0
mips allyesconfig gcc-15.2.0
nios2 allmodconfig clang-23
nios2 allmodconfig gcc-11.5.0
nios2 allnoconfig clang-23
nios2 allnoconfig gcc-11.5.0
nios2 defconfig clang-19
nios2 randconfig-001-20260307 gcc-15.2.0
nios2 randconfig-002-20260307 gcc-15.2.0
openrisc allmodconfig clang-23
openrisc allmodconfig gcc-15.2.0
openrisc allnoconfig clang-23
openrisc allnoconfig gcc-15.2.0
openrisc defconfig gcc-15.2.0
parisc allmodconfig gcc-15.2.0
parisc allnoconfig clang-23
parisc allnoconfig gcc-15.2.0
parisc allyesconfig clang-19
parisc allyesconfig gcc-15.2.0
parisc defconfig gcc-15.2.0
parisc randconfig-001-20260307 gcc-12.5.0
parisc randconfig-002-20260307 gcc-12.5.0
parisc64 defconfig clang-19
powerpc allmodconfig gcc-15.2.0
powerpc allnoconfig clang-23
powerpc allnoconfig gcc-15.2.0
powerpc randconfig-001-20260307 gcc-12.5.0
powerpc randconfig-002-20260307 gcc-12.5.0
powerpc64 randconfig-001-20260307 gcc-12.5.0
powerpc64 randconfig-002-20260307 gcc-12.5.0
riscv allmodconfig clang-23
riscv allnoconfig clang-23
riscv allnoconfig gcc-15.2.0
riscv allyesconfig clang-16
riscv defconfig gcc-15.2.0
riscv randconfig-001-20260307 clang-23
riscv randconfig-002-20260307 clang-23
s390 allmodconfig clang-18
s390 allmodconfig clang-19
s390 allnoconfig clang-23
s390 allyesconfig gcc-15.2.0
s390 defconfig gcc-15.2.0
s390 randconfig-001-20260307 clang-23
s390 randconfig-002-20260307 clang-23
sh allmodconfig gcc-15.2.0
sh allnoconfig clang-23
sh allnoconfig gcc-15.2.0
sh allyesconfig clang-19
sh allyesconfig gcc-15.2.0
sh defconfig gcc-14
sh randconfig-001-20260307 clang-23
sh randconfig-002-20260307 clang-23
sparc allnoconfig clang-23
sparc allnoconfig gcc-15.2.0
sparc defconfig gcc-15.2.0
sparc randconfig-001-20260307 gcc-15.2.0
sparc randconfig-001-20260307 gcc-8.5.0
sparc randconfig-002-20260307 gcc-11.5.0
sparc randconfig-002-20260307 gcc-8.5.0
sparc64 allmodconfig clang-23
sparc64 defconfig gcc-14
sparc64 randconfig-001-20260307 clang-23
sparc64 randconfig-001-20260307 gcc-8.5.0
sparc64 randconfig-002-20260307 gcc-8.5.0
um allmodconfig clang-19
um allnoconfig clang-23
um allyesconfig gcc-15.2.0
um defconfig gcc-14
um i386_defconfig gcc-14
um randconfig-001-20260307 gcc-14
um randconfig-001-20260307 gcc-8.5.0
um randconfig-002-20260307 clang-23
um randconfig-002-20260307 gcc-8.5.0
um x86_64_defconfig gcc-14
x86_64 allmodconfig clang-20
x86_64 allnoconfig clang-20
x86_64 allnoconfig clang-23
x86_64 allyesconfig clang-20
x86_64 buildonly-randconfig-001-20260307 clang-20
x86_64 buildonly-randconfig-002-20260307 clang-20
x86_64 buildonly-randconfig-003-20260307 clang-20
x86_64 buildonly-randconfig-004-20260307 clang-20
x86_64 buildonly-randconfig-005-20260307 clang-20
x86_64 buildonly-randconfig-006-20260307 clang-20
x86_64 defconfig gcc-14
x86_64 kexec clang-20
x86_64 randconfig-001-20260307 gcc-14
x86_64 randconfig-002-20260307 gcc-14
x86_64 randconfig-003-20260307 gcc-14
x86_64 randconfig-004-20260307 gcc-14
x86_64 randconfig-005-20260307 gcc-14
x86_64 randconfig-006-20260307 gcc-14
x86_64 randconfig-011-20260307 gcc-14
x86_64 randconfig-012-20260307 gcc-14
x86_64 randconfig-013-20260307 gcc-14
x86_64 randconfig-014-20260307 gcc-14
x86_64 randconfig-015-20260307 gcc-14
x86_64 randconfig-016-20260307 gcc-14
x86_64 randconfig-071-20260307 gcc-14
x86_64 randconfig-072-20260307 gcc-14
x86_64 randconfig-073-20260307 gcc-14
x86_64 randconfig-074-20260307 gcc-14
x86_64 randconfig-075-20260307 gcc-14
x86_64 randconfig-076-20260307 gcc-14
x86_64 rhel-9.4 clang-20
x86_64 rhel-9.4-bpf gcc-14
x86_64 rhel-9.4-func clang-20
x86_64 rhel-9.4-kselftests clang-20
x86_64 rhel-9.4-kunit gcc-14
x86_64 rhel-9.4-ltp gcc-14
x86_64 rhel-9.4-rust clang-20
xtensa allnoconfig clang-23
xtensa allnoconfig gcc-15.2.0
xtensa randconfig-001-20260307 gcc-8.5.0
xtensa randconfig-002-20260307 gcc-8.5.0
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply
* Re: [BUG] wifi: mt76: mt7925u: probe with driver mt7925u failed with error -110
From: Sean Wang @ 2026-03-07 0:46 UTC (permalink / raw)
To: Nick
Cc: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Deren Wu, Leon Yen
In-Reply-To: <CAFktD2eG+nebKcNbw2imufSOz6MCR-SUXjcUQmDqJabNfwx4sg@mail.gmail.com>
Hi Nick,
Thanks for the detailed report this is very helpful. I don't have an
MT7925 USB device to detail look into the issue, but based on the
trace I wrote a small change to try a different MT7925 reset sequence.
please help test.
--- a/drivers/net/wireless/mediatek/mt76/mt792x_usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_usb.c
@@ -234,6 +234,36 @@ int mt792xu_dma_init(struct mt792x_dev *dev, bool resume)
}
EXPORT_SYMBOL_GPL(mt792xu_dma_init);
+static int mt7925u_wfsys_reset(struct mt792x_dev *dev)
+{
+ u32 val;
+ int i;
+
+#define MT7925_CBTOP_RGU_WF_SUBSYS_RST 0x70028600
+#define MT7925_WFSYS_SW_INIT_DONE_ADDR 0x184c1604
+#define MT7925_WFSYS_SW_INIT_DONE 0x00001d1e
+
+ val = mt792xu_uhw_rr(&dev->mt76, MT7925_CBTOP_RGU_WF_SUBSYS_RST);
+ val |= MT_CBTOP_RGU_WF_SUBSYS_RST_WF_WHOLE_PATH;
+ mt792xu_uhw_wr(&dev->mt76, MT7925_CBTOP_RGU_WF_SUBSYS_RST, val);
+
+ msleep(20);
+
+ val = mt792xu_uhw_rr(&dev->mt76, MT7925_CBTOP_RGU_WF_SUBSYS_RST);
+ val &= ~MT_CBTOP_RGU_WF_SUBSYS_RST_WF_WHOLE_PATH;
+ mt792xu_uhw_wr(&dev->mt76, MT7925_CBTOP_RGU_WF_SUBSYS_RST, val);
+
+ for (i = 0; i < MT792x_WFSYS_INIT_RETRY_COUNT; i++) {
+ val = mt792xu_uhw_rr(&dev->mt76, MT7925_WFSYS_SW_INIT_DONE_ADDR);
+ if (val == MT7925_WFSYS_SW_INIT_DONE)
+ return 0;
+
+ msleep(100);
+ }
+
+ return -ETIMEDOUT;
+}
+
int mt792xu_wfsys_reset(struct mt792x_dev *dev)
{
u32 val;
@@ -241,6 +271,9 @@ int mt792xu_wfsys_reset(struct mt792x_dev *dev)
mt792xu_epctl_rst_opt(dev, false);
+ if (is_mt7925(&dev->mt76))
+ return mt7925u_wfsys_reset(dev);
+
val = mt792xu_uhw_rr(&dev->mt76, MT_CBTOP_RGU_WF_SUBSYS_RST);
On Fri, Mar 6, 2026 at 1:24 PM Nick <morrownr@gmail.com> wrote:
>
> > > Reference: https://github.com/morrownr/USB-WiFi/issues/688#issuecomment-3999038526
> > >
> > > The above thread is rather lengthy as we have been working on this
> > > issue since Dec. 25.
> > >
> > > Testing with a Netgear A9000 USB WiFi adapter (mt7925u driver). Kernel
> > > 7.0 rc2 and a x86_64 system. Additional testing with older kernels was
> > > also performed with the same results.
> > >
> > > Problem description:
> > >
> > > Cold boot shows the adapter coming up and operating normally.
> > >
> > > Removing the adapter from the USB port and replacing it shows the
> > > adapter coming up and operating normally.
> > >
> > > A warm reboot does not provide a WiFi interface and shows the
> > > following in the system log:
> > >
> > > mt7925u 2-3.2:1.0: probe with driver mt7925u failed with error -110
> > >
> > > Using the commands rmmod and modeprobe do not provide a WiFi interface.
> > >
> > > Thoughts: The problem likely is not the module teardown. The problem
> > > seems to be that the firmware (or the mt7925u driver) leaves the
> > > adapter in a strange state such that a power cycle of the adapter
> > > hardware is needed before the mt7925u driver can properly initialize
> > > it a second time.
> > >
> >
> > Hi Nick,
> >
> > Could you enable debug logs and check whether the driver can still
> > read the correct chip ID after a warm reboot, and at which step the
> > initialization fails before the -110 error? Thanks for continuing to
> > test and gather this useful information.
> >
> > Sean
>
> Hi Sean,
>
> Github user @exct has performed the testing requested and provides the
> following report:
>
> mt7925u Probe Failure Debug Report
> Adapter: Netgear A9000 (USB ID 0846:9072, MediaTek MT7925)
> Kernel: 6.19.6-2-cachyos
>
> Summary
> The driver can read the correct chip ID after a warm reload. The
> failure occurs before firmware is loaded, inside
> mt792xu_wfsys_reset(), which times out waiting for the WiFi subsystem
> to reinitialize. -ETIMEDOUT (-110) is returned and the probe aborts.
>
> Findings
>
> Question: Chip ID readable after warm reload?
> Answer: Yes — MT_HW_CHIPID = 0x7925, MT_HW_REV = 0x8a00
>
> Question: Which step fails?
> Answer: mt792xu_wfsys_reset() — WFSYS_INIT_DONE never asserted
>
> Question: Does it reach mt792xu_mcu_power_on()?
> Answer: No
>
> Question: Does it reach mt7925_run_firmware()?
> Answer: No
>
> Probe Sequence Trace
>
> mt7925u_probe()
> ├─ mt76_alloc_device() OK
> ├─ __mt76u_init() OK
> ├─ read MT_HW_CHIPID (0x70010200) → 0x00007925 ✓
> ├─ read MT_HW_REV (0x70010204) → 0x00008a00 ✓
> ├─ read MT_CONN_ON_MISC (0x7c0600f0) → 0x00000003 ← FW_N9_RDY is SET
> ├─ enters mt792xu_wfsys_reset() ← triggered because FW_N9_RDY = 1
> │ ├─ write MT_CBTOP_RGU_WF_SUBSYS_RST (assert reset)
> │ ├─ write MT_CBTOP_RGU_WF_SUBSYS_RST (deassert reset)
> │ ├─ poll MT_UDMA_CONN_INFRA_STATUS (0x74000a20) → 0x00000000
> │ ├─ poll MT_UDMA_CONN_INFRA_STATUS (0x74000a20) → 0x00000000
> │ └─ ... timeout after ~212 ms → return -ETIMEDOUT
> └─ goto error: (mt76u_queues_deinit + mt76_free_device)
>
> Root Cause
>
> After rmmod, the firmware leaves FW_N9_RDY asserted in
> MT_CONN_ON_MISC. On re-probe, the driver correctly detects this and
> calls mt792xu_wfsys_reset() to recover. However, the WiFi subsystem
> never signals completion — WFSYS_INIT_DONE in
> MT_UDMA_CONN_INFRA_STATUS (reg 0x74000a20) stays 0x00000000 throughout
> the retry loop. The subsystem is stuck in a state that the software
> reset path cannot recover from. Only a full USB power cycle clears it.
>
> Hope this helps,
>
> Nick
^ permalink raw reply
* [PATCH 18/18] wifi: mt76: mt7925: add 320MHz bandwidth to bss_rlm_tlv
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
bss_rlm_tlv() in mt7925_mcu_bss_rlm_tlv() has no case for
NL80211_CHAN_WIDTH_320. When associated to a 320MHz BSS, the switch
falls through to default and sends bw=0 (CMD_CBW_20MHZ) to firmware
via BSS_RLM TLV. Firmware then configures the RX radio for 20MHz
and cannot decode the AP's 320MHz frames, resulting in complete data
path failure at 320MHz.
Add the missing NL80211_CHAN_WIDTH_320 case with CMD_CBW_320MHZ and
center_chan2.
Tested on ASUS RT-BE92U: 320MHz throughput goes from 0 Mbps to
841 Mbps (iperf3 -t30 -P8), PHY 4803 Mbps EHT-MCS11.
Reported-by: 张旭涵 <Loong.0x00@gmail.com>
Closes: https://github.com/jetm/mediatek-mt7927-dkms/issues/15
Assisted-by: Claude Code <noreply@anthropic.com> (claude-opus-4-6)
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 3458aa8c79cb..025e6d14f7ce 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -2363,6 +2363,10 @@ void mt7925_mcu_bss_rlm_tlv(struct sk_buff *skb, struct mt76_phy *phy,
case NL80211_CHAN_WIDTH_160:
req->bw = CMD_CBW_160MHZ;
break;
+ case NL80211_CHAN_WIDTH_320:
+ req->bw = CMD_CBW_320MHZ;
+ req->center_chan2 = ieee80211_frequency_to_channel(freq2);
+ break;
case NL80211_CHAN_WIDTH_5:
req->bw = CMD_CBW_5MHZ;
break;
--
2.53.0
^ permalink raw reply related
* [PATCH 17/18] wifi: mt76: mt7925: fix MT7927 band_idx for stable 5GHz/6GHz operation
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
The MT7927 (Filogic 380) firmware requires explicit band_idx assignment
(0 for 2.4GHz, 1 for 5GHz/6GHz) instead of 0xff (auto-select) used by
MT7925. Without this, the firmware selects the wrong radio for 5GHz and
6GHz connections, causing WPA 4-way handshake timeout and data plane
failures on those bands.
Add mt7925_mt7927_hw_band_from_nl() helper to map nl80211_band to
hardware band index, and use it throughout the driver:
- mac_link_bss_add: set band_idx from link channel at BSS creation
- assign_vif_chanctx: update band_idx when channel context changes,
resend DEV_INFO to firmware if band changed
- bss_basic_tlv: set band_idx in BSS info sent to firmware
- set_roc / set_mlo_roc / abort_roc: send concrete dbdcband instead
of 0xff auto-select
- roc_iter / roc_handle_grant: clamp invalid grant band_idx values
using rfband as fallback, process grants for all MT7927 request
types (not just JOIN)
All changes guarded by is_mt7927() - no impact on MT7925 behavior.
Originally discovered and fixed by marcin-fm; Loong0x00 contributed
additional improvements based on marcin-fm's patch.
Co-developed-by: Marcin FM <marcin@lgic.pl>
Signed-off-by: Marcin FM <marcin@lgic.pl>
Co-developed-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: 张旭涵 <Loong.0x00@gmail.com>
Assisted-by: Claude Code <noreply@anthropic.com> (claude-opus-4-6)
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/main.c | 40 +++++++++++++++-
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 54 ++++++++++++++++++----
drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h | 5 ++
3 files changed, 87 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index f82c56c46324..fcb9f26c8b87 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -400,7 +400,24 @@ static int mt7925_mac_link_bss_add(struct mt792x_dev *dev,
mconf->mt76.omac_idx = ieee80211_vif_is_mld(vif) ?
0 : mconf->mt76.idx;
- mconf->mt76.band_idx = 0xff;
+
+ if (is_mt7927(&dev->mt76)) {
+ struct ieee80211_channel *chan = NULL;
+
+ if (link_conf->chanreq.oper.chan)
+ chan = link_conf->chanreq.oper.chan;
+ else if (mvif->phy->mt76->chandef.chan)
+ chan = mvif->phy->mt76->chandef.chan;
+
+ if (chan)
+ mconf->mt76.band_idx =
+ mt7925_mt7927_hw_band_from_nl(chan->band);
+ else
+ mconf->mt76.band_idx = 0xff;
+ } else {
+ mconf->mt76.band_idx = 0xff;
+ }
+
mconf->mt76.wmm_idx = ieee80211_vif_is_mld(vif) ?
0 : mconf->mt76.idx % MT76_CONNAC_MAX_WMM_SETS;
mconf->mt76.link_idx = hweight16(mvif->valid_links);
@@ -417,7 +434,8 @@ static int mt7925_mac_link_bss_add(struct mt792x_dev *dev,
mlink->wcid.idx = idx;
mlink->wcid.tx_info |= MT_WCID_TX_INFO_SET;
- mt76_wcid_init(&mlink->wcid, 0);
+ mt76_wcid_init(&mlink->wcid,
+ mconf->mt76.band_idx == 0xff ? 0 : mconf->mt76.band_idx);
mt7925_mac_wtbl_update(dev, idx,
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
@@ -2119,9 +2137,12 @@ static int mt7925_assign_vif_chanctx(struct ieee80211_hw *hw,
{
struct mt792x_chanctx *mctx = (struct mt792x_chanctx *)ctx->drv_priv;
struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
+ struct mt792x_link_sta *mlink;
struct mt792x_dev *dev = mt792x_hw_dev(hw);
struct ieee80211_bss_conf *pri_link_conf;
struct mt792x_bss_conf *mconf;
+ u8 band_idx;
+ u8 old_band;
mutex_lock(&dev->mt76.mutex);
@@ -2137,6 +2158,21 @@ static int mt7925_assign_vif_chanctx(struct ieee80211_hw *hw,
mconf = &mvif->bss_conf;
}
+ old_band = mconf->mt76.band_idx;
+ if (is_mt7927(&dev->mt76) && ctx->def.chan) {
+ band_idx = mt7925_mt7927_hw_band_from_nl(ctx->def.chan->band);
+ mconf->mt76.band_idx = band_idx;
+ mlink = mt792x_sta_to_link(&mvif->sta, mconf->link_id);
+ if (mlink)
+ mlink->wcid.phy_idx = band_idx;
+
+ if (old_band != band_idx && vif->type == NL80211_IFTYPE_STATION &&
+ mlink)
+ mt76_connac_mcu_uni_add_dev(&dev->mphy, link_conf,
+ &mconf->mt76, &mlink->wcid,
+ true);
+ }
+
mconf->mt76.ctx = ctx;
mctx->bss_conf = mconf;
mutex_unlock(&dev->mt76.mutex);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 8b5ffb240d52..3458aa8c79cb 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -301,16 +301,36 @@ mt7925_mcu_connection_loss_event(struct mt792x_dev *dev, struct sk_buff *skb)
static void
mt7925_mcu_roc_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
{
- struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
+ struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;
struct mt7925_roc_grant_tlv *grant = priv;
+ u8 band_idx = grant->dbdcband;
if (ieee80211_vif_is_mld(vif) && vif->type == NL80211_IFTYPE_STATION)
return;
- if (mvif->idx != grant->bss_idx)
+ if (mvif->bss_conf.mt76.idx != grant->bss_idx)
return;
- mvif->band_idx = grant->dbdcband;
+ /* MT7927 firmware requires band_idx 0 (2.4G) or 1 (5/6G).
+ * Clamp invalid grant values using rfband as fallback.
+ */
+ if (is_mt7927(&mvif->phy->dev->mt76) && band_idx > 1) {
+ switch (grant->rfband) {
+ case 1: /* 2.4 GHz */
+ band_idx = 0;
+ break;
+ case 2: /* 5 GHz */
+ case 3: /* 6 GHz */
+ band_idx = 1;
+ break;
+ default:
+ band_idx = mvif->bss_conf.mt76.band_idx <= 1 ?
+ mvif->bss_conf.mt76.band_idx : 0;
+ break;
+ }
+ }
+
+ mvif->bss_conf.mt76.band_idx = band_idx;
}
static void mt7925_mcu_roc_handle_grant(struct mt792x_dev *dev,
@@ -327,10 +347,11 @@ static void mt7925_mcu_roc_handle_grant(struct mt792x_dev *dev,
if (grant->reqtype == MT7925_ROC_REQ_ROC)
ieee80211_ready_on_channel(hw);
- else if (grant->reqtype == MT7925_ROC_REQ_JOIN)
+ else if (is_mt7927(&dev->mt76) || grant->reqtype == MT7925_ROC_REQ_JOIN)
ieee80211_iterate_active_interfaces_atomic(hw,
IEEE80211_IFACE_ITER_RESUME_ALL,
mt7925_mcu_roc_iter, grant);
+
dev->phy.roc_grant = true;
wake_up(&dev->phy.roc_wait);
duration = le32_to_cpu(grant->max_interval);
@@ -1378,10 +1399,15 @@ int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
req.roc[i].center_chan2 = 0;
req.roc[i].center_chan2_from_ap = 0;
- /* STR : 0xfe indicates BAND_ALL with enabling DBDC
- * EMLSR : 0xff indicates (BAND_AUTO) without DBDC
- */
- req.roc[i].dbdcband = type == MT7925_ROC_REQ_JOIN ? 0xfe : 0xff;
+ if (is_mt7927(&mvif->phy->dev->mt76))
+ req.roc[i].dbdcband =
+ mt7925_mt7927_hw_band_from_nl(chan->band);
+ else
+ /* STR : 0xfe indicates BAND_ALL with enabling DBDC
+ * EMLSR : 0xff indicates (BAND_AUTO) without DBDC
+ */
+ req.roc[i].dbdcband = type == MT7925_ROC_REQ_JOIN ?
+ 0xfe : 0xff;
if (chan->hw_value < center_ch)
req.roc[i].sco = 1; /* SCA */
@@ -1419,7 +1445,9 @@ int mt7925_mcu_set_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
.bw_from_ap = CMD_CBW_20MHZ,
.center_chan = center_ch,
.center_chan_from_ap = center_ch,
- .dbdcband = 0xff, /* auto */
+ .dbdcband = is_mt7927(&dev->mt76) ?
+ mt7925_mt7927_hw_band_from_nl(chan->band) :
+ 0xff, /* auto */
},
};
@@ -1466,7 +1494,10 @@ int mt7925_mcu_abort_roc(struct mt792x_phy *phy, struct mt792x_bss_conf *mconf,
.len = cpu_to_le16(sizeof(struct roc_abort_tlv)),
.tokenid = token_id,
.bss_idx = mconf->mt76.idx,
- .dbdcband = 0xff, /* auto*/
+ .dbdcband = is_mt7927(&dev->mt76) &&
+ mconf->mt76.band_idx <= 1 ?
+ mconf->mt76.band_idx :
+ 0xff, /* auto */
},
};
@@ -2495,6 +2526,9 @@ mt7925_mcu_bss_basic_tlv(struct sk_buff *skb,
basic_req->phymode_ext = mt7925_get_phy_mode_ext(phy, vif, band,
link_sta);
+ if (is_mt7927(phy->dev))
+ mconf->mt76.band_idx = mt7925_mt7927_hw_band_from_nl(band);
+
if (band == NL80211_BAND_2GHZ)
basic_req->nonht_basic_phy = cpu_to_le16(PHY_TYPE_ERP_INDEX);
else
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h b/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
index ba3d2c4de4ce..d3c89ea0afab 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mt7925.h
@@ -63,6 +63,11 @@ enum mt7925_roc_req {
MT7925_ROC_REQ_NUM
};
+static inline u8 mt7925_mt7927_hw_band_from_nl(enum nl80211_band band)
+{
+ return band == NL80211_BAND_2GHZ ? 0 : 1;
+}
+
enum {
UNI_EVENT_ROC_GRANT = 0,
UNI_EVENT_ROC_GRANT_SUB_LINK = 4,
--
2.53.0
^ permalink raw reply related
* [PATCH 16/18] wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
In the error path of mt7925_change_vif_links(), the free: label iterates
over link_ids to clean up, but compares against `mconf` and `mlink`
which hold stale values from the last loop iteration rather than the
current link_id being freed.
Use array-indexed access (mconfs[link_id] / mlinks[link_id]) to compare
against the correct per-link pointers.
Fixes: 69acd6d910b0 ("wifi: mt76: mt7925: add MLO support")
Assisted-by: Claude Code <noreply@anthropic.com> (claude-opus-4-6)
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 4e1265886f20..f82c56c46324 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -2073,9 +2073,9 @@ mt7925_change_vif_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
rcu_assign_pointer(mvif->link_conf[link_id], NULL);
rcu_assign_pointer(mvif->sta.link[link_id], NULL);
- if (mconf != &mvif->bss_conf)
+ if (mconfs[link_id] != &mvif->bss_conf)
devm_kfree(dev->mt76.dev, mconfs[link_id]);
- if (mlink != &mvif->sta.deflink)
+ if (mlinks[link_id] != &mvif->sta.deflink)
devm_kfree(dev->mt76.dev, mlinks[link_id]);
}
--
2.53.0
^ permalink raw reply related
* [PATCH 15/18] wifi: mt76: mt7925: handle 320MHz bandwidth in RXV and TXS
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
The RX vector (RXV) and TX status (TXS) parsing in mac.c lack handling
for 320MHz channel width. When the hardware reports 320MHz in the
bandwidth field, mt7925_mac_fill_rx_rate() returns -EINVAL and
mt7925_mac_add_txs_skb() records no bandwidth stats.
Add IEEE80211_STA_RX_BW_320 cases to both functions. The RXV parser
also handles BW_320+1 since the hardware can report 320MHz in two
adjacent encoding positions.
Also fix whitespace alignment in mt792x_regs.h defines.
Assisted-by: Claude Code <noreply@anthropic.com> (claude-opus-4-6)
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 9 +++++++++
drivers/net/wireless/mediatek/mt76/mt792x_regs.h | 6 +++---
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
index caaf71c31480..ad03fc554b69 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
@@ -339,6 +339,11 @@ mt7925_mac_fill_rx_rate(struct mt792x_dev *dev,
case IEEE80211_STA_RX_BW_160:
status->bw = RATE_INFO_BW_160;
break;
+ /* RXV can report 320 in two positions */
+ case IEEE80211_STA_RX_BW_320:
+ case IEEE80211_STA_RX_BW_320 + 1:
+ status->bw = RATE_INFO_BW_320;
+ break;
default:
return -EINVAL;
}
@@ -992,6 +997,10 @@ mt7925_mac_add_txs_skb(struct mt792x_dev *dev, struct mt76_wcid *wcid,
stats->tx_mode[mode]++;
switch (FIELD_GET(MT_TXS0_BW, txs)) {
+ case IEEE80211_STA_RX_BW_320:
+ rate.bw = RATE_INFO_BW_320;
+ stats->tx_bw[4]++;
+ break;
case IEEE80211_STA_RX_BW_160:
rate.bw = RATE_INFO_BW_160;
stats->tx_bw[3]++;
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_regs.h b/drivers/net/wireless/mediatek/mt76/mt792x_regs.h
index b364d0038653..a2ce6872559e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_regs.h
@@ -301,9 +301,9 @@
#define MT_WFDMA0_GLO_CFG_CSR_DISP_BASE_PTR_CHAIN_EN BIT(15)
#define MT_WFDMA0_GLO_CFG_CSR_LBK_RX_Q_SEL_EN BIT(20)
#define MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 BIT(21)
-#define MT_WFDMA0_GLO_CFG_ADDR_EXT_EN BIT(26)
#define MT_WFDMA0_GLO_CFG_OMIT_RX_INFO BIT(27)
#define MT_WFDMA0_GLO_CFG_OMIT_TX_INFO BIT(28)
+#define MT_WFDMA0_GLO_CFG_ADDR_EXT_EN BIT(26)
#define MT_WFDMA0_GLO_CFG_CLK_GAT_DIS BIT(30)
#define HOST_RX_DONE_INT_ENA0 BIT(0)
@@ -509,8 +509,8 @@
#define MT_MCIF_REMAP_WF_1_BA 0xd1034
/* CBInfra CBTOP remap values */
-#define MT_CBINFRA_REMAP_WF_VAL 0x74037001
-#define MT_CBINFRA_REMAP_BT_VAL 0x70007000
+#define MT_CBINFRA_REMAP_WF_VAL 0x74037001
+#define MT_CBINFRA_REMAP_BT_VAL 0x70007000
#define MT_MCIF_REMAP_WF_1_BA_VAL 0x18051803
--
2.53.0
^ permalink raw reply related
* [PATCH 14/18] wifi: mt76: mt7925: disable ASPM for MT7927 to fix throughput collapse
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
MT7927 (MT7927) exhibits severe throughput degradation when PCIe ASPM
L1 is active. Upload throughput drops from 1+ Gbps to ~200 Mbps, and
intermittent download drops to ~69 Mbps have been observed.
The root cause is that MT7927's CONNINFRA power domain and WFDMA
register access are unreliable when the PCIe link transitions in and
out of L1 sleep state. Unlike MT7925, MT7927 depends on CONNINFRA
being continuously accessible for CBTOP address remap, and its ROM
reinitializes WFDMA on every CLR_OWN which can race with L1
transitions.
Disable ASPM unconditionally for MT7927 at probe time using the
existing mt76_pci_disable_aspm() helper, which handles both the device
and parent bridge. This disables L0s in addition to L1; L0s power
savings are negligible for a PCIe WLAN card and this avoids needing a
separate L1-only code path with CONFIG_PCIEASPM fallback handling.
After the disable, mt76_pci_aspm_supported() returns false so the
2-3 ms delay in __mt792xe_mcu_drv_pmctrl() is correctly skipped.
The pci_disable_link_state() call persists across suspend/resume.
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
index 6275e78777b0..e6830404c8fc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
@@ -516,7 +516,14 @@ static int mt7925_pci_probe(struct pci_dev *pdev,
if (ret)
goto err_free_pci_vec;
- if (mt7925_disable_aspm)
+ /* MT7927 CONNINFRA power domain and WFDMA register access are
+ * unreliable with PCIe L1 active, causing throughput to drop
+ * from 1+ Gbps to ~200 Mbps. Disable ASPM unconditionally
+ * rather than only L1, since L0s savings are negligible for
+ * a PCIe WLAN card and mt76_pci_disable_aspm() already
+ * handles both device and parent bridge in one call.
+ */
+ if (mt7925_disable_aspm || is_mt7927_hw)
mt76_pci_disable_aspm(pdev);
ops = mt792x_get_mac80211_ops(&pdev->dev, &mt7925_ops,
--
2.53.0
^ permalink raw reply related
* [PATCH 13/18] wifi: mt76: mt7925: restore FW_DWLD_BYPASS_DMASHDL in MT7927 PM wake path
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
mt7927_dma_init() sets FW_DWLD_BYPASS_DMASHDL (BIT(9) of GLO_CFG)
during initial probe, but mt792x_dma_enable() - called on every PM
wake cycle - did not restore it. On MT7927, every CLR_OWN causes the
ROM to reinitialize WFDMA which resets GLO_CFG. The PM wake path
already restores ADDR_EXT_EN and clears CSR_LBK_RX_Q_SEL_EN but was
missing FW_DWLD_BYPASS_DMASHDL.
Add FW_DWLD_BYPASS_DMASHDL to the existing is_mt7927() block in
mt792x_dma_enable() so all three MT7927-specific GLO_CFG bits are
consistently restored after PM wake.
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt792x_dma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_dma.c b/drivers/net/wireless/mediatek/mt76/mt792x_dma.c
index 32364f19007d..95082d64fb69 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_dma.c
@@ -168,7 +168,8 @@ int mt792x_dma_enable(struct mt792x_dev *dev)
if (is_mt7927(&dev->mt76)) {
mt76_set(dev, MT_WFDMA0_GLO_CFG,
- MT_WFDMA0_GLO_CFG_ADDR_EXT_EN);
+ MT_WFDMA0_GLO_CFG_ADDR_EXT_EN |
+ MT_WFDMA0_GLO_CFG_FW_DWLD_BYPASS_DMASHDL);
mt76_clear(dev, MT_WFDMA0_GLO_CFG,
MT_WFDMA0_GLO_CFG_CSR_LBK_RX_Q_SEL_EN);
}
--
2.53.0
^ permalink raw reply related
* [PATCH 12/18] wifi: mt76: mt7925: advertise EHT 320MHz capabilities for 6GHz band
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
mt7925_init_eht_caps() only populates EHT MCS/NSS maps for BW <= 80
and BW = 160, but never sets BW = 320. This means iw phy shows no
320MHz MCS map entries even though the hardware supports 320MHz
operation in the 6GHz band.
Add the missing 320MHz capability bits for 6GHz, following the same
pattern as mt7996:
- PHY_CAP0: IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ
- PHY_CAP1: beamformee SS for 320MHz
- PHY_CAP2: sounding dimensions for 320MHz
- PHY_CAP6: MCS15 support for 320MHz width
- PHY_CAP7: non-OFDMA UL MU-MIMO and MU beamformer for 320MHz
- MCS/NSS: populate bw._320 maps for 6GHz band
Guard all 320MHz capability advertisements behind is_mt7927() since
320MHz support has only been validated on MT7927 hardware. The mt7925
standalone chip may not support 320MHz operation.
Assisted-by: Claude Code <noreply@anthropic.com> (claude-opus-4-6)
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/main.c | 28 +++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 2d358a96640c..4e1265886f20 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -183,6 +183,10 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER |
IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
+ if (band == NL80211_BAND_6GHZ && is_mt7927(&phy->dev->mt76))
+ eht_cap_elem->phy_cap_info[0] |=
+ IEEE80211_EHT_PHY_CAP0_320MHZ_IN_6GHZ;
+
eht_cap_elem->phy_cap_info[0] |=
u8_encode_bits(u8_get_bits(sts - 1, BIT(0)),
IEEE80211_EHT_PHY_CAP0_BEAMFORMEE_SS_80MHZ_MASK);
@@ -193,10 +197,20 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
u8_encode_bits(sts - 1,
IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_160MHZ_MASK);
+ if (band == NL80211_BAND_6GHZ && is_mt7927(&phy->dev->mt76))
+ eht_cap_elem->phy_cap_info[1] |=
+ u8_encode_bits(sts - 1,
+ IEEE80211_EHT_PHY_CAP1_BEAMFORMEE_SS_320MHZ_MASK);
+
eht_cap_elem->phy_cap_info[2] =
u8_encode_bits(sts - 1, IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_80MHZ_MASK) |
u8_encode_bits(sts - 1, IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_160MHZ_MASK);
+ if (band == NL80211_BAND_6GHZ && is_mt7927(&phy->dev->mt76))
+ eht_cap_elem->phy_cap_info[2] |=
+ u8_encode_bits(sts - 1,
+ IEEE80211_EHT_PHY_CAP2_SOUNDING_DIM_320MHZ_MASK);
+
eht_cap_elem->phy_cap_info[3] =
IEEE80211_EHT_PHY_CAP3_NG_16_SU_FEEDBACK |
IEEE80211_EHT_PHY_CAP3_NG_16_MU_FEEDBACK |
@@ -217,7 +231,8 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
u8_encode_bits(u8_get_bits(0x11, GENMASK(1, 0)),
IEEE80211_EHT_PHY_CAP5_MAX_NUM_SUPP_EHT_LTF_MASK);
- val = width == NL80211_CHAN_WIDTH_160 ? 0x7 :
+ val = width == NL80211_CHAN_WIDTH_320 ? 0xf :
+ width == NL80211_CHAN_WIDTH_160 ? 0x7 :
width == NL80211_CHAN_WIDTH_80 ? 0x3 : 0x1;
eht_cap_elem->phy_cap_info[6] =
u8_encode_bits(u8_get_bits(0x11, GENMASK(4, 2)),
@@ -230,6 +245,11 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ |
IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ;
+ if (band == NL80211_BAND_6GHZ && is_mt7927(&phy->dev->mt76))
+ eht_cap_elem->phy_cap_info[7] |=
+ IEEE80211_EHT_PHY_CAP7_NON_OFDMA_UL_MU_MIMO_320MHZ |
+ IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ;
+
val = u8_encode_bits(nss, IEEE80211_EHT_MCS_NSS_RX) |
u8_encode_bits(nss, IEEE80211_EHT_MCS_NSS_TX);
@@ -239,6 +259,12 @@ mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
eht_nss->bw._160.rx_tx_mcs9_max_nss = val;
eht_nss->bw._160.rx_tx_mcs11_max_nss = val;
eht_nss->bw._160.rx_tx_mcs13_max_nss = val;
+
+ if (band == NL80211_BAND_6GHZ && is_mt7927(&phy->dev->mt76)) {
+ eht_nss->bw._320.rx_tx_mcs9_max_nss = val;
+ eht_nss->bw._320.rx_tx_mcs11_max_nss = val;
+ eht_nss->bw._320.rx_tx_mcs13_max_nss = val;
+ }
}
int mt7925_init_mlo_caps(struct mt792x_phy *phy)
--
2.53.0
^ permalink raw reply related
* [PATCH 11/18] wifi: mt76: mt7925: fix uninitialized is_mt7927_hw in probe
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
is_mt7927_hw was declared at the top of mt7925_pci_probe() but only
assigned after its first use at the irq_map selection. The uninitialized
value (typically zero on x86_64) caused the mt7925 IRQ map to be selected
instead of mt7927_irq_map. With the wrong map the driver polls RX rings
0/2 instead of 4/6/7, so MCU responses are never received and every
command times out with "Failed to get patch semaphore".
Fix by initializing is_mt7927_hw at declaration from pdev->device.
Also remove a stale MT_WFDMA0_GLO_CFG_EXT1 define that pointed to the
wrong register address (MT_WFDMA0 base 0xd4000 instead of MT_UWFDMA0
base 0x24000). The correct BIT(28) write is already handled by
mt792x_dma_enable() via MT_UWFDMA0_GLO_CFG_EXT1.
Reported-by: 张旭涵 <Loong.0x00@gmail.com>
Closes: https://github.com/jetm/mediatek-mt7927-dkms/issues/15
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
index 0f76d9197230..6275e78777b0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
@@ -418,7 +418,6 @@ static int mt7927_dma_init(struct mt792x_dev *dev)
/* MT7927-specific GLO_CFG bits before DMA enable */
mt76_set(dev, MT_WFDMA0_GLO_CFG, MT_WFDMA0_GLO_CFG_ADDR_EXT_EN);
mt76_clear(dev, MT_WFDMA0_GLO_CFG, MT_WFDMA0_GLO_CFG_CSR_LBK_RX_Q_SEL_EN);
- mt76_set(dev, MT_WFDMA0_GLO_CFG_EXT1, BIT(28));
mt76_set(dev, MT_WFDMA0_GLO_CFG,
MT_WFDMA0_GLO_CFG_FW_DWLD_BYPASS_DMASHDL);
@@ -489,7 +488,7 @@ static int mt7925_pci_probe(struct pci_dev *pdev,
struct mt76_bus_ops *bus_ops;
struct mt792x_dev *dev;
struct mt76_dev *mdev;
- bool is_mt7927_hw;
+ bool is_mt7927_hw = (pdev->device == 0x6639 || pdev->device == 0x7927);
u8 features;
int ret;
u16 cmd;
@@ -574,8 +573,6 @@ static int mt7925_pci_probe(struct pci_dev *pdev,
if (!mt7925_disable_aspm && mt76_pci_aspm_supported(pdev))
dev->aspm_supported = true;
- is_mt7927_hw = (pdev->device == 0x6639 || pdev->device == 0x7927);
-
ret = __mt792x_mcu_fw_pmctrl(dev);
if (ret)
goto err_free_dev;
--
2.53.0
^ permalink raw reply related
* [PATCH 10/18] wifi: mt76: mt7925: enable MT7927 runtime power management
From: Javier Tia @ 2026-03-07 0:33 UTC (permalink / raw)
To: linux-wireless, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
Shayne Chen, Sean Wang, Matthias Brugger,
AngeloGioacchino Del Regno, Deren Wu, Ming Yen Hsieh
Cc: linux-kernel, linux-arm-kernel, linux-mediatek, Marcin FM,
Cristian-Florin Radoi, George Salukvadze, Evgeny Kapusta,
Samu Toljamo, Ariel Rosenfeld, Chapuis Dario,
Thibaut François, 张旭涵, Javier Tia
In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me>
Add MT7927-specific GLO_CFG register programming to mt792x_dma_enable()
so that ADDR_EXT_EN and CSR_LBK_RX_Q_SEL_EN are correctly configured
after every WPDMA reinitialization triggered by CLR_OWN during power
management transitions.
On MT7927, every CLR_OWN causes the ROM to reinitialize WFDMA, which
resets the DMA configuration. The PM wake path already handles ring
reprogramming (mt76_queue_reset restores ring base addresses from
stored desc_dma) and prefetch configuration (mt792x_dma_prefetch has
an is_mt7927 branch), but two GLO_CFG bits were missing from
mt792x_dma_enable:
- BIT(26) ADDR_EXT_EN: extended DMA addressing, required for
MT7927's host memory access
- BIT(20) CSR_LBK_RX_Q_SEL_EN: loopback RX queue select, must
be cleared for normal DMA operation
Also define proper macros for these bits and use them in
mt7927_dma_init() to replace bare BIT() values.
With the DMA recovery path now fully MT7927-aware, remove the
is_mt7927() guard that disabled runtime PM and deep sleep. Let the
standard mt792x power management work for MT7927 hardware.
Tested-by: Marcin FM <marcin@lgic.pl>
Tested-by: Cristian-Florin Radoi <radoi.chris@gmail.com>
Tested-by: George Salukvadze <giosal90@gmail.com>
Tested-by: Evgeny Kapusta <3193631@gmail.com>
Tested-by: Samu Toljamo <samu.toljamo@gmail.com>
Tested-by: Ariel Rosenfeld <ariel.rosenfeld.750@gmail.com>
Tested-by: Chapuis Dario <chapuisdario4@gmail.com>
Tested-by: Thibaut François <tibo@humeurlibre.fr>
Tested-by: 张旭涵 <Loong.0x00@gmail.com>
Signed-off-by: Javier Tia <floss@jetm.me>
---
drivers/net/wireless/mediatek/mt76/mt7925/init.c | 5 +----
drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 4 ++--
drivers/net/wireless/mediatek/mt76/mt792x_dma.c | 7 +++++++
drivers/net/wireless/mediatek/mt76/mt792x_regs.h | 2 ++
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/init.c b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
index 1e9eadca3988..84af52a0176d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/init.c
@@ -242,10 +242,7 @@ int mt7925_register_device(struct mt792x_dev *dev)
dev->pm.idle_timeout = MT792x_PM_TIMEOUT;
dev->pm.stats.last_wake_event = jiffies;
dev->pm.stats.last_doze_event = jiffies;
- /* MT7927: disable power management. Every CLR_OWN triggers the
- * ROM to reinitialize WFDMA, destroying DMA ring configuration.
- * Keep the device awake until the PM wake path handles MT7927. */
- if (!mt76_is_usb(&dev->mt76) && !is_mt7927(&dev->mt76)) {
+ if (!mt76_is_usb(&dev->mt76)) {
dev->pm.enable_user = true;
dev->pm.enable = true;
dev->pm.ds_enable_user = true;
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
index 0dec25b320f8..0f76d9197230 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
@@ -416,8 +416,8 @@ static int mt7927_dma_init(struct mt792x_dev *dev)
napi_enable(&dev->mt76.tx_napi);
/* MT7927-specific GLO_CFG bits before DMA enable */
- mt76_set(dev, MT_WFDMA0_GLO_CFG, BIT(26)); /* ADDR_EXT_EN */
- mt76_clear(dev, MT_WFDMA0_GLO_CFG, BIT(20)); /* CSR_LBK_RX_Q_SEL_EN */
+ mt76_set(dev, MT_WFDMA0_GLO_CFG, MT_WFDMA0_GLO_CFG_ADDR_EXT_EN);
+ mt76_clear(dev, MT_WFDMA0_GLO_CFG, MT_WFDMA0_GLO_CFG_CSR_LBK_RX_Q_SEL_EN);
mt76_set(dev, MT_WFDMA0_GLO_CFG_EXT1, BIT(28));
mt76_set(dev, MT_WFDMA0_GLO_CFG,
MT_WFDMA0_GLO_CFG_FW_DWLD_BYPASS_DMASHDL);
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_dma.c b/drivers/net/wireless/mediatek/mt76/mt792x_dma.c
index 3177c6cc6eb5..32364f19007d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_dma.c
@@ -166,6 +166,13 @@ int mt792x_dma_enable(struct mt792x_dev *dev)
mt76_set(dev, MT_WFDMA0_GLO_CFG,
MT_WFDMA0_GLO_CFG_TX_DMA_EN | MT_WFDMA0_GLO_CFG_RX_DMA_EN);
+ if (is_mt7927(&dev->mt76)) {
+ mt76_set(dev, MT_WFDMA0_GLO_CFG,
+ MT_WFDMA0_GLO_CFG_ADDR_EXT_EN);
+ mt76_clear(dev, MT_WFDMA0_GLO_CFG,
+ MT_WFDMA0_GLO_CFG_CSR_LBK_RX_Q_SEL_EN);
+ }
+
if (is_mt7925(&dev->mt76)) {
mt76_rmw(dev, MT_UWFDMA0_GLO_CFG_EXT1, BIT(28), BIT(28));
mt76_set(dev, MT_WFDMA0_INT_RX_PRI, 0x0F00);
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_regs.h b/drivers/net/wireless/mediatek/mt76/mt792x_regs.h
index 5497cfaab8d7..b364d0038653 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_regs.h
@@ -299,7 +299,9 @@
#define MT_WFDMA0_GLO_CFG_FIFO_LITTLE_ENDIAN BIT(12)
#define MT_WFDMA0_GLO_CFG_RX_WB_DDONE BIT(13)
#define MT_WFDMA0_GLO_CFG_CSR_DISP_BASE_PTR_CHAIN_EN BIT(15)
+#define MT_WFDMA0_GLO_CFG_CSR_LBK_RX_Q_SEL_EN BIT(20)
#define MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 BIT(21)
+#define MT_WFDMA0_GLO_CFG_ADDR_EXT_EN BIT(26)
#define MT_WFDMA0_GLO_CFG_OMIT_RX_INFO BIT(27)
#define MT_WFDMA0_GLO_CFG_OMIT_TX_INFO BIT(28)
#define MT_WFDMA0_GLO_CFG_CLK_GAT_DIS BIT(30)
--
2.53.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox