Skip to contentSkip to conversation

net: ethernet: toshiba: ps3_gelic_wireless: Remove driver using deprecated API wext

PATCH In review Philipp Hortmann 5 participants 13 messages Dec 24, 2024 – Jan 6, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: toshiba: ps3_gelic_wireless: Remove driver using deprecated API wext

Driver was contributed in 2008.

The following reasons lead to the removal:
- This driver generates maintenance workload for itself and for API wext
- wext is deprecated and only used by two wireless drivers in mainline kernel
- no progress changing to mac80211
- This driver has a maximum 54MBit/s as it supports only 802.11 b/g.
- Using this hardware is security wise not state of the art as WPA3 is not supported.

The longterm kernels will still support this hardware for years.

Find further discussions and history in the Link below.

---
Only compile tested.

Tested a rebased version of this patch on the Playstation 3. Used T2 Linux with Kernel 6.12.5 to test the Ethernet connection.

No updates required in MAINTAINERS.

---
 drivers/net/ethernet/toshiba/Kconfig          |   11 -
 drivers/net/ethernet/toshiba/Makefile         |    3 +-
 drivers/net/ethernet/toshiba/ps3_gelic_net.c  |   17 -
 .../net/ethernet/toshiba/ps3_gelic_wireless.c | 2654 -----------------
 .../net/ethernet/toshiba/ps3_gelic_wireless.h |  313 --
 5 files changed, 1 insertion(+), 2997 deletions(-)
 delete mode 100644 drivers/net/ethernet/toshiba/ps3_gelic_wireless.c
 delete mode 100644 drivers/net/ethernet/toshiba/ps3_gelic_wireless.h
drivers/net/ethernet/toshiba/Kconfig +0 -11
index 701e9b7c1c3b..039ad7558c0f 100644
@@ -28,17 +28,6 @@ config GELIC_NET
 	  To compile this driver as a module, choose M here: the
 	  module will be called ps3_gelic.
 
-config GELIC_WIRELESS
-	bool "PS3 Wireless support"
-	depends on GELIC_NET && WLAN
-	select WIRELESS_EXT
-	help
-	  This option adds the support for the wireless feature of PS3.
-	  If you have the wireless-less model of PS3 or have no plan to
-	  use wireless feature, disabling this option saves memory.  As
-	  the driver automatically distinguishes the models, you can
-	  safely enable this option even if you have a wireless-less model.
-
 config SPIDER_NET
 	tristate "Spider Gigabit Ethernet driver"
 	depends on PCI && PPC_IBM_CELL_BLADE
drivers/net/ethernet/toshiba/Makefile +1 -2
index f434fd0f429e..f5c4a7c22679 100644
@@ -4,8 +4,7 @@
 #
 
 obj-$(CONFIG_GELIC_NET) += ps3_gelic.o
-gelic_wireless-$(CONFIG_GELIC_WIRELESS) += ps3_gelic_wireless.o
-ps3_gelic-objs += ps3_gelic_net.o $(gelic_wireless-y)
+ps3_gelic-objs += ps3_gelic_net.o
 spidernet-y += spider_net.o spider_net_ethtool.o
 obj-$(CONFIG_SPIDER_NET) += spidernet.o
 obj-$(CONFIG_TC35815) += tc35815.o
drivers/net/ethernet/toshiba/ps3_gelic_net.c +0 -17
index 5ee8e8980393..2f248e62cb74 100644
@@ -35,7 +35,6 @@
 #include <asm/lv1call.h>
 
 #include "ps3_gelic_net.h"
-#include "ps3_gelic_wireless.h"
 
 #define DRV_NAME "Gelic Network Driver"
 #define DRV_VERSION "2.0"
@@ -1148,12 +1147,6 @@ static irqreturn_t gelic_card_interrupt(int irq, void *ptr)
 	if (status & GELIC_CARD_PORT_STATUS_CHANGED)
 		gelic_card_get_ether_port_status(card, 1);
 
