mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
Staging: otus: remove dependency on WIRELESS_EXT version
As the driver is in mainline now we can remove such dependency. WIRELESS_EXT is 22 now and it is always defined. Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4a5629b92e
commit
92e6765f40
12 changed files with 1 additions and 73 deletions
|
@ -58,9 +58,7 @@
|
||||||
#define ZD_MAX_KEY_SIZE 32
|
#define ZD_MAX_KEY_SIZE 32
|
||||||
#define ZD_MAX_GENERIC_SIZE 64
|
#define ZD_MAX_GENERIC_SIZE 64
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
extern u16_t zfLnxGetVapId(zdev_t *dev);
|
extern u16_t zfLnxGetVapId(zdev_t *dev);
|
||||||
|
|
||||||
|
@ -248,7 +246,6 @@ int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WIRELESS_EXT > 14
|
|
||||||
/*
|
/*
|
||||||
* Encode a WPA or RSN information element as a custom
|
* Encode a WPA or RSN information element as a custom
|
||||||
* element using the hostap format.
|
* element using the hostap format.
|
||||||
|
@ -269,7 +266,6 @@ u32 encode_ie(void *buf, u32 bufsize, const u8 *ie, u32 ielen,
|
||||||
p += sprintf(p, "%02x", ie[i]);
|
p += sprintf(p, "%02x", ie[i]);
|
||||||
return (i == ielen ? p - (u8 *)buf:0);
|
return (i == ielen ? p - (u8 *)buf:0);
|
||||||
}
|
}
|
||||||
#endif /* WIRELESS_EXT > 14 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Translate scan data returned from the card to a card independent
|
* Translate scan data returned from the card to a card independent
|
||||||
|
@ -284,9 +280,7 @@ char *usbdrv_translate_scan(struct net_device *dev,
|
||||||
char *current_val; /* For rates */
|
char *current_val; /* For rates */
|
||||||
char *last_ev;
|
char *last_ev;
|
||||||
int i;
|
int i;
|
||||||
#if WIRELESS_EXT > 14
|
char buf[64*2 + 30];
|
||||||
char buf[64*2 + 30];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
last_ev = current_ev;
|
last_ev = current_ev;
|
||||||
|
|
||||||
|
@ -365,10 +359,8 @@ char *usbdrv_translate_scan(struct net_device *dev,
|
||||||
|
|
||||||
/* Add quality statistics */
|
/* Add quality statistics */
|
||||||
iwe.cmd = IWEVQUAL;
|
iwe.cmd = IWEVQUAL;
|
||||||
#if WIRELESS_EXT > 18
|
|
||||||
iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED
|
iwe.u.qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED
|
||||||
| IW_QUAL_NOISE_UPDATED;
|
| IW_QUAL_NOISE_UPDATED;
|
||||||
#endif
|
|
||||||
iwe.u.qual.level = list->signalStrength;
|
iwe.u.qual.level = list->signalStrength;
|
||||||
iwe.u.qual.noise = 0;
|
iwe.u.qual.noise = 0;
|
||||||
iwe.u.qual.qual = list->signalQuality;
|
iwe.u.qual.qual = list->signalQuality;
|
||||||
|
@ -441,7 +433,6 @@ char *usbdrv_translate_scan(struct net_device *dev,
|
||||||
/* Check if we added any event */
|
/* Check if we added any event */
|
||||||
if ((current_val - current_ev) > IW_EV_LCP_LEN)
|
if ((current_val - current_ev) > IW_EV_LCP_LEN)
|
||||||
current_ev = current_val;
|
current_ev = current_val;
|
||||||
#if WIRELESS_EXT > 14
|
|
||||||
#define IEEE80211_ELEMID_RSN 0x30
|
#define IEEE80211_ELEMID_RSN 0x30
|
||||||
memset(&iwe, 0, sizeof(iwe));
|
memset(&iwe, 0, sizeof(iwe));
|
||||||
iwe.cmd = IWEVCUSTOM;
|
iwe.cmd = IWEVCUSTOM;
|
||||||
|
@ -503,7 +494,6 @@ char *usbdrv_translate_scan(struct net_device *dev,
|
||||||
last_ev = current_ev;
|
last_ev = current_ev;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/* The other data in the scan result are not really
|
/* The other data in the scan result are not really
|
||||||
* interesting, so for now drop it
|
* interesting, so for now drop it
|
||||||
*/
|
*/
|
||||||
|
@ -697,12 +687,9 @@ int usbdrvwext_giwrange(struct net_device *dev,
|
||||||
if (!netif_running(dev))
|
if (!netif_running(dev))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
#if WIRELESS_EXT > 9
|
|
||||||
range->txpower_capa = IW_TXPOW_DBM;
|
range->txpower_capa = IW_TXPOW_DBM;
|
||||||
/* XXX what about min/max_pmp, min/max_pmt, etc. */
|
/* XXX what about min/max_pmp, min/max_pmt, etc. */
|
||||||
#endif
|
|
||||||
|
|
||||||
#if WIRELESS_EXT > 10
|
|
||||||
range->we_version_compiled = WIRELESS_EXT;
|
range->we_version_compiled = WIRELESS_EXT;
|
||||||
range->we_version_source = 13;
|
range->we_version_source = 13;
|
||||||
|
|
||||||
|
@ -710,7 +697,6 @@ int usbdrvwext_giwrange(struct net_device *dev,
|
||||||
range->retry_flags = IW_RETRY_LIMIT;
|
range->retry_flags = IW_RETRY_LIMIT;
|
||||||
range->min_retry = 0;
|
range->min_retry = 0;
|
||||||
range->max_retry = 255;
|
range->max_retry = 255;
|
||||||
#endif /* WIRELESS_EXT > 10 */
|
|
||||||
|
|
||||||
channel_num = zfiWlanQueryAllowChannels(dev, channels);
|
channel_num = zfiWlanQueryAllowChannels(dev, channels);
|
||||||
|
|
||||||
|
@ -917,13 +903,11 @@ int usbdrvwext_giwscan(struct net_device *dev,
|
||||||
current_ev = usbdrv_translate_scan(dev, info, current_ev,
|
current_ev = usbdrv_translate_scan(dev, info, current_ev,
|
||||||
end_buf, &pBssList->bssInfo[i]);
|
end_buf, &pBssList->bssInfo[i]);
|
||||||
|
|
||||||
#if WIRELESS_EXT > 16
|
|
||||||
if (current_ev == end_buf) {
|
if (current_ev == end_buf) {
|
||||||
kfree(pBssList);
|
kfree(pBssList);
|
||||||
data->length = current_ev - extra;
|
data->length = current_ev - extra;
|
||||||
return -E2BIG;
|
return -E2BIG;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Length of data */
|
/* Length of data */
|
||||||
|
|
|
@ -39,9 +39,7 @@
|
||||||
#include "linux/netlink.h"
|
#include "linux/netlink.h"
|
||||||
#include "linux/rtnetlink.h"
|
#include "linux/rtnetlink.h"
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ZM_HOSTAPD_SUPPORT
|
#ifdef ZM_HOSTAPD_SUPPORT
|
||||||
#include "athr_common.h"
|
#include "athr_common.h"
|
||||||
|
@ -113,9 +111,6 @@ extern u8_t zfLnxCreateThread(zdev_t *dev);
|
||||||
|
|
||||||
/* Definition of Wireless Extension */
|
/* Definition of Wireless Extension */
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
|
||||||
#endif
|
|
||||||
//wireless extension helper functions
|
//wireless extension helper functions
|
||||||
extern int usbdrv_ioctl_setessid(struct net_device *dev, struct iw_point *erq);
|
extern int usbdrv_ioctl_setessid(struct net_device *dev, struct iw_point *erq);
|
||||||
extern int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq);
|
extern int usbdrv_ioctl_setrts(struct net_device *dev, struct iw_param *rrq);
|
||||||
|
@ -203,7 +198,6 @@ struct iw_priv_args usbdrv_private_args[] = {
|
||||||
// { SIOCIWFIRSTPRIV + 0xC, 0, IW_PRIV_TYPE_CHAR | 12, "get_mac_mode" },
|
// { SIOCIWFIRSTPRIV + 0xC, 0, IW_PRIV_TYPE_CHAR | 12, "get_mac_mode" },
|
||||||
};
|
};
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
static iw_handler usbdrvwext_handler[] = {
|
static iw_handler usbdrvwext_handler[] = {
|
||||||
(iw_handler) NULL, /* SIOCSIWCOMMIT */
|
(iw_handler) NULL, /* SIOCSIWCOMMIT */
|
||||||
(iw_handler) usbdrvwext_giwname, /* SIOCGIWNAME */
|
(iw_handler) usbdrvwext_giwname, /* SIOCGIWNAME */
|
||||||
|
@ -229,13 +223,8 @@ static iw_handler usbdrvwext_handler[] = {
|
||||||
(iw_handler) usbdrvwext_giwap, /* SIOCGIWAP */
|
(iw_handler) usbdrvwext_giwap, /* SIOCGIWAP */
|
||||||
(iw_handler) NULL, /* -- hole -- */
|
(iw_handler) NULL, /* -- hole -- */
|
||||||
(iw_handler) usbdrvwext_iwaplist, /* SIOCGIWAPLIST */
|
(iw_handler) usbdrvwext_iwaplist, /* SIOCGIWAPLIST */
|
||||||
#if WIRELESS_EXT > 13
|
|
||||||
(iw_handler) usbdrvwext_siwscan, /* SIOCSIWSCAN */
|
(iw_handler) usbdrvwext_siwscan, /* SIOCSIWSCAN */
|
||||||
(iw_handler) usbdrvwext_giwscan, /* SIOCGIWSCAN */
|
(iw_handler) usbdrvwext_giwscan, /* SIOCGIWSCAN */
|
||||||
#else /* WIRELESS_EXT > 13 */
|
|
||||||
(iw_handler) NULL, /* null */ /* SIOCSIWSCAN */
|
|
||||||
(iw_handler) NULL, /* null */ /* SIOCGIWSCAN */
|
|
||||||
#endif /* WIRELESS_EXT > 13 */
|
|
||||||
(iw_handler) usbdrvwext_siwessid, /* SIOCSIWESSID */
|
(iw_handler) usbdrvwext_siwessid, /* SIOCSIWESSID */
|
||||||
(iw_handler) usbdrvwext_giwessid, /* SIOCGIWESSID */
|
(iw_handler) usbdrvwext_giwessid, /* SIOCGIWESSID */
|
||||||
|
|
||||||
|
@ -291,7 +280,6 @@ static struct iw_handler_def p80211wext_handler_def = {
|
||||||
.private = (iw_handler *) usbdrv_private_handler,
|
.private = (iw_handler *) usbdrv_private_handler,
|
||||||
.private_args = (struct iw_priv_args *) usbdrv_private_args
|
.private_args = (struct iw_priv_args *) usbdrv_private_args
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
/* WDS */
|
/* WDS */
|
||||||
//struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
|
//struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
|
||||||
|
@ -1106,9 +1094,7 @@ u8_t zfLnxInitSetup(struct net_device *dev, struct usbdrv_private *macp)
|
||||||
dev->dev_addr[4] = addr[4];
|
dev->dev_addr[4] = addr[4];
|
||||||
dev->dev_addr[5] = addr[5];
|
dev->dev_addr[5] = addr[5];
|
||||||
#endif
|
#endif
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
dev->wireless_handlers = (struct iw_handler_def *)&p80211wext_handler_def;
|
dev->wireless_handlers = (struct iw_handler_def *)&p80211wext_handler_def;
|
||||||
#endif
|
|
||||||
|
|
||||||
dev->netdev_ops = &otus_netdev_ops;
|
dev->netdev_ops = &otus_netdev_ops;
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,7 @@
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Called to allocate buffer, must return a continue buffer space */
|
/* Called to allocate buffer, must return a continue buffer space */
|
||||||
|
|
|
@ -27,10 +27,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
void zfwDumpBuf(zdev_t* dev, zbuf_t* buf)
|
void zfwDumpBuf(zdev_t* dev, zbuf_t* buf)
|
||||||
{
|
{
|
||||||
|
|
|
@ -28,10 +28,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/***** Management *****/
|
/***** Management *****/
|
||||||
|
@ -75,7 +72,6 @@ u16_t zfLnxAsocNotify(zdev_t* dev, u16_t* macAddr, u8_t* body, u16_t bodySize, u
|
||||||
// //wireless_send_event(macp->device, SIOCGIWSCAN, &wreq, NULL);
|
// //wireless_send_event(macp->device, SIOCGIWSCAN, &wreq, NULL);
|
||||||
// wireless_send_event(macp->device, SIOCGIWAP, &wreq, NULL);
|
// wireless_send_event(macp->device, SIOCGIWAP, &wreq, NULL);
|
||||||
//}
|
//}
|
||||||
#if WIRELESS_EXT >= 15
|
|
||||||
//else if(macp->cardSetting.BssType == AP_BSS) {
|
//else if(macp->cardSetting.BssType == AP_BSS) {
|
||||||
// if (port == 0)
|
// if (port == 0)
|
||||||
// {
|
// {
|
||||||
|
@ -94,7 +90,6 @@ u16_t zfLnxAsocNotify(zdev_t* dev, u16_t* macAddr, u8_t* body, u16_t bodySize, u
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
#endif
|
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -185,7 +180,6 @@ void zfLnxConnectNotify(zdev_t* dev, u16_t status, u16_t* bssid)
|
||||||
// //wireless_send_event(dev, SIOCGIWSCAN, &wreq, NULL);
|
// //wireless_send_event(dev, SIOCGIWSCAN, &wreq, NULL);
|
||||||
wireless_send_event(dev, SIOCGIWAP, &wreq, NULL);
|
wireless_send_event(dev, SIOCGIWAP, &wreq, NULL);
|
||||||
}
|
}
|
||||||
#if WIRELESS_EXT >= 15
|
|
||||||
else if(zfiWlanQueryWlanMode(dev) == ZM_MODE_AP) {
|
else if(zfiWlanQueryWlanMode(dev) == ZM_MODE_AP) {
|
||||||
//if (port == 0)
|
//if (port == 0)
|
||||||
//{
|
//{
|
||||||
|
@ -204,7 +198,6 @@ void zfLnxConnectNotify(zdev_t* dev, u16_t status, u16_t* bssid)
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
//return 0;
|
//return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Memory management */
|
/* Memory management */
|
||||||
/* Called to allocate uncached memory, allocated memory must */
|
/* Called to allocate uncached memory, allocated memory must */
|
||||||
|
|
|
@ -28,10 +28,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
//extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
|
//extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
|
||||||
extern struct zsVapStruct vap[ZM_VAP_PORT_NUMBER];
|
extern struct zsVapStruct vap[ZM_VAP_PORT_NUMBER];
|
||||||
|
|
|
@ -28,11 +28,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
|
//extern struct zsWdsStruct wds[ZM_WDS_PORT_NUMBER];
|
||||||
|
|
|
@ -28,10 +28,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ZM_ENABLE_CENC
|
#ifdef ZM_ENABLE_CENC
|
||||||
extern int zfLnxCencSendMsg(struct sock *netlink_sk, u_int8_t *msg, int len);
|
extern int zfLnxCencSendMsg(struct sock *netlink_sk, u_int8_t *msg, int len);
|
||||||
|
|
|
@ -28,10 +28,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void zfLnxInitUsbTxQ(zdev_t* dev);
|
extern void zfLnxInitUsbTxQ(zdev_t* dev);
|
||||||
extern void zfLnxInitUsbRxQ(zdev_t* dev);
|
extern void zfLnxInitUsbRxQ(zdev_t* dev);
|
||||||
|
|
|
@ -26,10 +26,7 @@
|
||||||
#include "usbdrv.h"
|
#include "usbdrv.h"
|
||||||
|
|
||||||
#include <linux/netlink.h>
|
#include <linux/netlink.h>
|
||||||
|
|
||||||
#if WIRELESS_EXT > 12
|
|
||||||
#include <net/iw_handler.h>
|
#include <net/iw_handler.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo);
|
extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo);
|
||||||
extern void zfCoreRecv(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo);
|
extern void zfCoreRecv(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo);
|
||||||
|
|
|
@ -35,16 +35,6 @@
|
||||||
#undef netdevice_t
|
#undef netdevice_t
|
||||||
typedef struct net_device netdevice_t;
|
typedef struct net_device netdevice_t;
|
||||||
|
|
||||||
#ifdef WIRELESS_EXT
|
|
||||||
#if (WIRELESS_EXT < 13)
|
|
||||||
struct iw_request_info
|
|
||||||
{
|
|
||||||
__u16 cmd; /* Wireless Extension command */
|
|
||||||
__u16 flags; /* More to come ;-) */
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef in_atomic
|
#ifndef in_atomic
|
||||||
#define in_atomic() 0
|
#define in_atomic() 0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue