mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 13:37:49 +07:00
04b2312a68
The include file linux/ieee80211.h contains three definitions for the same thing in enum ieee80211_eid due to historic changes: /* Information Element IDs */ enum ieee80211_eid { : WLAN_EID_WPA = 221, WLAN_EID_GENERIC = 221, WLAN_EID_VENDOR_SPECIFIC = 221, : }; The standard refers to this as "vendor specific" element so the other two definitions are better not used. This patch changes the wireless drivers to use one definition, ie. WLAN_EID_VENDOR_SPECIFIC. Cc: Jouni Malinen <j@w1.fi> Cc: Dan Williams <dcbw@redhat.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> [ath6kl] Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex] Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com> [ipw2x00] Signed-off-by: Arend van Spriel <arend@broadcom.com> [change libipw as well] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
/* 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_commit(struct orinoco_private *priv);
|
|
void orinoco_reset(struct work_struct *work);
|
|
|
|
/* Information element helpers - find a home for these... */
|
|
#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_VENDOR_SPECIFIC) &&
|
|
(memcmp(&p[2], WPA_OUI_TYPE, WPA_SELECTOR_LEN) == 0))
|
|
return p;
|
|
p += p[1] + 2;
|
|
}
|
|
return NULL;
|
|
}
|
|
|
|
#endif /* _ORINOCO_MAIN_H_ */
|