2024-04-11 18:07:59

by Kalle Valo

[permalink] [raw]
Subject: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

From: Kalle Valo <[email protected]>

ath12k will support Multi-Link Operation (MLO) in the future but not yet. A
major change with MLO is that cfg80211 will disable Wireless Extension (WEXT)
user space interface. To avoid having inconsistent user experience, first
supporting WEXT and later not, disable WEXT already now.

Now ath12k claims that WEXT is not supported:

$ iwconfig wlan0
wlan0 no wireless extensions.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/ath/ath12k/mac.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index f15dcd75157d..e989628d7d72 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -8556,6 +8556,12 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
NL80211_FEATURE_AP_SCAN;

+ /* MLO is not yet supported so disable Wireless Extensions for now
+ * to make sure ath12k users don't use it. This flag can be removed
+ * once WIPHY_FLAG_SUPPORTS_MLO is enabled.
+ */
+ wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
+
hw->queues = ATH12K_HW_MAX_QUEUES;
wiphy->tx_queue_len = ATH12K_QUEUE_LEN;
hw->offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1;

base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9
--
2.39.2



2024-04-11 19:42:06

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

On 4/11/2024 9:56 AM, Kalle Valo wrote:
> From: Kalle Valo <[email protected]>
>
> ath12k will support Multi-Link Operation (MLO) in the future but not yet. A
> major change with MLO is that cfg80211 will disable Wireless Extension (WEXT)
> user space interface. To avoid having inconsistent user experience, first
> supporting WEXT and later not, disable WEXT already now.
>
> Now ath12k claims that WEXT is not supported:
>
> $ iwconfig wlan0
> wlan0 no wireless extensions.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Kalle Valo <[email protected]>
> ---
> drivers/net/wireless/ath/ath12k/mac.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index f15dcd75157d..e989628d7d72 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -8556,6 +8556,12 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
> wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
> NL80211_FEATURE_AP_SCAN;
>
> + /* MLO is not yet supported so disable Wireless Extensions for now
> + * to make sure ath12k users don't use it. This flag can be removed
> + * once WIPHY_FLAG_SUPPORTS_MLO is enabled.
> + */
> + wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
> +
> hw->queues = ATH12K_HW_MAX_QUEUES;
> wiphy->tx_queue_len = ATH12K_QUEUE_LEN;
> hw->offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1;
>
> base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9

Currently on my version of Ubuntu when I switch to Hotspot mode I'm seeing:
[ 55.189623] warning: `iwconfig' uses wireless extensions which will stop
working for Wi-Fi 7 hardware; use nl80211

So are userspace folks aware of the need to move away from iwconfig?
Is there a Ubuntu / Network Manager fix fir this?

/jeff

/jeff


2024-04-11 21:00:16

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

On 4/11/2024 12:41 PM, Jeff Johnson wrote:
> On 4/11/2024 9:56 AM, Kalle Valo wrote:
>> From: Kalle Valo <[email protected]>
>>
>> ath12k will support Multi-Link Operation (MLO) in the future but not yet. A
>> major change with MLO is that cfg80211 will disable Wireless Extension (WEXT)
>> user space interface. To avoid having inconsistent user experience, first
>> supporting WEXT and later not, disable WEXT already now.
>>
>> Now ath12k claims that WEXT is not supported:
>>
>> $ iwconfig wlan0
>> wlan0 no wireless extensions.
>>
>> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>>
>> Signed-off-by: Kalle Valo <[email protected]>
>> ---
>> drivers/net/wireless/ath/ath12k/mac.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
>> index f15dcd75157d..e989628d7d72 100644
>> --- a/drivers/net/wireless/ath/ath12k/mac.c
>> +++ b/drivers/net/wireless/ath/ath12k/mac.c
>> @@ -8556,6 +8556,12 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
>> wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
>> NL80211_FEATURE_AP_SCAN;
>>
>> + /* MLO is not yet supported so disable Wireless Extensions for now
>> + * to make sure ath12k users don't use it. This flag can be removed
>> + * once WIPHY_FLAG_SUPPORTS_MLO is enabled.
>> + */
>> + wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
>> +
>> hw->queues = ATH12K_HW_MAX_QUEUES;
>> wiphy->tx_queue_len = ATH12K_QUEUE_LEN;
>> hw->offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1;
>>
>> base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9
>
> Currently on my version of Ubuntu when I switch to Hotspot mode I'm seeing:
> [ 55.189623] warning: `iwconfig' uses wireless extensions which will stop
> working for Wi-Fi 7 hardware; use nl80211
>
> So are userspace folks aware of the need to move away from iwconfig?
> Is there a Ubuntu / Network Manager fix fir this?

And I've confirmed that with this patch in place I cannot start the Hotspot.
So suggest you sit on that until userspace is ready.

/jeff


2024-04-13 19:15:21

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

On 4/11/2024 1:59 PM, Jeff Johnson wrote:
> On 4/11/2024 12:41 PM, Jeff Johnson wrote:
>> On 4/11/2024 9:56 AM, Kalle Valo wrote:
>>> From: Kalle Valo <[email protected]>
>>>
>>> ath12k will support Multi-Link Operation (MLO) in the future but not yet. A
>>> major change with MLO is that cfg80211 will disable Wireless Extension (WEXT)
>>> user space interface. To avoid having inconsistent user experience, first
>>> supporting WEXT and later not, disable WEXT already now.
>>>
>>> Now ath12k claims that WEXT is not supported:
>>>
>>> $ iwconfig wlan0
>>> wlan0 no wireless extensions.
>>>
>>> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>>>
>>> Signed-off-by: Kalle Valo <[email protected]>
>>> ---
>>> drivers/net/wireless/ath/ath12k/mac.c | 6 ++++++
>>> 1 file changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
>>> index f15dcd75157d..e989628d7d72 100644
>>> --- a/drivers/net/wireless/ath/ath12k/mac.c
>>> +++ b/drivers/net/wireless/ath/ath12k/mac.c
>>> @@ -8556,6 +8556,12 @@ static int ath12k_mac_hw_register(struct ath12k_hw *ah)
>>> wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
>>> NL80211_FEATURE_AP_SCAN;
>>>
>>> + /* MLO is not yet supported so disable Wireless Extensions for now
>>> + * to make sure ath12k users don't use it. This flag can be removed
>>> + * once WIPHY_FLAG_SUPPORTS_MLO is enabled.
>>> + */
>>> + wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
>>> +
>>> hw->queues = ATH12K_HW_MAX_QUEUES;
>>> wiphy->tx_queue_len = ATH12K_QUEUE_LEN;
>>> hw->offchannel_tx_hw_queue = ATH12K_HW_MAX_QUEUES - 1;
>>>
>>> base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9
>>
>> Currently on my version of Ubuntu when I switch to Hotspot mode I'm seeing:
>> [ 55.189623] warning: `iwconfig' uses wireless extensions which will stop
>> working for Wi-Fi 7 hardware; use nl80211
>>
>> So are userspace folks aware of the need to move away from iwconfig?
>> Is there a Ubuntu / Network Manager fix fir this?
>
> And I've confirmed that with this patch in place I cannot start the Hotspot.
> So suggest you sit on that until userspace is ready.

It turns out that once I configured the Hotspot explicitly for 2.4 GHz
operation that it works even with this patch in place. So I have a separate
issue somewhere with 5 GHz Hotspot operation.

So this patch can go forward...
Acked-by: Jeff Johnson <[email protected]>



2024-04-15 16:27:44

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

Jeff Johnson <[email protected]> writes:

> On 4/11/2024 9:56 AM, Kalle Valo wrote:
>
>> From: Kalle Valo <[email protected]>
>>
>> ath12k will support Multi-Link Operation (MLO) in the future but not yet. A
>> major change with MLO is that cfg80211 will disable Wireless Extension (WEXT)
>> user space interface. To avoid having inconsistent user experience, first
>> supporting WEXT and later not, disable WEXT already now.
>>
>> Now ath12k claims that WEXT is not supported:
>>
>> $ iwconfig wlan0
>> wlan0 no wireless extensions.
>>
>> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>>
>> Signed-off-by: Kalle Valo <[email protected]>

[...]

> Currently on my version of Ubuntu when I switch to Hotspot mode I'm seeing:
> [ 55.189623] warning: `iwconfig' uses wireless extensions which will stop
> working for Wi-Fi 7 hardware; use nl80211

Do you know what entity is running iwconfig? Or was it you running
iwconfig manually?

Please note that this warning is shown only once, all following WEXT
usage (of any process) is not warned. Linus proposed doing a per process
type of warning but we never implemented that, I think we should do
that.

> So are userspace folks aware of the need to move away from iwconfig?

I hope they are but difficult to say. We have been trying for years to
get rid of WEXT but the progress has been really slow. This warning is
another attempt to make everyone aware as with MLO WEXT will not work.

> Is there a Ubuntu / Network Manager fix fir this?

I would hope that Network Manager doesn't use WEXT or especially run the
iwconfig tool. This is why I suspect that you run iwconfig manually.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2024-04-15 17:01:53

by Jeff Johnson

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

On 4/15/2024 9:27 AM, Kalle Valo wrote:
> Jeff Johnson <[email protected]> writes:
>> Is there a Ubuntu / Network Manager fix fir this?
>
> I would hope that Network Manager doesn't use WEXT or especially run the
> iwconfig tool. This is why I suspect that you run iwconfig manually.
>

I am not running iwconfig manually. I'm simply using the Ubuntu wifi settings
menu to enable Hotspot. So somewhere under the hood Ubuntu/NM is running iwconfig



2024-04-15 17:17:30

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

Jeff Johnson <[email protected]> writes:

> On 4/15/2024 9:27 AM, Kalle Valo wrote:
>> Jeff Johnson <[email protected]> writes:
>>> Is there a Ubuntu / Network Manager fix fir this?
>>
>> I would hope that Network Manager doesn't use WEXT or especially run the
>> iwconfig tool. This is why I suspect that you run iwconfig manually.
>
> I am not running iwconfig manually. I'm simply using the Ubuntu wifi settings
> menu to enable Hotspot. So somewhere under the hood Ubuntu/NM is running iwconfig

Oh man, screenscraping iwconfig is horrible. I would be very curious to
know what software exactly does this. This makes even more important to
extend the cfg80211 wext warning per process, otherwise there can be
more of these which are not detected.

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2024-04-18 15:21:13

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

Kalle Valo <[email protected]> wrote:

> ath12k will support Multi-Link Operation (MLO) in the future but not yet. A
> major change with MLO is that cfg80211 will disable Wireless Extension (WEXT)
> user space interface. To avoid having inconsistent user experience, first
> supporting WEXT and later not, disable WEXT already now.
>
> Now ath12k claims that WEXT is not supported:
>
> $ iwconfig wlan0
> wlan0 no wireless extensions.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
>
> Signed-off-by: Kalle Valo <[email protected]>
> Acked-by: Jeff Johnson <[email protected]>

Patch applied to ath-next branch of ath.git, thanks.

03a509740b5d wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches