mbox series

[0/2] wifi: create legacy and virtual directories

Message ID 20230227121732.8967-1-kvalo@kernel.org
Headers show
Series wifi: create legacy and virtual directories | expand

Message

Kalle Valo Feb. 27, 2023, 12:17 p.m. UTC
The top-level directory drivers/net/wireless is cluttered with three old legacy
drivers and two virtual drivers. To make it faster to find the vendor
directories add new directories legacy and virtual and move the rest of the
drivers there.

Kalle Valo (2):
  wifi: move mac80211_hwsim and virt_wifi to virtual directory
  wifi: move raycs, wl3501 and rndis_wlan to legacy directory

 drivers/net/wireless/Kconfig                  | 75 +------------------
 drivers/net/wireless/Makefile                 | 11 +--
 drivers/net/wireless/legacy/Kconfig           | 55 ++++++++++++++
 drivers/net/wireless/legacy/Makefile          |  6 ++
 drivers/net/wireless/{ => legacy}/ray_cs.c    |  0
 drivers/net/wireless/{ => legacy}/ray_cs.h    |  0
 drivers/net/wireless/{ => legacy}/rayctl.h    |  0
 .../net/wireless/{ => legacy}/rndis_wlan.c    |  0
 drivers/net/wireless/{ => legacy}/wl3501.h    |  0
 drivers/net/wireless/{ => legacy}/wl3501_cs.c |  0
 drivers/net/wireless/virtual/Kconfig          | 20 +++++
 drivers/net/wireless/virtual/Makefile         |  3 +
 .../wireless/{ => virtual}/mac80211_hwsim.c   |  0
 .../wireless/{ => virtual}/mac80211_hwsim.h   |  0
 .../net/wireless/{ => virtual}/virt_wifi.c    |  0
 15 files changed, 88 insertions(+), 82 deletions(-)
 create mode 100644 drivers/net/wireless/legacy/Kconfig
 create mode 100644 drivers/net/wireless/legacy/Makefile
 rename drivers/net/wireless/{ => legacy}/ray_cs.c (100%)
 rename drivers/net/wireless/{ => legacy}/ray_cs.h (100%)
 rename drivers/net/wireless/{ => legacy}/rayctl.h (100%)
 rename drivers/net/wireless/{ => legacy}/rndis_wlan.c (100%)
 rename drivers/net/wireless/{ => legacy}/wl3501.h (100%)
 rename drivers/net/wireless/{ => legacy}/wl3501_cs.c (100%)
 create mode 100644 drivers/net/wireless/virtual/Kconfig
 create mode 100644 drivers/net/wireless/virtual/Makefile
 rename drivers/net/wireless/{ => virtual}/mac80211_hwsim.c (100%)
 rename drivers/net/wireless/{ => virtual}/mac80211_hwsim.h (100%)
 rename drivers/net/wireless/{ => virtual}/virt_wifi.c (100%)


base-commit: ec52d77d077529f198fd874c550a26b9cc86a331

Comments

Kalle Valo Feb. 27, 2023, 7:11 p.m. UTC | #1
Dan Williams <dcbw@redhat.com> writes:

> On Mon, 2023-02-27 at 14:17 +0200, Kalle Valo wrote:
>> To clean up drivers/net/wireless move the old drivers drivers left in
>> the
>> directory to a new "legacy" directory. I did consider adding
>> CONFIG_WLAN_VENDOR_LEGACY like other vendors have but then dropped
>> the idea as
>> these are really old drivers and hopefully we get to remove them
>> soon.
>
> Why is rndis_wlan legacy? It supports devices that are way newer than
> ray_cs or wl3501... like this Linksys WUSB54GSC from late 2007:
>
> [1086339.589565] rndis_wlan 1-3:1.0 wlan0: register 'rndis_wlan' at
> usb-0000:00:14.0-3, Wireless RNDIS device, BCM4320b based,
> 00:1d:7e:9e:2f:bb
> [1086339.589961] usbcore: registered new interface driver rndis_wlan

So you have this device? Does it work? I think I should make a table
somewhere for these old drivers with last success reports :)

> Dunno, just seems a completely different class of devices than old
> 802.11b-only PCMCIA ones...

I was about to say that all drivers using Wireless Extensions are
legacy, but to my surprise rndis_wlan actually uses cfg80211 :)

I put this to "legacy" as I didn't find any better location and adding a
new vendor driver just for rndis_wlan felt like overkill. The directory
name "legacy" is just a name, it has no real meaning and users won't see
it either. It could be "misc", "old" or something else as well.
Kalle Valo Feb. 28, 2023, 6:29 a.m. UTC | #2
Dan Williams <dcbw@redhat.com> writes:

