summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/hal_init.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8712: fix CamelCase in fw_priv structRobert Eshleman2018-11-071-5/+5
| | | | | | | | Rename fields in fw_priv struct from CamelCase to snake_case. Reported by checkpatch. Signed-off-by: Robert Eshleman <bobbyeshleman@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: replace licence header with SPDX licence idAndré Lehmann2018-09-201-9/+1Star
| | | | | | | fixed warning found by checkpatch Signed-off-by: André Lehmann <lenneman@web.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove redundant zero assignment to val32Colin Ian King2017-11-281-1/+0Star
| | | | | | | | | | | | Variable val32 is being assigned a zero value that is never read since val32 is being updated immediately afterwards. Remove this redundant assignment, cleans up clang warning: drivers/staging/rtl8712/hal_init.c:339:2: warning: Value stored to 'val32' is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fix unbalanced braces around else statementLiam Ryan2017-09-171-2/+2
| | | | | | | | | | | | | | | | Fix checkpath-reported unbalanced braces in the following areas 221: FILE: drivers/staging/rtl8712/hal_init.c:221: 392: FILE: drivers/staging/rtl8712/os_intfs.c:392: 363: FILE: drivers/staging/rtl8712/rtl8712_cmd.c:363: 889: FILE: drivers/staging/rtl8712/rtl8712_recv.c:889: 902: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:902: 84: FILE: drivers/staging/rtl8712/rtl871x_ioctl_set.c:84: 580: FILE: drivers/staging/rtl8712/rtl871x_mlme.c:580: 593: FILE: drivers/staging/rtl8712/usb_intf.c:593: Signed-off-by: Liam Ryan <liamryandev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: changed typecast to __leJannik Becher2017-01-031-6/+6
| | | | | | | | | Fixed sparse warning. Changed uint to __le16 and __le32. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8712: Fixed alignment to match open parenthesisParth Sane2016-05-011-4/+5
| | | | | | | Fixed alignment to match open parenthesis. Signed-off-by: Parth Sane <laerdevstudios@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fixed FSF address warning in hal_init.cParth Sane2016-03-281-4/+0Star
| | | | | | | 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>
* staging: rtl8712: hal_init.c: fix comment block code styleJuliana Rodrigues2016-03-281-4/+8
| | | | | | | | | This patch fixes several warnings caused by malformed comments on hal_init.c and found by checkpatch.pl. Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: braces should be used on all armsLuis de Bethencourt2015-10-251-5/+6
| | | | | | | | Fix all instances of the following checkpatch.pl check: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: usleep_range is preferred over udelayAmitoj Kaur Chawla2015-10-131-2/+2
| | | | | | | | | | | Fix checkpatch.pl issue: "CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt". Replace `udelay()` with a call to `usleep_range()` with a reasonable upper limit determined by the other sleeping functions present. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNELAmitoj Kaur Chawla2015-10-131-1/+1
| | | | | | | | | Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is used in atomic context and only needed when functions are not allowed to sleep whereas the function is later calling msleep(). Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove NULL comparisonAmitoj Kaur Chawla2015-10-081-1/+1
| | | | | | | | | Remove NULL comparison by using '!' operator. Problem found using checkpatch.pl CHECK: Comparison to NULL could be written "!padapter->halpriv.hal_bus_init" Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove NULL comparisonAmitoj Kaur Chawla2015-10-081-1/+1
| | | | | | | | | Remove NULL comparison by using '!' operator. Problem found using checkpatch.pl CHECK: Comparison to NULL could be written "!ptmpchar" Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Add space around '&'Amitoj Kaur Chawla2015-10-081-2/+2
| | | | | | | | | Add space around operator '&'. Problem found using checkpatch.pl CHECK: spaces preferred around that '&' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Add spaces around '|'Amitoj Kaur Chawla2015-10-081-5/+5
| | | | | | | | | Add space around operator '|'. Problem found using checkpatch.pl CHECK: spaces preferred around that '|' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Add space around '+'Amitoj Kaur Chawla2015-10-081-12/+12
| | | | | | | | | Add space around operator '+'. Problem found using checkpatch.pl CHECK: spaces preferred around that '+' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging rtl8172: Remove unnecessary typecastVatika Harlalka2015-03-091-1/+1
| | | | | | | | | Using addressof and then casting to the original type is unneeded. So these casts can be removed. Issue detected via Coccinelle script. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove unused variablesSudip Mukherjee2014-10-291-7/+2Star
| | | | | | | | | | | | | | | | | | unused variables are removed. These variables were only assigned some values and after that they were never being used. So they are safe to be removed , and it has been build tested. I left a call to r8712_read32(padapter, TCR) and r8712_read8(padapter, SDIO_HCPWM) . r8712_read32() and r8712_read8() is ultimately calling usb_read32() and usb_read8() respectively. and they are again calling r8712_usbctrl_vendorreq(). this r8712_usbctrl_vendorreq() is communicating through the usb bus and is sending and receiving the control msg. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove redundant castRasmus Villemoes2014-10-291-1/+1
| | | | | | | | struct firmware::data has type const u8*, as does *ppmappedfw, so the cast to u8* is unnecessary and slightly confusing. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fixed else not required after returnSarah Khan2014-10-021-4/+2Star
| | | | | | | | | WARNING: Else generally not required after return checkpatch.pl warning in hal_init.c Fixed by removing else Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fixed missing blank lineSarah Khan2014-09-241-0/+1
| | | | | | | | | WARNING : Missing a blank line after declaration checkpatch.pl warning in hal_init.c Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove useless variable 'fw_found'Thomas Vegas2014-06-201-2/+0Star
| | | | | | | | | 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>
* staging: rtl8712: remove _malloc()Vitaly Osipov2014-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes all usage of _malloc() and the function itself. Most uses are straightforward replacements by kmalloc(..., GFP_ATOMIC), because this was the definition of _malloc(). In a few places it was possible to use kzalloc() or memdup_user. A further improvement would be to replace GFP_ATOMIC with GFP_KERNEL where possible. Verified by compilation only. Initial replacement done by running a Coccinelle script along the lines of: @@ type T; expression E; identifier V; @@ - V = (T) _malloc(E); + V = kmalloc(E, GFP_ATOMIC); @@ expression E, E1; @@ - E1 = _malloc(E); + E1 = kmalloc(E, GFP_ATOMIC); Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8712: replace printk with better solutionsPrzemo Firszt2013-01-121-8/+9
| | | | | | | | Replace printk with netdev_printk helpers, dev_printk helpers or pr_err/warn/info if there is no device info available. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: delete all duplicated endian crap from rtl8712 driverPaul Gortmaker2012-05-101-1/+0Star
| | | | | | | | | | | This driver had headers like big_endian.h, little_endian.h, swab.h and yet we can throw them all in the trash can and the thing still builds on x86-64 and ppc, just by deleting the references to the deleted files. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* staging: r8712u: Use asynchronous firmware loadingLarry Finger2012-02-081-19/+43
| | | | | | | | | | 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>
* staging: r8712u: include module.h where neededStephen Rothwell2011-10-041-0/+1
| | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Merging Realtek's latest (v2.6.6). Updated include directives.Ali Bahar2011-09-071-0/+5
| | | | | | | | | | | | These are the new include directives for header files. The following were (somehow!) not explicity in Realtek's, but proved necessary: "linux/usb.h" is needed for usb_alloc_urb(); "linux/interrupt.h" is needed for tasklet_struct. It was often a nested include. 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>
* Staging: Merge branch 'staging-next' into 2.6.38-rc3Greg Kroah-Hartman2011-02-021-4/+7
|\ | | | | | | | | | | | | | | | | This was done to resolve conflicts in the following files due to patches in Linus's tree and in the staging-next tree: drivers/staging/brcm80211/brcmsmac/wl_mac80211.c drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: r8712u: Fix memory leak in firmware loadingLarry Finger2011-01-201-4/+7
| | | | | | | | | | | | | | The error path leaks the firmware struct. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging: r8712u: Firmware changes for driverLarry Finger2011-01-211-1/+2
| | | | | | | | | | | | | | | | | | * select FW_LOADER in Kconfig - From: Stefan Lippers-Hollmann <s.l-h@gmx.de> * declare MODULE_FIRMWARE for r8712u and change to correct directory * delete 10K line farray.h containing internal firmware Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | staging: r8712u: Switch driver to use external firmware from linux-firmwareLarry Finger2011-01-211-5/+17
|/ | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Add module parameter to disable turbo modeLarry Finger2010-08-311-1/+2
| | | | | | 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>
* staging: r8712u: Fix sparse warningsLarry Finger2010-08-311-0/+1
| | | | | Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: r8712u: Add the new driver to the mainline kernelLarry Finger2010-08-201-0/+356
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>