Commit Graph

30 Commits

Author SHA1 Message Date
Wan Jiabing 6f08cc6c2f drivers: staging: rtl8712: _adapter is declared twice
struct _adapter has been declared at 23rd line.
Remove the duplicate.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20210325080050.861273-1-wanjiabing@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-26 14:59:33 +01:00
Deepak Mishra 8810493fc5 staging: rtl8712: Fixed CamelCase wkFilterRxFF0 renamed to wk_filter_rx_ff0
In process of cleaning up struct _adapter in drv_types.h, wkFilterRxFF0
     is renamed to to wk_filter_rx_ff0 to fix a checkpatch reported issue.

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13 11:52:39 +02:00
Deepak Mishra 6cc6677aee staging: rtl8712: Fixed CamelCase lockRxFF0Filter renamed to lock_rx_ff0_filter
In process of cleaning up struct _adapter in drv_types.h, lockRxFF0Filter
 is renamed to to lock_rx_ff0_filter to fix a checkpatch reported issue.

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13 11:52:39 +02:00
Deepak Mishra 3300a661a9 staging: rtl8712: removed unused variables from struct _adapter
This patch removed following unused member variables from struct _adapter

IsrContent, xmitThread, evtThread, recvThread

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10 17:57:22 +02:00
Deepak Mishra cc96550b69 staging: rtl8712: Fixed CamelCase cmdThread rename to cmd_thread
This patch renames CamelCase cmdThread to cmd_thread in struct _adapter in
drv_types.h and in os_intfs.c

This was reported by checkpatch.pl

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10 17:57:21 +02:00
Deepak Mishra 43dfe7df06 staging: rtl8712: Removed redundant code from function oid_rt_pro_write_register_hdl
In function oid_rt_pro_write_register_hdl, Adapter->ImrContent is
assigned with RegRWStruct->value but Adapter->ImrContent is never used
anywhere else. So those lines has no impact and are removed removed.

As that was the only place where ImrContent was used, so the member
variable is removed from the structure _adapter

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10 17:57:21 +02:00
Deepak Mishra 906ad742fd staging: rtl8712: Fixed CamelCase for EepromAddressSize
This patch renames CamelCase EepromAddressSizefrom to eeprom_address_size in
struct _adapter and in related files drv_types.h, rtl871x_eeprom.c, usb_intf.c

This was reported by checkpatch.pl

Signed-off-by: Deepak Mishra <linux.dkm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-10 17:57:21 +02:00
Himadri Pandya 7e5173822c staging: rtl8712: rename bSuspended to suspended
- Rename structure field bSuspended to suspended to avoid camelcase.
Suggested by checkpatch.
 - Change type to bool as the variable is used as a boolean.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:05:18 +01:00
Himadri Pandya 5b8d98f171 staging: rtl8712: rename bSurpriseRemoved to surprise_removed
- Rename structure field bSurprisedRemoved to surprised_removed to avoid
camelcase. Suggested by checkpatch.
 - Change type to bool as the variable is used as a boolean.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:05:18 +01:00
Himadri Pandya 0ec6fc6f45 staging: rtl8712: rename bDriverStopped to driver_stopped
- Rename structure field bDriverStopped to driver_stopped to avoid
camelcase. Suggested by checkpatch.
 - Change type to bool as the variable is being used as boolean.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:05:18 +01:00
Michael Straube e24c1f8658 staging: rtl8712: add SPDX identifiers
This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03 11:36:09 -07:00
Arushi Singhal 4cacc00256 staging: rtl8712: Fixed 'tabstop' coding style warning
Replace a mix of tabs and spaces indentation by tabs only.

Fixed checkpatch warning "Statements should start on a tabstop".

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:03:43 -08:00
Parth Sane 501ef12a74 staging: rtl8712: Fixed FSF address warning in drv_types.h
Fixed checkpatch warning after removing FSF address block as per guidelines.

Signed-off-by: Parth Sane <laerdevstudios@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Hemmo Nieminen 39e9526cec staging: rtl8712: Improve suspend/resume functionality.
Cancel pending URBs during suspend operation to avoid receiving ESHUTDOWN
in read/write completion callbacks while the device is suspended.

Receiving ESHUTDOWN in read/write completion callbacks will cause the
driver to enter a non-functioning "stopped" state from which the driver is
unable to recover without reloading the module.

Signed-off-by: Hemmo Nieminen <hemmo.nieminen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 19:52:30 -08:00
Punit Vara 0c9968ef9b Staging: rtl8712: drv_types.h:Coding style warnings fix for block comments
This is patch to the drv_types.h file that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:34:46 +01:00
Michael Hornung 21fa7be013 staging: rtl8712: Do coding style cleanup
* Fix checkpatch.pl warnings "Fix missing space after return type warning".

Signed-off-by: Michael Hornung <mhornung.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:39:50 +08:00
James A Shackleford 143198fd31 staging: rtl8712: remove #define _workitem struct work_struct
_workitem is just a #define for work_struct.  Remove the #define and
use struct work_struct directly instead.

Signed-off-by: James A Shackleford <shack@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 12:30:46 -07:00
Thomas Vegas 22649bb2b6 staging: rtl8712: Remove useless variable 'fw_found'
The net device only exists when firmware is loaded successfully.
Firmware presence variable is only used through r871xu_dev_remove() and
this function already checks for net device existence.

Signed-off-by: Thomas Vegas <thomas@grouk.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 16:40:07 -07:00
Gulsah Kose ba2ac29ed6 staging: rtl8712: Fix multiple spaces after return type
Fix checkpatch.pl issues with multiple spaces after return type in
drv_types.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-18 12:06:31 -07:00
Larry Finger 73ee07faee staging: r8712u: Remove defines that are not used
This driver has a number of defines, etc. that are not used.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:14:08 -07:00
Justin P. Mattock be10ac2b96 staging: rtl8712: Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-09 13:46:01 -07:00
Greg Kroah-Hartman b91867f2ee Merge tag 'staging-3.3-rc3' into staging-next
This was done to resolve some merge issues with the following files that
had changed in both branches:
	drivers/staging/rtl8712/rtl871x_sta_mgt.c
	drivers/staging/tidspbridge/rmgr/drv_interface.c
	drivers/staging/zcache/zcache-main.c

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 10:58:25 -08:00
Larry Finger 86587b671b staging: r8712u: Simplify semaphores
I am preparing to convert this driver from semaphore to mutex locking,
The first step has been to eliminate a number of semaphores that were
initialized but never used, and one whose only use was a single "up"
after initialization. A total of 9 semaphores were removed in this process.

One other change was to remove some inline semaphore routines that were
unused.

In addition, several cases had the following structure:

down()
if () {
   ...
}
up()

The locking overhead was reduced by moving the up/down inside the if
block.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:12:55 -08:00
Larry Finger 8c213fa591 staging: r8712u: Use asynchronous firmware loading
In https://bugs.archlinux.org/task/27996, failure of driver r8712u is
reported, with a timeout during module loading due to synchronous loading
of the firmware. The code now uses request_firmware_nowait().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-08 14:14:15 -08:00
Ali Bahar f95302eed9 staging: r8712u: Merging Realtek's latest (v2.6.6). tx: NULL _in_ spin lock.
In transmit path, r8712_free_xmitframe(), the pkt pointer is now
NULLed _within_ the spin lock.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 17:00:34 -07:00
Ali Bahar cf3e6881e3 staging: r8712u: Merging Realtek's latest (v2.6.6). Copyright banners.
Only copyright banners have been added to these files. No functional changes.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 17:00:29 -07:00
Ali Bahar d1661dfdb9 staging: r8712u: Sets to SSID, and to AP MAC#, can now be done when the interface is Down.
The original Realtek code assumed that ioctl Sets get done after the
interface is Up. This included the set to Essid and to the AP MAC#;
and it fit Realtek's installation procedure. But there is no such
necessity for the adapter, and no stated requirement found
elsewhere. Also, wireless drivers typically permit this.

A typical error message used to be:
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device wlan0 ; Operation not permitted.

Signed-off-by: Ali Bahar <ali@internetDog.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 12:24:31 -07:00
Vitaliy Ivanov e44ba033c5 treewide: remove duplicate includes
Many stupid corrections of duplicated includes based on the output of
scripts/checkincludes.pl.

Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-20 16:08:19 +02:00
Larry Finger d19b86473e staging: r8712u: Add module parameter to disable turbo mode
Signed-off-by: Albert Wang <albert_wang@realtek.com.tw>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 10:59:52 -07:00
Larry Finger 2865d42c78 staging: r8712u: Add the new driver to the mainline kernel
This code is for a completely new version of the Realtek 8192 USB devices
such as the D-Link DWA-130. The Realtek code, which was originally for
Linux, Windows XP and Windows CE, has been stripped of all code not needed
for Linux. In addition, only one additional configuration variable, which
enables AP mode, remains.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Tested-by: Frederic Leroy <fredo@starox.org>
2010-08-20 10:15:30 -05:00