staging: rtl8192u: remove #ifdef JOHN_
authorXenia Ragiadakou <burzalodowa@gmail.com>
Thu, 10 Oct 2013 07:43:47 +0000 (10:43 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2013 22:42:53 +0000 (15:42 -0700)
This patch removes the guards #ifdef JOHN_HWSEC, #ifdef JOHN_DUMP_TXDESC and
because the code inside them calls some undefined functions (e.g read_rtl8225,
rtl8187_read_phy etc).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/r8192U.h
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_wx.c

index 4c46bb25a6b31c671af3304425c1497c142d5266..ad3bc567d35a18ac0dbe2cd0026085b37db67f05 100644 (file)
@@ -1154,14 +1154,6 @@ typedef enum {
        NIC_8192E = 3,
 } nic_t;
 
-
-#ifdef JOHN_HWSEC
-struct ssid_thread {
-       struct net_device *dev;
-       u8 name[IW_ESSID_MAX_SIZE + 1];
-};
-#endif
-
 bool init_firmware(struct net_device *dev);
 short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb);
 short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
index c383e6450bd2c0f7fddd2e78063384c12d0b5f79..42d1f214371b24e99281ef4a46b64e43e1fefb85 100644 (file)
@@ -1608,13 +1608,6 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
        idx_pipe = txqueue2outpipe(priv, queue_index);
 #else
        idx_pipe = 0x04;
-#endif
-#ifdef JOHN_DUMP_TXDESC
-       int i;
-       printk("<Tx descriptor>--rate %x---", rate);
-       for (i = 0; i < 8; i++)
-               printk("%8x ", tx[i]);
-       printk("\n");
 #endif
        usb_fill_bulk_urb(tx_urb, priv->udev, usb_sndbulkpipe(priv->udev, idx_pipe),
                          skb->data, skb->len, rtl8192_tx_isr, skb);
@@ -3859,15 +3852,6 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                                }
                        }
                }
-#ifdef JOHN_HWSEC_DEBUG
-               //john's test 0711
-               printk("@@ wrq->u pointer = ");
-               for (i = 0; i < wrq->u.data.length; i++) {
-                       if (i%10 == 0) printk("\n");
-                       printk("%8x|", ((u32 *)wrq->u.data.pointer)[i]);
-               }
-               printk("\n");
-#endif /*JOHN_HWSEC_DEBUG*/
                ret = ieee80211_wpa_supplicant_ioctl(priv->ieee80211, &wrq->u.data);
                break;
 
index 61f6620213e2e99881f76835eb51ea3bc6709b15..c70af014a31670428b67205763be1f2a786f42a0 100644 (file)
@@ -127,156 +127,6 @@ static int r8192_wx_get_power(struct net_device *dev,
        return ieee80211_wx_get_power(priv->ieee80211,info,wrqu,extra);
 }
 
-#ifdef JOHN_IOCTL
-u16 read_rtl8225(struct net_device *dev, u8 addr);
-void write_rtl8225(struct net_device *dev, u8 adr, u16 data);
-u32 john_read_rtl8225(struct net_device *dev, u8 adr);
-void _write_rtl8225(struct net_device *dev, u8 adr, u16 data);
-
-static int r8192_wx_read_regs(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       u8 addr;
-       u16 data1;
-
-       down(&priv->wx_sem);
-
-
-       get_user(addr,(u8 *)wrqu->data.pointer);
-       data1 = read_rtl8225(dev, addr);
-       wrqu->data.length = data1;
-
-       up(&priv->wx_sem);
-       return 0;
-
-}
-
-static int r8192_wx_write_regs(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       u8 addr;
-
-       down(&priv->wx_sem);
-
-       get_user(addr, (u8 *)wrqu->data.pointer);
-       write_rtl8225(dev, addr, wrqu->data.length);
-
-       up(&priv->wx_sem);
-       return 0;
-
-}
-
-void rtl8187_write_phy(struct net_device *dev, u8 adr, u32 data);
-u8 rtl8187_read_phy(struct net_device *dev,u8 adr, u32 data);
-
-static int r8192_wx_read_bb(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       u8 databb;
-
-       down(&priv->wx_sem);
-
-       databb = rtl8187_read_phy(dev, (u8)wrqu->data.length, 0x00000000);
-       wrqu->data.length = databb;
-
-       up(&priv->wx_sem);
-       return 0;
-}
-
-void rtl8187_write_phy(struct net_device *dev, u8 adr, u32 data);
-static int r8192_wx_write_bb(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       u8 databb;
-
-       down(&priv->wx_sem);
-
-       get_user(databb, (u8 *)wrqu->data.pointer);
-       rtl8187_write_phy(dev, wrqu->data.length, databb);
-
-       up(&priv->wx_sem);
-       return 0;
-
-}
-
-
-static int r8192_wx_write_nicb(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       u32 addr;
-
-       down(&priv->wx_sem);
-
-       get_user(addr, (u32 *)wrqu->data.pointer);
-       write_nic_byte(dev, addr, wrqu->data.length);
-
-       up(&priv->wx_sem);
-       return 0;
-
-}
-static int r8192_wx_read_nicb(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       u32 addr;
-       u16 data1;
-
-       down(&priv->wx_sem);
-
-       get_user(addr,(u32 *)wrqu->data.pointer);
-       read_nic_byte(dev, addr, &data1);
-       wrqu->data.length = data1;
-
-       up(&priv->wx_sem);
-       return 0;
-}
-
-static int r8192_wx_get_ap_status(struct net_device *dev,
-                              struct iw_request_info *info,
-                              union iwreq_data *wrqu, char *extra)
-{
-       struct r8192_priv *priv = ieee80211_priv(dev);
-       struct ieee80211_device *ieee = priv->ieee80211;
-       struct ieee80211_network *target;
-       int name_len;
-
-       down(&priv->wx_sem);
-
-       //count the length of input ssid
-       for(name_len=0 ; ((char *)wrqu->data.pointer)[name_len]!='\0' ; name_len++);
-
-       //search for the corresponding info which is received
-       list_for_each_entry(target, &ieee->network_list, list) {
-               if ( (target->ssid_len == name_len) &&
-                    (strncmp(target->ssid, (char *)wrqu->data.pointer, name_len)==0)){
-                       if(target->wpa_ie_len>0 || target->rsn_ie_len>0 )
-                               //set flags=1 to indicate this ap is WPA
-                               wrqu->data.flags = 1;
-                       else wrqu->data.flags = 0;
-
-
-               break;
-               }
-       }
-
-       up(&priv->wx_sem);
-       return 0;
-}
-
-
-
-#endif
 static int r8192_wx_force_reset(struct net_device *dev,
                struct iw_request_info *info,
                union iwreq_data *wrqu, char *extra)
@@ -1106,46 +956,7 @@ static const struct iw_priv_args r8192_private_args[] = {
        {
                SIOCIWFIRSTPRIV + 0x2,
                IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rawtx"
-       }
-#ifdef JOHN_IOCTL
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x3,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readRF"
-       }
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x4,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeRF"
-       }
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x5,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readBB"
-       }
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x6,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writeBB"
-       }
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x7,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "readnicb"
-       }
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x8,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "writenicb"
-       }
-       ,
-       {
-               SIOCIWFIRSTPRIV + 0x9,
-               IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "apinfo"
-       }
-
-#endif
-       ,
+       },
        {
                SIOCIWFIRSTPRIV + 0x3,
                IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "forcereset"
@@ -1163,15 +974,6 @@ static iw_handler r8192_private_handler[] = {
 //     r8192_wx_set_monitor_type,
        r8192_wx_set_scan_type,
        r8192_wx_set_rawtx,
-#ifdef JOHN_IOCTL
-       r8192_wx_read_regs,
-       r8192_wx_write_regs,
-       r8192_wx_read_bb,
-       r8192_wx_write_bb,
-       r8192_wx_read_nicb,
-       r8192_wx_write_nicb,
-       r8192_wx_get_ap_status,
-#endif
        //r8192_wx_null,
        r8192_wx_force_reset,
 };