summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-04-24 15:50:00 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-25 15:50:19 +0200
commit92c1552caef3661f049c4e967550e933599e2663 (patch)
tree4f1fb1fd70671ba1cb03c08bc5113f694c30f559 /drivers/staging
parente83cfca1abbeee6ad77e2c8543183483eba10eab (diff)
downloadlinux-92c1552caef3661f049c4e967550e933599e2663.tar.bz2
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: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/ks7010/ks_wlan.h12
-rw-r--r--drivers/staging/ks7010/ks_wlan_ioctl.h2
-rw-r--r--drivers/staging/ks7010/ks_wlan_net.c11
3 files changed, 0 insertions, 25 deletions
diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h
index 365001bebabc..2894b0c3816c 100644
--- a/drivers/staging/ks7010/ks_wlan.h
+++ b/drivers/staging/ks7010/ks_wlan.h
@@ -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;
diff --git a/drivers/staging/ks7010/ks_wlan_ioctl.h b/drivers/staging/ks7010/ks_wlan_ioctl.h
index 121e7cb808a2..e45a33291b46 100644
--- a/drivers/staging/ks7010/ks_wlan_ioctl.h
+++ b/drivers/staging/ks7010/ks_wlan_ioctl.h
@@ -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)
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 3f631d9a45ba..a9fdf25b45c0 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -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 */