summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpizza <pizza>2007-06-20 14:45:49 +0000
committerpizza <pizza>2007-06-20 14:45:49 +0000
commit15790a3412e8acb0299520dab0ed9fd45b46eecf (patch)
tree19cc3562e9f7557c67ac4feb5d577e58b4956aec
parent7ad827def4b174e45e6f20f31204ffe790de9b79 (diff)
downloadlinux-wlan-ng-15790a3412e8acb0299520dab0ed9fd45b46eecf.tar.gz
linux-wlan-ng-15790a3412e8acb0299520dab0ed9fd45b46eecf.tar.bz2
linux-wlan-ng-15790a3412e8acb0299520dab0ed9fd45b46eecf.zip
Support 2.6.22 kernels.
Original patch by Tormod Volden, but modified somewhat to support older kernels.
-rw-r--r--CHANGES1
-rwxr-xr-xConfigure4
-rw-r--r--config.in2
-rw-r--r--src/include/wlan/wlan_compat.h4
-rw-r--r--src/p80211/p80211conv.c4
-rw-r--r--src/p80211/p80211netdev.c3
-rw-r--r--src/prism2/driver/hfa384x.c2
-rw-r--r--src/prism2/driver/hfa384x_usb.c2
8 files changed, 16 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index b8d6d64..0d8a429 100644
--- a/CHANGES
+++ b/CHANGES
@@ -41,6 +41,7 @@
* Intersil Corporation as part of PRISM(R) chipset product development.
*
* --------------------------------------------------------------------
+ - Support 2.6.22 kernels
0.2.8
- Fix up a pile of sparse warnings (Pavel Roskin)
- Support 2.6.20 kernels (Pavel Roskin)
diff --git a/Configure b/Configure
index 776e5a6..b10d5b7 100755
--- a/Configure
+++ b/Configure
@@ -277,9 +277,9 @@ if [ $VERSION_CODE -ge `version 2 6 17` ] ; then
fi
write_bool KERN_2_6_17
-if [ $VERSION_CODE -gt `version 2 6 21` ] ; then
+if [ $VERSION_CODE -gt `version 2 6 22` ] ; then
$ECHO "******* WARNING WARNING WARNING *******"
- $ECHO "Kernels newer than 2.6.21.x are not supported."
+ $ECHO "Kernels newer than 2.6.22.x are not supported."
$ECHO "******* WARNING WARNING WARNING *******"
fi
diff --git a/config.in b/config.in
index 9076932..9d4a306 100644
--- a/config.in
+++ b/config.in
@@ -1,6 +1,6 @@
WLAN_VERSION=0
WLAN_PATCHLEVEL=2
-WLAN_SUBLEVEL=8
+WLAN_SUBLEVEL=9
WLAN_EXTRAVERSION=
#LINUX_SRC=/usr/src/linux
PCMCIA_SRC=
diff --git a/src/include/wlan/wlan_compat.h b/src/include/wlan/wlan_compat.h
index ac1dc7b..44d351e 100644
--- a/src/include/wlan/wlan_compat.h
+++ b/src/include/wlan/wlan_compat.h
@@ -500,6 +500,10 @@ create_proc_read_entry(const char *name, mode_t mode,
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+#define skb_reset_mac_header(__a) (__a)->mac.raw = (__a)->data
+#endif
+
#ifndef INIT_WORK
#define work_struct tq_struct
diff --git a/src/p80211/p80211conv.c b/src/p80211/p80211conv.c
index 408d327..53c62e5 100644
--- a/src/p80211/p80211conv.c
+++ b/src/p80211/p80211conv.c
@@ -498,7 +498,11 @@ int skb_p80211_to_ether( wlandevice_t *wlandev, UINT32 ethconv, struct sk_buff *
}
skb->protocol = eth_type_trans(skb, netdev);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,21)
+ skb->mac_header = (unsigned char *) e_hdr; /* new MAC header */
+#else
skb->mac.raw = (unsigned char *) e_hdr; /* new MAC header */
+#endif
/* jkriegl: process signal and noise as set in hfa384x_int_rx() */
/* jkriegl: only process signal/noise if requested by iwspy */
diff --git a/src/p80211/p80211netdev.c b/src/p80211/p80211netdev.c
index 9e51f40..72ee865 100644
--- a/src/p80211/p80211netdev.c
+++ b/src/p80211/p80211netdev.c
@@ -389,7 +389,8 @@ static void p80211netdev_rx_bh(unsigned long arg)
/* set up various data fields */
skb->dev = dev;
- skb->mac.raw = skb->data ;
+ skb_reset_mac_header(skb);
+
skb->ip_summed = CHECKSUM_NONE;
skb->pkt_type = PACKET_OTHERHOST;
skb->protocol = htons(ETH_P_80211_RAW);
diff --git a/src/prism2/driver/hfa384x.c b/src/prism2/driver/hfa384x.c
index 9dc126c..e706e6e 100644
--- a/src/prism2/driver/hfa384x.c
+++ b/src/prism2/driver/hfa384x.c
@@ -3645,7 +3645,7 @@ static void hfa384x_int_rx(wlandevice_t *wlandev)
/* the prism2 cards don't return the FCS */
datap = skb_put(skb, WLAN_CRC_LEN);
memset (datap, 0xff, WLAN_CRC_LEN);
- skb->mac.raw = skb->data;
+ skb_reset_mac_header(skb);
/* Attach the rxmeta, set some stuff */
p80211skb_rxmeta_attach(wlandev, skb);
diff --git a/src/prism2/driver/hfa384x_usb.c b/src/prism2/driver/hfa384x_usb.c
index a2a2d6c..02fc393 100644
--- a/src/prism2/driver/hfa384x_usb.c
+++ b/src/prism2/driver/hfa384x_usb.c
@@ -4255,7 +4255,7 @@ static void hfa384x_usbin_rx(wlandevice_t *wlandev, struct sk_buff *skb)
/* The prism2 series does not return the CRC */
memset(skb_put(skb, WLAN_CRC_LEN), 0xff, WLAN_CRC_LEN);
- skb->mac.raw = skb->data;
+ skb_reset_mac_header(skb);
/* Attach the rxmeta, set some stuff */
p80211skb_rxmeta_attach(wlandev, skb);