> On Mon, 2023-02-27 at 21:11 +0200, Kalle Valo wrote:
>> Dan Williams <dcbw@redhat.com> writes:
>> 
>> > On Mon, 2023-02-27 at 14:17 +0200, Kalle Valo wrote:
>> > > To clean up drivers/net/wireless move the old drivers drivers
>> > > left in
>> > > the
>> > > directory to a new "legacy" directory. I did consider adding
>> > > CONFIG_WLAN_VENDOR_LEGACY like other vendors have but then
>> > > dropped
>> > > the idea as
>> > > these are really old drivers and hopefully we get to remove them
>> > > soon.
>> > 
>> > Why is rndis_wlan legacy? It supports devices that are way newer
>> > than
>> > ray_cs or wl3501... like this Linksys WUSB54GSC from late 2007:
>> > 
>> > [1086339.589565] rndis_wlan 1-3:1.0 wlan0: register 'rndis_wlan' at
>> > usb-0000:00:14.0-3, Wireless RNDIS device, BCM4320b based,
>> > 00:1d:7e:9e:2f:bb
>> > [1086339.589961] usbcore: registered new interface driver
>> > rndis_wlan
>> 
>> So you have this device? Does it work? I think I should make a table
>> somewhere for these old drivers with last success reports :)
>
> Yep, I have it, it works. Needless to say, I don't *use* it.

Yeah, I guessed that part :) But thanks for testing, good to know it
works.

>> > Dunno, just seems a completely different class of devices than old
>> > 802.11b-only PCMCIA ones...
>> 
>> I was about to say that all drivers using Wireless Extensions are
>> legacy, but to my surprise rndis_wlan actually uses cfg80211 :)
>> 
>> I put this to "legacy" as I didn't find any better location and
>> adding a
>> new vendor driver just for rndis_wlan felt like overkill. The
>> directory
>> name "legacy" is just a name, it has no real meaning and users won't
>> see
>> it either. It could be "misc", "old" or something else as well.
>
> Is the goal just to get all the .c individual drivers out of
> net/wireless? 

Yes, exactly. The extra files in drivers/net/wireless annoy me everytime
when I'm checking something in the tree.

> Also isn't Greg KH out to kill RNDIS too? I don't recall that being a
> settled question yet, but I lost track.

I haven't heard anything about that recently, I hope we don't have to
remove rndis_wlan from the tree. But wext drivers are another thing, we
really should get rid of them (or convert to cfg80211).
Dan Williams Feb. 28, 2023, 5:37 p.m. UTC | #3
On Tue, 2023-02-28 at 08:29 +0200, Kalle Valo wrote:
> Dan Williams <dcbw@redhat.com> writes:
> 
> > On Mon, 2023-02-27 at 21:11 +0200, Kalle Valo wrote:
> > > Dan Williams <dcbw@redhat.com> writes:
> > > 
> > > > On Mon, 2023-02-27 at 14:17 +0200, Kalle Valo wrote:
> > > > > To clean up drivers/net/wireless move the old drivers drivers
> > > > > left in
> > > > > the
> > > > > directory to a new "legacy" directory. I did consider adding
> > > > > CONFIG_WLAN_VENDOR_LEGACY like other vendors have but then
> > > > > dropped
> > > > > the idea as
> > > > > these are really old drivers and hopefully we get to remove
> > > > > them
> > > > > soon.
> > > > 
> > > > Why is rndis_wlan legacy? It supports devices that are way
> > > > newer
> > > > than
> > > > ray_cs or wl3501... like this Linksys WUSB54GSC from late 2007:
> > > > 
> > > > [1086339.589565] rndis_wlan 1-3:1.0 wlan0: register
> > > > 'rndis_wlan' at
> > > > usb-0000:00:14.0-3, Wireless RNDIS device, BCM4320b based,
> > > > 00:1d:7e:9e:2f:bb
> > > > [1086339.589961] usbcore: registered new interface driver
> > > > rndis_wlan
> > > 
> > > So you have this device? Does it work? I think I should make a
> > > table
> > > somewhere for these old drivers with last success reports :)
> > 
> > Yep, I have it, it works. Needless to say, I don't *use* it.
> 
> Yeah, I guessed that part :) But thanks for testing, good to know it
> works.
> 
> > > > Dunno, just seems a completely different class of devices than
> > > > old
> > > > 802.11b-only PCMCIA ones...
> > > 
> > > I was about to say that all drivers using Wireless Extensions are
> > > legacy, but to my surprise rndis_wlan actually uses cfg80211 :)
> > > 
> > > I put this to "legacy" as I didn't find any better location and
> > > adding a
> > > new vendor driver just for rndis_wlan felt like overkill. The
> > > directory
> > > name "legacy" is just a name, it has no real meaning and users
> > > won't
> > > see
> > > it either. It could be "misc", "old" or something else as well.
> > 
> > Is the goal just to get all the .c individual drivers out of
> > net/wireless? 
> 
> Yes, exactly. The extra files in drivers/net/wireless annoy me
> everytime
> when I'm checking something in the tree.

ray_cs and wl3501_cs are also PCMCIA drivers (not CardBus) and isn't
Arnd trying to get rid of PCMCIA via "[RFC 0/6] pcmcia: separate 16-bit
support from cardbus"?

Maybe those two drivers get solved for you :)

> > Also isn't Greg KH out to kill RNDIS too? I don't recall that being
> > a
> > settled question yet, but I lost track.
> 
> I haven't heard anything about that recently, I hope we don't have to
> remove rndis_wlan from the tree. But wext drivers are another thing,
> we
> really should get rid of them (or convert to cfg80211).

I have vague, morbid interest in converting atmel and prism54 to
cfg80211 but timeline on that would be "this year".

Dan
Kalle Valo March 1, 2023, 7:09 a.m. UTC | #4
Dan Williams <dcbw@redhat.com> writes:

>> > Is the goal just to get all the .c individual drivers out of
>> > net/wireless? 
>> 
>> Yes, exactly. The extra files in drivers/net/wireless annoy me
>> everytime
>> when I'm checking something in the tree.
>
> ray_cs and wl3501_cs are also PCMCIA drivers (not CardBus) and isn't
> Arnd trying to get rid of PCMCIA via "[RFC 0/6] pcmcia: separate 16-bit
> support from cardbus"?
>
> Maybe those two drivers get solved for you :)

That would be great :)

>> > Also isn't Greg KH out to kill RNDIS too? I don't recall that being
>> > a
>> > settled question yet, but I lost track.
>> 
>> I haven't heard anything about that recently, I hope we don't have to
>> remove rndis_wlan from the tree. But wext drivers are another thing,
>> we
>> really should get rid of them (or convert to cfg80211).
>
> I have vague, morbid interest in converting atmel and prism54 to
> cfg80211 but timeline on that would be "this year".

As you already noticed, prism54 is already gone. But I'm keeping fingers
crossed that who you would have time to convert atmel :)

We really should get rid of wext, at least from drivers/net/wireless.
Staging drivers are of course of another thing. Just for fun I decided
to grep how many wext drivers and the first match was an ethernet
driver, weird:

drivers/net/ethernet/toshiba/ps3_gelic_wireless.c:2570: netdev->wireless_handlers = &gelic_wl_wext_handler_def;

These are the mainline drivers using wext:

drivers/net/wireless/atmel/atmel.c:1574:	dev->wireless_handlers = &atmel_handler_def;
drivers/net/wireless/cisco/airo.c:2674:	dev->wireless_handlers = &airo_handler_def;
drivers/net/wireless/cisco/airo.c:2828:	dev->wireless_handlers = &airo_handler_def;
drivers/net/wireless/intel/ipw2x00/ipw2100.c:6032:	dev->wireless_handlers = &ipw2100_wx_handler_def;
drivers/net/wireless/intel/ipw2x00/ipw2200.c:11675:	net_dev->wireless_handlers = &ipw_wx_handler_def;
drivers/net/wireless/intersil/hostap/hostap_main.c:851:	dev->wireless_handlers = &hostap_iw_handler_def;
drivers/net/wireless/intersil/orinoco/main.c:2251:	dev->wireless_handlers = &orinoco_handler_def;
drivers/net/wireless/ray_cs.c:303:	dev->wireless_handlers = &ray_handler_def;
drivers/net/wireless/wl3501_cs.c:1886:	dev->wireless_handlers	= &wl3501_handler_def;
drivers/net/wireless/zydas/zd1201.c:1782:	dev->wireless_handlers = &zd1201_iw_handlers;

And these are the staging drivers:

