Added some fixes for the rpxlite combination of kernel and pcmcia-cs. Mostly

related to the updates for 2.3.x/2.4.x.
This commit is contained in:
mark 2000-06-21 13:10:54 +00:00
parent 64dc35cae6
commit 0b5cf907dc
4 changed files with 20 additions and 18 deletions

View file

@ -69,15 +69,15 @@
/* struct device from linux/netdevice.h */
/* Not exactly sure when this changed.... */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38))
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38))
typedef struct device netdevice_t;
#else
typedef struct net_device netdevice_t;
#endif
#ifndef _LINUX_K_COMPAT_H
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1))
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,16))
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,1))
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,0,16))
#define init_waitqueue_head(p) (*(p) = NULL)
#else
#define init_waitqueue_head(p) init_waitqueue(p)

View file

@ -590,6 +590,8 @@ typedef signed int INT;
#define wlan_max(a, b) (((a) > (b)) ? (a) : (b))
#define wlan_min(a, b) (((a) < (b)) ? (a) : (b))
#define WLAN_KVERSION(a,b,c) (((a)<<16)+((b)<<8)+(c))
/*=============================================================*/
/*--- Variables -----------------------------------------------*/
/*=============================================================*/

View file

@ -218,7 +218,7 @@ int p80211knetdev_open( netdevice_t *netdev )
if ( wlandev->open != NULL) {
result = (*(wlandev->open))(wlandev);
if ( result == 0 ) {
#if ( LINUX_VERSION_CODE < KERNEL_VERSION(2,3,43) )
#if ( LINUX_VERSION_CODE < WLAN_KVERSION(2,3,43) )
/* set the device flags */
netdev->tbusy = 0;
netdev->interrupt = 0;
@ -259,7 +259,7 @@ int p80211knetdev_stop( netdevice_t *netdev )
result = (*(wlandev->close))(wlandev);
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
/* To make sure noone tries to send us something, just force */
/* tbusy to true */
netdev->tbusy = 1;
@ -295,7 +295,7 @@ void p80211netdev_rx(wlandevice_t *wlandev, wlan_pb_t *pb)
DBFENTER;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
if (dev->start) {
#else
if (dev->flags & IFF_UP ) {
@ -354,7 +354,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
DBFENTER;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
if (netdev->start == 0) {
#else
if ((netdev->flags & IFF_UP) == 0 ) {
@ -362,7 +362,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
return 1;
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
if ( test_and_set_bit(0, (void*)&(netdev->tbusy)) != 0 ) {
/* We've been called w/ tbusy set, has the tx */
/* path stalled? */
@ -414,7 +414,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
if ( txresult == 0) {
/* success and more buf */
/* avail, re: hw_txdata */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
netdev->tbusy = 0;
#else
netif_wake_queue(netdev);
@ -429,7 +429,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
} else if ( txresult == 2 ) {
/* alloc failure, drop frame */
WLAN_LOG_DEBUG0(3, "txframe returned alloc_fail\n");
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
netdev->tbusy = 0;
#else
netif_wake_queue(netdev);
@ -441,7 +441,7 @@ int p80211knetdev_hard_start_xmit( struct sk_buff *skb, netdevice_t *netdev)
} else {
/* buffer full or queue busy */
WLAN_LOG_DEBUG0(3, "txframe returned full or busy\n");
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
netdev->tbusy = 0;
#else
netif_wake_queue(netdev);
@ -611,10 +611,10 @@ int wlan_setup(wlandevice_t *wlandev)
dev->open = &p80211knetdev_open;
dev->stop = &p80211knetdev_stop;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
dev->tbusy = 1;
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,99) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,99) )
dev->name = wlandev->name;
#endif
ether_setup(dev);
@ -698,7 +698,7 @@ int register_wlandev(wlandevice_t *wlandev)
i = wlandev_get_index(wlandev);
}
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,99) )
#if ( LINUX_VERSION_CODE >= WLAN_KVERSION(2,3,99) )
strcpy(dev->name, wlandev->name);
#endif

View file

@ -2008,7 +2008,7 @@ void prism2sta_int_alloc(wlandevice_t *wlandev)
txfid_push(priv, wlan_inw_le16_to_cpu(HFA384x_ALLOCFID(hw->iobase)));
/* clear tbusy (if set) */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
wlandev->netdev->tbusy = 0;
mark_bh(NET_BH);
#else
@ -2560,7 +2560,7 @@ static int prism2sta_event (event_t event, int priority, event_callback_args_t *
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG)
{
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
wlandev->netdev->tbusy = 1;
wlandev->netdev->start = 0;
#else
@ -2591,7 +2591,7 @@ static int prism2sta_event (event_t event, int priority, event_callback_args_t *
link->state |= DEV_SUSPEND;
if (link->state & DEV_CONFIG)
{
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
wlandev->netdev->tbusy = 1;
wlandev->netdev->start = 0;
#else
@ -2614,7 +2614,7 @@ static int prism2sta_event (event_t event, int priority, event_callback_args_t *
WLAN_LOG_ERROR0("MAC Initialization failed.\n");
result = 1;
} else {
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38) )
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
wlandev->netdev->tbusy = 0;
wlandev->netdev->start = 1;
#else