Commit 92c1552c authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Greg Kroah-Hartman

staging: ks7010: remove WPS definition conditional code

WPS definition was defined by default in ks_wlan.h header
file. So it makes no sense to have conditional preprocessor
stuff along the code about this.
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e83cfca1
......@@ -12,8 +12,6 @@
#ifndef _KS_WLAN_H
#define _KS_WLAN_H
#define WPS
#include <linux/atomic.h> /* struct atomic_t */
#include <linux/completion.h> /* struct completion */
#include <linux/netdevice.h> /* struct net_device_stats, struct sk_buff */
......@@ -122,10 +120,8 @@ enum {
SME_RSN_AUTH_REQUEST,
SME_RSN_ENABLED_REQUEST,
SME_RSN_MODE_REQUEST,
#ifdef WPS
SME_WPS_ENABLE_REQUEST,
SME_WPS_PROBE_REQUEST,
#endif
SME_SET_GAIN,
SME_GET_GAIN,
SME_SLEEP_REQUEST,
......@@ -198,14 +194,12 @@ struct rsn_ie {
u8 body[RSN_IE_BODY_MAX];
} __packed;
#ifdef WPS
#define WPS_IE_BODY_MAX 255
struct wps_ie {
u8 id; /* 221 'dd <len> 00 50 F2 04' */
u8 size; /* max ? 255 ? */
u8 body[WPS_IE_BODY_MAX];
} __packed;
#endif /* WPS */
struct local_ap {
u8 bssid[6];
......@@ -226,9 +220,7 @@ struct local_ap {
u8 noise;
struct rsn_ie wpa_ie;
struct rsn_ie rsn_ie;
#ifdef WPS
struct wps_ie wps_ie;
#endif /* WPS */
};
#define LOCAL_APLIST_MAX 31
......@@ -371,13 +363,11 @@ struct pmk_list {
} pmk[PMK_LIST_MAX];
};
#ifdef WPS
struct wps_status {
int wps_enabled;
int ielen;
u8 ie[255];
};
#endif /* WPS */
struct ks_wlan_private {
/* hardware information */
......@@ -450,9 +440,7 @@ struct ks_wlan_private {
u8 scan_ssid_len;
u8 scan_ssid[IW_ESSID_MAX_SIZE + 1];
struct local_gain gain;
#ifdef WPS
struct wps_status wps;
#endif /* WPS */
u8 sleep_mode;
u8 region;
......
......@@ -19,11 +19,9 @@
/* former KS_WLAN_GET_DRIVER_VERSION (SIOCIWFIRSTPRIV + 1) */
/* (SIOCIWFIRSTPRIV + 2) */
#define KS_WLAN_GET_FIRM_VERSION (SIOCIWFIRSTPRIV + 3)
#ifdef WPS
#define KS_WLAN_SET_WPS_ENABLE (SIOCIWFIRSTPRIV + 4)
#define KS_WLAN_GET_WPS_ENABLE (SIOCIWFIRSTPRIV + 5)
#define KS_WLAN_SET_WPS_PROBE_REQ (SIOCIWFIRSTPRIV + 6)
#endif
#define KS_WLAN_GET_EEPROM_CKSUM (SIOCIWFIRSTPRIV + 7)
#define KS_WLAN_SET_PREAMBLE (SIOCIWFIRSTPRIV + 8)
#define KS_WLAN_GET_PREAMBLE (SIOCIWFIRSTPRIV + 9)
......
......@@ -2113,8 +2113,6 @@ static int ks_wlan_get_sleep_mode(struct net_device *dev,
return 0;
}
#ifdef WPS
static int ks_wlan_set_wps_enable(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq,
char *extra)
......@@ -2178,7 +2176,6 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
return 0;
}
#endif /* WPS */
static int ks_wlan_set_tx_gain(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq,
......@@ -2389,14 +2386,12 @@ static const struct iw_priv_args ks_wlan_private_args[] = {
/*{ cmd, set_args, get_args, name[16] } */
{KS_WLAN_GET_FIRM_VERSION, IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | (128 + 1), "GetFirmwareVer"},
#ifdef WPS
{KS_WLAN_SET_WPS_ENABLE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE, "SetWPSEnable"},
{KS_WLAN_GET_WPS_ENABLE, IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "GetW"},
{KS_WLAN_SET_WPS_PROBE_REQ, IW_PRIV_TYPE_BYTE | 2047, IW_PRIV_TYPE_NONE,
"SetWPSProbeReq"},
#endif /* WPS */
{KS_WLAN_SET_PREAMBLE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE, "SetPreamble"},
{KS_WLAN_GET_PREAMBLE, IW_PRIV_TYPE_NONE,
......@@ -2482,15 +2477,9 @@ static const iw_handler ks_wlan_private_handler[] = {
(iw_handler)NULL, /* 1, KS_WLAN_GET_DRIVER_VERSION */
(iw_handler)NULL, /* 2 */
(iw_handler)ks_wlan_get_firmware_version,/* 3 KS_WLAN_GET_FIRM_VERSION */
#ifdef WPS
(iw_handler)ks_wlan_set_wps_enable, /* 4 KS_WLAN_SET_WPS_ENABLE */
(iw_handler)ks_wlan_get_wps_enable, /* 5 KS_WLAN_GET_WPS_ENABLE */
(iw_handler)ks_wlan_set_wps_probe_req, /* 6 KS_WLAN_SET_WPS_PROBE_REQ */
#else
(iw_handler)NULL, /* 4 */
(iw_handler)NULL, /* 5 */
(iw_handler)NULL, /* 6 */
#endif /* WPS */
(iw_handler)ks_wlan_get_eeprom_cksum, /* 7 KS_WLAN_GET_CONNECT */
(iw_handler)ks_wlan_set_preamble, /* 8 KS_WLAN_SET_PREAMBLE */
(iw_handler)ks_wlan_get_preamble, /* 9 KS_WLAN_GET_PREAMBLE */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment