Commit graph

27 commits

Author SHA1 Message Date
Greg Donald 0b4ef0a641 drivers: staging: rtl8192u: Fix space required after that ',' errors
Fix checkpatch.pl space required after that ',' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:56:38 -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
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
Ana Rey bf316434ae staging: rtl8192u: Delete duplicate function declarations and extern keyword
Delete the duplicate function declarations in r8192U_dm.c.

These function declarations are defined in r8192U_dm.h.

Also, delete the 'extern' keyword of these function definitions.

Fix the following sparse warnings:

  CHECK   drivers/staging/rtl8192u/r8192U_dm.c
drivers/staging/rtl8192u/r8192U_dm.c:159:1: warning: function 'init_hal_dm' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:179:13: warning: function 'deinit_hal_dm' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:245:17: warning: function 'hal_dm_watchdog' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:278:13: warning: function 'init_rate_adaptive' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:878:17: warning: function 'dm_txpower_trackingcallback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1609:13: warning: function 'dm_cck_txpower_adjust' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1776:13: warning: function 'dm_change_dynamic_initgain_thresh' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2543:13: warning: function 'dm_init_edca_turbo' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2782:17: warning: function 'dm_rf_pathcheck_workitemcallback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:3142:13: warning: function 'dm_fsync_timer_callback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:3481:13: warning: function 'dm_shadow_init' with external linkage has definition

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:30:01 -07:00
Ana Rey 5cd3b24908 staging: rtl8192u: Delete 'DM_CTSToSelfSetting' function in r8192U_dm.c
Delete the DM_CTSToSelfSetting function that is not used in
anywhere in the driver.

Fix sparse warnings:
drivers/staging/rtl8192u/r8192U_dm.c:2623:6: warning: symbol 'DM_CTSToSelfSetting' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:30:01 -07:00
Ana Rey e635b0793d staging: rtl8192u: Delete 'dm_change_fsync_setting' function in r8192U_dm.c
Delete the 'dm_change_fsync_setting' function that is not used in
anywhere in the driver.

Fix sparse warnings:

drivers/staging/rtl8192u/r8192U_dm.c:1812:6: warning: symbol 'dm_change_fsync_setting' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:30:01 -07:00
Himangi Saraogi c541fa8756 staging:rtl8192u: drop explicit externs
This patch removes use of explicit extern specifier and quietens the
sparse warnings:
drivers/staging/rtl8192u/r8192U_dm.c:159:1: warning: function 'init_hal_dm' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:179:13: warning: function 'deinit_hal_dm' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:245:17: warning: function 'hal_dm_watchdog' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:278:13: warning: function 'init_rate_adaptive' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:878:17: warning: function 'dm_txpower_trackingcallback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1609:13: warning: function 'dm_cck_txpower_adjust' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1776:13: warning: function 'dm_change_dynamic_initgain_thresh' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1846:1: warning: function 'dm_change_fsync_setting' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:1863:1: warning: function 'dm_change_rxpath_selection_setting' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2543:13: warning: function 'dm_init_edca_turbo' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2663:13: warning: function 'DM_CTSToSelfSetting' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:2782:17: warning: function 'dm_rf_pathcheck_workitemcallback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:3142:13: warning: function 'dm_fsync_timer_callback' with external linkage has definition
drivers/staging/rtl8192u/r8192U_dm.c:3481:13: warning: function 'dm_shadow_init' with external linkage has definition

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 11:07:56 -07:00
Xenia Ragiadakou 97d6f4a9f9 staging: rtl8192u: remove #ifndef RTL8192U and the code inside it
This patch removes the unused code inside #ifndef RTL8192U header guard
and the guard itself, since RTL8192U is defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou f326fe2a63 staging: rtl8192u: remove #ifndef RTL8190P guard from r8192U_dm.c
This patch removes #ifndef RTL8190P header guard since RTL8190P is not
defined anywhere in rtl8192u code.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou 91e39f09e5 staging: rtl8192u: remove code inside #ifdef RTL8190P in r8192U_dm.c
This patch removes the unused code that resides inside #ifdef RTL8190P
header guard since RTL8190P is not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:24 -07:00
Xenia Ragiadakou dd747fa582 staging: rtl8192u: remove unused dm_gpio_change_rf_callback()
This patch removes dm_gpio_change_rf_callback() because it is not called
anywhere and it resides inside an #ifdef RTL8192E guard while RTL8192E
is not defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou 1e27ab87d1 staging: rtl8192u: remove #ifdef RTL8192U guard in r8192U_dm.c
This patch removes #ifdef RTL8192U header guards from r8192U_dm.c, since
RTL8192U is defined in the included r8192U.h header.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou 95b672bbf7 staging: rtl8192u: remove dm_check_rfctrl_gpio()
This patch removes dm_check_rfctrl_gpio() because it does nothing when
RTL8192U is defined.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -07:00
Xenia Ragiadakou f6150b40e9 staging: rtl8192u: remove cmpk_message_handle_tx()
The function cmpk_message_handle_tx() is called only in r8192U_dm.c in two
places. The first call resides outside an #ifdef RTL8192U guard, and since
RTL8192U is defined this call can be removed. At the other site this function
is called, there is no check on its return value. Since cmpk_message_handle_tx()
does not do anything else other than returning true, it can be safely removed.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:51:23 -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 0009631bc2 rtl8192u: remove whitespace after '(' and before ')' in r8192U_dm.c
This patch fixes the following checkpatch errors, in r8192U_dm.c:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:45:53 -07:00
Xenia Ragiadakou 33c2aa14a8 rtl8192u: fix whitespace around ~ in r8192U_dm.c
This patch fixes the following checkpatch error:
ERROR: space prohibited after that '~'

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:44:50 -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 999d594b78 STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_dm.c
This patch fixes the pointer position in r8192U_dm.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-12 08:42:50 -07:00
Sebastian Hahn de13a3dad6 staging/rtl8192u: do not init statics to 0
Fix the checkpatch error "do not initialize statics to 0 or NULL"

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
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 4c234ebcf4 staging: "rtl8192e/r8192u" typo change ContiuneDiffCount.
As mentioned by jesper juhl, we should probably change ContiuneDiffCount
to ContinueDiffCount. Below you will find the changes to do so.  I have
compile tested this and everything builds with the changes, as for
testing on the hardware I am unable to do.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:52:12 -07:00
Justin P. Mattock 8ef3a7ed35 staging:rtl8192u Fix typos and comments
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-01 21:50:58 -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
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