* wifi: mt76: mt7915: fix broken background radar implementation
@ 2025-02-21 15:35 lukasz.michalski
2025-02-25 20:30 ` Felix Fietkau
0 siblings, 1 reply; 4+ messages in thread
From: lukasz.michalski @ 2025-02-21 15:35 UTC (permalink / raw)
To: linux-wireless, nbd, lorenzo
Currently enabling background radar in hostapd results in unreachable AP.
There is because of mistake in enabling background radar implementation for
mt7915 mcu driver - 3rd and 4th parameters are swapped.
mt76_connac_mcu_rdd_cmd requires rx_sel as a fourth parameter but this
parameter is provided as third argument.
Fix was tested on mt7981 and background radar works now correctly. Other
mt76 drivers do not have similar issues.
The issue was also described here:
https://github.com/openwrt/mt76/issues/958
Signed-off-by: Lukasz Michalski <lukasz.michalski@onet.pl>
---
drivers/net/wireless/mt76/mt7915/mcu.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mt76/mt7915/mcu.c
b/drivers/net/wireless/mt76/mt7915/mcu.c
index 9d790f23..a2bad361 100644
--- a/drivers/net/wireless/mt76/mt7915/mcu.c
+++ b/ drivers/net/wireless/mt76/mt7915/mcu.c
@@ -2718,8 +2718,8 @@ int mt7915_mcu_rdd_background_enable(str
int err, region;
if (!chandef) { /* disable offchain */
- err = mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_STOP,
MT_RX_SEL2,
- 0, 0);
+ err = mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_STOP, 0,
+ MT_RX_SEL2, 0);
if (err)
return err;
@@ -2745,8 +2745,8 @@ int mt7915_mcu_rdd_background_enable(str
break;
}
- return mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_START, MT_RX_SEL2,
- 0, region);
+ return mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_START, 0,
+ MT_RX_SEL2, region);
}
int mt7915_mcu_set_chan_info(struct mt7915_phy *phy, int cmd)
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: wifi: mt76: mt7915: fix broken background radar implementation
2025-02-21 15:35 wifi: mt76: mt7915: fix broken background radar implementation lukasz.michalski
@ 2025-02-25 20:30 ` Felix Fietkau
2025-02-26 15:23 ` lukasz.michalski
0 siblings, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2025-02-25 20:30 UTC (permalink / raw)
To: lukasz.michalski, linux-wireless, lorenzo
Hi Lukasz,
On 21.02.25 16:35, lukasz.michalski@onet.pl wrote:
> Currently enabling background radar in hostapd results in unreachable AP.
> There is because of mistake in enabling background radar implementation for
> mt7915 mcu driver - 3rd and 4th parameters are swapped.
> mt76_connac_mcu_rdd_cmd requires rx_sel as a fourth parameter but this
> parameter is provided as third argument.
> Fix was tested on mt7981 and background radar works now correctly. Other
> mt76 drivers do not have similar issues.
> The issue was also described here:
> https://github.com/openwrt/mt76/issues/958
>
> Signed-off-by: Lukasz Michalski <lukasz.michalski@onet.pl>
MediaTek informed me that MT7981 does not actually have background radar
detection in hardware, so this patch can't be merged.
We should instead change the driver code to refuse attempts to enable
background radar detection on this chip.
- Felix
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: wifi: mt76: mt7915: fix broken background radar implementation
2025-02-25 20:30 ` Felix Fietkau
@ 2025-02-26 15:23 ` lukasz.michalski
2025-02-26 15:41 ` Felix Fietkau
0 siblings, 1 reply; 4+ messages in thread
From: lukasz.michalski @ 2025-02-26 15:23 UTC (permalink / raw)
To: 'Felix Fietkau'; +Cc: linux-wireless, lorenzo
Hi Felix, thanks for the info.
Is it only about mt7981 or mt7986 too?
Strange that patched code works flawlessly (or maybe firmware just sliently ignores scan requests?).
Lukasz Michalski
-----Original Message-----
From: Felix Fietkau <nbd@nbd.name>
Sent: Tuesday, February 25, 2025 9:30 PM
To: lukasz.michalski@onet.pl; linux-wireless@vger.kernel.org; lorenzo@kernel.org
Subject: Re: wifi: mt76: mt7915: fix broken background radar implementation
Hi Lukasz,
On 21.02.25 16:35, lukasz.michalski@onet.pl wrote:
> Currently enabling background radar in hostapd results in unreachable AP.
> There is because of mistake in enabling background radar
> implementation for
> mt7915 mcu driver - 3rd and 4th parameters are swapped.
> mt76_connac_mcu_rdd_cmd requires rx_sel as a fourth parameter but this
> parameter is provided as third argument.
> Fix was tested on mt7981 and background radar works now correctly.
> Other
> mt76 drivers do not have similar issues.
> The issue was also described here:
> https://github.com/openwrt/mt76/issues/958
>
> Signed-off-by: Lukasz Michalski <lukasz.michalski@onet.pl>
MediaTek informed me that MT7981 does not actually have background radar detection in hardware, so this patch can't be merged.
We should instead change the driver code to refuse attempts to enable background radar detection on this chip.
- Felix
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: wifi: mt76: mt7915: fix broken background radar implementation
2025-02-26 15:23 ` lukasz.michalski
@ 2025-02-26 15:41 ` Felix Fietkau
0 siblings, 0 replies; 4+ messages in thread
From: Felix Fietkau @ 2025-02-26 15:41 UTC (permalink / raw)
To: lukasz.michalski; +Cc: linux-wireless, lorenzo
On 26.02.25 16:23, lukasz.michalski@onet.pl wrote:
> Hi Felix, thanks for the info.
>
> Is it only about mt7981 or mt7986 too?
> Strange that patched code works flawlessly (or maybe firmware just sliently ignores scan requests?).
I think MT7986 also doesn't have that feature. Additionally, the feature
is only available on devices that have a separate antenna just for DFS.
I think with your patch it wasn't performing any actual background radar
detection, but the driver and mac80211 weren't noticing. So it only
appeared to work but wasn't compliant in any way.
- Felix
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-26 15:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-21 15:35 wifi: mt76: mt7915: fix broken background radar implementation lukasz.michalski
2025-02-25 20:30 ` Felix Fietkau
2025-02-26 15:23 ` lukasz.michalski
2025-02-26 15:41 ` Felix Fietkau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox