summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192su/r8192U_wx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rtl8192su/r8192U_wx.c')
-rw-r--r--drivers/staging/rtl8192su/r8192U_wx.c45
1 files changed, 4 insertions, 41 deletions
diff --git a/drivers/staging/rtl8192su/r8192U_wx.c b/drivers/staging/rtl8192su/r8192U_wx.c
index f9eafb16dbb7..74aa9628265b 100644
--- a/drivers/staging/rtl8192su/r8192U_wx.c
+++ b/drivers/staging/rtl8192su/r8192U_wx.c
@@ -28,7 +28,7 @@
#endif
#ifdef ENABLE_DOT11D
-#include "dot11d.h"
+#include "ieee80211/dot11d.h"
#endif
#define RATE_COUNT 12
@@ -548,10 +548,8 @@ static int rtl8180_wx_get_range(struct net_device *dev,
}
range->num_frequency = val;
range->num_channels = val;
-#if WIRELESS_EXT > 17
range->enc_capa = IW_ENC_CAPA_WPA|IW_ENC_CAPA_WPA2|
IW_ENC_CAPA_CIPHER_TKIP|IW_ENC_CAPA_CIPHER_CCMP;
-#endif
tmp->scan_capa = 0x01;
return 0;
}
@@ -568,7 +566,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
if (priv->ieee80211->LinkDetectInfo.bBusyTraffic == true)
return -EAGAIN;
-#if WIRELESS_EXT > 17
+
if (wrqu->data.flags & IW_SCAN_THIS_ESSID)
{
struct iw_scan_req* req = (struct iw_scan_req*)b;
@@ -580,7 +578,6 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
//printk("=====>network ssid:%s\n", ieee->current_network.ssid);
}
}
-#endif
down(&priv->wx_sem);
if(priv->ieee80211->state != IEEE80211_LINKED){
@@ -963,7 +960,6 @@ exit:
return err;
}
-#if (WIRELESS_EXT >= 18)
#if 0
static int r8192_wx_get_enc_ext(struct net_device *dev,
struct iw_request_info *info,
@@ -981,7 +977,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
int ret=0;
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
struct r8192_priv *priv = ieee80211_priv(dev);
struct ieee80211_device* ieee = priv->ieee80211;
//printk("===>%s()\n", __FUNCTION__);
@@ -1065,22 +1060,19 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
end_hw_sec:
up(&priv->wx_sem);
-#endif
return ret;
-
}
static int r8192_wx_set_auth(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *data, char *extra)
{
int ret=0;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
+
//printk("====>%s()\n", __FUNCTION__);
struct r8192_priv *priv = ieee80211_priv(dev);
down(&priv->wx_sem);
ret = ieee80211_wx_set_auth(priv->ieee80211, info, &(data->param), extra);
up(&priv->wx_sem);
-#endif
return ret;
}
@@ -1091,23 +1083,19 @@ static int r8192_wx_set_mlme(struct net_device *dev,
//printk("====>%s()\n", __FUNCTION__);
int ret=0;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
struct r8192_priv *priv = ieee80211_priv(dev);
down(&priv->wx_sem);
ret = ieee80211_wx_set_mlme(priv->ieee80211, info, wrqu, extra);
-
up(&priv->wx_sem);
-#endif
return ret;
}
-#endif
+
static int r8192_wx_set_gen_ie(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *data, char *extra)
{
//printk("====>%s(), len:%d\n", __FUNCTION__, data->length);
int ret=0;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
struct r8192_priv *priv = ieee80211_priv(dev);
down(&priv->wx_sem);
#if 1
@@ -1115,7 +1103,6 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
#endif
up(&priv->wx_sem);
//printk("<======%s(), ret:%d\n", __FUNCTION__, ret);
-#endif
return ret;
@@ -1152,11 +1139,7 @@ static iw_handler r8192_wx_handlers[] =
NULL, /* SIOCWIWTHRSPY */
r8192_wx_set_wap, /* SIOCSIWAP */
r8192_wx_get_wap, /* SIOCGIWAP */
-#if (WIRELESS_EXT >= 18)
r8192_wx_set_mlme, /* MLME-- */
-#else
- NULL,
-#endif
dummy, /* SIOCGIWAPLIST -- depricated */
r8192_wx_set_scan, /* SIOCSIWSCAN */
r8192_wx_get_scan, /* SIOCGIWSCAN */
@@ -1185,17 +1168,10 @@ static iw_handler r8192_wx_handlers[] =
r8192_wx_set_gen_ie,//NULL, /* SIOCSIWGENIE */
NULL, /* SIOCSIWGENIE */
-#if (WIRELESS_EXT >= 18)
r8192_wx_set_auth,//NULL, /* SIOCSIWAUTH */
NULL,//r8192_wx_get_auth,//NULL, /* SIOCSIWAUTH */
r8192_wx_set_enc_ext, /* SIOCSIWENCODEEXT */
NULL,//r8192_wx_get_enc_ext,//NULL, /* SIOCSIWENCODEEXT */
-#else
- NULL,
- NULL,
- NULL,
- NULL,
-#endif
NULL, /* SIOCSIWPMKSA */
NULL, /*---hole---*/
@@ -1297,7 +1273,6 @@ static iw_handler r8192_private_handler[] = {
#endif
};
-//#if WIRELESS_EXT >= 17
struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
{
struct r8192_priv *priv = ieee80211_priv(dev);
@@ -1311,11 +1286,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
wstats->qual.qual = 0;
wstats->qual.level = 0;
wstats->qual.noise = 0;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14))
wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
-#else
- wstats->qual.updated = 0x0f;
-#endif
return wstats;
}
@@ -1327,15 +1298,9 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
wstats->qual.level = tmp_level;
wstats->qual.qual = tmp_qual;
wstats->qual.noise = tmp_noise;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14))
wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM;
-#else
- wstats->qual.updated = 0x0f;
-#endif
return wstats;
}
-//#endif
-
struct iw_handler_def r8192_wx_handlers_def={
.standard = r8192_wx_handlers,
@@ -1343,8 +1308,6 @@ struct iw_handler_def r8192_wx_handlers_def={
.private = r8192_private_handler,
.num_private = sizeof(r8192_private_handler) / sizeof(iw_handler),
.num_private_args = sizeof(r8192_private_args) / sizeof(struct iw_priv_args),
-#if WIRELESS_EXT >= 17
.get_wireless_stats = r8192_get_wireless_stats,
-#endif
.private_args = (struct iw_priv_args *)r8192_private_args,
};