0001
0002
0003
0004
0005 #ifndef _ORINOCO_MAIN_H_
0006 #define _ORINOCO_MAIN_H_
0007
0008 #include <linux/ieee80211.h>
0009 #include "orinoco.h"
0010
0011
0012
0013
0014
0015
0016 #ifdef WIRELESS_SPY
0017 #define SPY_NUMBER(priv) (priv->spy_data.spy_number)
0018 #else
0019 #define SPY_NUMBER(priv) 0
0020 #endif
0021
0022
0023
0024
0025 extern int force_monitor;
0026
0027
0028 struct net_device;
0029 struct work_struct;
0030
0031 void set_port_type(struct orinoco_private *priv);
0032 int orinoco_commit(struct orinoco_private *priv);
0033 void orinoco_reset(struct work_struct *work);
0034
0035
0036 #define WPA_OUI_TYPE "\x00\x50\xF2\x01"
0037 #define WPA_SELECTOR_LEN 4
0038 static inline u8 *orinoco_get_wpa_ie(u8 *data, size_t len)
0039 {
0040 u8 *p = data;
0041 while ((p + 2 + WPA_SELECTOR_LEN) < (data + len)) {
0042 if ((p[0] == WLAN_EID_VENDOR_SPECIFIC) &&
0043 (memcmp(&p[2], WPA_OUI_TYPE, WPA_SELECTOR_LEN) == 0))
0044 return p;
0045 p += p[1] + 2;
0046 }
0047 return NULL;
0048 }
0049
0050 #endif