2006-01-22 17:11:10

by Adrian Bunk

[permalink] [raw]
Subject: [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18

WIRELESS_EXT < 18 will never be true in the kernel.


Signed-off-by: Adrian Bunk <[email protected]>

---

This patch was already sent on:
- 14 Jan 2006

drivers/net/wireless/tiacx/acx_struct.h | 5
drivers/net/wireless/tiacx/common.c | 4
drivers/net/wireless/tiacx/conv.c | 2
drivers/net/wireless/tiacx/ioctl.c | 436 -----------------------
drivers/net/wireless/tiacx/pci.c | 8
drivers/net/wireless/tiacx/usb.c | 6
drivers/net/wireless/tiacx/wlan.c | 2
drivers/net/wireless/tiacx/wlan_compat.h | 10
8 files changed, 1 insertion(+), 472 deletions(-)

--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h.old 2005-12-03 02:58:36.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/acx_struct.h 2005-12-03 02:59:36.000000000 +0100
@@ -1053,9 +1053,8 @@
* the struct net_device. */
/*** Device statistics ***/
struct net_device_stats stats; /* net device statistics */
-#ifdef WIRELESS_EXT
struct iw_statistics wstats; /* wireless statistics */
-#endif
+
/*** Power managment ***/
struct pm_dev *pm; /* PM crap */

@@ -1103,9 +1102,7 @@
u8 scan_rate;
u16 scan_duration;
u16 scan_probe_delay;
-#if WIRELESS_EXT > 15
struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
-#endif

/*** Wireless network settings ***/
/* copy of the device address (ifconfig hw ether) that we actually use
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c.old 2005-12-03 02:59:47.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/common.c 2005-12-03 03:00:04.000000000 +0100
@@ -46,9 +46,7 @@
#include <linux/wireless.h>
#include <linux/pm.h>
#include <linux/vmalloc.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif /* WE >= 13 */

#include "acx.h"

@@ -2707,7 +2705,6 @@
acxlog(L_ASSOC, "%s(%d):%s\n",
__func__, new_status, acx_get_status_name(new_status));

-#if WIRELESS_EXT > 13 /* wireless_send_event() and SIOCGIWSCAN */
/* wireless_send_event never sleeps */
if (ACX_STATUS_4_ASSOCIATED == new_status) {
union iwreq_data wrqu;
@@ -2729,7 +2726,6 @@
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
wireless_send_event(priv->netdev, SIOCGIWAP, &wrqu, NULL);
}
-#endif

priv->status = new_status;

--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c.old 2005-12-03 03:00:17.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/conv.c 2005-12-03 03:00:26.000000000 +0100
@@ -36,9 +36,7 @@
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif

#include "acx.h"

--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c.old 2005-12-03 03:02:16.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/pci.c 2005-12-03 03:02:30.000000000 +0100
@@ -45,9 +45,7 @@
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif
#include <linux/netdevice.h>
#include <linux/ioport.h>
#include <linux/pci.h>
@@ -1820,11 +1818,7 @@
dev->hard_start_xmit = &acx_i_start_xmit;
dev->get_stats = &acx_e_get_stats;
dev->get_wireless_stats = &acx_e_get_wireless_stats;
-#if WIRELESS_EXT >= 13
dev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
-#else
- dev->do_ioctl = &acx_e_ioctl_old;
-#endif
dev->set_multicast_list = &acxpci_i_set_multicast_list;
dev->tx_timeout = &acxpci_i_tx_timeout;
dev->change_mtu = &acx_e_change_mtu;
@@ -3842,7 +3836,6 @@
r100 = txdesc->u.r1.rate;
r111 = txdesc->u.r2.rate111;

-#if WIRELESS_EXT > 13 /* wireless_send_event() and IWEVTXDROP are WE13 */
/* need to check for certain error conditions before we
* clean the descriptor: we still need valid descr data here */
if (unlikely(0x30 & error)) {
@@ -3857,7 +3850,6 @@
MAC_COPY(wrqu.addr.sa_data, hdr->a1);
wireless_send_event(priv->netdev, IWEVTXDROP, &wrqu, NULL);
}
-#endif
/* ...and free the desc */
txdesc->error = 0;
txdesc->ack_failures = 0;
--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c.old 2005-12-03 03:02:58.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan.c 2005-12-03 03:03:02.000000000 +0100
@@ -43,9 +43,7 @@
#include <linux/types.h>
#include <linux/if_arp.h>
#include <linux/wireless.h>
-#if WIRELESS_EXT >= 13
#include <net/iw_handler.h>
-#endif

#include "acx.h"

--- linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h.old 2005-12-03 03:03:11.000000000 +0100
+++ linux-2.6.15-rc3-mm1/drivers/net/wireless/tiacx/wlan_compat.h 2005-12-03 03:03:19.000000000 +0100
@@ -228,15 +228,6 @@
typedef struct net_device netdevice_t;
#endif

-#ifdef WIRELESS_EXT
-#if (WIRELESS_EXT < 13)
-struct iw_request_info {
- __u16 cmd; /* Wireless Extension command */
- __u16 flags; /* More to come ;-) */
-};
-#endif
-#endif
-
/* Interrupt handler backwards compatibility stuff */
#ifndef IRQ_NONE
#define IRQ_NONE


2006-01-27 10:22:10

by Denis Vlasenko

[permalink] [raw]
Subject: Re: [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18

Hi Adrian,


On Sunday 22 January 2006 19:11, Adrian Bunk wrote:
> WIRELESS_EXT < 18 will never be true in the kernel.
>
>
> Signed-off-by: Adrian Bunk <[email protected]>

Please don't do this. We are not in the kernel yet.

acx currently is in -mm, not in mainline.

We have quite a few users of it which aren't using -mm,
but instead compile it out-of-kernel.

We gradually removed 2.4 compat code and most of early 2.6isms.
Even that produced a few complains. Currently out-of-tree acx
is working for any kernel >= 2.6.10.

I very much want to get rid of all remaining compat cruft, and
I plan to do it as soon as acx will be present in mainline kernel.
--
vda

2006-01-27 11:54:18

by Johannes Berg

[permalink] [raw]
Subject: Re: [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18

On Fri, 2006-01-27 at 12:19 +0200, Denis Vlasenko wrote:

> I very much want to get rid of all remaining compat cruft, and
> I plan to do it as soon as acx will be present in mainline kernel.

I doubt you'll get it merged with the compat cruft.

johannes


Attachments:
signature.asc (832.00 B)
This is a digitally signed message part

2006-01-27 12:51:17

by Denis Vlasenko

[permalink] [raw]
Subject: Re: [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18

On Friday 27 January 2006 13:49, Johannes Berg wrote:
> On Fri, 2006-01-27 at 12:19 +0200, Denis Vlasenko wrote:
>
> > I very much want to get rid of all remaining compat cruft, and
> > I plan to do it as soon as acx will be present in mainline kernel.
>
> I doubt you'll get it merged with the compat cruft.

What cruft? This?

# grep -r WIRELESS_EXT .
./pci.c: ndev->name, WIRELESS_EXT, UTS_RELEASE);
./common.c: "Wireless extension version:\t" STRING(WIRELESS_EXT) "\n"
./acx_struct.h:#ifdef WIRELESS_EXT
./acx_struct.h:#if WIRELESS_EXT > 15
./ioctl.c: range->we_version_compiled = WIRELESS_EXT;

I consider this to be a really modest amount of compat code
which makes driver users happy (that fraction of it which is not
willing to run -mm).

However, I would remove even that at Jeff's or Andrew's request,
or without anyone's request if acx will be merged to Linus tree.
--
vda

2006-01-27 14:46:16

by Andreas Mohr

[permalink] [raw]
Subject: Re: [Acx100-devel] Re: [-mm patch] drivers/net/wireless/tiacx/: remove code for WIRELESS_EXT < 18

Hi,

On Fri, Jan 27, 2006 at 02:49:49PM +0200, Denis Vlasenko wrote:
> On Friday 27 January 2006 13:49, Johannes Berg wrote:
> > On Fri, 2006-01-27 at 12:19 +0200, Denis Vlasenko wrote:
> >
> > > I very much want to get rid of all remaining compat cruft, and
> > > I plan to do it as soon as acx will be present in mainline kernel.
> >
> > I doubt you'll get it merged with the compat cruft.
>
> What cruft? This?
>
> # grep -r WIRELESS_EXT .
> ./pci.c: ndev->name, WIRELESS_EXT, UTS_RELEASE);
> ./common.c: "Wireless extension version:\t" STRING(WIRELESS_EXT) "\n"
> ./acx_struct.h:#ifdef WIRELESS_EXT
> ./acx_struct.h:#if WIRELESS_EXT > 15
> ./ioctl.c: range->we_version_compiled = WIRELESS_EXT;
>
> I consider this to be a really modest amount of compat code
> which makes driver users happy (that fraction of it which is not
> willing to run -mm).
>
> However, I would remove even that at Jeff's or Andrew's request,
> or without anyone's request if acx will be merged to Linus tree.

Indeed, I don't think there should be any discussion at all about this,
since it helps users of our currently still external driver
(not too much longer external, I guess and hope) a lot.
Given that we don't have a stable driver ABI (for way too often discussed
very valid and sane reasons) I really, really think we shouldn't shoot
our foot into pieces by then additionally also bitching about *MINIMAL*
amounts of compatibility code required to keep up with those speedily changing
kernel requirements while our driver isn't included yet.

In the future, I'd like to ask people to be a *bit* more tolerant of newish
compatibility cruft. It's not like we're supporting kernel 2.2.x here still,
our driver is at 2.6.10 at a minimum(!), yet you still want to remove even
those few pieces!
This is simply ridiculous (again, as long as our driver isn't merged, which it
should be soon to improve maintenance).

OK, ending this rather fruitless discussion here. I better get back to hacking,
that's more productive.

Andreas Mohr