* [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
@ 2023-07-26 9:17 Felix Fietkau
2023-07-26 9:17 ` [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif Felix Fietkau
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Felix Fietkau @ 2023-07-26 9:17 UTC (permalink / raw)
To: linux-wireless
The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
160 MHz support, so it is wrong to also advertise full 160 MHz support.
Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index ee976657bfc3..78552f10b377 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
if (!dev->dbdc_support)
vht_cap->cap |=
IEEE80211_VHT_CAP_SHORT_GI_160 |
- IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
} else {
vht_cap->cap |=
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif
2023-07-26 9:17 [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Felix Fietkau
@ 2023-07-26 9:17 ` Felix Fietkau
2023-07-26 9:17 ` [PATCH 3/3] wifi: mt76: mt7603: fix tx filter/flush function Felix Fietkau
2023-09-21 5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
2 siblings, 0 replies; 11+ messages in thread
From: Felix Fietkau @ 2023-07-26 9:17 UTC (permalink / raw)
To: linux-wireless
When disabling beacons on a vif, intval is 0. Ensure that dev->mt76.beacon_int
is not overwritten in this case, so that beacons continue to work for other
interfaces.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
index b65b0a88c1de..888678732f29 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/beacon.c
@@ -161,7 +161,8 @@ void mt7603_beacon_set_timer(struct mt7603_dev *dev, int idx, int intval)
return;
}
- dev->mt76.beacon_int = intval;
+ if (intval)
+ dev->mt76.beacon_int = intval;
mt76_wr(dev, MT_TBTT,
FIELD_PREP(MT_TBTT_PERIOD, intval) | MT_TBTT_CAL_ENABLE);
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/3] wifi: mt76: mt7603: fix tx filter/flush function
2023-07-26 9:17 [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Felix Fietkau
2023-07-26 9:17 ` [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif Felix Fietkau
@ 2023-07-26 9:17 ` Felix Fietkau
2023-09-21 5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
2 siblings, 0 replies; 11+ messages in thread
From: Felix Fietkau @ 2023-07-26 9:17 UTC (permalink / raw)
To: linux-wireless
Setting MT_TX_ABORT does not abort any transmission for a wtbl index on its
own. Instead, it modifies the behavior of a queue flush to make it selectively
flush packets for a particular wtbl index.
Adjust powersave filtering to make use of this in order to avoid running into
unnecessary timeouts while flushing
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
.../net/wireless/mediatek/mt76/mt7603/mac.c | 21 ++++++++++++++-----
.../net/wireless/mediatek/mt76/mt7603/main.c | 5 ++++-
.../wireless/mediatek/mt76/mt7603/mt7603.h | 2 +-
.../net/wireless/mediatek/mt76/mt7603/regs.h | 7 +++++++
4 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index de11557eb04c..99ae080502d8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -178,8 +178,9 @@ mt7603_wtbl_set_skip_tx(struct mt7603_dev *dev, int idx, bool enabled)
mt76_wr(dev, addr + 3 * 4, val);
}
-void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort)
+void mt7603_filter_tx(struct mt7603_dev *dev, int mac_idx, int idx, bool abort)
{
+ u32 flush_mask;
int i, port, queue;
if (abort) {
@@ -195,6 +196,18 @@ void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort)
mt76_wr(dev, MT_TX_ABORT, MT_TX_ABORT_EN |
FIELD_PREP(MT_TX_ABORT_WCID, idx));
+ flush_mask = MT_WF_ARB_TX_FLUSH_AC0 |
+ MT_WF_ARB_TX_FLUSH_AC1 |
+ MT_WF_ARB_TX_FLUSH_AC2 |
+ MT_WF_ARB_TX_FLUSH_AC3;
+ flush_mask <<= mac_idx;
+
+ mt76_wr(dev, MT_WF_ARB_TX_FLUSH_0, flush_mask);
+ mt76_poll(dev, MT_WF_ARB_TX_FLUSH_0, flush_mask, 0, 20000);
+ mt76_wr(dev, MT_WF_ARB_TX_START_0, flush_mask);
+
+ mt76_wr(dev, MT_TX_ABORT, 0);
+
for (i = 0; i < 4; i++) {
mt76_wr(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY |
FIELD_PREP(MT_DMA_FQCR0_TARGET_WCID, idx) |
@@ -202,13 +215,11 @@ void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort)
FIELD_PREP(MT_DMA_FQCR0_DEST_PORT_ID, port) |
FIELD_PREP(MT_DMA_FQCR0_DEST_QUEUE_ID, queue));
- mt76_poll(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY, 0, 15000);
+ mt76_poll(dev, MT_DMA_FQCR0, MT_DMA_FQCR0_BUSY, 0, 5000);
}
WARN_ON_ONCE(mt76_rr(dev, MT_DMA_FQCR0) & MT_DMA_FQCR0_BUSY);
- mt76_wr(dev, MT_TX_ABORT, 0);
-
mt7603_wtbl_set_skip_tx(dev, idx, false);
}
@@ -245,7 +256,7 @@ void mt7603_wtbl_set_ps(struct mt7603_dev *dev, struct mt7603_sta *sta,
mt76_poll(dev, MT_PSE_RTA, MT_PSE_RTA_BUSY, 0, 5000);
if (enabled)
- mt7603_filter_tx(dev, idx, false);
+ mt7603_filter_tx(dev, sta->vif->idx, idx, false);
addr = mt7603_wtbl1_addr(idx);
mt76_set(dev, MT_WTBL1_OR, MT_WTBL1_OR_PSM_WRITE);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/main.c b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
index 1d4893410ca5..c213fd2a5216 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/main.c
@@ -69,6 +69,7 @@ mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
INIT_LIST_HEAD(&mvif->sta.wcid.poll_list);
mvif->sta.wcid.idx = idx;
mvif->sta.wcid.hw_key_idx = -1;
+ mvif->sta.vif = mvif;
mt76_packet_id_init(&mvif->sta.wcid);
eth_broadcast_addr(bc_addr);
@@ -357,6 +358,7 @@ mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
msta->smps = ~0;
msta->wcid.sta = 1;
msta->wcid.idx = idx;
+ msta->vif = mvif;
mt7603_wtbl_init(dev, idx, mvif->idx, sta->addr);
mt7603_wtbl_set_ps(dev, msta, false);
@@ -380,12 +382,13 @@ mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{
struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
+ struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
spin_lock_bh(&dev->ps_lock);
__skb_queue_purge(&msta->psq);
- mt7603_filter_tx(dev, wcid->idx, true);
+ mt7603_filter_tx(dev, mvif->idx, wcid->idx, true);
spin_unlock_bh(&dev->ps_lock);
spin_lock_bh(&mdev->sta_poll_lock);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
index 354b189862f7..9e58df7042ad 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mt7603.h
@@ -230,7 +230,7 @@ void mt7603_wtbl_set_ps(struct mt7603_dev *dev, struct mt7603_sta *sta,
bool enabled);
void mt7603_wtbl_set_smps(struct mt7603_dev *dev, struct mt7603_sta *sta,
bool enabled);
-void mt7603_filter_tx(struct mt7603_dev *dev, int idx, bool abort);
+void mt7603_filter_tx(struct mt7603_dev *dev, int mac_idx, int idx, bool abort);
int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
enum mt76_txq_id qid, struct mt76_wcid *wcid,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/regs.h b/drivers/net/wireless/mediatek/mt76/mt7603/regs.h
index 3b901090b29c..a39c9a0fcb1c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/regs.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/regs.h
@@ -309,6 +309,13 @@ enum {
#define MT_WF_ARB_TX_STOP_0 MT_WF_ARB(0x110)
#define MT_WF_ARB_TX_STOP_1 MT_WF_ARB(0x114)
+#define MT_WF_ARB_TX_FLUSH_AC0 BIT(0)
+#define MT_WF_ARB_TX_FLUSH_AC1 BIT(5)
+#define MT_WF_ARB_TX_FLUSH_AC2 BIT(10)
+#define MT_WF_ARB_TX_FLUSH_AC3 BIT(16)
+#define MT_WF_ARB_TX_FLUSH_AC4 BIT(21)
+#define MT_WF_ARB_TX_FLUSH_AC5 BIT(26)
+
#define MT_WF_ARB_BCN_START MT_WF_ARB(0x118)
#define MT_WF_ARB_BCN_START_BSSn(n) BIT(0 + (n))
#define MT_WF_ARB_BCN_START_T_PRE_TTTT BIT(10)
--
2.41.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-07-26 9:17 [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Felix Fietkau
2023-07-26 9:17 ` [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif Felix Fietkau
2023-07-26 9:17 ` [PATCH 3/3] wifi: mt76: mt7603: fix tx filter/flush function Felix Fietkau
@ 2023-09-21 5:02 ` Oleksandr Natalenko
2023-09-21 7:19 ` Greg Kroah-Hartman
` (2 more replies)
2 siblings, 3 replies; 11+ messages in thread
From: Oleksandr Natalenko @ 2023-09-21 5:02 UTC (permalink / raw)
To: linux-wireless
Cc: Felix Fietkau, Sasha Levin, Greg Kroah-Hartman, stable,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2101 bytes --]
Hello Felix.
On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
> The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
> 160 MHz support, so it is wrong to also advertise full 160 MHz support.
>
> Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> index ee976657bfc3..78552f10b377 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
> if (!dev->dbdc_support)
> vht_cap->cap |=
> IEEE80211_VHT_CAP_SHORT_GI_160 |
> - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
> FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
> } else {
> vht_cap->cap |=
>
For some reason this got backported into the stable kernel:
```
$ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
```
and this broke my mt7915-based AP.
However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
Is this expected?
Please check.
Thanks.
--
Oleksandr Natalenko (post-factum)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-21 5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
@ 2023-09-21 7:19 ` Greg Kroah-Hartman
2023-09-21 16:03 ` Oleksandr Natalenko
2023-09-22 11:22 ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-09-29 12:59 ` Nicolas Cavallari
2 siblings, 1 reply; 11+ messages in thread
From: Greg Kroah-Hartman @ 2023-09-21 7:19 UTC (permalink / raw)
To: Oleksandr Natalenko
Cc: linux-wireless, Felix Fietkau, Sasha Levin, stable, linux-kernel
On Thu, Sep 21, 2023 at 07:02:41AM +0200, Oleksandr Natalenko wrote:
> Hello Felix.
>
> On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
> > The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
> > 160 MHz support, so it is wrong to also advertise full 160 MHz support.
> >
> > Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
> > Signed-off-by: Felix Fietkau <nbd@nbd.name>
> > ---
> > drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> > index ee976657bfc3..78552f10b377 100644
> > --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> > @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
> > if (!dev->dbdc_support)
> > vht_cap->cap |=
> > IEEE80211_VHT_CAP_SHORT_GI_160 |
> > - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
> > FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
> > } else {
> > vht_cap->cap |=
> >
>
> For some reason this got backported into the stable kernel:
>
> ```
> $ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
> c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
> edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
> 9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
> 0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
> 6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
> 7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
> feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
> 70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
> ```
>
> and this broke my mt7915-based AP.
>
> However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
>
> Is this expected?
Is your device also broken in 6.6-rc2?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-21 7:19 ` Greg Kroah-Hartman
@ 2023-09-21 16:03 ` Oleksandr Natalenko
2023-09-29 11:26 ` Linux regression tracking (Thorsten Leemhuis)
0 siblings, 1 reply; 11+ messages in thread
From: Oleksandr Natalenko @ 2023-09-21 16:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-wireless, Felix Fietkau, Sasha Levin, stable, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2728 bytes --]
Hello.
On čtvrtek 21. září 2023 9:19:58 CEST Greg Kroah-Hartman wrote:
> On Thu, Sep 21, 2023 at 07:02:41AM +0200, Oleksandr Natalenko wrote:
> > Hello Felix.
> >
> > On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
> > > The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
> > > 160 MHz support, so it is wrong to also advertise full 160 MHz support.
> > >
> > > Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
> > > Signed-off-by: Felix Fietkau <nbd@nbd.name>
> > > ---
> > > drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
> > > 1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> > > index ee976657bfc3..78552f10b377 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> > > @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
> > > if (!dev->dbdc_support)
> > > vht_cap->cap |=
> > > IEEE80211_VHT_CAP_SHORT_GI_160 |
> > > - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
> > > FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
> > > } else {
> > > vht_cap->cap |=
> > >
> >
> > For some reason this got backported into the stable kernel:
> >
> > ```
> > $ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
> > c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
> > edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
> > 9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
> > 0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
> > 6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
> > 7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
> > feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
> > 70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
> > ```
> >
> > and this broke my mt7915-based AP.
> >
> > However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
> >
> > Is this expected?
>
> Is your device also broken in 6.6-rc2?
Yes, the same behaviour is observed with v6.6-rc2:
```
hostapd[1316]: Configured VHT capability [VHT_CAP_SUPP_CHAN_WIDTH_MASK] exceeds max value supported by the driver (1 > 0)
```
while having `[VT160]` in `vht_capab=`.
Thanks.
> thanks,
>
> greg k-h
>
--
Oleksandr Natalenko (post-factum)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-21 5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
2023-09-21 7:19 ` Greg Kroah-Hartman
@ 2023-09-22 11:22 ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-10-13 13:21 ` Linux regression tracking #update (Thorsten Leemhuis)
2023-09-29 12:59 ` Nicolas Cavallari
2 siblings, 1 reply; 11+ messages in thread
From: Linux regression tracking #adding (Thorsten Leemhuis) @ 2023-09-22 11:22 UTC (permalink / raw)
To: Oleksandr Natalenko, linux-wireless
Cc: Felix Fietkau, Sasha Levin, Greg Kroah-Hartman, stable,
linux-kernel, Linux kernel regressions list
[TLDR: I'm adding this report to the list of tracked Linux kernel
regressions; the text you find below is based on a few templates
paragraphs you might have encountered already in similar form.
See link in footer if these mails annoy you.]
On 21.09.23 07:02, Oleksandr Natalenko wrote:
>
> On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
>> The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
>> 160 MHz support, so it is wrong to also advertise full 160 MHz support.
>>
>> Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>> ---
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>> index ee976657bfc3..78552f10b377 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>> @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
>> if (!dev->dbdc_support)
>> vht_cap->cap |=
>> IEEE80211_VHT_CAP_SHORT_GI_160 |
>> - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
>> FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
>> } else {
>> vht_cap->cap |=
>>
>
> For some reason this got backported into the stable kernel:
>
> ```
> $ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
> c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
> edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
> 9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
> 0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
> 6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
> 7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
> feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
> 70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
> ```
>
> and this broke my mt7915-based AP.
>
> However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
>
> Is this expected?
Thanks for the report. To be sure the issue doesn't fall through the
cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression
tracking bot:
#regzbot ^introduced 3ec5ac12ac8a4e..fe0ea395f0a351
#regzbot title wifi: mt76: mt7915: removal of VHT160 capability broke hostap
#regzbot ignore-activity
This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.
Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (the parent of this mail). See page linked in footer for
details.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-21 16:03 ` Oleksandr Natalenko
@ 2023-09-29 11:26 ` Linux regression tracking (Thorsten Leemhuis)
0 siblings, 0 replies; 11+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-09-29 11:26 UTC (permalink / raw)
To: Felix Fietkau, Lorenzo Bianconi, Ryder Lee
Cc: linux-wireless, Sasha Levin, stable, linux-kernel,
Oleksandr Natalenko, Greg Kroah-Hartman
Seems nothing happened since this regression was reported more that a
week ago. From a quick search on lore it seems Felix is not around
currently; thus bringing the other mt76 maintainers in, maybe they can
help out here to get this fixed rather sooner than later, as the culprit
unfortunately made it to various stable trees. Ciao, Thorsten.
On 21.09.23 18:03, Oleksandr Natalenko wrote:
> On čtvrtek 21. září 2023 9:19:58 CEST Greg Kroah-Hartman wrote:
>> On Thu, Sep 21, 2023 at 07:02:41AM +0200, Oleksandr Natalenko wrote:
>>>
>>> On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
>>>> The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
>>>> 160 MHz support, so it is wrong to also advertise full 160 MHz support.
>>>>
>>>> Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
>>>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>>>> ---
>>>> drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
>>>> 1 file changed, 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>>>> index ee976657bfc3..78552f10b377 100644
>>>> --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>>>> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>>>> @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
>>>> if (!dev->dbdc_support)
>>>> vht_cap->cap |=
>>>> IEEE80211_VHT_CAP_SHORT_GI_160 |
>>>> - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
>>>> FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
>>>> } else {
>>>> vht_cap->cap |=
>>>>
>>>
>>> For some reason this got backported into the stable kernel:
>>>
>>> ```
>>> $ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
>>> c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
>>> edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
>>> 9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
>>> 0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
>>> 6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
>>> 7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
>>> feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
>>> 70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
>>> ```
>>>
>>> and this broke my mt7915-based AP.
>>>
>>> However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
>>>
>>> Is this expected?
>>
>> Is your device also broken in 6.6-rc2?
>
> Yes, the same behaviour is observed with v6.6-rc2:
>
> ```
> hostapd[1316]: Configured VHT capability [VHT_CAP_SUPP_CHAN_WIDTH_MASK] exceeds max value supported by the driver (1 > 0)
> ```
>
> while having `[VT160]` in `vht_capab=`.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
#regzbot introduced 3ec5ac12ac8a4e
#regzbot ignore-activity
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-21 5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
2023-09-21 7:19 ` Greg Kroah-Hartman
2023-09-22 11:22 ` Linux regression tracking #adding (Thorsten Leemhuis)
@ 2023-09-29 12:59 ` Nicolas Cavallari
2023-09-29 20:36 ` Oleksandr Natalenko
2 siblings, 1 reply; 11+ messages in thread
From: Nicolas Cavallari @ 2023-09-29 12:59 UTC (permalink / raw)
To: Oleksandr Natalenko, linux-wireless
Cc: Felix Fietkau, Sasha Levin, Greg Kroah-Hartman, stable,
linux-kernel, Linux regression tracking (Thorsten Leemhuis)
On 21/09/2023 07:02, Oleksandr Natalenko wrote:
> Hello Felix.
>
> On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
>> The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
>> 160 MHz support, so it is wrong to also advertise full 160 MHz support.
>>
>> Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>> ---
>> drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>> index ee976657bfc3..78552f10b377 100644
>> --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
>> @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
>> if (!dev->dbdc_support)
>> vht_cap->cap |=
>> IEEE80211_VHT_CAP_SHORT_GI_160 |
>> - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
>> FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
>> } else {
>> vht_cap->cap |=
>>
>
> For some reason this got backported into the stable kernel:
>
> ```
> $ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
> c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
> edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
> 9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
> 0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
> 6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
> 7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
> feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
> 70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
> ```
>
> and this broke my mt7915-based AP.
>
> However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
>
> Is this expected?
I would say it is expected.
hostapd seems to solely rely on the VHT Supported Channel Width and does not
seem to support the VHT Extended NSS BW stuff. So it only knows about full VHT
160 MHz support and not about half NSS VHT 160 MHz.
The hardware does not actually support full 160 MHz (despite the driver
erroneously claiming support for it before this patch) so it make sense that
hostapd fails to start the AP if the config file requests (full) VHT 160 MHz.
However, hostapd knows about half NSS HE 160 MHz and I suspect your
configuration also requests HE 160 MHz, so 160 MHz works fine in HE but not in VHT.
In any case, it would help to know the hostapd version and your configuration file.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-29 12:59 ` Nicolas Cavallari
@ 2023-09-29 20:36 ` Oleksandr Natalenko
0 siblings, 0 replies; 11+ messages in thread
From: Oleksandr Natalenko @ 2023-09-29 20:36 UTC (permalink / raw)
To: linux-wireless, Nicolas Cavallari
Cc: Felix Fietkau, Sasha Levin, Greg Kroah-Hartman, stable,
linux-kernel, Linux regression tracking (Thorsten Leemhuis)
[-- Attachment #1: Type: text/plain, Size: 4563 bytes --]
Hello.
On pátek 29. září 2023 14:59:26 CEST Nicolas Cavallari wrote:
> On 21/09/2023 07:02, Oleksandr Natalenko wrote:
> > Hello Felix.
> >
> > On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
> >> The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
> >> 160 MHz support, so it is wrong to also advertise full 160 MHz support.
> >>
> >> Fixes: c2f73eacee3b ("wifi: mt76: mt7915: add back 160MHz channel width support for MT7915")
> >> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> >> ---
> >> drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >>
> >> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> >> index ee976657bfc3..78552f10b377 100644
> >> --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> >> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
> >> @@ -414,7 +414,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
> >> if (!dev->dbdc_support)
> >> vht_cap->cap |=
> >> IEEE80211_VHT_CAP_SHORT_GI_160 |
> >> - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ |
> >> FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
> >> } else {
> >> vht_cap->cap |=
> >>
> >
> > For some reason this got backported into the stable kernel:
> >
> > ```
> > $ git log --oneline v6.5.2..v6.5.4 -- drivers/net/wireless/mediatek/mt76/mt7915/
> > c43017fbebcc3 wifi: mt76: mt7915: fix power-limits while chan_switch
> > edb1afe042c74 wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
> > 9ec0dec0baea3 wifi: mt76: mt7915: remove VHT160 capability on MT7915
> > 0e61f73e6ebc0 wifi: mt76: mt7915: fix capabilities in non-AP mode
> > 6bce28ce28390 wifi: mt76: mt7915: fix command timeout in AP stop period
> > 7af917d4864c6 wifi: mt76: mt7915: rework tx bytes counting when WED is active
> > feae00c6468ce wifi: mt76: mt7915: rework tx packets counting when WED is active
> > 70bbcc4ad6544 wifi: mt76: mt7915: fix background radar event being blocked
> > ```
> >
> > and this broke my mt7915-based AP.
> >
> > However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
> >
> > Is this expected?
>
> I would say it is expected.
>
> hostapd seems to solely rely on the VHT Supported Channel Width and does not
> seem to support the VHT Extended NSS BW stuff. So it only knows about full VHT
> 160 MHz support and not about half NSS VHT 160 MHz.
>
> The hardware does not actually support full 160 MHz (despite the driver
> erroneously claiming support for it before this patch) so it make sense that
> hostapd fails to start the AP if the config file requests (full) VHT 160 MHz.
>
> However, hostapd knows about half NSS HE 160 MHz and I suspect your
> configuration also requests HE 160 MHz, so 160 MHz works fine in HE but not in VHT.
I see, thanks for the explanation.
> In any case, it would help to know the hostapd version and your configuration file.
It's 2.10 with the following config at the very moment:
```
interface=wlp1s0
ctrl_interface=/run/hostapd/wlp1s0
driver=nl80211
ssid=xxx
utf8_ssid=1
interworking=1
ipaddr_type_availability=12
country_code=XX
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK FT-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
wpa_psk_file=/run/credentials/hostapd@wlp1s0.service/hostapd.wpa_psk
macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept
noscan=1
hw_mode=a
ieee80211n=1
channel=100
vht_oper_chwidth=2
vht_oper_centr_freq_seg0_idx=114
ieee80211ax=1
he_oper_chwidth=2
he_oper_centr_freq_seg0_idx=114
ieee80211w=1
ocv=1
ieee80211d=1
ieee80211h=1
wmm_enabled=1
ht_capab=[RXLDPC][HT40+][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40]
mobility_domain=abcd
ft_psk_generate_local=1
pmk_r1_push=1
rsn_preauth=1
rsn_preauth_interfaces=wifi-br
nas_identifier=yyy
r1_key_holder=yyy
r0kh=ff:ff:ff:ff:ff:ff * zzz
r1kh=00:00:00:00:00:00 00:00:00:00:00:00 zzz
disassoc_low_ack=1
fst_group_id=wifi-br
fst_priority=100
mbo=1
mbo_cell_data_conn_pref=1
require_ht=1
ieee80211ac=1
require_vht=1
vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MU-BEAMFORMER][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][MAX-A-MPDU-LEN-EXP7]
```
(I wonder if I did other obviously stupid things here)
--
Oleksandr Natalenko (post-factum)
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915
2023-09-22 11:22 ` Linux regression tracking #adding (Thorsten Leemhuis)
@ 2023-10-13 13:21 ` Linux regression tracking #update (Thorsten Leemhuis)
0 siblings, 0 replies; 11+ messages in thread
From: Linux regression tracking #update (Thorsten Leemhuis) @ 2023-10-13 13:21 UTC (permalink / raw)
To: Oleksandr Natalenko, linux-wireless
Cc: Felix Fietkau, Sasha Levin, Greg Kroah-Hartman, stable,
linux-kernel, Linux kernel regressions list
[TLDR: This mail in primarily relevant for Linux kernel regression
tracking. See link in footer if these mails annoy you.]
On 22.09.23 13:22, Linux regression tracking #adding (Thorsten Leemhuis)
wrote:
>
> On 21.09.23 07:02, Oleksandr Natalenko wrote:
>> On středa 26. července 2023 11:17:02 CEST Felix Fietkau wrote:
>>> The IEEE80211_VHT_CAP_EXT_NSS_BW value already indicates support for half-NSS
>>> 160 MHz support, so it is wrong to also advertise full 160 MHz support.
> [...]
>> and this broke my mt7915-based AP.
>>
>> However, if I remove `[VT160]` capability from the hostapd config, things go back to normal. It does seem that 160 MHz still works even.
>>
>> Is this expected?
>
> Thanks for the report.
Removing this from the regression tracking after mentioning the intent
to do so due to the tricky striation in my last report to Linus.
#regzbot inconclusive: tricky situation, no simple way out afaics
#regzbot ignore-activity
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-10-13 13:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 9:17 [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Felix Fietkau
2023-07-26 9:17 ` [PATCH 2/3] wifi: mt76: mt7603: fix beacon interval after disabling a single vif Felix Fietkau
2023-07-26 9:17 ` [PATCH 3/3] wifi: mt76: mt7603: fix tx filter/flush function Felix Fietkau
2023-09-21 5:02 ` [PATCH 1/3] wifi: mt76: mt7915: remove VHT160 capability on MT7915 Oleksandr Natalenko
2023-09-21 7:19 ` Greg Kroah-Hartman
2023-09-21 16:03 ` Oleksandr Natalenko
2023-09-29 11:26 ` Linux regression tracking (Thorsten Leemhuis)
2023-09-22 11:22 ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-10-13 13:21 ` Linux regression tracking #update (Thorsten Leemhuis)
2023-09-29 12:59 ` Nicolas Cavallari
2023-09-29 20:36 ` Oleksandr Natalenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).