Commit 616f58f6 authored by Mike Gilks's avatar Mike Gilks Committed by Greg Kroah-Hartman

staging: rtl8192u: fix checkpatch.pl issues to line 514

Fixed most problems pointed out by checkpatch.pl in file r8192U_core.c
up to line 500
Signed-off-by: default avatarMike Gilks <mike.kernel@gilksonline.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 70eef90e
...@@ -408,14 +408,12 @@ u16 read_nic_word(struct net_device *dev, int indx) ...@@ -408,14 +408,12 @@ u16 read_nic_word(struct net_device *dev, int indx)
struct usb_device *udev = priv->udev; struct usb_device *udev = priv->udev;
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ, RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
(indx&0xff)|0xff00, (indx>>8)&0x0f, &data, 2, HZ / 2); (indx&0xff)|0xff00, (indx>>8)&0x0f,
&data, 2, HZ / 2);
if (status < 0) if (status < 0)
{
printk("read_nic_word TimeOut! status:%d\n", status); printk("read_nic_word TimeOut! status:%d\n", status);
}
return data; return data;
} }
...@@ -429,13 +427,10 @@ u16 read_nic_word_E(struct net_device *dev, int indx) ...@@ -429,13 +427,10 @@ u16 read_nic_word_E(struct net_device *dev, int indx)
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ, RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
indx|0xfe00, 0, &data, 2, HZ / 2); indx|0xfe00, 0, &data, 2, HZ / 2);
if (status < 0) if (status < 0)
{
printk("read_nic_word TimeOut! status:%d\n", status); printk("read_nic_word TimeOut! status:%d\n", status);
}
return data; return data;
} }
...@@ -444,31 +439,29 @@ u32 read_nic_dword(struct net_device *dev, int indx) ...@@ -444,31 +439,29 @@ u32 read_nic_dword(struct net_device *dev, int indx)
{ {
u32 data; u32 data;
int status; int status;
// int result; /* int result; */
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
struct usb_device *udev = priv->udev; struct usb_device *udev = priv->udev;
status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), status = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
RTL8187_REQ_GET_REGS, RTL8187_REQT_READ, RTL8187_REQ_GET_REGS, RTL8187_REQT_READ,
(indx&0xff)|0xff00, (indx>>8)&0x0f, &data, 4, HZ / 2); (indx&0xff)|0xff00, (indx>>8)&0x0f,
// if(0 != result) { &data, 4, HZ / 2);
// printk(KERN_WARNING "read size of data = %d\, date = %d\n", result, data); /* if(0 != result) {
// } * printk(KERN_WARNING "read size of data = %d\, date = %d\n",
* result, data);
* }
*/
if (status < 0) if (status < 0)
{
printk("read_nic_dword TimeOut! status:%d\n", status); printk("read_nic_dword TimeOut! status:%d\n", status);
}
return data; return data;
} }
/* u8 read_phy_cck(struct net_device *dev, u8 adr); */
//u8 read_phy_cck(struct net_device *dev, u8 adr); /* u8 read_phy_ofdm(struct net_device *dev, u8 adr); */
//u8 read_phy_ofdm(struct net_device *dev, u8 adr);
/* this might still called in what was the PHY rtl8185/rtl8192 common code /* this might still called in what was the PHY rtl8185/rtl8192 common code
* plans are to possibilty turn it again in one common code... * plans are to possibilty turn it again in one common code...
*/ */
...@@ -476,26 +469,22 @@ inline void force_pci_posting(struct net_device *dev) ...@@ -476,26 +469,22 @@ inline void force_pci_posting(struct net_device *dev)
{ {
} }
static struct net_device_stats *rtl8192_stats(struct net_device *dev); static struct net_device_stats *rtl8192_stats(struct net_device *dev);
void rtl8192_commit(struct net_device *dev); void rtl8192_commit(struct net_device *dev);
//void rtl8192_restart(struct net_device *dev); /* void rtl8192_restart(struct net_device *dev); */
void rtl8192_restart(struct work_struct *work); void rtl8192_restart(struct work_struct *work);
//void rtl8192_rq_tx_ack(struct work_struct *work); /* void rtl8192_rq_tx_ack(struct work_struct *work); */
void watch_dog_timer_callback(unsigned long data); void watch_dog_timer_callback(unsigned long data);
/**************************************************************************** /****************************************************************************
-----------------------------PROCFS STUFF------------------------- * -----------------------------PROCFS STUFF-------------------------
*****************************************************************************/ *****************************************************************************
*/
static struct proc_dir_entry *rtl8192_proc = NULL;
static struct proc_dir_entry *rtl8192_proc;
static int proc_get_stats_ap(char *page, char **start, static int proc_get_stats_ap(char *page, char **start, off_t offset, int count,
off_t offset, int count, int *eof, void *data)
int *eof, void *data)
{ {
struct net_device *dev = data; struct net_device *dev = data;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
...@@ -506,18 +495,12 @@ static int proc_get_stats_ap(char *page, char **start, ...@@ -506,18 +495,12 @@ static int proc_get_stats_ap(char *page, char **start,
list_for_each_entry(target, &ieee->network_list, list) { list_for_each_entry(target, &ieee->network_list, list) {
len += snprintf(page + len, count - len, len += snprintf(page + len, count - len, "%s ", target->ssid);
"%s ", target->ssid);
if(target->wpa_ie_len>0 || target->rsn_ie_len>0){
len += snprintf(page + len, count - len,
"WPA\n");
}
else{
len += snprintf(page + len, count - len,
"non_WPA\n");
}
if (target->wpa_ie_len > 0 || target->rsn_ie_len > 0)
len += snprintf(page + len, count - len, "WPA\n");
else
len += snprintf(page + len, count - len, "non_WPA\n");
} }
*eof = 1; *eof = 1;
......
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