Commit Graph

200 Commits

Author SHA1 Message Date
Bill Pemberton ea7e9f2a49 staging: rtl8187se: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:07:42 -08:00
Bill Pemberton 7df813d56f staging: rtl8187se: remove use of __devinitdata
CONFIG_HOTPLUG is going away as an option so __devinitdata is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:07:42 -08:00
Bill Pemberton 19fc6b57db staging: rtl8187se: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:07:42 -08:00
Bill Pemberton 435c78dfb8 staging: rtl8187se: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:07:41 -08:00
MAACHE Mehdi 90c1076509 Staging: rtl8187se: remove check for IW_ENCODE_DISABLED
The original code had a no-op stub where it checked if
IW_ENCODE_DISABLED and did nothing.  Then in a cleanup patch we
accidentally turned the check on.  That was: de171bd6ff "Staging:
rtl8187se: r8180_wx: fixed a lot of checkpatch.pl issues".

The check should just be removed.

Signed-off-by: Mehdi MAACHE <mehdi.maache@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:01 -08:00
YAMANE Toshiaki 167989ba2e staging/rtl8187se: Fix spacing coding style in r8185b_init.c
The following errors and warnings fixed.
- ERROR: space prohibited after that open parenthesis '('
- ERROR: space prohibited before that close parenthesis ')'
- ERROR: space required before the open parenthesis '('
- WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki 545bb52ccd staging/rtl8187se: Use netdev_ printks in r8185b_init.c
The following warnings fixed.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
- WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki 0ef68ab4dd staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_wep.c
The following errors and warnings fixed.
- ERROR: code indent should use tabs where possible
- WARNING: please, no spaces at the start of a line

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki e10fbca953 staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt_wep.c
The following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki 98319002a2 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_wep.c
The following errors fixed.
-ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki 4de389bd05 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_crypt_wep.c
The following warning fixed.
- WARNING: Use #include <linux/string.h> instead of <asm/string.h>

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki 937afb70a0 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_ccmp.c
The following error and warning fixed.
- ERROR: code indent should use tabs where possible
- WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki d6f272c25a staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt_ccmp.c
The following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 14:00:00 -08:00
YAMANE Toshiaki 5bd6e9e0c7 staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt_ccmp.c
The following errors fixed.
-ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki 8433b14324 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_crypt_ccmp.c
The following warnings fixed.
- WARNING: Use #include <linux/string.h> instead of <asm/string.h>

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki e3b9b6cf1b staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_module.c
The following errors and warnings fixed.
- ERROR: space required after that ',' (ctx:VxV)
- ERROR: code indent should use tabs where possible
- WARNING: please, no space before tabs
- WARNING: please, no spaces at the start of a line
- WARNING: suspect code indent for conditional statements (8, 10)

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki 3c304fe63b staging/rtl8187se: Use netdev_ printks in ieee80211/ieee80211_module.c
The following warning fixed.
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki 39550d2823 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_module.c
The following warning fixed.
- WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki 29deac403f staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt.h
The following error fixed.
-ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki 18637d934d staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_crypt.c
The following errors fixed.
-ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki 3bba8b9657 staging/rtl8187se: Use pr_ printks in ieee80211/ieee80211_crypt.c
The following warnings fixed.
- WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

