From 683b13dd753bca2e8234af0689e22980cf819800 Mon Sep 17 00:00:00 2001 From: solomon Date: Mon, 26 Sep 2005 19:42:47 +0000 Subject: [PATCH] Fixes for 2.6.14+ kernels. --- CHANGES | 1 + src/include/wlan/wlan_compat.h | 4 ++++ src/p80211/Makefile | 2 +- src/p80211/p80211conv.c | 3 +-- src/p80211/p80211frm.c | 1 + src/p80211/p80211mod.c | 2 +- src/p80211/p80211req.c | 11 +++++++---- src/p80211/p80211wep.c | 1 + src/prism2/driver/hfa384x_usb.c | 6 +++--- src/version.h.in | 1 + 10 files changed, 21 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 1c77e3a..79c6271 100644 --- a/CHANGES +++ b/CHANGES @@ -41,6 +41,7 @@ * Intersil Corporation as part of PRISM(R) chipset product development. * * -------------------------------------------------------------------- + - Build fixes for 2.6.14+ - Change the type of 'request_pending' to take care of warnings. - Fixes for warnings generated by the 'sparse' tool (Richard Kennedy) - Add an explicit README.firmware containing copyright information diff --git a/src/include/wlan/wlan_compat.h b/src/include/wlan/wlan_compat.h index 771a3de..1ddc1bc 100644 --- a/src/include/wlan/wlan_compat.h +++ b/src/include/wlan/wlan_compat.h @@ -568,6 +568,10 @@ typedef void irqreturn_t; #define in_atomic() 0 #endif +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)) +#define URB_ASYNC_UNLINK 0 +#endif + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)) #define URB_ASYNC_UNLINK USB_ASYNC_UNLINK #define usb_fill_bulk_urb FILL_BULK_URB diff --git a/src/p80211/Makefile b/src/p80211/Makefile index f3d3639..6f7363f 100644 --- a/src/p80211/Makefile +++ b/src/p80211/Makefile @@ -50,7 +50,7 @@ endif ifneq ($(KERNELRELEASE),) -EXTRA_CFLAGS += -I$(WLAN_SRC)/include $(WLAN_INCLUDE_DEBUG) +EXTRA_CFLAGS += -I$(WLAN_SRC)/include $(WLAN_INCLUDE_DEBUG) -DWLAN_HOSTIF=WLAN_NONE ifeq ($(KERN_25), y) diff --git a/src/p80211/p80211conv.c b/src/p80211/p80211conv.c index 5b24621..54bfc1e 100644 --- a/src/p80211/p80211conv.c +++ b/src/p80211/p80211conv.c @@ -70,13 +70,12 @@ #include +#include #include - /*================================================================*/ /* Project Includes */ -#include #include #include #include diff --git a/src/p80211/p80211frm.c b/src/p80211/p80211frm.c index 398e6bf..4d0771e 100644 --- a/src/p80211/p80211frm.c +++ b/src/p80211/p80211frm.c @@ -65,6 +65,7 @@ #include #include +#include #include /*================================================================*/ diff --git a/src/p80211/p80211mod.c b/src/p80211/p80211mod.c index 3fefb37..e209853 100644 --- a/src/p80211/p80211mod.c +++ b/src/p80211/p80211mod.c @@ -70,12 +70,12 @@ #include #include +#include #include /*================================================================*/ /* Project Includes */ -#include #include #include #include diff --git a/src/p80211/p80211req.c b/src/p80211/p80211req.c index 3a59e09..2945a66 100644 --- a/src/p80211/p80211req.c +++ b/src/p80211/p80211req.c @@ -53,8 +53,6 @@ /*================================================================*/ /* System Includes */ -#define __NO_VERSION__ /* prevent the static definition */ - #include #include @@ -70,12 +68,12 @@ #include #include +#include #include /*================================================================*/ /* Project Includes */ -#include #include #include #include @@ -351,8 +349,13 @@ int p80211req_mibset_mibget(wlandevice_t *wlandev, p80211msg_dot11req_mibget_t * void p80211indicate_init(void) { DBFENTER; - nl_indicate = +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)) netlink_kernel_create( P80211_NL_SOCK_IND, &p80211ind_rx); +#else + nl_indicate = + netlink_kernel_create( P80211_NL_SOCK_IND, P80211_NL_MCAST_GRP_MLME, &p80211ind_rx, THIS_MODULE); + +#endif if ( nl_indicate == NULL ) { WLAN_LOG_DEBUG(2,"Failed to create indicate netlink i/f.\n"); } diff --git a/src/p80211/p80211wep.c b/src/p80211/p80211wep.c index 7cae98e..123a572 100644 --- a/src/p80211/p80211wep.c +++ b/src/p80211/p80211wep.c @@ -56,6 +56,7 @@ #include #include +#include #include // #define WEP_DEBUG diff --git a/src/prism2/driver/hfa384x_usb.c b/src/prism2/driver/hfa384x_usb.c index f4faf0f..0cae22c 100644 --- a/src/prism2/driver/hfa384x_usb.c +++ b/src/prism2/driver/hfa384x_usb.c @@ -2108,7 +2108,7 @@ hfa384x_dormem( ctlx->outbuf.rmemreq.offset, ctlx->outbuf.rmemreq.page); - WLAN_LOG_DEBUG(4,"pktsize=%d\n", + WLAN_LOG_DEBUG(4,"pktsize=%ld\n", ROUNDUP64(sizeof(ctlx->outbuf.rmemreq))); ctlx->reapable = mode; @@ -3131,7 +3131,7 @@ int hfa384x_drvr_readpda(hfa384x_t *hw, void *buf, UINT len) if (result) { WLAN_LOG_WARNING( - "Read from index %d failed, continuing\n", + "Read from index %ld failed, continuing\n", i ); continue; } @@ -4320,7 +4320,7 @@ static void hfa384x_int_rxmonitor( wlandevice_t *wlandev, hfa384x_usb_rxfrm_t *r if ( skblen > (sizeof(p80211msg_lnxind_wlansniffrm_t) + WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN) ) { - WLAN_LOG_DEBUG(1, "overlen frm: len=%d\n", + WLAN_LOG_DEBUG(1, "overlen frm: len=%ld\n", skblen - sizeof(p80211msg_lnxind_wlansniffrm_t)); } diff --git a/src/version.h.in b/src/version.h.in index 56f1fb9..b8bfd99 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -50,6 +50,7 @@ #endif /* WLAN_HOSTIF (generally set on the command line, not detected) */ +#define WLAN_NONE 0 #define WLAN_PCMCIA 1 #define WLAN_ISA 2 #define WLAN_PCI 3