rfloeter's Wireless Extensions patch.

This commit is contained in:
mark 2001-12-13 21:19:33 +00:00
parent 416e9f0595
commit 2e2091c9aa
9 changed files with 72 additions and 7 deletions

View File

@ -42,6 +42,11 @@
*
* --------------------------------------------------------------------
0.1.13
- Added rfloeter's cool Wireless Extensions patch which was kindly
updated to 0.1.12 by pizza. Note that my own testing of this patch has
been minimal but I've had reports of folks who are using it successfully.
NOTE: The addition of this patch adds the requirement that Wireless
Extensions (version >= 10) be compiled into one's kernel.
- DOH! some somewhat kind soul on the lists pointed out that the keygen
program wasn't in the distributed tarball. Basically, I forgot to
check it into CVS, therefore the distribution build script couldn't

1
THANKS
View File

@ -63,6 +63,7 @@ Ben Gertzfield <che@debian.org>
Daniel Lyddy <sprocket@path.berkeley.edu>
Bryan Smith <b.j.smith@ieee.org>
Stuffed Crust <pizza@shaftnet.org>
Reyk Floeter <reyk@synack.de>
[Many, many more. If I've overlooked you and you want to be listed here,
send me e-mail and I'll fix it. I _know_ a bunch of linux-wlan contributors

View File

@ -53,6 +53,7 @@
*/
#ifndef _LINUX_P80211CONV_H
#define _LINUX_P80211CONV_H
/*================================================================*/
/* Constants */

View File

@ -51,6 +51,7 @@
*/
#ifndef _LINUX_P80211NETDEV_H
#define _LINUX_P80211NETDEV_H
/*================================================================*/
/* Constants */
@ -128,6 +129,19 @@ typedef struct p80211_frmrx_t
UINT32 data_unknown;
} p80211_frmrx_t;
/* compatibility to wireless extensions */
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#include <linux/wireless.h>
#if WIRELESS_EXT > 10
typedef struct iw_statistics iw_stats;
/* called by /proc/net/wireless */
iw_stats* p80211wext_get_wireless_stats(struct net_device *dev);
/* check for a wireless extension- compatible ioctl */
int p80211wext_check_ioctl(int cmd);
/* wireless extensions' ioctls */
int p80211wext_support_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
#endif
#endif /* wireless extensions */
/* WLAN device type */
typedef struct wlandevice
@ -175,6 +189,15 @@ typedef struct wlandevice
/* 802.11 device statistics */
struct p80211_frmrx_t rx;
/* compatibility to wireless extensions */
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#if WIRELESS_EXT > 10
iw_stats* (*get_wireless_stats)(struct net_device *dev);
iw_stats wstats; /* Wireless-specific statistics */
int (*support_ioctl)(struct net_device *dev, struct iwreq *iwr, int cmd);
#endif
#endif
} wlandevice_t;

View File

@ -46,6 +46,7 @@
*/
#ifndef _LINUX_P80211REQ_H
#define _LINUX_P80211REQ_H
/*================================================================*/
/* Constants */

View File

@ -84,13 +84,16 @@ P80211_MODULE=p80211.o
P80211_SRC= p80211conv.c \
p80211req.c \
p80211frm.c \
p80211wext.c \
p80211netdev.c \
p80211mod.c
p80211mod.c
P80211_OBJ= p80211conv.o \
p80211req.o \
p80211frm.o \
p80211wext.o \
p80211netdev.o \
p80211mod.o
p80211mod.o
# List of modules to build
MODULES=
@ -143,7 +146,7 @@ clean:
rm -f core core.* *.o .*.o *.s *.a .depend tmp_make *~ tags
rm -fr $(OBJ_DIR)
rm -fr $(MODULES)
#
# Include a dependency file (if one exists)
#

View File

@ -556,6 +556,19 @@ int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
goto bail;
}
/* compatibility to wireless extensions */
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#if WIRELESS_EXT > 10
/* to be or not to be a wireless extension- compatible ioctl */
if(p80211wext_check_ioctl(cmd)) {
if((result = p80211wext_support_ioctl(dev, ifr, cmd))
!= (-EOPNOTSUPP)) {
return result;
}
}
#endif
#endif
/* Test the magic, assume ifr is good if it's there */
if ( req->magic != P80211_IOCTL_MAGIC ) {
result = -ENOSYS;
@ -650,6 +663,14 @@ int wlan_setup(wlandevice_t *wlandev)
dev->open = &p80211knetdev_open;
dev->stop = &p80211knetdev_stop;
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#if WIRELESS_EXT > 10
/* called by /proc/net/wireless */
dev->get_wireless_stats = &p80211wext_get_wireless_stats;
#endif
#endif
#if (LINUX_VERSION_CODE < WLAN_KVERSION(2,3,38) )
dev->tbusy = 1;
#endif

View File

@ -94,17 +94,20 @@ PLX_MODULE=prism2_plx.o
PCI_MODULE=prism2_pci.o
USB_MODULE=prism2_usb.o
CS_OBJ= $(CS_OBJ_DIR)/prism2sta.o \
CS_OBJ= $(CS_OBJ_DIR)/prism2wext.o \
$(CS_OBJ_DIR)/prism2sta.o \
$(CS_OBJ_DIR)/prism2mgmt.o \
$(CS_OBJ_DIR)/prism2mib.o \
$(CS_OBJ_DIR)/hfa384x.o
PLX_OBJ= $(PLX_OBJ_DIR)/prism2sta.o \
PLX_OBJ= $(PLX_OBJ_DIR)/prism2wext.o \
$(PLX_OBJ_DIR)/prism2sta.o \
$(PLX_OBJ_DIR)/prism2mgmt.o \
$(PLX_OBJ_DIR)/prism2mib.o \
$(PLX_OBJ_DIR)/hfa384x.o
PCI_OBJ= $(PCI_OBJ_DIR)/prism2sta.o \
PCI_OBJ= $(PLX_OBJ_DIR)/prism2wext.o \
$(PCI_OBJ_DIR)/prism2sta.o \
$(PCI_OBJ_DIR)/prism2mgmt.o \
$(PCI_OBJ_DIR)/prism2mib.o \
$(PCI_OBJ_DIR)/hfa384x.o

View File

@ -104,7 +104,7 @@
#include <wlan/p80211metastruct.h>
#include <prism2/hfa384x.h>
#include <prism2/prism2mgmt.h>
#include <prism2/prism2wext.h>
/*================================================================*/
/* Local Constants */
@ -2360,6 +2360,13 @@ dev_link_t *prism2sta_attach(void)
wlandev->txframe = &prism2sta_txframe;
wlandev->mlmerequest = &prism2sta_mlmerequest;
#if defined(__LINUX_WLAN__) && defined (__KERNEL__)
#if WIRELESS_EXT > 10
wlandev->get_wireless_stats = &prism2wext_get_wireless_stats;
wlandev->support_ioctl = &prism2wext_support_ioctl;
#endif
#endif
/* Set up the remaining entries in the wlan common way */
wlandev->name = ((prism2sta_priv_t*)wlandev->priv)->node.dev_name;
wlan_setup(wlandev);