and add pr_fmt.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:59 -08:00
YAMANE Toshiaki a16f3eb1f2 staging/rtl8187se: Fix include file issue in ieee80211/ieee80211_crypt.c
The following warnings fixed.
- WARNING: Use #include <linux/string.h> instead of <asm/string.h>
- WARNING: Use #include <linux/errno.h> instead of <asm/errno.h>

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:58 -08:00
YAMANE Toshiaki 5b7f7ab839 staging/rtl8187se: Fix spacing coding style in r8180_dm.h
The following errors fixed.
-ERROR: "foo * bar" should be "foo *bar"

Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 13:59:58 -08:00
Kumar Amit Mehta 36e97a5714 staging: rtl8187se: r8180_core.c: Inspect the return value of register_netdev()
Inspect the return value of register_netdev() in the driver probe routine and
return -ENODEV in case of error.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-14 16:34:58 -08:00
Maxim Mikityanskiy fbce428a07 staging: rtl8187se: Fixed size of BEACON_INTERVAL register
BEACON_INTERVAL register is 16-bit, not 32-bit

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:59 -08:00
Maxim Mikityanskiy 53094af120 staging: rtl8187se: Removed empty stub read_acadapter_file()
Removed empty read_acadapter_file() and priv->PowerProfile that never
changes its value

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:59 -08:00
Maxim Mikityanskiy 861437d2be staging: rtl8187se: Removed unused fields in r8180_priv
Removed unused fields in r8180_priv and dead code that appeared after
field removal

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:59 -08:00
Maxim Mikityanskiy 3044e45762 staging: rtl8187se: Removed unneeded reads from EEPROM
Removed unneeded reads from EEPROM and some unnecessary conditions

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:58 -08:00
Maxim Mikityanskiy dfd6aefb89 staging: rtl8187se: Use ARRAY_SIZE instead of in-code constants
Use ARRAY_SIZE macro instead of hardcoding array size into loop
condition and remove unused last item of rtl8225z2_rxgain[]

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:58 -08:00
Maxim Mikityanskiy 4dffbc3d28 staging: rtl8187se: Removed unused arrays in r8180_rtl8225z2.c
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:58 -08:00
Maxim Mikityanskiy 2296beb034 staging: rtl8187se: Removed non-existent function headers from r8180.h
Cleaned up r8180.h header file by removing headers of functions that
don't exist

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:58 -08:00
Maxim Mikityanskiy 42af49901a staging: rtl8187se: Fixed typo in TransmitConfig
Fixed typo in TransmitConfig and removed always false condition

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:58 -08:00
Maxim Mikityanskiy 0d50168d1b staging: rtl8187se: Removed unused parameters of HwHSSIThreeWire()
Removed two parameters of HwHSSIThreeWire() that are equal in all
function calls, fixed return type, fixed register width and simplified
code

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:58 -08:00
Maxim Mikityanskiy b9ce05eef9 staging: rtl8187se: Removed dead code
Removed some unused functions, arrays and #define in r8180_core.c

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:41:57 -08:00
Maxim Mikityanskiy 5faca16ad7 staging: rtl8187se: Removed unused module parameters and fixed module description
Removed confusing and unimplemented module parameters and fix NIC name
in module description

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:40:00 -08:00
Maxim Mikityanskiy 17e81bd3d3 staging: rtl8187se: Fixed oops when rmmoding
Don't remove procfs entry that is never created

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:40:00 -08:00
Maxim Mikityanskiy d4457a8e42 staging: rtl8187se: Simplified function GetSupportedWirelessMode8185()
Removed unnecessary variable in GetSupportedWirelessMode8185() and
shortened its code

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:40:00 -08:00
Maxim Mikityanskiy ddedb78aac staging: rtl8187se: Fixed bugs in interrupt handler
Fixed typo in rtl8180_interrupt() and added missing line

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:40:00 -08:00
Maxim Mikityanskiy bf5bff4779 staging: rtl8187se: Removed empty functions and one-iteration loop
Removed empty functions, their calls and 'do {} while (0)' loop
condition

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:40:00 -08:00
Maxim Mikityanskiy 51150d2737 staging: rtl8187se: Removed legacy rtl8225_rf_set_chan()
Removed rtl8225_rf_set_chan() and corresponding arrays, changed its
usage to rtl8225z2_rf_set_chan()

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:38:29 -08:00
Maxim Mikityanskiy 5c0ec2497f staging: rtl8187se: Removed dead functions
Removed stale functions that are never called

Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 12:38:29 -08:00
Peter Huewe f71ccaa4bf staging/rtl8187se: Fix compile warning 'is static but declared in .. which is not static'
When compiling this driver I get these compile warnings:

ieee80211.h:1227:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_empty_essid' which is not static [enabled by
default]
ieee80211.h:1233:3: warning: '______f' is static but declared in inline
function 'ieee80211_is_empty_essid' which is not static [enabled by
default]
ieee80211.h:1248:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1253:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1258:2: warning: '______f' is static but declared in inline
function 'ieee80211_is_valid_mode' which is not static [enabled by
default]
ieee80211.h:1272:3: warning: '______f' is static but declared in inline
function 'ieee80211_get_hdrlen' which is not static [enabled by default]
ieee80211.h:1274:3: warning: '______f' is static but declared in inline
function 'ieee80211_get_hdrlen' which is not static [enabled by default]

These functions are declared as extern inline but not 'overloaded'
anywhere so we can declare them static inline and get rid of the
warnings.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-29 15:01:02 -07:00
Wei Yongjun ceee26c0e0 staging: rtl8187se: using random_ether_addr() to generate random MAC
Using random_ether_addr() to generate a random Ethernet
address (MAC) that is not multicast and has the local
assigned bit set. Not need to duplicating its implementation.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:10:08 -07:00
Wei Yongjun f69ba6abda Staging: rtl8187se: use is_zero_ether_addr() instead of memcmp()
Using is_zero_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is all
zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:09:01 -07:00
Wei Yongjun 148d711654 staging: rtl8187se: use is_broadcast_ether_addr() instead of memcmp()
Using is_broadcast_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is broadcast
address.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:03:40 -07:00
Masanari Iida 3d604a398c staging: rtl8187se: Fix typo in staging/rtl8187se
Correct spelling typo and adjust comment line length.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:32:13 -07:00
Dan Carpenter 6fe864409b Staging: rtl8187se, rtl8192e: fix '&' vs '|' bugs
The original code is equivalent to:

	wrqu->retry.flags = 0x1000 & 0x0002;

so it just sets .flags to zero.  We should be ORing the values together
like r8192_wx_get_retry() does in drivers/staging/rtl8192u/r8192U_wx.c.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 10:52:32 -07:00
Joe Perches 14fc42355f staging: Remove test of is_broadcast with is_multicast
A broadcast packet is a multicast packet, no need to test twice.

Reorder one defective test in rtl_core of is_multi_ether_addr
before is_broadcast_ether_addr as the is_multi returns true for
broadcast frames.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 13:52:23 -07:00
Justin P. Mattock ed2cb4f3b5 Staging: rtl8187se: Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-18 16:58:16 -07:00
Masanari Iida 73e2918990 staging: Fix typo in multiple files
Collect spelling typo in multiple files within staging directory.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:31:01 -07:00