diff --git a/CHANGES b/CHANGES index 50c397c..d7b51f2 100644 --- a/CHANGES +++ b/CHANGES @@ -42,6 +42,12 @@ * * -------------------------------------------------------------------- 0.1.12 + - proskin's patches for netlink disable when not configured in kernel, + mkprintstr fix, and turn off skeleton install. The netlink patch + pointed out something that might be the root cause of some problems + with the _cs driver. pcmcia_cs now strips the kernel CONFIG items + it cares about and puts them in it's own include/linux/config.h + (which is symlinked to include/pcmcia/config.h). - Added mtaylor's suggested close() to do_ioctl() in wlanctl. - Added mkarmak's suggested change for the GL24110P device ID as PCI_DEVICE_GL24110P_ALT and an additional item in the device table diff --git a/Configure b/Configure index 995f764..2558e3e 100755 --- a/Configure +++ b/Configure @@ -370,6 +370,16 @@ if [ $PRISM2_PCMCIA = "y" ] ; then TARGET_PCMCIA_DIR=$TARGET_ROOT_ON_HOST$PCMCIA_DIR write_str TARGET_PCMCIA_DIR $ECHO "" + + # Test for netlink availability in the kernel + if grep "#define.*CONFIG_NETLINK.*1" ; then + CONFIG_NETLINK=y + write_bool CONFIG_NETLINK + else + CONFIG_NETLINK=n + write_bool CONFIG_NETLINK + fi + fi #======================================================================= # Alternate target install root dir - the value of this variable diff --git a/TODO b/TODO index d2a007d..ecd064e 100644 --- a/TODO +++ b/TODO @@ -43,7 +43,10 @@ * -------------------------------------------------------------------- Linux WLAN NG TODO - +- [CS] Need to look at the pcmcia_cs/include/linux/config.h issue. + David's overriding our include of the kernel config with his collection + of config items that pcmcia_cs cares about. Unfortunately, there's at + least one item we need (CONFIG_NETLINK) that pcmcia_cs isn't picking up. - [USB] Integrate with usbmgr and new hotplug subsystem. - [USB] Remove driver's port-reset when new primary firmware becomes available. diff --git a/src/include/wlan/p80211req.h b/src/include/wlan/p80211req.h index ba9cbca..414c318 100644 --- a/src/include/wlan/p80211req.h +++ b/src/include/wlan/p80211req.h @@ -64,11 +64,13 @@ int p80211req_dorequest(wlandevice_t *wlandev, UINT8 *msgbuf); void p80211req_confirm(wlandevice_t *wlandev); +#ifdef CONFIG_NETLINK void p80211indicate( wlandevice_t *wlandev, p80211msg_t *msg, int len); void p80211indicate_init(void); void p80211indicate_shutdown(void); void p80211ind_mlme( wlandevice_t *wlandev, struct sk_buff *skb); void p80211ind_sniff( wlandevice_t *wlandev, struct sk_buff *skb); void p80211ind_distribution( wlandevice_t *wlandev, struct sk_buff *skb); +#endif /* CONFIG_NETLINK */ #endif diff --git a/src/include/wlan/wlan_compat.h b/src/include/wlan/wlan_compat.h index 7ab0eb0..f2a0e7d 100644 --- a/src/include/wlan/wlan_compat.h +++ b/src/include/wlan/wlan_compat.h @@ -690,8 +690,8 @@ typedef signed int INT; } else { \ (str)[j] = '\\'; \ (str)[j+1] = 'x'; \ - (str)[j+2] = wlan_hexchar(((str)[i] & 0xf0) >> 4); \ - (str)[j+3] = wlan_hexchar(((str)[i] & 0x0f)); \ + (str)[j+2] = wlan_hexchar(((buf)[i] & 0xf0) >> 4); \ + (str)[j+3] = wlan_hexchar(((buf)[i] & 0x0f)); \ j += 4; \ } \ } \ diff --git a/src/p80211/p80211mod.c b/src/p80211/p80211mod.c index e03d7e8..395b42f 100644 --- a/src/p80211/p80211mod.c +++ b/src/p80211/p80211mod.c @@ -145,7 +145,11 @@ int init_module(void) #endif p80211netdev_startup(); +#ifdef CONFIG_NETLINK p80211indicate_init(); +#else +#warning "CONFIG_NETLINK not enabled, not compiling sniffing/indication code" +#endif DBFEXIT; return 0; @@ -175,7 +179,9 @@ void cleanup_module(void) { DBFENTER; +#ifdef CONFIG_NETLINK p80211indicate_shutdown(); +#endif printk(KERN_NOTICE "%s Unloaded\n", version); DBFEXIT; diff --git a/src/p80211/p80211req.c b/src/p80211/p80211req.c index bdd057c..7c46b4a 100644 --- a/src/p80211/p80211req.c +++ b/src/p80211/p80211req.c @@ -100,15 +100,19 @@ typedef void (*timerfunc_t)(unsigned long); /*================================================================*/ /* Local Static Definitions */ +#ifdef CONFIG_NETLINK /* Netlink interface(s) */ static struct sock *nl_indicate = NULL; +#endif /*================================================================*/ /* Local Function Declarations */ static void p80211req_timerfunc(wlandevice_t *wlandev); static void p80211req_handlemsg( wlandevice_t *wlandev, p80211msg_t *msg); +#ifdef CONFIG_NETLINK static void p80211ind_rx(struct sock *sk, int len); +#endif /*================================================================*/ /* Function Definitions */ @@ -277,6 +281,7 @@ void p80211req_confirm(wlandevice_t *wlandev) } +#ifdef CONFIG_NETLINK /*---------------------------------------------------------------- * p80211indicate_init * @@ -451,3 +456,4 @@ void p80211ind_distribution( wlandevice_t *wlandev, struct sk_buff *skb) DBFEXIT; return; } +#endif /* CONFIG_NETLINK */ diff --git a/src/skeleton/Makefile b/src/skeleton/Makefile index 8f63dc0..9d77caa 100644 --- a/src/skeleton/Makefile +++ b/src/skeleton/Makefile @@ -135,9 +135,10 @@ $(SKEL_MODULE) : $(SKEL_OBJ) $(LD) -r -o $@ $(SKEL_OBJ) chmod -x $@ +# It's a demo. Don't actually install it. install : $(MODULES) - mkdir -p $(TARGET_MODDIR)/pcmcia - cp $(SKEL_MODULE) $(TARGET_MODDIR)/pcmcia +# mkdir -p $(TARGET_MODDIR)/pcmcia +# cp $(SKEL_MODULE) $(TARGET_MODDIR)/pcmcia clean: rm -f .depend .depend* diff --git a/src/skeleton/skeleton.c b/src/skeleton/skeleton.c index 42133af..b3d186a 100644 --- a/src/skeleton/skeleton.c +++ b/src/skeleton/skeleton.c @@ -208,7 +208,9 @@ int wlanskel_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg) ind->reasoncode.len = 4; ind->reasoncode.data = 1; +#ifdef CONFIG_NETLINK p80211ind_mlme(wlandev, skb); +#endif return 0; }