2023-02-27 12:17:40

by Kalle Valo

[permalink] [raw]
Subject: [PATCH 0/2] wifi: create legacy and virtual directories

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
--
2.30.2



2023-02-27 12:17:45

by Kalle Valo

[permalink] [raw]
Subject: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

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.

There should be no changes in compilation or in Kconfig options, merely moving files.

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/Kconfig | 55 +------------------
drivers/net/wireless/Makefile | 7 +--
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
10 files changed, 63 insertions(+), 60 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%)

diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 42b40cc96b21..7555af5195ec 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -38,60 +38,7 @@ source "drivers/net/wireless/ti/Kconfig"
source "drivers/net/wireless/zydas/Kconfig"
source "drivers/net/wireless/quantenna/Kconfig"

-config PCMCIA_RAYCS
- tristate "Aviator/Raytheon 2.4GHz wireless support"
- depends on PCMCIA
- select WIRELESS_EXT
- select WEXT_SPY
- select WEXT_PRIV
- help
- Say Y here if you intend to attach an Aviator/Raytheon PCMCIA
- (PC-card) wireless Ethernet networking card to your computer.
- Please read the file
- <file:Documentation/networking/device_drivers/wifi/ray_cs.rst> for
- details.
-
- To compile this driver as a module, choose M here: the module will be
- called ray_cs. If unsure, say N.
-
-config PCMCIA_WL3501
- tristate "Planet WL3501 PCMCIA cards"
- depends on CFG80211 && PCMCIA
- select WIRELESS_EXT
- select WEXT_SPY
- help
- A driver for WL3501 PCMCIA 802.11 wireless cards made by Planet.
- It has basic support for Linux wireless extensions and initial
- micro support for ethtool.
-
-config USB_NET_RNDIS_WLAN
- tristate "Wireless RNDIS USB support"
- depends on USB
- depends on CFG80211
- select USB_NET_DRIVERS
- select USB_USBNET
- select USB_NET_CDCETHER
- select USB_NET_RNDIS_HOST
- help
- This is a driver for wireless RNDIS devices.
- These are USB based adapters found in devices such as:
-
- Buffalo WLI-U2-KG125S
- U.S. Robotics USR5421
- Belkin F5D7051
- Linksys WUSB54GSv2
- Linksys WUSB54GSC
- Asus WL169gE
- Eminent EM4045
- BT Voyager 1055
- Linksys WUSB54GSv1
- U.S. Robotics USR5420
- BUFFALO WLI-USB-G54
-
- All of these devices are based on Broadcom 4320 chip which is the
- only wireless RNDIS chip known to date.
-
- If you choose to build a module, it'll be called rndis_wlan.
+source "drivers/net/wireless/legacy/Kconfig"

source "drivers/net/wireless/virtual/Kconfig"

diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index 1b697cfe0a13..4d7374d567d1 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -23,10 +23,5 @@ obj-$(CONFIG_WLAN_VENDOR_ST) += st/
obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/

-# 16-bit wireless PCMCIA client drivers
-obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
-obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
-
-obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
-
+obj-$(CONFIG_WLAN) += legacy/
obj-$(CONFIG_WLAN) += virtual/
diff --git a/drivers/net/wireless/legacy/Kconfig b/drivers/net/wireless/legacy/Kconfig
new file mode 100644
index 000000000000..3a5275941212
--- /dev/null
+++ b/drivers/net/wireless/legacy/Kconfig
@@ -0,0 +1,55 @@
+config PCMCIA_RAYCS
+ tristate "Aviator/Raytheon 2.4GHz wireless support"
+ depends on PCMCIA
+ select WIRELESS_EXT
+ select WEXT_SPY
+ select WEXT_PRIV
+ help
+ Say Y here if you intend to attach an Aviator/Raytheon PCMCIA
+ (PC-card) wireless Ethernet networking card to your computer.
+ Please read the file
+ <file:Documentation/networking/device_drivers/wifi/ray_cs.rst> for
+ details.
+
+ To compile this driver as a module, choose M here: the module will be
+ called ray_cs. If unsure, say N.
+
+config PCMCIA_WL3501
+ tristate "Planet WL3501 PCMCIA cards"
+ depends on CFG80211 && PCMCIA
+ select WIRELESS_EXT
+ select WEXT_SPY
+ help
+ A driver for WL3501 PCMCIA 802.11 wireless cards made by Planet.
+ It has basic support for Linux wireless extensions and initial
+ micro support for ethtool.
+
+config USB_NET_RNDIS_WLAN
+ tristate "Wireless RNDIS USB support"
+ depends on USB
+ depends on CFG80211
+ select USB_NET_DRIVERS
+ select USB_USBNET
+ select USB_NET_CDCETHER
+ select USB_NET_RNDIS_HOST
+ help
+ This is a driver for wireless RNDIS devices.
+ These are USB based adapters found in devices such as:
+
+ Buffalo WLI-U2-KG125S
+ U.S. Robotics USR5421
+ Belkin F5D7051
+ Linksys WUSB54GSv2
+ Linksys WUSB54GSC
+ Asus WL169gE
+ Eminent EM4045
+ BT Voyager 1055
+ Linksys WUSB54GSv1
+ U.S. Robotics USR5420
+ BUFFALO WLI-USB-G54
+
+ All of these devices are based on Broadcom 4320 chip which is the
+ only wireless RNDIS chip known to date.
+
+ If you choose to build a module, it'll be called rndis_wlan.
+
diff --git a/drivers/net/wireless/legacy/Makefile b/drivers/net/wireless/legacy/Makefile
new file mode 100644
index 000000000000..36878f080bfc
--- /dev/null
+++ b/drivers/net/wireless/legacy/Makefile
@@ -0,0 +1,6 @@
+# 16-bit wireless PCMCIA client drivers
+obj-$(CONFIG_PCMCIA_RAYCS) += ray_cs.o
+obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o
+
+obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o
+
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/legacy/ray_cs.c
similarity index 100%
rename from drivers/net/wireless/ray_cs.c
rename to drivers/net/wireless/legacy/ray_cs.c
diff --git a/drivers/net/wireless/ray_cs.h b/drivers/net/wireless/legacy/ray_cs.h
similarity index 100%
rename from drivers/net/wireless/ray_cs.h
rename to drivers/net/wireless/legacy/ray_cs.h
diff --git a/drivers/net/wireless/rayctl.h b/drivers/net/wireless/legacy/rayctl.h
similarity index 100%
rename from drivers/net/wireless/rayctl.h
rename to drivers/net/wireless/legacy/rayctl.h
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/legacy/rndis_wlan.c
similarity index 100%
rename from drivers/net/wireless/rndis_wlan.c
rename to drivers/net/wireless/legacy/rndis_wlan.c
diff --git a/drivers/net/wireless/wl3501.h b/drivers/net/wireless/legacy/wl3501.h
similarity index 100%
rename from drivers/net/wireless/wl3501.h
rename to drivers/net/wireless/legacy/wl3501.h
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/legacy/wl3501_cs.c
similarity index 100%
rename from drivers/net/wireless/wl3501_cs.c
rename to drivers/net/wireless/legacy/wl3501_cs.c
--
2.30.2


2023-02-27 12:17:46

by Kalle Valo

[permalink] [raw]
Subject: [PATCH 1/2] wifi: move mac80211_hwsim and virt_wifi to virtual directory

To clean up drivers/net/wireless move the virtual drivers to a new virtual
directory. I did consider adding CONFIG_WLAN_VENDOR_VIRTUAL like other vendors
have but then dropped the idea as we are not real drivers.

There should be no changes in compilation or in Kconfig options, merely moving
files. The order in menuconfig is slightly changed, the virtual drivers are now
last in the list.

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/Kconfig | 20 +------------------
drivers/net/wireless/Makefile | 4 +---
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
7 files changed, 25 insertions(+), 22 deletions(-)
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%)

diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index cb1c15012dd0..42b40cc96b21 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -64,19 +64,6 @@ config PCMCIA_WL3501
It has basic support for Linux wireless extensions and initial
micro support for ethtool.

-config MAC80211_HWSIM
- tristate "Simulated radio testing tool for mac80211"
- depends on MAC80211
- help
- This driver is a developer testing tool that can be used to test
- IEEE 802.11 networking stack (mac80211) functionality. This is not
- needed for normal wireless LAN usage and is only for testing. See
- Documentation/networking/mac80211_hwsim for more information on how
- to use this tool.
-
- To compile this driver as a module, choose M here: the module will be
- called mac80211_hwsim. If unsure, say N.
-
config USB_NET_RNDIS_WLAN
tristate "Wireless RNDIS USB support"
depends on USB
@@ -106,11 +93,6 @@ config USB_NET_RNDIS_WLAN

