Commit graph

29 commits

Author SHA1 Message Date
Ovidiu Toader c4d6b8fbea drivers/staging/rtl8192u/r8192U_wx.c: fix warnings issued by sparse
This minor patch motivated by eudyptula challenge fixes the following warnings issued
by `sparse' in drivers/staging/rtl8192u/r8192U_wx.c:
 .../r8192U_wx.c:27:5: warning: symbol 'rtl8180_rates' was not declared. Should it be static?
 .../r8192U_wx.c:961:22: warning: symbol 'r8192_get_wireless_stats' was not declared. Should it be static?
 .../r8192U_wx.c:990:24: warning: symbol 'r8192_wx_handlers_def' was not declared. Should it be static?

Signed-off-by: Ovidiu Toader <ovi@phas.ubc.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:20 -07:00
Chaitanya Hazarey a2581a4a65 Staging: rtl8192u: r8192U_wx.c Fixed a code-style error about trailing whitespace
Fixed the following error reported by running checkpatch.pl

ERROR: trailing whitespace

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 19:56:48 -04:00
Chaitanya Hazarey 0b5b4e223a Staging: rtl8192u: r8192U_wx.c Fixed some more code-style warnings about spaces
Fixed the following warnings issued by checkpatch.pl

WARNING: please, no space before tabs

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 19:56:48 -04:00
Chaitanya Hazarey a08d541a26 Staging: rtl8192u: r8192U_wx.c Fixed code-style warnings
Fixed some of the following warning generated by checkpatch.pl:

WARNING: Missing a blank line after declarations

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 19:56:48 -04:00
Chaitanya Hazarey 69eb976bd9 Staging: rtl8192u: r8192U_wx.c Removed some more commented out dead code
Removed dead code from the file.

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:15:43 -07:00
Chaitanya Hazarey 31c207f4af Staging: rtl8192u: r8192U_wx.c Added a single space for code-style issue
Added a space around '|' to address:

ERROR: need consistent spacing around '|' (ctx:VxW)

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:13:25 -07:00
Chaitanya Hazarey 0bb927cf40 Staging: rtl8192u: r8192U_wx.c Removed all C99 comments
To address the error -

ERROR: do not use C99 // comments

Removed all C99 comments.

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:13:25 -07:00
Chaitanya Hazarey 2808a02332 Staging: rtl8192u: r8192U_wx.c removed commented dead code
Removed dead code, commented out printks and DMESG.

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:13:25 -07:00
Chaitanya Hazarey e00b8fdca8 Staging: rtl8192u: r8192U_wx.c Fixed a misplaced brace
Fixed a misplaced brace in a function

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29 13:43:23 -07:00
Chaitanya Hazarey 28cda5ae09 Staging: rtl8192u: r8192U_wx.c Added {} braces and newlines
Added {} braces and newlines to address the following:

ERROR: else should follow close brace '}'
ERROR: space required before the open brace '{'
ERROR: trailing statements should be on next line
ERROR: space required before the open parenthesis '('
ERROR: that open brace { should be on the previous line

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:33:04 -07:00
Chaitanya Hazarey 654d1ce918 Staging: rtl8192u: r8192U_wx.c Added missing spaces
Added spaces needed in the proper places to address:

WARNING: please, no spaces at the start of a line
WARNING: missing space after struct definition
ERROR: spaces required around that '!=' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:VxW)
ERROR: spaces required around that '&&' (ctx:VxV)
ERROR: spaces required around that '!=' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: space required before the open parenthesis '('
ERROR: space required before the open brace '{'
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that close brace '}'
ERROR: space prohibited before that '--' (ctx:WxO)
ERROR: space prohibited before that close parenthesis ')'
ERROR: space prohibited after that open parenthesis '('

Signed-off-by: Chaitanya Hazarey <c@24.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-28 14:33:03 -07:00
Joe Perches f8628a47ba staging: Convert __FUNCTION__ to __func__
Use the normal mechanism for emitting a function name.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25 11:05:07 -07:00
Joel Pelaez Jorge e6c1ef6ce9 Staging: rtl8192u: Remove old WIRELESS_EXT support
Remove support for building against ancient WIRELESS_EXT versions,
only leaving support for the current version: 22

Signed-off-by: Joel Pelaez Jorge <joelpelaez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 04:42:20 +09:00
Rui Miguel Silva 2930d0b977 staging: rtl8192u: fix checkpatch braces warning
fix some code style related to the use of braces in a one statement block

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:22:43 -04:00
Xenia Ragiadakou aa0cb59cfa 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: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 15:42:53 -07:00
Andrea Merello 559a4c318c staging: Update e-mail address for Andrea Merello
A lot of files contain reference to my old e-mail address.
Now I'm going not to read mail from it anymore, so update it
with my current address everywhere.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 22:03:53 -07:00
Xenia Ragiadakou b3d42bf187 staging: rtl8192u: fix read_nic_* functions
read_nic_*() functions are defined in r8192U_core.c.
They call internally usb_control_msg() to read the
nic registers and return the value read.
Following a remark made by Dan Carpenter, if usb_control_msg()
fails, the value returned will be invalid.

To accommodate for this, this patch changes the functions
to take a pointer as argument to set the value read and
return 0 on success and the error status on failure, so
that callers of read_nic_*() can check the return status.

Some other fixes introduced in read_nic_*() functions are:

The expressions (1<<EPROM_*_SHIFT) used to address and set
the individual bits of the eeprom register were replaced
with EPROM_*_BIT bitmasks to make the code more intuitive.
EPROM_*_BIT bitmasks were defined in r8192U_hw.h and
EPROM_*_SHIFT were removed.

In netdev_err(), which is called in case of failure,
the hardcoded function name in the error log message was
replaced with __func__ to reduce line size.
Also, from the error log message, it was omitted the word
"Timeout" and it is just reported the error code since the
failure can not only be due to timeout expiration but also
due to a memory allocation failure. In case of timeout
expiration, usb_start_wait_urb() prints an appropriate log
message when debug is enabled.

Finally, some minor fixes to the coding style were applied in
lines affected by the above changes, including the removal
of ifdef DEBUG_RX (the debugging of reads and writes of the
nic registers shall be done with explicit check on their
return status which will be added in a follow on patch).

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-06 11:57:16 -07:00
Xenia Ragiadakou ad6384591f STAGING: rtl8192u: fix checkpatch error by adding space after switch
This patch fixes the following checkpatch error:
ERROR: space required before the open parenthesis '('

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:17:58 -07:00
Xenia Ragiadakou b81c2b0a33 STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_wx.c
This patch fixes the pointer position in r8192U_wx.c
to meet the kernel coding style conventions.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-13 07:11:49 -07:00
Sebastian Hahn 24fbe87525 staging/rtl8192u: use same indent for switch and case
Fix the checkpatch error "switch and case should be at the same indent"

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:41 -08:00
Jennifer Naumann 0db7a34e6c staging/rtl8192u: put { on same line as struct
This fixes the checkpatch error "open brace '{' following struct go on the
same line" in staging/rtl8192u

Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:53:40 -08:00
Sebastian Hahn 35997ff0ca staging/rtl8192u: cleanfile run
Run cleanfile on all files inside drivers/staging/rtl819u

Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de>
Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 12:52:58 -08:00
Justin P. Mattock ffae3055d2 staging: rtl8192u Fix a typo.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:50:09 -07:00
Justin P. Mattock 589b3d06fd staging: rtl8192u Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-30 10:48:48 -04:00
Jim Cromie b330f606ed staging: replace open-coded ARRAY_SIZEs
spatch http://coccinelle.lip6.fr/rules/array.cocci did these.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 15:25:55 -07:00
David Chosrova 0e7a3e7a74 Staging: rtl8192u: remove dead code to disable dot11d
This patch removes all the ENABLE_DOT11D ifdefs.
It is always defined for driver. DOT11D has to do with regulatory domains.

What prompted this patch was a warning message in Sparse.

drivers/staging/rtl8192u/r8192U_core.c:247:1: warning: "eqMacAddr"
redefined in file included from drivers/staging/rtl8192u/:81:81:
drivers/staging/rtl8192u/dot11d.h:35:1: warning: this is the location
of the previous definition

Now there are no ifdefs around dot11d.h it made no sense to have this
second definition, so I removed that macro as well. ( Thanks Dan ;-) ).

Acked-by. Dan Carpenter <error27@gmail.com>
Signed-off-by: David Chosrova <dada2372@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-01 14:51:16 -08:00
Mauro Carvalho Chehab 50a09b3b09 Staging: rtl8192u: remove dead code
Remove #ifse against older kernel versions;
Remove codes marked with #if 0;
Remove #if 1

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Mauro Carvalho Chehab e406322b4b Staging: rtl8192u: remove bad whitespaces
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00
Jerry Chuang 8fc8598e61 Staging: Added Realtek rtl8192u driver to staging
Add Realtek linux driver for rtl8192u as provided by Realtek

rtl8192u_linux_2.6.0006.1031.2008.tar.gz, send to me C/C staging ML.

This version won't compile against upstream, doesn't follow
Linux CodingStyle and has their own ieee80211 stack.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:22 -08:00