2010-11-23 20:40:31

by Sven-Haegar Koch

[permalink] [raw]
Subject: [PATCH] compat-wireless: fix activesync devices


Compiling support for ActiveSync devices in compat-wireless depends
on USB_NET_CDCETHER to be set in main kernel.

But USB_NET_CDCETHER can also be a module, in which case
CONFIG_USB_NET_CDCETHER will not be defined inside compat_autoconf.h and
the compat-wireless cdc_ether.ko will miss the support for it.

So check also for CONFIG_USB_NET_CDCETHER_MODULE in config.mk to be safe
in both cases.

Signed-off-by: Sven-Haegar Koch <[email protected]>
---

I needed to also use an old windows mobile device (Palm Treo 750)
connected over USB with my laptop which otherwise uses compat-wireless.

But after connecting it I only got:
usb 2-1: bad CDC descriptors

This happens when in drivers/net/usb/cdc_ether.c
CONFIG_USB_NET_COMPAT_RNDIS_HOST and
CONFIG_USB_NET_COMPAT_RNDIS_HOST_MODULE both are not defined, because it
stubs out the rndis_host support.

Perhaps not the most visually pleasing solution to just include the
ifdef block in config.mk twice, but everything else would have needed a
much deeper surgery - and as this is the only usage of ifdef in
compat.mk where the symbol can also be a module I did not find it to be
worth the additional complexity.

Tested with compat-wireless-2.6.36-5-spn.tar.bz2, but also happened with
earlier versions and should also apply to newer.

c'ya
sven-haegar

Index: linux/compat-wireless/config.mk
===================================================================
--- compat-wireless.orig/config.mk
+++ compat-wireless/config.mk
@@ -383,6 +383,10 @@ ifdef CONFIG_USB_NET_CDCETHER
CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
endif #CONFIG_USB_NET_CDCETHER
+ifdef CONFIG_USB_NET_CDCETHER_MODULE
+CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
+CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
+endif #CONFIG_USB_NET_CDCETHER
CONFIG_USB_NET_COMPAT_CDCETHER=m
endif #CONFIG_COMPAT_KERNEL_29



2010-11-23 22:30:08

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH] compat-wireless: fix activesync devices

On Tue, Nov 23, 2010 at 12:39 PM, Sven-Haegar Koch <[email protected]> wrote:
>
> Compiling support for ActiveSync devices in compat-wireless depends
> on USB_NET_CDCETHER to be set in main kernel.
>
> But USB_NET_CDCETHER can also be a module, in which case
> CONFIG_USB_NET_CDCETHER will not be defined inside compat_autoconf.h and
> the compat-wireless cdc_ether.ko will miss the support for it.
>
> So check also for CONFIG_USB_NET_CDCETHER_MODULE in config.mk to be safe
> in both cases.
>
> Signed-off-by: Sven-Haegar Koch <[email protected]>
> ---
>
> I needed to also use an old windows mobile device (Palm Treo 750)
> connected over USB with my laptop which otherwise uses compat-wireless.
>
> But after connecting it I only got:
>        usb 2-1: bad CDC descriptors
>
> This happens when in drivers/net/usb/cdc_ether.c
> CONFIG_USB_NET_COMPAT_RNDIS_HOST and
> CONFIG_USB_NET_COMPAT_RNDIS_HOST_MODULE both are not defined, because it
> stubs out the rndis_host support.
>
> Perhaps not the most visually pleasing solution to just include the
> ifdef block in config.mk twice, but everything else would have needed a
> much deeper surgery - and as this is the only usage of ifdef in
> compat.mk where the symbol can also be a module I did not find it to be
> worth the additional complexity.
>
> Tested with compat-wireless-2.6.36-5-spn.tar.bz2, but also happened with
> earlier versions and should also apply to newer.

Thanks applied to the latest (always first) and will later push out a
new release for 2.6.36.

Luis