drivers/staging/ks7010/ks_wlan_net.c:2636:	dev->wireless_handlers = &ks_wlan_handler_def;
drivers/staging/r8188eu/os_dep/os_intfs.c:358:	pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2334:	dev->wireless_handlers = &r8192_wx_handlers_def;
drivers/staging/rtl8192u/r8192U_core.c:4532:	dev->wireless_handlers = &r8192_wx_handlers_def;
drivers/staging/rtl8712/os_intfs.c:214:	pnetdev->wireless_handlers = (struct iw_handler_def *)
Dan Williams March 1, 2023, 4:33 p.m. UTC | #5
On Wed, 2023-03-01 at 09:09 +0200, Kalle Valo wrote:
> Dan Williams <dcbw@redhat.com> writes:
> 
> > > > Is the goal just to get all the .c individual drivers out of
> > > > net/wireless? 
> > > 
> > > Yes, exactly. The extra files in drivers/net/wireless annoy me
> > > everytime
> > > when I'm checking something in the tree.
> > 
> > ray_cs and wl3501_cs are also PCMCIA drivers (not CardBus) and isn't
> > Arnd trying to get rid of PCMCIA via "[RFC 0/6] pcmcia: separate 16-bit
> > support from cardbus"?
> > 
> > Maybe those two drivers get solved for you :)
> 
> That would be great :)
> 
> > > > Also isn't Greg KH out to kill RNDIS too? I don't recall that being
> > > > a
> > > > settled question yet, but I lost track.
> > > 
> > > I haven't heard anything about that recently, I hope we don't have to
> > > remove rndis_wlan from the tree. But wext drivers are another thing,
> > > we
> > > really should get rid of them (or convert to cfg80211).
> > 
> > I have vague, morbid interest in converting atmel and prism54 to
> > cfg80211 but timeline on that would be "this year".
> 
> As you already noticed, prism54 is already gone. But I'm keeping fingers
> crossed that who you would have time to convert atmel :)
> 
> We really should get rid of wext, at least from drivers/net/wireless.
> Staging drivers are of course of another thing. Just for fun I decided
> to grep how many wext drivers and the first match was an ethernet
> driver, weird:
> 
> drivers/net/ethernet/toshiba/ps3_gelic_wireless.c:2570: netdev->wireless_handlers = &gelic_wl_wext_handler_def;

Not super odd; that's the PlayStation 3. HW is an odd combo of ethernet
and WiFi and the FW interface is bizarre as you can see. At least it
supports 802.11g and WPA which is more than we can say for ipw2100.

> 
> These are the mainline drivers using wext:
> 
> drivers/net/wireless/atmel/atmel.c:1574:        dev->wireless_handlers = &atmel_handler_def;
> drivers/net/wireless/cisco/airo.c:2674: dev->wireless_handlers = &airo_handler_def;
> drivers/net/wireless/cisco/airo.c:2828: dev->wireless_handlers = &airo_handler_def;
> drivers/net/wireless/intel/ipw2x00/ipw2100.c:6032:      dev->wireless_handlers = &ipw2100_wx_handler_def;
> drivers/net/wireless/intel/ipw2x00/ipw2200.c:11675:     net_dev->wireless_handlers = &ipw_wx_handler_def;
> drivers/net/wireless/intersil/hostap/hostap_main.c:851: dev->wireless_handlers = &hostap_iw_handler_def;
> drivers/net/wireless/intersil/orinoco/main.c:2251:      dev->wireless_handlers = &orinoco_handler_def;
> drivers/net/wireless/ray_cs.c:303:      dev->wireless_handlers = &ray_handler_def;
> drivers/net/wireless/wl3501_cs.c:1886:  dev->wireless_handlers  = &wl3501_handler_def;
> drivers/net/wireless/zydas/zd1201.c:1782:       dev->wireless_handlers = &zd1201_iw_handlers;

FWIW orinoco and ipw2x00 have some minimal cfg80211 code but IIRC it's
pretty limited.

Honestly we probably should start deprecation/removal for 802.11b-only
hardware which is everything on this list *except* ps3_gelic and
ipw2200.

Dan

> 
> And these are the staging drivers:
> 
> drivers/staging/ks7010/ks_wlan_net.c:2636:      dev->wireless_handlers = &ks_wlan_handler_def;
> drivers/staging/r8188eu/os_dep/os_intfs.c:358:  pnetdev->wireless_handlers = (struct iw_handler_def *)&rtw_handlers_def;
> drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2334:      dev->wireless_handlers = &r8192_wx_handlers_def;
> drivers/staging/rtl8192u/r8192U_core.c:4532:    dev->wireless_handlers = &r8192_wx_handlers_def;
> drivers/staging/rtl8712/os_intfs.c:214: pnetdev->wireless_handlers = (struct iw_handler_def *)
>