-#ifdef CONFIG_GELIC_WIRELESS
-	if (status & (GELIC_CARD_WLAN_EVENT_RECEIVED |
-		      GELIC_CARD_WLAN_COMMAND_COMPLETED))
-		gelic_wl_interrupt(card->netdev[GELIC_PORT_WIRELESS], status);
-#endif
-
 	return IRQ_HANDLED;
 }
 
@@ -1769,13 +1762,6 @@ static int ps3_gelic_driver_probe(struct ps3_system_bus_device *dev)
 		goto fail_setup_netdev;
 	}
 
-#ifdef CONFIG_GELIC_WIRELESS
-	result = gelic_wl_driver_probe(card);
-	if (result) {
-		dev_dbg(&dev->core, "%s: WL init failed\n", __func__);
-		goto fail_setup_netdev;
-	}
-#endif
 	pr_debug("%s: done\n", __func__);
 	return 0;
 
@@ -1818,9 +1804,6 @@ static void ps3_gelic_driver_remove(struct ps3_system_bus_device *dev)
 	/* set auto-negotiation */
 	gelic_card_set_link_mode(card, GELIC_LV1_ETHER_AUTO_NEG);
 
-#ifdef CONFIG_GELIC_WIRELESS
-	gelic_wl_driver_remove(card);
-#endif
 	/* stop interrupt */
 	gelic_card_set_irq_mask(card, 0);
 
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c deleted +0 -2654

2,654 lines not on this page · raw message

drivers/net/ethernet/toshiba/ps3_gelic_wireless.h deleted +0 -313

279 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.43.0

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 4 lines · Philipp Hortmann

Driver was contributed in 2008.

The following reasons lead to the removal:
- This driver generates maintenance workload for itself and for API wext

So I've been wondering, why are you so concerned about this? And in particular, more concerned about it than the people actually doing the maintenance? :)

We got here because I removed a *staging* driver that was in the way of some wext cleanups, but that had a thousand other reasons to never go anywhere anyway.

Quoted 2 lines

- wext is deprecated and only used by two wireless drivers in mainline kernel

true

Quoted 1 line

- no progress changing to mac80211

It fundamentally cannot be converted to mac80211, it has a whole different model. In fact it cannot even be converted to cfg80211 because some APIs it uses just never existed there, and likely never will.

Quoted 3 lines

Tested a rebased version of this patch on the Playstation 3. Used T2 Linux with Kernel 6.12.5 to test the Ethernet connection.

Arguably that's a pretty strong argument for *not* removing it, if it's actually relatively simple today to bring up the latest kernel on a PS3.

johannes

#2 lore raw
Quoted 9 lines · Johannes Berg
Quoted 4 lines · Philipp Hortmann

Driver was contributed in 2008.

The following reasons lead to the removal:
- This driver generates maintenance workload for itself and for API wext

So I've been wondering, why are you so concerned about this? And in particular, more concerned about it than the people actually doing the maintenance? :)

One of my big fears is the hand over to the next generation maintainers and developers. The less code and the less exceptions due to old interfaces the easier it will be. We loose maintainers and developers for many reasons, like: retirement, burnout, embargos or simply because they are not paid and need to earn money. After giving some support on the staging subsystem I cannot see at all that we can attract so many talented people as required for a save future beyond 7 years...

People who evolved with the kernel development do not have a good sense how difficult it can be to join nowadays.

A friend just bought two servers. One with a paid OS and one planned with Linux as OS. The difference was over 12000 € due to licenses. What would be the price when we do not have a choice? Do not feel save because of today. We need to fight for tomorrow.

Where do you want to invest your time? Into the new technologies to keep up at the front edge or to keep old stuff running that is not productive anymore. But there might be someone who can pull the hardware once every two month out of the shelf and ask why this is not working. Should this really stop us from progress?

Quoted 5 lines

We got here because I removed a *staging* driver that was in the way of some wext cleanups, but that had a thousand other reasons to never go anywhere anyway.

Partial, for me more important was the try to remove all wext drivers in October 2023 by Arnd Bergmann. [PATCH] [RFC] wireless: move obsolete drivers to staging
https://lore.kernel.org/linux-staging/[email protected]/

Quoted 11 lines
Quoted 2 lines

- wext is deprecated and only used by two wireless drivers in mainline kernel

true

Quoted 1 line

