Commit aa0cb59c authored by Xenia Ragiadakou's avatar Xenia Ragiadakou Committed by Greg Kroah-Hartman

staging: rtl8192u: remove #ifdef JOHN_

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: default avatarXenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b806ad48
...@@ -1154,14 +1154,6 @@ typedef enum { ...@@ -1154,14 +1154,6 @@ typedef enum {
NIC_8192E = 3, NIC_8192E = 3,
} nic_t; } 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); bool init_firmware(struct net_device *dev);
short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb); short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb);
short rtl8192_tx(struct net_device *dev, struct sk_buff *skb); short rtl8192_tx(struct net_device *dev, struct sk_buff *skb);
......
...@@ -1608,13 +1608,6 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb) ...@@ -1608,13 +1608,6 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb)
idx_pipe = txqueue2outpipe(priv, queue_index); idx_pipe = txqueue2outpipe(priv, queue_index);
#else #else
idx_pipe = 0x04; 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 #endif
usb_fill_bulk_urb(tx_urb, priv->udev, usb_sndbulkpipe(priv->udev, idx_pipe), usb_fill_bulk_urb(tx_urb, priv->udev, usb_sndbulkpipe(priv->udev, idx_pipe),
skb->data, skb->len, rtl8192_tx_isr, skb); skb->data, skb->len, rtl8192_tx_isr, skb);
...@@ -3859,15 +3852,6 @@ int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -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); ret = ieee80211_wpa_supplicant_ioctl(priv->ieee80211, &wrq->u.data);
break; break;
......
...@@ -127,156 +127,6 @@ static int r8192_wx_get_power(struct net_device *dev, ...@@ -127,156 +127,6 @@ static int r8192_wx_get_power(struct net_device *dev,
return ieee80211_wx_get_power(priv->ieee80211,info,wrqu,extra); 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, static int r8192_wx_force_reset(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
...@@ -1106,46 +956,7 @@ static const struct iw_priv_args r8192_private_args[] = { ...@@ -1106,46 +956,7 @@ static const struct iw_priv_args r8192_private_args[] = {
{ {
SIOCIWFIRSTPRIV + 0x2, SIOCIWFIRSTPRIV + 0x2,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rawtx" 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, SIOCIWFIRSTPRIV + 0x3,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "forcereset" IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "forcereset"
...@@ -1163,15 +974,6 @@ static iw_handler r8192_private_handler[] = { ...@@ -1163,15 +974,6 @@ static iw_handler r8192_private_handler[] = {
// r8192_wx_set_monitor_type, // r8192_wx_set_monitor_type,
r8192_wx_set_scan_type, r8192_wx_set_scan_type,
r8192_wx_set_rawtx, 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_null,
r8192_wx_force_reset, r8192_wx_force_reset,
}; };
......
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