orinoco: Move WEXT handlers into a separate file

No functional change.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
David Kilroy 2009-02-04 23:05:56 +00:00 committed by John W. Linville
parent 712a4342a0
commit cb1576a829
5 changed files with 2408 additions and 2350 deletions

View File

@ -1,7 +1,7 @@
#
# Makefile for the orinoco wireless device drivers.
#
orinoco-objs := main.o fw.o hw.o mic.o scan.o
orinoco-objs := main.o fw.o hw.o mic.o scan.o wext.o
obj-$(CONFIG_HERMES) += orinoco.o hermes.o hermes_dld.o
obj-$(CONFIG_PCMCIA_HERMES) += orinoco_cs.o

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,63 @@
/* Exports from main to helper modules
*
* See copyright notice in main.c
*/
#ifndef _ORINOCO_MAIN_H_
#define _ORINOCO_MAIN_H_
#include <linux/ieee80211.h>
#include "orinoco.h"
/********************************************************************/
/* Compile time configuration and compatibility stuff */
/********************************************************************/
/* We do this this way to avoid ifdefs in the actual code */
#ifdef WIRELESS_SPY
#define SPY_NUMBER(priv) (priv->spy_data.spy_number)
#else
#define SPY_NUMBER(priv) 0
#endif /* WIRELESS_SPY */
/********************************************************************/
/* Export module parameter */
extern int force_monitor;
/* Forward declarations */
struct net_device;
struct work_struct;
void set_port_type(struct orinoco_private *priv);
int __orinoco_program_rids(struct net_device *dev);
void orinoco_reset(struct work_struct *work);
/* Information element helpers - find a home for these... */
static inline u8 *orinoco_get_ie(u8 *data, size_t len,
enum ieee80211_eid eid)
{
u8 *p = data;
while ((p + 2) < (data + len)) {
if (p[0] == eid)
return p;
p += p[1] + 2;
}
return NULL;
}
#define WPA_OUI_TYPE "\x00\x50\xF2\x01"
#define WPA_SELECTOR_LEN 4
static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len)
{
u8 *p = data;
while ((p + 2 + WPA_SELECTOR_LEN) < (data + len)) {
if ((p[0] == WLAN_EID_GENERIC) &&
(memcmp(&p[2], WPA_OUI_TYPE, WPA_SELECTOR_LEN) == 0))
return p;
p += p[1] + 2;
}
return NULL;
}
#endif /* _ORINOCO_MAIN_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,13 @@
/* Wireless extensions support.
*
* See copyright notice in main.c
*/
#ifndef _ORINOCO_WEXT_H_
#define _ORINOCO_WEXT_H_
#include <net/iw_handler.h>
/* Structure defining all our WEXT handlers */
extern const struct iw_handler_def orinoco_handler_def;
#endif /* _ORINOCO_WEXT_H_ */