Support 2.6.22 kernels.
Original patch by Tormod Volden, but modified somewhat to support older kernels.
This commit is contained in:
parent
7ad827def4
commit
15790a3412
1
CHANGES
1
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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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=
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue