Commit graph

23 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 e42c0e77fa staging: rtl8192u: Delete 'fwSendNullPacket' function in r819xU_firmware.c
Delete the fwSendNullPacket function that is not used in anywhere in
the driver.

Fix sparse warnings:
drivers/staging/rtl8192u/r819xU_firmware.c:109:1: warning: symbol 'fwSendNullPacket' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:36:25 -07:00
Ana Rey 2cc817c09e staging: rtl8192u: make in r819xU_firmware.c some local functions static
Make some local functions static (firmware_init_param, fw_download_code,
CPUcheck_maincodeok_turnonCPU and CPUcheck_firmware_ready) and fix
coding style in these function declarations when It is necessary.

Fixed the following sparse warnings in r819xU_firmware.c

  CHECK   drivers/staging/rtl8192u/r819xU_firmware.c
drivers/staging/rtl8192u/r819xU_firmware.c:20:6: warning: symbol 'firmware_init_param' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware.c:32:6: warning: symbol 'fw_download_code' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware.c:159:6: warning: symbol 'CPUcheck_maincodeok_turnonCPU' was not declared. Should it be static?
drivers/staging/rtl8192u/r819xU_firmware.c:208:6: warning: symbol 'CPUcheck_firmware_ready' was not declared. Should it be static?

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-19 09:36:25 -07:00
Xenia Ragiadakou ba9aabb710 staging: rtl8192u: remove code inside #ifdef RTL8190P in r819xU_firmware.c
This patch removes the unused code that resides inside #ifdef RTL8190P 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 f8518efa4e staging: rtl8192u: check dev_alloc_skb() return value in fw_download_code()
This patch adds a check whether skb allocation, in fw_download_code(), was
successful.

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 ccb0ec8338 staging: rtl8192u: remove unused code in fw_download_code()
This patch removes the code that resides outside #ifdef RTL8192U,
since RTL8192U is defined in r8192U.h and removes, also, the header
guard itself.

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 14bc0d4f07 rtl8192u: fix whitespace around if statements in r819xU_firmware.c
This patch fixes a part of the following checkpatch error:
ERROR: space required before the open parenthesis '('
by adding space after if

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16 16:43:34 -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 12fbccbe18 STAGING: rtl8192u: fix checkpatch error about pointer position in r819xU_firmware.c
This patch fixes the pointer position in r819xU_firmware.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:48 -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
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 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
Stefan Lippers-Hollmann 589c3ca00b staging: rtl8192u: declare MODULE_FIRMWARE
declaring MODULE_FIRMWARE has apparently forgotten while removing the embedded
firmware arrays in 0a8692b534 (rtl8192u_usb:
Remove built-in firmware images).

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: stable <stable@kernel.org> [2.6.39+]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-02 16:07:50 -07:00
Ben Hutchings 0a8692b534 rtl8192u_usb: Remove built-in firmware images
These firmware images are already unused.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:19:11 -08:00
Uwe Kleine-König 9b0131cb24 staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:23:26 -07:00
Dave Jones 2addf798e4 Staging: rtl8192u: remove a copy of 80211.h
We had a request to enable one of the realtek network drivers in staging in Fedora.
After a quick lookover, I decided this wasn't such a great idea.

In doing so though, I noticed we have 6 copies of ieee80211.h there now,
Two drivers even have two copies of it.  (Even worse, cleanups have been pointlessly
happening to both files).  The patch below removes one of them, which is asides
from whitespace, identical afaics. With a change of filename to the #include,
it all still compiles for me.

A better fix would be to remove both, and have them use the core ieee80211 stuff,
but this is at least a tiny step in the right direction.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:25:30 -07: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