diff mbox series

wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT

Message ID 20240411165645.4071238-1-kvalo@kernel.org
State New
Headers show
Series wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT | expand

Commit Message

Kalle Valo April 11, 2024, 4:56 p.m. UTC
From: Kalle Valo <quic_kvalo@quicinc.com>

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 <quic_kvalo@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 6 ++++++
 1 file changed, 6 insertions(+)


base-commit: 363e7193eaf258fe7f04e8db560bd8a282a12cd9

Comments

Jeff Johnson April 11, 2024, 7:41 p.m. UTC | #1
On 4/11/2024 9:56 AM, Kalle Valo wrote:
> From: Kalle Valo <quic_kvalo@quicinc.com>
> 
> 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 <quic_kvalo@quicinc.com>
> ---
>  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
Jeff Johnson April 11, 2024, 8:59 p.m. UTC | #2
On 4/11/2024 12:41 PM, Jeff Johnson wrote:
> On 4/11/2024 9:56 AM, Kalle Valo wrote:
>> From: Kalle Valo <quic_kvalo@quicinc.com>
>>
>> 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 <quic_kvalo@quicinc.com>
>> ---
>>  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
Jeff Johnson April 13, 2024, 7:15 p.m. UTC | #3
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 <quic_kvalo@quicinc.com>
>>>
>>> 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 <quic_kvalo@quicinc.com>
>>> ---
>>>  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 <quic_jjohnson@quicinc.com>
Kalle Valo April 15, 2024, 4:27 p.m. UTC | #4
Jeff Johnson <quic_jjohnson@quicinc.com> writes:

> On 4/11/2024 9:56 AM, Kalle Valo wrote:
>
>> From: Kalle Valo <quic_kvalo@quicinc.com>
>> 
>> 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 <quic_kvalo@quicinc.com>

[...]

> 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.
Jeff Johnson April 15, 2024, 4:59 p.m. UTC | #5
On 4/15/2024 9:27 AM, Kalle Valo wrote:
> Jeff Johnson <quic_jjohnson@quicinc.com> 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
Kalle Valo April 15, 2024, 5:17 p.m. UTC | #6
Jeff Johnson <quic_jjohnson@quicinc.com> writes:

> On 4/15/2024 9:27 AM, Kalle Valo wrote:
>> Jeff Johnson <quic_jjohnson@quicinc.com> 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.
Kalle Valo April 18, 2024, 3:21 p.m. UTC | #7
Kalle Valo <kvalo@kernel.org> 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 <quic_kvalo@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>

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

03a509740b5d wifi: ath12k: enable WIPHY_FLAG_DISABLE_WEXT
diff mbox series

Patch

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;