- no progress changing to mac80211

It fundamentally cannot be converted to mac80211, it has a whole different model. In fact it cannot even be converted to cfg80211 because some APIs it uses just never existed there, and likely never will.

Quoted 6 lines
Quoted 3 lines

Tested a rebased version of this patch on the Playstation 3. Used T2 Linux with Kernel 6.12.5 to test the Ethernet connection.

Arguably that's a pretty strong argument for *not* removing it, if it's actually relatively simple today to bring up the latest kernel on a PS3.

I was not able to use the WLAN on T2 Linux. I just tested the Ethernet connection as I know that the developer of T2 is using it. The reason why I bought the PS3 is to see if Linux on it is really a use case. But all I found is that it is only a test vehicle to say T2 is working on Power PC architecture.

At the time the PS3 WLAN driver was added to the mainline kernel it was really cool stuff. But nowadays it is just a high Power consuming device with a noisy fan and not enough RAM to do anything (256MB). The powerfull GPU is not supported by the kernel.

Do I need to find out why the WLAN is not working under T2 on PS3 to convince you? The WLAN is working under redribbon Linux with Kernel 3.5 on the PS3.

T2 is working but to make this happen the T2 Author has an own repo for patches to apply. In the following video he publishes his view on how well the ps3disk is maintained and tested by the linux kernel community. My impression of this is that ps3disk is not tested on hardware at all. You can find this in a youtube video: “I can't believe VIP Linux kernel developer BROKE PS3 support” but watch out that you are in a good mood otherwise it is pulling you down like me...

The commit that is breaking the function is:
commit a7f18b74dbe171625afc2751942a92f71a4dd4ba

This fixes are not in Mainline up to today. So who beside T2 Linux is using this? You can find more of those breaking patches... and videos...

The following points are also in the list of reasons:
- This driver has a maximum 54MBit/s as it supports only 802.11 b/g.
- Using this hardware is security wise not state of the art as WPA3 is not supported.

Thanks for your patience.

Bye Philipp

#3 lore raw

Hi Philipp,

CC hch

Quoted 10 lines · Philipp Hortmann

T2 is working but to make this happen the T2 Author has an own repo for patches to apply. In the following video he publishes his view on how well the ps3disk is maintained and tested by the linux kernel community. My impression of this is that ps3disk is not tested on hardware at all. You can find this in a youtube video: “I can't believe VIP Linux kernel developer BROKE PS3 support” but watch out that you are in a good mood otherwise it is pulling you down like me...

The commit that is breaking the function is:
commit a7f18b74dbe171625afc2751942a92f71a4dd4ba

Thanks, I see no evidence of this ever being reported upstream, which makes it rather difficult to be aware of the issue...

Quoted 2 lines

This fixes are not in Mainline up to today. So who beside T2 Linux is using this? You can find more of those breaking patches... and videos...

Care to tell us where the fix is?

/me looks at the bad commit...

Oh, dev->bounce_size is used before set. Patch sent.
https://lore.kernel.org/06988f959ea6885b8bd7fb3b9059dd54bc6bbad7.1735894216.git.geert+renesas@glider.be

Quoted 4 lines

The following points are also in the list of reasons:
- This driver has a maximum 54MBit/s as it supports only 802.11 b/g.
- Using this hardware is security wise not state of the art as WPA3 is not supported.

If you only do VPN over such an insecure link, I guess it's still safe?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw
Quoted 7 lines · Geert Uytterhoeven
Quoted 5 lines

The following points are also in the list of reasons:
- This driver has a maximum 54MBit/s as it supports only 802.11 b/g.
- Using this hardware is security wise not state of the art as WPA3 is not supported.

If you only do VPN over such an insecure link, I guess it's still safe?

Why VPN? If it's public Internet that any you only use secure protocols such as https/ssh/etc over it that's just fine too.

#5 lore raw

Hi David,

Quoted 10 lines · David Woodhouse
Quoted 6 lines · Geert Uytterhoeven
Quoted 4 lines

The following points are also in the list of reasons:
- This driver has a maximum 54MBit/s as it supports only 802.11 b/g.
- Using this hardware is security wise not state of the art as WPA3 is not supported.

If you only do VPN over such an insecure link, I guess it's still safe?

Why VPN? If it's public Internet that any you only use secure protocols such as https/ssh/etc over it that's just fine too.

Oh sure.

I was also considering it from the side of the wireless access point:
if you have to provide an non-secure access point just for your PS3, an attacker can not only impact PS3 wireless traffic, but also connect to the access point.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#6 lore raw
Quoted 3 lines · Geert Uytterhoeven

I was also considering it from the side of the wireless access point:
if you have to provide an non-secure access point just for your PS3,

It supports WPA2/PSK (~2004) which is plenty secure. It's not "non- secure", it's just "not secure per WPA3 (2018) standard". Many other drivers in tree don't support WPA3 for one reason or the other (mostly lack of management frame protection support.)

johannes

#8 lore raw

Hi Philipp,

Quoted 7 lines · Philipp Hortmann
Quoted 1 line · Geert Uytterhoeven

Care to tell us where the fix is?

please find all patches for T2 on this page:
https://wiki.t2linux.org/guides/kernel/
More exact here:
git clone --depth=1 https://github.com/t2linux/linux-t2-patches patches

Thanks, but I cannot find a ps3disk fix there?

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#9 lore raw
Quoted 12 lines · Geert Uytterhoeven

Hi Philipp,

Quoted 7 lines · Philipp Hortmann
Quoted 1 line · Geert Uytterhoeven

Care to tell us where the fix is?

please find all patches for T2 on this page:
https://wiki.t2linux.org/guides/kernel/
More exact here:
git clone --depth=1 https://github.com/t2linux/linux-t2-patches patches

Quoted 6 lines

Thanks, but I cannot find a ps3disk fix there?

Gr{oetje,eeting}s,

Geert

He Geert,

I think there are some regarding PS3 and also Sparc, not only ps3disk.
You can leave this to me. I will go through it. If anybody else is doing this please CC me so we do not do the work twice.

I am OOO so it will take some days.

Thanks for your support.

Bye Philipp

#10 lore raw
In reply to Philipp Hortmann
Quoted 8 lines · Philipp Hortmann

One of my big fears is the hand over to the next generation maintainers and developers. The less code and the less exceptions due to old interfaces the easier it will be. We loose maintainers and developers for many reasons, like: retirement, burnout, embargos or simply because they are not paid and need to earn money. After giving some support on the staging subsystem I cannot see at all that we can attract so many talented people as required for a save future beyond 7 years...

I wouldn't say that's necessarily a wrong sentiment, but I feel future maintainers can also make that decision, and if it's "years" in the future the relevance will only go down anyway.

We just started putting some pressure into the system for removal of wext and nl80211 support (with WiFi7 devices no longer supporting wext) so chances are at least here the situation will change, and anyway wext stuff will become less relevant, perhaps to the point that other tools will drop support for it anyway. Not wpa_supplicant though, I suppose :)

Quoted 7 lines

People who evolved with the kernel development do not have a good sense how difficult it can be to join nowadays.

A friend just bought two servers. One with a paid OS and one planned with Linux as OS. The difference was over 12000 € due to licenses. What would be the price when we do not have a choice? Do not feel save because of today. We need to fight for tomorrow.

Not sure I see how that's related. This stuff really isn't in the way now. If it were, I might have killed it already like the staging driver(s).

Quoted 5 lines

Where do you want to invest your time? Into the new technologies to keep up at the front edge or to keep old stuff running that is not productive anymore. But there might be someone who can pull the hardware once every two month out of the shelf and ask why this is not working. Should this really stop us from progress?

Again, I don't see the correlation, much less causation. Keeping the wext stuff working for now is a promise for stable APIs for existing things anyway. IMHO progress isn't achieved by removing old things gratuitously but by offering better ways and moving things over. Which _is_ happening, just that this particular driver is a hold-out because progress happened in a direction that didn't add support for it.

Quoted 4 lines

Partial, for me more important was the try to remove all wext drivers in October 2023 by Arnd Bergmann.
[PATCH] [RFC] wireless: move obsolete drivers to staging
https://lore.kernel.org/linux-staging/[email protected]/

I don't think this was really all that much about "remove wext" rather than "remove obsolete stuff".

Quoted 5 lines

I was not able to use the WLAN on T2 Linux. I just tested the Ethernet connection as I know that the developer of T2 is using it. The reason why I bought the PS3 is to see if Linux on it is really a use case. But all I found is that it is only a test vehicle to say T2 is working on Power PC architecture.

Power is vastly more than PS3, the SPU/cell architecture was more the interesting part of PS3 rather than anything else.

Quoted 8 lines

At the time the PS3 WLAN driver was added to the mainline kernel it was really cool stuff. But nowadays it is just a high Power consuming device with a noisy fan and not enough RAM to do anything (256MB). The powerfull GPU is not supported by the kernel.

Do I need to find out why the WLAN is not working under T2 on PS3 to convince you? The WLAN is working under redribbon Linux with Kernel 3.5 on the PS3.

That's a whole different argument, so you're saying it wasn't working _anyway_? Your whole original patch/argument seemed to be centered around a whole lot of other things, but if it's not working anyway and

Quoted 7 lines

T2 is working but to make this happen the T2 Author has an own repo for patches to apply. In the following video he publishes his view on how well the ps3disk is maintained and tested by the linux kernel community. My impression of this is that ps3disk is not tested on hardware at all. You can find this in a youtube video: “I can't believe VIP Linux kernel developer BROKE PS3 support” but watch out that you are in a good mood otherwise it is pulling you down like me...

That's on him, things get broken all the time. I guess rants sell better *shrug*.

Quoted 4 lines

The following points are also in the list of reasons:
- This driver has a maximum 54MBit/s as it supports only 802.11 b/g.
- Using this hardware is security wise not state of the art as WPA3 is not supported.

Neither of those is really all that relevant, there are plenty other 11g-only drivers and/or without WPA3, and WPA3 anyway isn't all that critical. Crypto in WPA2 isn't broken (in fact it's mostly the same as WPA3), it's just (slightly) less susceptible to DOS attacks due to MFP.

Anyway ... if it's broken it _would_ be nice to know why, just to know how long ago that was I guess, but we can also remove it with that argument. I just think that's a completely different argument ("it's broken and nobody cared in a few years") than what your patch now implies ("it's working but too old".)

johannes

#11 lore raw
Quoted 14 lines · Johannes Berg
Quoted 8 lines · Philipp Hortmann

One of my big fears is the hand over to the next generation maintainers and developers. The less code and the less exceptions due to old interfaces the easier it will be. We loose maintainers and developers for many reasons, like: retirement, burnout, embargos or simply because they are not paid and need to earn money. After giving some support on the staging subsystem I cannot see at all that we can attract so many talented people as required for a save future beyond 7 years...

I wouldn't say that's necessarily a wrong sentiment, but I feel future maintainers can also make that decision, and if it's "years" in the future the relevance will only go down anyway.

Quoted 5 lines

We just started putting some pressure into the system for removal of wext and nl80211 support (with WiFi7 devices no longer supporting wext) so chances are at least here the situation will change, and anyway wext stuff will become less relevant, perhaps to the point that other tools will drop support for it anyway. Not wpa_supplicant though, I suppose :)

I would assume that once removing CFG80211_WEXT becomes an option, we can just put the remaining parts of net/wireless/wext-*.c into both ps3_gelic and ipw2x00, duplicating and then simplifying the implementation. As far as I can tell, there is very little that is actually shared between the two anyway.

Arnd

#12 lore raw
Quoted 6 lines · Arnd Bergmann

I would assume that once removing CFG80211_WEXT becomes an option, we can just put the remaining parts of net/wireless/wext-*.c into both ps3_gelic and ipw2x00, duplicating and then simplifying the implementation. As far as I can tell, there is very little that is actually shared between the two anyway.

Indeed.

Note that net/wireless/wext-{core,proc,priv}.c are not even related to CFG80211_WEXT (wext-{compat,sme}.c are), and just form the core wext code that can be treated completely orthogonal and independent of cfg80211. This driver doesn't even use CFG80211_WEXT code at all.

johannes