If you choose to build a module, it'll be called rndis_wlan.

-config VIRT_WIFI
- tristate "Wifi wrapper for ethernet drivers"
- depends on CFG80211
- help
- This option adds support for ethernet connections to appear as if they
- are wifi connections through a special rtnetlink device.
+source "drivers/net/wireless/virtual/Kconfig"

endif # WLAN
diff --git a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
index a61cf6c90343..1b697cfe0a13 100644
--- a/drivers/net/wireless/Makefile
+++ b/drivers/net/wireless/Makefile
@@ -29,6 +29,4 @@ obj-$(CONFIG_PCMCIA_WL3501) += wl3501_cs.o

obj-$(CONFIG_USB_NET_RNDIS_WLAN) += rndis_wlan.o

-obj-$(CONFIG_MAC80211_HWSIM) += mac80211_hwsim.o
-
-obj-$(CONFIG_VIRT_WIFI) += virt_wifi.o
+obj-$(CONFIG_WLAN) += virtual/
diff --git a/drivers/net/wireless/virtual/Kconfig b/drivers/net/wireless/virtual/Kconfig
new file mode 100644
index 000000000000..fb3b4b69f26b
--- /dev/null
+++ b/drivers/net/wireless/virtual/Kconfig
@@ -0,0 +1,20 @@
+config MAC80211_HWSIM
+ tristate "Simulated radio testing tool for mac80211"
+ depends on MAC80211
+ help
+ This driver is a developer testing tool that can be used to test
+ IEEE 802.11 networking stack (mac80211) functionality. This is not
+ needed for normal wireless LAN usage and is only for testing. See
+ Documentation/networking/mac80211_hwsim for more information on how
+ to use this tool.
+
+ To compile this driver as a module, choose M here: the module will be
+ called mac80211_hwsim. If unsure, say N.
+
+config VIRT_WIFI
+ tristate "Wifi wrapper for ethernet drivers"
+ depends on CFG80211
+ help
+ This option adds support for ethernet connections to appear as if they
+ are wifi connections through a special rtnetlink device.
+
diff --git a/drivers/net/wireless/virtual/Makefile b/drivers/net/wireless/virtual/Makefile
new file mode 100644
index 000000000000..5773cc6d643e
--- /dev/null
+++ b/drivers/net/wireless/virtual/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_MAC80211_HWSIM) += mac80211_hwsim.o
+
+obj-$(CONFIG_VIRT_WIFI) += virt_wifi.o
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
similarity index 100%
rename from drivers/net/wireless/mac80211_hwsim.c
rename to drivers/net/wireless/virtual/mac80211_hwsim.c
diff --git a/drivers/net/wireless/mac80211_hwsim.h b/drivers/net/wireless/virtual/mac80211_hwsim.h
similarity index 100%
rename from drivers/net/wireless/mac80211_hwsim.h
rename to drivers/net/wireless/virtual/mac80211_hwsim.h
diff --git a/drivers/net/wireless/virt_wifi.c b/drivers/net/wireless/virtual/virt_wifi.c
similarity index 100%
rename from drivers/net/wireless/virt_wifi.c
rename to drivers/net/wireless/virtual/virt_wifi.c
--
2.30.2


2023-02-27 17:50:59

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

Hi Kalle,

I love your patch! Perhaps something to improve:

[auto build test WARNING on ec52d77d077529f198fd874c550a26b9cc86a331]

url: https://github.com/intel-lab-lkp/linux/commits/Kalle-Valo/wifi-move-mac80211_hwsim-and-virt_wifi-to-virtual-directory/20230227-201848
base: ec52d77d077529f198fd874c550a26b9cc86a331
patch link: https://lore.kernel.org/r/20230227121732.8967-3-kvalo%40kernel.org
patch subject: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory
config: sparc-allyesconfig (https://download.01.org/0day-ci/archive/20230228/[email protected]/config)
compiler: sparc64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/b3643ed46f437156c43b21bfc61dd622a6d53191
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Kalle-Valo/wifi-move-mac80211_hwsim-and-virt_wifi-to-virtual-directory/20230227-201848
git checkout b3643ed46f437156c43b21bfc61dd622a6d53191
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/net/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

In function 'init_startup_params',
inlined from 'ray_init' at drivers/net/wireless/legacy/ray_cs.c:506:2:
>> drivers/net/wireless/legacy/ray_cs.c:628:17: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
628 | strncpy(local->sparm.b4.a_current_ess_id, essid, ESSID_SIZE);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/strncpy +628 drivers/net/wireless/legacy/ray_cs.c

141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 568
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 569 /*===========================================================================*/
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 570 static void init_startup_params(ray_dev_t *local)
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 571 {
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 572 int i;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 573
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 574 if (country > JAPAN_TEST)
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 575 country = USA;
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 576 else if (country < USA)
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 577 country = USA;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 578 /* structure for hop time and beacon period is defined here using
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 579 * New 802.11D6.1 format. Card firmware is still using old format
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 580 * until version 6.
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 581 * Before After
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 582 * a_hop_time ms byte a_hop_time ms byte
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 583 * a_hop_time 2s byte a_hop_time ls byte
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 584 * a_hop_time ls byte a_beacon_period ms byte
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 585 * a_beacon_period a_beacon_period ls byte
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 586 *
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 587 * a_hop_time = uS a_hop_time = KuS
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 588 * a_beacon_period = hops a_beacon_period = KuS
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 589 *//* 64ms = 010000 */
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 590 if (local->fw_ver == 0x55) {
e48d661eb13f2f8 drivers/net/wireless/ray_cs.c Kees Cook 2017-05-05 591 memcpy(&local->sparm.b4, b4_default_startup_parms,
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 592 sizeof(struct b4_startup_params));
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 593 /* Translate sane kus input values to old build 4/5 format */
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 594 /* i = hop time in uS truncated to 3 bytes */
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 595 i = (hop_dwell * 1024) & 0xffffff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 596 local->sparm.b4.a_hop_time[0] = (i >> 16) & 0xff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 597 local->sparm.b4.a_hop_time[1] = (i >> 8) & 0xff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 598 local->sparm.b4.a_beacon_period[0] = 0;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 599 local->sparm.b4.a_beacon_period[1] =
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 600 ((beacon_period / hop_dwell) - 1) & 0xff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 601 local->sparm.b4.a_curr_country_code = country;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 602 local->sparm.b4.a_hop_pattern_length =
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 603 hop_pattern_length[(int)country] - 1;
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 604 if (bc) {
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 605 local->sparm.b4.a_ack_timeout = 0x50;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 606 local->sparm.b4.a_sifs = 0x3f;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 607 }
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 608 } else { /* Version 5 uses real kus values */
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 609 memcpy((UCHAR *) &local->sparm.b5, b5_default_startup_parms,
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 610 sizeof(struct b5_startup_params));
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 611
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 612 local->sparm.b5.a_hop_time[0] = (hop_dwell >> 8) & 0xff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 613 local->sparm.b5.a_hop_time[1] = hop_dwell & 0xff;
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 614 local->sparm.b5.a_beacon_period[0] =
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 615 (beacon_period >> 8) & 0xff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 616 local->sparm.b5.a_beacon_period[1] = beacon_period & 0xff;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 617 if (psm)
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 618 local->sparm.b5.a_power_mgt_state = 1;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 619 local->sparm.b5.a_curr_country_code = country;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 620 local->sparm.b5.a_hop_pattern_length =
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 621 hop_pattern_length[(int)country];
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 622 }
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 623
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 624 local->sparm.b4.a_network_type = net_type & 0x01;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 625 local->sparm.b4.a_acting_as_ap_status = TYPE_STA;
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 626
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 627 if (essid != NULL)
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 @628 strncpy(local->sparm.b4.a_current_ess_id, essid, ESSID_SIZE);
^1da177e4c3f415 drivers/net/wireless/ray_cs.c Linus Torvalds 2005-04-16 629 } /* init_startup_params */
141fa61f10c419c drivers/net/wireless/ray_cs.c John Daiker 2009-03-10 630

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

2023-02-27 18:10:14

by Dan Williams

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

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

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

Dan

>
> There should be no changes in compilation or in Kconfig options,
> merely moving files.
>
> Signed-off-by: Kalle Valo <[email protected]>
> ---
>  drivers/net/wireless/Kconfig                  | 55 +----------------
> --
>  drivers/net/wireless/Makefile                 |  7 +--
>  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
>  10 files changed, 63 insertions(+), 60 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%)
>
> diff --git a/drivers/net/wireless/Kconfig
> b/drivers/net/wireless/Kconfig
> index 42b40cc96b21..7555af5195ec 100644
> --- a/drivers/net/wireless/Kconfig
> +++ b/drivers/net/wireless/Kconfig
> @@ -38,60 +38,7 @@ source "drivers/net/wireless/ti/Kconfig"
>  source "drivers/net/wireless/zydas/Kconfig"
>  source "drivers/net/wireless/quantenna/Kconfig"
>  
> -config PCMCIA_RAYCS
> -       tristate "Aviator/Raytheon 2.4GHz wireless support"
> -       depends on PCMCIA
> -       select WIRELESS_EXT
> -       select WEXT_SPY
> -       select WEXT_PRIV
> -       help
> -         Say Y here if you intend to attach an Aviator/Raytheon
> PCMCIA
> -         (PC-card) wireless Ethernet networking card to your
> computer.
> -         Please read the file
> -        
> <file:Documentation/networking/device_drivers/wifi/ray_cs.rst> for
> -         details.
> -
> -         To compile this driver as a module, choose M here: the
> module will be
> -         called ray_cs.  If unsure, say N.
> -
> -config PCMCIA_WL3501
> -       tristate "Planet WL3501 PCMCIA cards"
> -       depends on CFG80211 && PCMCIA
> -       select WIRELESS_EXT
> -       select WEXT_SPY
> -       help
> -         A driver for WL3501 PCMCIA 802.11 wireless cards made by
> Planet.
> -         It has basic support for Linux wireless extensions and
> initial
> -         micro support for ethtool.
> -
> -config USB_NET_RNDIS_WLAN
> -       tristate "Wireless RNDIS USB support"
> -       depends on USB
> -       depends on CFG80211
> -       select USB_NET_DRIVERS
> -       select USB_USBNET
> -       select USB_NET_CDCETHER
> -       select USB_NET_RNDIS_HOST
> -       help
> -         This is a driver for wireless RNDIS devices.
> -         These are USB based adapters found in devices such as:
> -
> -         Buffalo WLI-U2-KG125S
> -         U.S. Robotics USR5421
> -         Belkin F5D7051
> -         Linksys WUSB54GSv2
> -         Linksys WUSB54GSC
> -         Asus WL169gE
> -         Eminent EM4045
> -         BT Voyager 1055
> -         Linksys WUSB54GSv1
> -         U.S. Robotics USR5420
> -         BUFFALO WLI-USB-G54
> -
> -         All of these devices are based on Broadcom 4320 chip which
> is the
> -         only wireless RNDIS chip known to date.
> -
> -         If you choose to build a module, it'll be called
> rndis_wlan.
> +source "drivers/net/wireless/legacy/Kconfig"
>  
>  source "drivers/net/wireless/virtual/Kconfig"
>  
> diff --git a/drivers/net/wireless/Makefile
> b/drivers/net/wireless/Makefile
> index 1b697cfe0a13..4d7374d567d1 100644
> --- a/drivers/net/wireless/Makefile
> +++ b/drivers/net/wireless/Makefile
> @@ -23,10 +23,5 @@ obj-$(CONFIG_WLAN_VENDOR_ST) += st/
>  obj-$(CONFIG_WLAN_VENDOR_TI) += ti/
>  obj-$(CONFIG_WLAN_VENDOR_ZYDAS) += zydas/
>  
> -# 16-bit wireless PCMCIA client drivers
> -obj-$(CONFIG_PCMCIA_RAYCS)     += ray_cs.o
> -obj-$(CONFIG_PCMCIA_WL3501)    += wl3501_cs.o
> -
> -obj-$(CONFIG_USB_NET_RNDIS_WLAN)       += rndis_wlan.o
> -
> +obj-$(CONFIG_WLAN) += legacy/
>  obj-$(CONFIG_WLAN) += virtual/
> diff --git a/drivers/net/wireless/legacy/Kconfig
> b/drivers/net/wireless/legacy/Kconfig
> new file mode 100644
> index 000000000000..3a5275941212
> --- /dev/null
> +++ b/drivers/net/wireless/legacy/Kconfig
> @@ -0,0 +1,55 @@
> +config PCMCIA_RAYCS
> +       tristate "Aviator/Raytheon 2.4GHz wireless support"
> +       depends on PCMCIA
> +       select WIRELESS_EXT
> +       select WEXT_SPY
> +       select WEXT_PRIV
> +       help
> +         Say Y here if you intend to attach an Aviator/Raytheon
> PCMCIA
> +         (PC-card) wireless Ethernet networking card to your
> computer.
> +         Please read the file
> +        
> <file:Documentation/networking/device_drivers/wifi/ray_cs.rst> for
> +         details.
> +
> +         To compile this driver as a module, choose M here: the
> module will be
> +         called ray_cs.  If unsure, say N.
> +
> +config PCMCIA_WL3501
> +       tristate "Planet WL3501 PCMCIA cards"
> +       depends on CFG80211 && PCMCIA
> +       select WIRELESS_EXT
> +       select WEXT_SPY
> +       help
> +         A driver for WL3501 PCMCIA 802.11 wireless cards made by
> Planet.
> +         It has basic support for Linux wireless extensions and
> initial
> +         micro support for ethtool.
> +
> +config USB_NET_RNDIS_WLAN
> +       tristate "Wireless RNDIS USB support"
> +       depends on USB
> +       depends on CFG80211
> +       select USB_NET_DRIVERS
> +       select USB_USBNET
> +       select USB_NET_CDCETHER
> +       select USB_NET_RNDIS_HOST
> +       help
> +         This is a driver for wireless RNDIS devices.
> +         These are USB based adapters found in devices such as:
> +
> +         Buffalo WLI-U2-KG125S
> +         U.S. Robotics USR5421
> +         Belkin F5D7051
> +         Linksys WUSB54GSv2
> +         Linksys WUSB54GSC
> +         Asus WL169gE
> +         Eminent EM4045
> +         BT Voyager 1055
> +         Linksys WUSB54GSv1
> +         U.S. Robotics USR5420
> +         BUFFALO WLI-USB-G54
> +
> +         All of these devices are based on Broadcom 4320 chip which
> is the
> +         only wireless RNDIS chip known to date.
> +
> +         If you choose to build a module, it'll be called
> rndis_wlan.
> +
> diff --git a/drivers/net/wireless/legacy/Makefile
> b/drivers/net/wireless/legacy/Makefile
> new file mode 100644
> index 000000000000..36878f080bfc
> --- /dev/null
> +++ b/drivers/net/wireless/legacy/Makefile
> @@ -0,0 +1,6 @@
> +# 16-bit wireless PCMCIA client drivers
> +obj-$(CONFIG_PCMCIA_RAYCS)     += ray_cs.o
> +obj-$(CONFIG_PCMCIA_WL3501)    += wl3501_cs.o
> +
> +obj-$(CONFIG_USB_NET_RNDIS_WLAN)       += rndis_wlan.o
> +
> diff --git a/drivers/net/wireless/ray_cs.c
> b/drivers/net/wireless/legacy/ray_cs.c
> similarity index 100%
> rename from drivers/net/wireless/ray_cs.c
> rename to drivers/net/wireless/legacy/ray_cs.c
> diff --git a/drivers/net/wireless/ray_cs.h
> b/drivers/net/wireless/legacy/ray_cs.h
> similarity index 100%
> rename from drivers/net/wireless/ray_cs.h
> rename to drivers/net/wireless/legacy/ray_cs.h
> diff --git a/drivers/net/wireless/rayctl.h
> b/drivers/net/wireless/legacy/rayctl.h
> similarity index 100%
> rename from drivers/net/wireless/rayctl.h
> rename to drivers/net/wireless/legacy/rayctl.h
> diff --git a/drivers/net/wireless/rndis_wlan.c
> b/drivers/net/wireless/legacy/rndis_wlan.c
> similarity index 100%
> rename from drivers/net/wireless/rndis_wlan.c
> rename to drivers/net/wireless/legacy/rndis_wlan.c
> diff --git a/drivers/net/wireless/wl3501.h
> b/drivers/net/wireless/legacy/wl3501.h
> similarity index 100%
> rename from drivers/net/wireless/wl3501.h
> rename to drivers/net/wireless/legacy/wl3501.h
> diff --git a/drivers/net/wireless/wl3501_cs.c
> b/drivers/net/wireless/legacy/wl3501_cs.c
> similarity index 100%
> rename from drivers/net/wireless/wl3501_cs.c
> rename to drivers/net/wireless/legacy/wl3501_cs.c


2023-02-27 19:11:37

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

Dan Williams <[email protected]> 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.

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

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

2023-02-27 19:14:38

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

kernel test robot <[email protected]> writes:

> Hi Kalle,
>
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on ec52d77d077529f198fd874c550a26b9cc86a331]
>
> url:
> https://github.com/intel-lab-lkp/linux/commits/Kalle-Valo/wifi-move-mac80211_hwsim-and-virt_wifi-to-virtual-directory/20230227-201848
> base: ec52d77d077529f198fd874c550a26b9cc86a331
> patch link: https://lore.kernel.org/r/20230227121732.8967-3-kvalo%40kernel.org
> patch subject: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory
> config: sparc-allyesconfig
> (https://download.01.org/0day-ci/archive/20230228/[email protected]/config)
> compiler: sparc64-linux-gcc (GCC) 12.1.0
> reproduce (this is a W=1 build):
> wget
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
> -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> #
> https://github.com/intel-lab-lkp/linux/commit/b3643ed46f437156c43b21bfc61dd622a6d53191
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review
> Kalle-Valo/wifi-move-mac80211_hwsim-and-virt_wifi-to-virtual-directory/20230227-201848
> git checkout b3643ed46f437156c43b21bfc61dd622a6d53191
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0
> make.cross W=1 O=build_dir ARCH=sparc olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0
> make.cross W=1 O=build_dir ARCH=sparc SHELL=/bin/bash drivers/net/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <[email protected]>
> | Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
>
> All warnings (new ones prefixed by >>):
>
> In function 'init_startup_params',
> inlined from 'ray_init' at drivers/net/wireless/legacy/ray_cs.c:506:2:
>>> drivers/net/wireless/legacy/ray_cs.c:628:17: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
> 628 | strncpy(local->sparm.b4.a_current_ess_id, essid, ESSID_SIZE);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I didn't make any changes in the code, just moved files around, so
this is an old issue.

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

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

2023-02-27 21:02:08

by Dan Williams

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

On Mon, 2023-02-27 at 21:11 +0200, Kalle Valo wrote:
> Dan Williams <[email protected]> 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.

>
> > 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? Also isn't Greg KH out to kill RNDIS too? I don't recall
that being a settled question yet, but I lost track.

Dan


2023-02-28 06:29:35

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

Dan Williams <[email protected]> writes:

> On Mon, 2023-02-27 at 21:11 +0200, Kalle Valo wrote:
>> Dan Williams <[email protected]> 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).

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

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

