cleaning up more wext code.
This commit is contained in:
parent
98f808a276
commit
a6a7930371
|
@ -131,12 +131,10 @@ typedef struct p80211_frmrx_t
|
|||
UINT32 data_unknown;
|
||||
} p80211_frmrx_t;
|
||||
|
||||
/* compatibility to wireless extensions */
|
||||
|
||||
#ifdef WIRELESS_EXT
|
||||
/* called by /proc/net/wireless */
|
||||
struct iw_statistics* p80211wext_get_wireless_stats(netdevice_t *dev);
|
||||
/* check for a wireless extension- compatible ioctl */
|
||||
int p80211wext_check_ioctl(int cmd);
|
||||
/* wireless extensions' ioctls */
|
||||
int p80211wext_support_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd);
|
||||
#endif /* wireless extensions */
|
||||
|
|
|
@ -565,13 +565,11 @@ int p80211knetdev_do_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
|||
|
||||
WLAN_LOG_DEBUG2(2, "rx'd ioctl, cmd=%d, len=%d\n", cmd, req->len);
|
||||
|
||||
|
||||
/* compatibility to wireless extensions */
|
||||
#ifdef WIRELESS_EXT
|
||||
/* 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)) {
|
||||
if ((cmd >= SIOCIWFIRST) && (cmd <= SIOCIWLAST)) {
|
||||
if ((result = p80211wext_support_ioctl(dev, ifr, cmd))
|
||||
!= (-EOPNOTSUPP)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,7 @@
|
|||
/* p80211wext.c -*- linux-c -*-
|
||||
* _ _ ___ _ _ _____ _ _ ___ __ _
|
||||
* | | _ | | / _ \ | | | || ____|| |_| | / _ \ | \ | |
|
||||
* | || || || /_\ || | | || ___| | ___ || /_\ || \| |
|
||||
* | || || || ___ | \ | / | |___ | | | || ___ || |\ |
|
||||
* www.\_/ \_/ |_| |_| \_/ |_____||_| |_||_| |_||_| \__|.de
|
||||
*
|
||||
* Wireless Tools 10+ compatibility for linux-wlan-ng based on code
|
||||
* of wlancfg and orinoco_cs
|
||||
*
|
||||
* author: Reyk Floeter <reyk@synack.de>
|
||||
* home: https://www.wavehan.de/projekte/prism2/
|
||||
* date: 10/04/2001
|
||||
* version: 0.0.4
|
||||
*
|
||||
*
|
||||
* original author: Reyk Floeter <reyk@synack.de>
|
||||
*
|
||||
* This application is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
|
@ -32,9 +21,6 @@
|
|||
/*================================================================*/
|
||||
/* System Includes */
|
||||
|
||||
#define __NO_VERSION__ /* prevent the static definition */
|
||||
#define WAVEHAN 23
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
|
@ -66,7 +52,7 @@
|
|||
#include <wlan/p80211req.h>
|
||||
|
||||
/* compatibility to wireless extensions */
|
||||
#if WIRELESS_EXT > 10
|
||||
#ifdef WIRELESS_EXT
|
||||
|
||||
/** function declarations =============== */
|
||||
|
||||
|
@ -74,14 +60,17 @@
|
|||
struct iw_statistics* p80211wext_get_wireless_stats (netdevice_t *dev)
|
||||
{
|
||||
wlandevice_t *wlandev = (wlandevice_t*)dev->priv;
|
||||
struct iw_statistics* wstats;
|
||||
struct iw_statistics* wstats = NULL;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
/* Check */
|
||||
if (wlandev == NULL)
|
||||
if ( wlandev == NULL )
|
||||
return NULL;
|
||||
|
||||
if ( wlandev->msdstate != WLAN_MSD_RUNNING )
|
||||
return NULL;
|
||||
|
||||
/* forward the request to a hardware- dependent function.
|
||||
* FIX: should it be possible to do abstract MIB- requests (ie. for
|
||||
* getting the link quality) on the p80211- level?!
|
||||
|
@ -95,23 +84,6 @@ struct iw_statistics* p80211wext_get_wireless_stats (netdevice_t *dev)
|
|||
return wstats;
|
||||
}
|
||||
|
||||
/* check for a wireless extension- compatible ioctl.
|
||||
*/
|
||||
int p80211wext_check_ioctl(int cmd)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
DBFENTER;
|
||||
|
||||
if(cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
|
||||
err = 1; /* return true, if we do have a wireless
|
||||
extension- compatible ioctl */
|
||||
}
|
||||
DBFEXIT;
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
/* wireless extensions' ioctls */
|
||||
int p80211wext_support_ioctl(netdevice_t *dev, struct ifreq *ifr, int cmd)
|
||||
{
|
||||
|
|
|
@ -447,9 +447,7 @@ static int prism2wext_getrate(hfa384x_t* hw, struct iw_param *rrq)
|
|||
return err;
|
||||
|
||||
rrq->fixed = 0;
|
||||
#if WIRELESS_EXT > 8
|
||||
rrq->disabled = 0;
|
||||
#endif
|
||||
rrq->value = 0;
|
||||
|
||||
switch (rate) {
|
||||
|
|
Loading…
Reference in a new issue