Linux wireless drivers development
 help / color / mirror / Atom feed
* compat-wireless master-2009-09-28 breakage and suggested fixes
@ 2009-09-29  2:35 Hin-Tak Leung
  2009-09-29  2:55 ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Hin-Tak Leung @ 2009-09-29  2:35 UTC (permalink / raw)
  To: Luis R. Rodriguez, linux-wireless

Hi Luis,

A couple of breakages against current wireless testing head:

compat-release  - master-2009-09-23-1-gd1e5747
git-describe  v2.6.32-rc1-39226-g63dbea4
master-tag master-2009-09-28

-----------
make[1]: Entering directory `/usr/src/kernels/2.6.30.8-67.fc11.x86_64'
  CC [M]  /home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/main.o
In file included from
/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/main.c:29:
/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/ieee80211_i.h:1053:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘ieee80211_monitor_start_xmit’
/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/ieee80211_i.h:1055:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘ieee80211_subif_start_xmit’
make[3]: *** [/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/main.o]
Error 1
make[2]: *** [/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211] Error 2
make[1]: *** [_module_/home/Hin-Tak/tmp-git/compat-wireless-2.6] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.30.8-67.fc11.x86_64'
make: *** [modules] Error 2
----------

----------
  CC [M]  /home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/iface.o
/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/iface.c: In
function ‘ieee80211_if_add’:
/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/iface.c:815:
error: implicit declaration of function ‘SET_NETDEV_DEVTYPE’
make[3]: *** [/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211/iface.o]
Error 1
make[2]: *** [/home/Hin-Tak/tmp-git/compat-wireless-2.6/net/mac80211] Error 2
make[1]: *** [_module_/home/Hin-Tak/tmp-git/compat-wireless-2.6] Error 2
----------

The first error can be fixed by inserting the netdev_tx_t enum:

----------------
$ diff -u ../wireless-testing/net/mac80211/ieee80211_i.h
net/mac80211/ieee80211_i.h
--- ../wireless-testing/net/mac80211/ieee80211_i.h	2009-09-29
01:21:11.000000000 +0100
+++ net/mac80211/ieee80211_i.h	2009-09-29 02:43:26.000000000 +0100
@@ -28,6 +28,24 @@
 #include "key.h"
 #include "sta_info.h"

+#ifdef NETDEV_TX_OK
+#undef NETDEV_TX_OK
+#endif
+#ifdef NETDEV_TX_BUSY
+#undef NETDEV_TX_BUSY
+#endif
+#ifdef NETDEV_TX_LOCKED
+#undef NETDEV_TX_LOCKED
+#endif
+
+/* Driver transmit return codes */
+enum netdev_tx {
+       NETDEV_TX_OK = 0,       /* driver took care of packet */
+       NETDEV_TX_BUSY,         /* driver tx path was busy*/
+       NETDEV_TX_LOCKED = -1,  /* driver tx lock was already taken */
+};
+typedef enum netdev_tx netdev_tx_t;
+
 struct ieee80211_local;

 /* Maximum number of broadcast/multicast frames to buffer when some of the
------------------

The 2nd by adding SET_NETDEV_DEVTYPE():
----------
--- ../wireless-testing/net/mac80211/iface.c	2009-09-29 01:21:11.000000000 +0100
+++ net/mac80211/iface.c	2009-09-29 02:50:54.000000000 +0100
@@ -22,6 +22,8 @@
 #include "led.h"
 #include "driver-ops.h"

+#define SET_NETDEV_DEVTYPE(net, devtype)       ((net)->dev.type = (devtype))
+
 /**
  * DOC: Interface list locking
  *
-------------

The first change is due to this:

commit d0cf9c0dadcdc89a755bcb301cfc9c796eb28ccf
Author: Stephen Hemminger <shemminger@vyatta.com>
Date:   Mon Aug 31 19:50:57 2009 +0000

    wireless: convert drivers to netdev_tx_t

and the 2nd change due to this:

commit 384912ed194e43c03ad1cdaa09b0b1e488c34d46
Author: Marcel Holtmann <marcel@holtmann.org>
Date:   Mon Aug 31 21:08:19 2009 +0000

    net: Add DEVTYPE support for Ethernet based devices

Both of these changes are traced back to changes in
<linux/netdevice.h> , which compat-wireless does not ship. What's your
policy on these kind of changes to compat-wireless?
(the 2nd SET_NETDEV_DEVTYPE change probably can be spanned by an
ifndef SET_NETDEV_DEVTYPE, and roll into
"compat/patches/01-netdev.patch"? Should the first kind of change also
go into compat/patches/01-netdev.patch?)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: compat-wireless master-2009-09-28 breakage and suggested fixes
  2009-09-29  2:35 compat-wireless master-2009-09-28 breakage and suggested fixes Hin-Tak Leung
@ 2009-09-29  2:55 ` Luis R. Rodriguez
  2009-09-29  3:33   ` Hin-Tak Leung
  0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2009-09-29  2:55 UTC (permalink / raw)
  To: Hin-Tak Leung; +Cc: Luis Rodriguez, linux-wireless

On Mon, Sep 28, 2009 at 07:35:22PM -0700, Hin-Tak Leung wrote:
> commit d0cf9c0dadcdc89a755bcb301cfc9c796eb28ccf
> Author: Stephen Hemminger <shemminger@vyatta.com>
> Date:   Mon Aug 31 19:50:57 2009 +0000
> 
>     wireless: convert drivers to netdev_tx_t
> 
> and the 2nd change due to this:
> 
> commit 384912ed194e43c03ad1cdaa09b0b1e488c34d46
> Author: Marcel Holtmann <marcel@holtmann.org>
> Date:   Mon Aug 31 21:08:19 2009 +0000
> 
>     net: Add DEVTYPE support for Ethernet based devices
> 
> Both of these changes are traced back to changes in
> <linux/netdevice.h> , which compat-wireless does not ship. What's your
> policy on these kind of changes to compat-wireless?
> (the 2nd SET_NETDEV_DEVTYPE change probably can be spanned by an
> ifndef SET_NETDEV_DEVTYPE, and roll into
> "compat/patches/01-netdev.patch"? Should the first kind of change also
> go into compat/patches/01-netdev.patch?)

I don't see this yet on wireless-testing but it is on 2.6.32.
I backported this as follows. I'll push this out shortly.

From: Luis R. Rodriguez <lrodriguez@atheros.com>
Subject: [PATCH] Fix compilation against for 2.6.32 changes

2.6.32 added SET_NETDEV_DEVTYPE() and netdev_tx

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 compat/compat-2.6.32.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/compat/compat-2.6.32.h b/compat/compat-2.6.32.h
index f7081f2..418b521 100644
--- a/compat/compat-2.6.32.h
+++ b/compat/compat-2.6.32.h
@@ -31,6 +31,18 @@
 
 #define dev_change_net_namespace(a, b, c) (-EOPNOTSUPP)
 
+#define SET_NETDEV_DEVTYPE(netdev, type)
+
+#ifdef __KERNEL__
+/* Driver transmit return codes */
+enum netdev_tx {
+	BACKPORT_NETDEV_TX_OK = NETDEV_TX_OK,       /* driver took care of packet */
+	BACKPORT_NETDEV_TX_BUSY = NETDEV_TX_BUSY,         /* driver tx path was busy*/
+	BACKPORT_NETDEV_TX_LOCKED = NETDEV_TX_LOCKED,  /* driver tx lock was already taken */
+};
+typedef enum netdev_tx netdev_tx_t;
+#endif /* __KERNEL__ */
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)) */
 
 #endif /* LINUX_26_32_COMPAT_H */
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: compat-wireless master-2009-09-28 breakage and suggested fixes
  2009-09-29  2:55 ` Luis R. Rodriguez