2023-02-28 17:38:15

by Dan Williams

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

On Tue, 2023-02-28 at 08:29 +0200, Kalle Valo wrote:
> Dan Williams <[email protected]> writes:
>
> > On Mon, 2023-02-27 at 21:11 +0200, Kalle Valo wrote:
> > > Dan Williams <[email protected]> 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


2023-03-01 07:09:29

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

Dan Williams <[email protected]> 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 *)

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

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

2023-03-01 16:35:57

by Dan Williams

[permalink] [raw]
Subject: Re: [PATCH 2/2] wifi: move raycs, wl3501 and rndis_wlan to legacy directory

On Wed, 2023-03-01 at 09:09 +0200, Kalle Valo wrote:
> Dan Williams <[email protected]> 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 *)
>


2023-03-13 13:42:48

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 1/2] wifi: move mac80211_hwsim and virt_wifi to virtual directory

Kalle Valo <[email protected]> wrote:

> To clean up drivers/net/wireless move the virtual drivers to a new virtual
> directory. I did consider adding CONFIG_WLAN_VENDOR_VIRTUAL like other vendors
> have but then dropped the idea as we are not real drivers.
>
> There should be no changes in compilation or in Kconfig options, merely moving
> files. The order in menuconfig is slightly changed, the virtual drivers are now
> last in the list.
>
> Signed-off-by: Kalle Valo <[email protected]>

2 patches applied to wireless-next.git, thanks.

f79cbc77abde wifi: move mac80211_hwsim and virt_wifi to virtual directory
298e50ad8eb8 wifi: move raycs, wl3501 and rndis_wlan to legacy directory

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

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