* [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage
@ 2022-11-04 16:42 Johannes Berg
2022-11-04 16:42 ` [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices Johannes Berg
2022-11-17 10:48 ` [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Kalle Valo
0 siblings, 2 replies; 7+ messages in thread
From: Johannes Berg @ 2022-11-04 16:42 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
With MLO/EHT support around the corner, we're going to
remove support for wireless extensions with new devices
since MLO cannot be properly indicated using them.
Add a warning to indicate which processes are still
using wireless extensions, if being used with modern
(i.e. cfg80211) drivers.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/wext-core.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
index fe8765c4075d..cbeb8be214a8 100644
--- a/net/wireless/wext-core.c
+++ b/net/wireless/wext-core.c
@@ -636,7 +636,15 @@ void wireless_send_event(struct net_device * dev,
}
EXPORT_SYMBOL(wireless_send_event);
+#ifdef CONFIG_CFG80211_WEXT
+static void wireless_warn_cfg80211_wext(void)
+{
+ char name[sizeof(current->comm)];
+ pr_warn_ratelimited("warning: `%s' uses wireless extensions that are deprecated for modern drivers\n",
+ get_task_comm(name, current));
+}
+#endif
/* IW handlers */
@@ -652,8 +660,10 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
if (dev->ieee80211_ptr &&
dev->ieee80211_ptr->wiphy &&
dev->ieee80211_ptr->wiphy->wext &&
- dev->ieee80211_ptr->wiphy->wext->get_wireless_stats)
+ dev->ieee80211_ptr->wiphy->wext->get_wireless_stats) {
+ wireless_warn_cfg80211_wext();
return dev->ieee80211_ptr->wiphy->wext->get_wireless_stats(dev);
+ }
#endif
/* not found */
@@ -690,8 +700,10 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
const struct iw_handler_def *handlers = NULL;
#ifdef CONFIG_CFG80211_WEXT
- if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy)
+ if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy) {
+ wireless_warn_cfg80211_wext();
handlers = dev->ieee80211_ptr->wiphy->wext;
+ }
#endif
#ifdef CONFIG_WIRELESS_EXT
if (dev->wireless_handlers)
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices
2022-11-04 16:42 [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Johannes Berg
@ 2022-11-04 16:42 ` Johannes Berg
2022-11-17 10:51 ` Kalle Valo
2022-11-17 10:48 ` [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Kalle Valo
1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2022-11-04 16:42 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
These are new devices that will be introduced into the market
in 2023, with new drivers. Wireless extensions haven't been in
real development since 2006. Since wireless has evolved a lot,
and continues to evolve significantly with MLO, there's really
no good way to still support wireless extensions for devices
that do MLO.
Stop supporting wireless extensions for new devices. We don't
consider this a regression since no such devices (apart from
hwsim) exist yet.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/wext-core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
index cbeb8be214a8..d3b5cf02690c 100644
--- a/net/wireless/wext-core.c
+++ b/net/wireless/wext-core.c
@@ -662,6 +662,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
dev->ieee80211_ptr->wiphy->wext &&
dev->ieee80211_ptr->wiphy->wext->get_wireless_stats) {
wireless_warn_cfg80211_wext();
+ if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
+ return NULL;
return dev->ieee80211_ptr->wiphy->wext->get_wireless_stats(dev);
}
#endif
@@ -702,6 +704,8 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
#ifdef CONFIG_CFG80211_WEXT
if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy) {
wireless_warn_cfg80211_wext();
+ if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
+ return NULL;
handlers = dev->ieee80211_ptr->wiphy->wext;
}
#endif
--
2.38.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices
2022-11-04 16:42 ` [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices Johannes Berg
@ 2022-11-17 10:51 ` Kalle Valo
2022-11-17 10:58 ` Johannes Berg
0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2022-11-17 10:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Johannes Berg
Johannes Berg <johannes@sipsolutions.net> writes:
> From: Johannes Berg <johannes.berg@intel.com>
>
> These are new devices that will be introduced into the market
s/new/Wi-Fi 7/?
> in 2023, with new drivers. Wireless extensions haven't been in
> real development since 2006. Since wireless has evolved a lot,
> and continues to evolve significantly with MLO, there's really
s/MLO/Multi-Link Operation/?
It would good to spell out the acronym at least once per commit log.
> no good way to still support wireless extensions for devices
> that do MLO.
>
> Stop supporting wireless extensions for new devices. We don't
> consider this a regression since no such devices (apart from
> hwsim) exist yet.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> net/wireless/wext-core.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c
> index cbeb8be214a8..d3b5cf02690c 100644
> --- a/net/wireless/wext-core.c
> +++ b/net/wireless/wext-core.c
> @@ -662,6 +662,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
> dev->ieee80211_ptr->wiphy->wext &&
> dev->ieee80211_ptr->wiphy->wext->get_wireless_stats) {
> wireless_warn_cfg80211_wext();
> + if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
> + return NULL;
Should we have a some kind of warning in this case as well? Otherwise
the user has no idea why it stopped working, right?
> return dev->ieee80211_ptr->wiphy->wext->get_wireless_stats(dev);
> }
> #endif
> @@ -702,6 +704,8 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
> #ifdef CONFIG_CFG80211_WEXT
> if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy) {
> wireless_warn_cfg80211_wext();
> + if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
> + return NULL;
And here?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices
2022-11-17 10:51 ` Kalle Valo
@ 2022-11-17 10:58 ` Johannes Berg
2022-11-17 11:05 ` Kalle Valo
0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2022-11-17 10:58 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On Thu, 2022-11-17 at 12:51 +0200, Kalle Valo wrote:
> Johannes Berg <johannes@sipsolutions.net> writes:
>
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > These are new devices that will be introduced into the market
>
> s/new/Wi-Fi 7/?
>
> > in 2023, with new drivers. Wireless extensions haven't been in
> > real development since 2006. Since wireless has evolved a lot,
> > and continues to evolve significantly with MLO, there's really
>
> s/MLO/Multi-Link Operation/?
>
> It would good to spell out the acronym at least once per commit log.
:)
> > +++ b/net/wireless/wext-core.c
> > @@ -662,6 +662,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
> > dev->ieee80211_ptr->wiphy->wext &&
> > dev->ieee80211_ptr->wiphy->wext->get_wireless_stats) {
> > wireless_warn_cfg80211_wext();
> > + if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
> > + return NULL;
>
> Should we have a some kind of warning in this case as well? Otherwise
> the user has no idea why it stopped working, right?
Well it's added after the warning wireless_warn_cfg80211_wext(), so it
already prints the warning from the previous.
I guess we could make an argument to the warning and modify the message
if it's rejected?
johannes
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices
2022-11-17 10:58 ` Johannes Berg
@ 2022-11-17 11:05 ` Kalle Valo
0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2022-11-17 11:05 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
Johannes Berg <johannes@sipsolutions.net> writes:
> On Thu, 2022-11-17 at 12:51 +0200, Kalle Valo wrote:
>> Johannes Berg <johannes@sipsolutions.net> writes:
>>
>> > From: Johannes Berg <johannes.berg@intel.com>
>> >
>> > These are new devices that will be introduced into the market
>>
>> s/new/Wi-Fi 7/?
>>
>> > in 2023, with new drivers. Wireless extensions haven't been in
>> > real development since 2006. Since wireless has evolved a lot,
>> > and continues to evolve significantly with MLO, there's really
>>
>> s/MLO/Multi-Link Operation/?
>>
>> It would good to spell out the acronym at least once per commit log.
>
> :)
>
>> > +++ b/net/wireless/wext-core.c
>> > @@ -662,6 +662,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
>> > dev->ieee80211_ptr->wiphy->wext &&
>> > dev->ieee80211_ptr->wiphy->wext->get_wireless_stats) {
>> > wireless_warn_cfg80211_wext();
>> > + if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
>> > + return NULL;
>>
>> Should we have a some kind of warning in this case as well? Otherwise
>> the user has no idea why it stopped working, right?
>
> Well it's added after the warning wireless_warn_cfg80211_wext(), so it
> already prints the warning from the previous.
>
> I guess we could make an argument to the warning and modify the message
> if it's rejected?
Sorry, I was blind again :) I first read that the call to
wireless_warn_cfg80211_wext() was removed, but clearly it wasn't, and
IMHO that warning is enough. So please ignore this comment.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage
2022-11-04 16:42 [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Johannes Berg
2022-11-04 16:42 ` [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices Johannes Berg
@ 2022-11-17 10:48 ` Kalle Valo
2022-11-17 10:49 ` Johannes Berg
1 sibling, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2022-11-17 10:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Johannes Berg
Johannes Berg <johannes@sipsolutions.net> writes:
> From: Johannes Berg <johannes.berg@intel.com>
>
> With MLO/EHT support around the corner, we're going to
> remove support for wireless extensions with new devices
> since MLO cannot be properly indicated using them.
>
> Add a warning to indicate which processes are still
> using wireless extensions, if being used with modern
> (i.e. cfg80211) drivers.
I doubt people outside of wireless know what MLO or EHT are :) Also it
would be good to mention what's the replacement for wireless extensions
so better to spell out that as well. So maybe use more widely known
terminology like this:
"With Wi-Fi 7 (IEEE 802.11be) support around the corner, we're going to
remove support for wireless extensions with new devices since Multi-Link
Operation (MLO) feature cannot be properly indicated using them.
Add a warning to indicate which processes are still using the ancient
wireless extensions, if being used with modern (i.e. cfg80211) drivers.
All those users should be using nl80211 instead.
Ancient drivers, which are not using cfg80211, are unaffected."
> +#ifdef CONFIG_CFG80211_WEXT
> +static void wireless_warn_cfg80211_wext(void)
> +{
> + char name[sizeof(current->comm)];
>
> + pr_warn_ratelimited("warning: `%s' uses wireless extensions that are deprecated for modern drivers\n",
> + get_task_comm(name, current));
> +}
> +#endif
Maybe add ", switch to nl80211" also to the warning message?
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage
2022-11-17 10:48 ` [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Kalle Valo
@ 2022-11-17 10:49 ` Johannes Berg
0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2022-11-17 10:49 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On Thu, 2022-11-17 at 12:48 +0200, Kalle Valo wrote:
> Johannes Berg <johannes@sipsolutions.net> writes:
>
> > From: Johannes Berg <johannes.berg@intel.com>
> >
> > With MLO/EHT support around the corner, we're going to
> > remove support for wireless extensions with new devices
> > since MLO cannot be properly indicated using them.
> >
> > Add a warning to indicate which processes are still
> > using wireless extensions, if being used with modern
> > (i.e. cfg80211) drivers.
>
> I doubt people outside of wireless know what MLO or EHT are :) Also it
> would be good to mention what's the replacement for wireless extensions
> so better to spell out that as well. So maybe use more widely known
> terminology like this:
>
> "With Wi-Fi 7 (IEEE 802.11be) support around the corner, we're going to
> remove support for wireless extensions with new devices since Multi-Link
> Operation (MLO) feature cannot be properly indicated using them.
>
> Add a warning to indicate which processes are still using the ancient
> wireless extensions, if being used with modern (i.e. cfg80211) drivers.
> All those users should be using nl80211 instead.
>
> Ancient drivers, which are not using cfg80211, are unaffected."
Sure, makes sense I guess. This might become a more referenced commit
perhaps :-)
> > +#ifdef CONFIG_CFG80211_WEXT
> > +static void wireless_warn_cfg80211_wext(void)
> > +{
> > + char name[sizeof(current->comm)];
> >
> > + pr_warn_ratelimited("warning: `%s' uses wireless extensions that are deprecated for modern drivers\n",
> > + get_task_comm(name, current));
> > +}
> > +#endif
>
> Maybe add ", switch to nl80211" also to the warning message?
>
It already got so long ... but I guess that makes sense.
johannes
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-17 11:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-04 16:42 [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Johannes Berg
2022-11-04 16:42 ` [RFC PATCH 2/2] wifi: wireless: deny wireless extensions on MLO-capable devices Johannes Berg
2022-11-17 10:51 ` Kalle Valo
2022-11-17 10:58 ` Johannes Berg
2022-11-17 11:05 ` Kalle Valo
2022-11-17 10:48 ` [RFC PATCH 1/2] wifi: wireless: warn on most wireless extension usage Kalle Valo
2022-11-17 10:49 ` Johannes Berg
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).