kconfig: Create include/generated for localmodconfig
[safe/jmp/linux-2.6] / drivers / staging / rtl8192e / r8192E_wx.c
index 497be2f..d1eb892 100644 (file)
 #include <linux/string.h>
 #include "r8192E.h"
 #include "r8192E_hw.h"
+#include "r8192E_wx.h"
 #ifdef ENABLE_DOT11D
 #include "dot11d.h"
 #endif
 
 #define RATE_COUNT 12
-u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
+static u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
        6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
 
 
@@ -42,40 +43,6 @@ static int r8192_wx_get_freq(struct net_device *dev,
 }
 
 
-#if 0
-
-static int r8192_wx_set_beaconinterval(struct net_device *dev, struct iw_request_info *aa,
-                         union iwreq_data *wrqu, char *b)
-{
-       int *parms = (int *)b;
-       int bi = parms[0];
-
-       struct r8192_priv *priv = ieee80211_priv(dev);
-
-       down(&priv->wx_sem);
-       DMESG("setting beacon interval to %x",bi);
-
-       priv->ieee80211->beacon_interval=bi;
-       rtl8180_commit(dev);
-       up(&priv->wx_sem);
-
-       return 0;
-}
-
-
-static int r8192_wx_set_forceassociate(struct net_device *dev, struct iw_request_info *aa,
-                         union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv=ieee80211_priv(dev);
-       int *parms = (int *)extra;
-
-       priv->ieee80211->force_associate = (parms[0] > 0);
-
-
-       return 0;
-}
-
-#endif
 static int r8192_wx_get_mode(struct net_device *dev, struct iw_request_info *a,
                             union iwreq_data *wrqu, char *b)
 {
@@ -479,7 +446,7 @@ static int rtl8180_wx_get_range(struct net_device *dev,
        range->max_qual.updated = 7; /* Updated all three */
 
        range->avg_qual.qual = 92; /* > 8% missed beacons is 'bad' */
-       /* TODO: Find real 'good' to 'bad' threshol value for RSSI */
+       /* TODO: Find real 'good' to 'bad' threshold value for RSSI */
        range->avg_qual.level = 20 + -98;
        range->avg_qual.noise = 0;
        range->avg_qual.updated = 7; /* Updated all three */
@@ -1036,23 +1003,11 @@ exit:
 }
 
 #if (WIRELESS_EXT >= 18)
-#if 0
-static int r8192_wx_get_enc_ext(struct net_device *dev,
-                                        struct iw_request_info *info,
-                                        union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       int ret = 0;
-       ret = ieee80211_wx_get_encode_ext(priv->ieee80211, info, wrqu, extra);
-       return ret;
-}
-#endif
 static int r8192_wx_set_enc_ext(struct net_device *dev,
                                         struct iw_request_info *info,
                                         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;
 
@@ -1137,7 +1092,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 
 end_hw_sec:
        up(&priv->wx_sem);
-#endif
        return ret;
 
 }
@@ -1146,13 +1100,11 @@ static int r8192_wx_set_auth(struct net_device *dev,
                                         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;
 }
 
@@ -1163,12 +1115,10 @@ 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
@@ -1178,18 +1128,12 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
 {
           //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
         ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length);
-#endif
         up(&priv->wx_sem);
        //printk("<======%s(), ret:%d\n", __FUNCTION__, ret);
-#endif
         return ret;
-
-
 }
 
 static int dummy(struct net_device *dev, struct iw_request_info *a,
@@ -1369,11 +1313,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;
        }
 
@@ -1385,11 +1325,7 @@ 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