@ 2009-09-29  3:33   ` Hin-Tak Leung
  0 siblings, 0 replies; 3+ messages in thread
From: Hin-Tak Leung @ 2009-09-29  3:33 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Luis Rodriguez, linux-wireless

On Tue, Sep 29, 2009 at 3:55 AM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:
> On Mon, Sep 28, 2009 at 07:35:22PM -0700, Hin-Tak Leung wrote:
>> commit d0cf9c0dadcdc89a755bcb301cfc9c796eb28ccf
>> Author: Stephen Hemminger <shemminger@vyatta.com>
>> Date:   Mon Aug 31 19:50:57 2009 +0000
>>
>>     wireless: convert drivers to netdev_tx_t
>>
>> and the 2nd change due to this:
>>
>> commit 384912ed194e43c03ad1cdaa09b0b1e488c34d46
>> Author: Marcel Holtmann <marcel@holtmann.org>
>> Date:   Mon Aug 31 21:08:19 2009 +0000
>>
>>     net: Add DEVTYPE support for Ethernet based devices
>>
>> Both of these changes are traced back to changes in
>> <linux/netdevice.h> , which compat-wireless does not ship. What's your
>> policy on these kind of changes to compat-wireless?
>> (the 2nd SET_NETDEV_DEVTYPE change probably can be spanned by an
>> ifndef SET_NETDEV_DEVTYPE, and roll into
>> "compat/patches/01-netdev.patch"? Should the first kind of change also
>> go into compat/patches/01-netdev.patch?)
>
> I don't see this yet on wireless-testing but it is on 2.6.32.
> I backported this as follows. I'll push this out shortly.
>
> From: Luis R. Rodriguez <lrodriguez@atheros.com>
> Subject: [PATCH] Fix compilation against for 2.6.32 changes
>
> 2.6.32 added SET_NETDEV_DEVTYPE() and netdev_tx

Argh, I see what you are getting at: codes that emulates "API changes
between 2.6.(x-1) and 2.6.(x)" go into file
compat/compat-2.6.(x).{h,c} .
The 'compatibility code for new kernel' wording wasn't too obvious :-).

>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>

Acked.

> ---
>  compat/compat-2.6.32.h |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/compat/compat-2.6.32.h b/compat/compat-2.6.32.h
> index f7081f2..418b521 100644
> --- a/compat/compat-2.6.32.h
> +++ b/compat/compat-2.6.32.h
> @@ -31,6 +31,18 @@
>
>  #define dev_change_net_namespace(a, b, c) (-EOPNOTSUPP)
>
> +#define SET_NETDEV_DEVTYPE(netdev, type)
> +
> +#ifdef __KERNEL__
> +/* Driver transmit return codes */
> +enum netdev_tx {
> +       BACKPORT_NETDEV_TX_OK = NETDEV_TX_OK,       /* driver took care of packet */
> +       BACKPORT_NETDEV_TX_BUSY = NETDEV_TX_BUSY,         /* driver tx path was busy*/
> +       BACKPORT_NETDEV_TX_LOCKED = NETDEV_TX_LOCKED,  /* driver tx lock was already taken */
> +};
> +typedef enum netdev_tx netdev_tx_t;
> +#endif /* __KERNEL__ */
> +
>  #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)) */
>
>  #endif /* LINUX_26_32_COMPAT_H */
> --
> 1.6.3.3
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-29  3:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-29  2:35 compat-wireless master-2009-09-28 breakage and suggested fixes Hin-Tak Leung
2009-09-29  2:55 ` Luis R. Rodriguez
2009-09-29  3:33   ` Hin-Tak Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox