For PCI and PLX, removed the dependency on the pcmcia-cs code. Now folks

who only want a PCI or PLX driver won't be required to install pcmcia-cs.
This commit is contained in:
mark 2001-08-27 18:49:40 +00:00
parent 116b756ceb
commit 229bcb0ab4
7 changed files with 38 additions and 11 deletions

View file

@ -1,7 +1,7 @@
WLAN_VERSION=0
WLAN_PATCHLEVEL=1
WLAN_SUBLEVEL=9
WLAN_EXTRAVERSION=-pre1
WLAN_EXTRAVERSION=
LINUX_SRC=/usr/src/linux
WLAN_TARGET_ARCH=
PCMCIA_SRC=

View file

@ -45,9 +45,9 @@
include ../config.mk
DIRS=p80211 prism2 shared wlanctl wland nwepgen \
skeleton mkmeta wlancfg
mkmeta wlancfg
ALL_DIRS=mkmeta p80211 prism2 shared wlanctl wland \
nwepgen skeleton wlancfg
nwepgen wlancfg
ifneq ($(wildcard *.addon),)
DIRS+=`cat *.addon`

View file

@ -77,6 +77,7 @@
#include <linux/delay.h>
#include <asm/byteorder.h>
#if (WLAN_HOSTIF == WLAN_PCMCIA)
#include <pcmcia/config.h>
#include <pcmcia/k_compat.h>
#include <pcmcia/version.h>
@ -86,6 +87,7 @@
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/driver_ops.h>
#endif
/*================================================================*/
/* Project Includes */
@ -692,8 +694,11 @@ int prism2mgmt_reset(wlandevice_t *wlandev, void *msgp)
prism2sta_priv_t *priv = (prism2sta_priv_t*)wlandev->priv;
hfa384x_t *hw = priv->hw;
p80211msg_dot11req_reset_t *msg = msgp;
#if (WLAN_HOSTIF==WLAN_PCMCIA)
dev_node_t node;
#elif (WLAN_HOSTIF==WLAN_PLX || WLAN_HOSTIF==WLAN_PCI)
char name[WLAN_DEVNAMELEN_MAX];
#endif
DBFENTER;
/* This is supported on both AP and STA */
@ -723,9 +728,17 @@ int prism2mgmt_reset(wlandevice_t *wlandev, void *msgp)
hfa384x_create( hw, hw->irq, hw->iobase, hw->membase);
/* Save a few vars, zero the priv structure and call initmac */
#if (WLAN_HOSTIF==WLAN_PCMCIA)
node = priv->node;
#elif (WLAN_HOSTIF==WLAN_PLX || WLAN_HOSTIF==WLAN_PCI)
memcpy(name, priv->name, WLAN_DEVNAMELEN_MAX);
#endif
memset(priv, 0, sizeof(priv));
#if (WLAN_HOSTIF==WLAN_PCMCIA)
priv->node = node;
#elif (WLAN_HOSTIF==WLAN_PLX || WLAN_HOSTIF==WLAN_PCI)
memcpy(priv->name, name, WLAN_DEVNAMELEN_MAX);
#endif
priv->hw = hw;
prism2sta_initmac(wlandev);

View file

@ -70,6 +70,7 @@
#include <linux/delay.h>
#include <asm/byteorder.h>
#if (WLAN_HOSTIF==WLAN_PCMCIA)
#include <pcmcia/config.h>
#include <pcmcia/k_compat.h>
#include <pcmcia/version.h>
@ -79,6 +80,7 @@
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/driver_ops.h>
#endif
/*================================================================*/
/* Project Includes */

View file

@ -68,6 +68,7 @@
#include <linux/delay.h>
#include <asm/byteorder.h>
#if (WLAN_HOSTIF == WLAN_PCMCIA)
#include <pcmcia/config.h>
#include <pcmcia/k_compat.h>
#include <pcmcia/version.h>
@ -77,6 +78,11 @@
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#include <pcmcia/driver_ops.h>
#endif
#if ((WLAN_HOSTIF == WLAN_PLX) || (WLAN_HOSTIF == WLAN_PCI))
#include <linux/pci.h>
#endif
/*================================================================*/
/* Project Includes */
@ -94,9 +100,6 @@
#include <prism2/hfa384x.h>
#include <prism2/prism2mgmt.h>
#if ((WLAN_HOSTIF == WLAN_PLX) || (WLAN_HOSTIF == WLAN_PCI))
#include <linux/pci.h>
#endif
/*================================================================*/
/* Local Constants */
@ -155,8 +158,10 @@
#define DRIVER_SUFFIX "_cs"
#elif (WLAN_HOSTIF == WLAN_PLX)
#define DRIVER_SUFFIX "_plx"
typedef char* dev_info_t;
#elif (WLAN_HOSTIF == WLAN_PCI)
#define DRIVER_SUFFIX "_pci"
typedef char* dev_info_t;
/* #else , TODO: Fix .depend generation for multiple driver build */
/* #error "HOSTIF unsupported or undefined!" */
#endif
@ -335,7 +340,7 @@ static void prism2sta_reset(wlandevice_t *wlandev );
static int prism2sta_txframe(wlandevice_t *wlandev, wlan_pb_t *pb);
static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg);
static void prism2sta_interrupt IRQ(int irq, void *dev_id, struct pt_regs *regs);
static void prism2sta_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void prism2sta_int_dtim(wlandevice_t *wlandev);
static void prism2sta_int_infdrop(wlandevice_t *wlandev);
static void prism2sta_int_info(wlandevice_t *wlandev);
@ -2176,7 +2181,7 @@ void prism2sta_inf_psusercnt( wlandevice_t *wlandev, hfa384x_InfFrame_t *inf)
* Call context:
* Ummm, could it be interrupt?
----------------------------------------------------------------*/
void prism2sta_interrupt IRQ(int irq, void *dev_id, struct pt_regs *regs)
void prism2sta_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
int reg;
wlandevice_t *wlandev = (wlandevice_t*)dev_id;
@ -3590,7 +3595,7 @@ static int prism2sta_probe_pci(struct pci_dev *pdev,
wlandev->mlmerequest = &prism2sta_mlmerequest;
/* Set up the remaining entries in the wlan common way */
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->node.dev_name;
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->name;
if ( wlan_setup(wlandev) != 0 ) {
kfree_s(priv->hw, sizeof(hfa384x_t));
kfree_s(wlandev->priv, sizeof(prism2sta_priv_t));
@ -3781,7 +3786,8 @@ static int prism2sta_probe_plx(struct pci_dev *pdev,
wlandev->mlmerequest = &prism2sta_mlmerequest;
/* Set up the remaining entries in the wlan common way */
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->node.dev_name;
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->name;
wlandev->name[0] = '\0';
if ( wlan_setup(wlandev) != 0 ) {
kfree_s(priv->hw, sizeof(hfa384x_t));
kfree_s(wlandev->priv, sizeof(prism2sta_priv_t));

View file

@ -114,7 +114,11 @@ typedef struct prism2sta_accesslist
typedef struct prism2sta_priv
{
#if (WLAN_HOSTIF == WLAN_PCMCIA)
dev_node_t node;
#elif (WLAN_HOSTIF==WLAN_PLX || WLAN_HOSTIF==WLAN_PCI)
char name[WLAN_DEVNAMELEN_MAX];
#endif
/* Structure for MAC data */
hfa384x_t *hw;

View file

@ -45,9 +45,11 @@
* --------------------------------------------------------------------
*/
#if 0
#ifndef __linux__
#include <pcmcia/u_compat.h>
#endif
#endif
#include <stdio.h>
#include <stdlib.h>