summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
AgeCommit message (Collapse)Author
2021-08-01staging: rtl8188eu: remove rtl8188eu driver from staging dirPhillip Potter
This driver was deprecated with the introduction of the r8188eu driver, based upon Realtek sources that were modified for CFG80211 support and other fixes on GitHub by Larry Finger. As that driver is now progressing at pace, we should remove this one. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210731133809.196681-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27staging: rtl8188eu: remove write-only power struct componentMartin Kaiser
pwrpriv->bFwCurrentInPSMode is initialized and updated but nobody reads its value. Remove this write-only component. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210725155902.32433-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-25staging: rtl8188eu: remove all RT_TRACE calls from core/rtw_pwrctrl.cPhillip Potter
Remove all RT_TRACE calls from core/rtw_pwrctrl.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210625000756.6313-16-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-24staging: rtl8188eu: remove all DBG_88E_LEVEL calls from core/rtw_pwrctrl.cPhillip Potter
Remove all DBG_88E_LEVEL calls from core/rtw_pwrctrl.c as this macro is unnecessary, and these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210623234902.7411-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-15staging: rtl8188eu: remove all DBG_88E calls from core/rtw_pwrctrl.cPhillip Potter
Remove all DBG_88E calls from core/rtw_pwrctrl.c as this macro is unnecessary, and many of these calls are dubious in terms of necessity. Removing all calls will ultimately allow the removal of the macro itself. Also remove pmlmepriv declaration from within rtw_ps_processor as it is now no longer used. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210615001507.1171-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove a constant variableMartin Kaiser
enqueue is always 0. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-22staging: rtl8188eu: use netdev routines for private dataMartin Kaiser
This driver implements its own routines to allocate, access and free the private data of its net_device. Use the functionality from the networking core instead. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210321162009.15447-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-22staging: rtl8188eu: clean up block comment style issuesMichael Straube
Clean up block comment style issues to follow kernel coding style and clear checkpatch warnings. WARNING: Block comments should align the * on each line WARNING: Block comments use a trailing */ on a separate line WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200919090040.9613-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-18staging: r8188eu: remove unnecessary type cast of rtw_netdev_priv() resultIvan Safonov
The type cast padapter = (struct adapter *)rtw_netdev_priv(dev); do nothing because type of rtw_netdev_priv() result is (struct adapter *). Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20200815203306.121039-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-01staging: rtl8188eu: add spaces around operatorsMichael Straube
Add spaces around operators to improve readability and clear checkpatch issues. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200629161255.28371-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-06-25Staging: rtl8188eu: Fix alignment coding style issuePeilin Ye
Fix "Alignment should match open parenthesis" issues reported by checkpatch.pl for all files under drivers/staging/rtl8188eu/core. Line rtw_mlme_ext.c:373 is left overlength for readability. Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com> Link: https://lore.kernel.org/r/1593013645-19130-1-git-send-email-yepeilin.cs@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-25Staging: rtl8188eu: core: rtw_pwrctrl: fixed a coding style issueCarlos Guerrero Álvarez
Fixed a checkpatch.pl warning: the constant should be in the right side of the comparison. Signed-off-by: Carlos Guerrero Álvarez <carlosteniswarrior@gmail.com> Link: https://lore.kernel.org/r/20200423183546.123612-1-carlosteniswarrior@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: rtl8188eu: remove return variable from rtw_pwr_unassociated_idleMichael Straube
Function rtw_pwr_unassociated_idle returns boolean values. Remove the return variable ret and the exit label to simplify the function a little bit. Return true or false directly instead. Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20191123151635.155138-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: rtl8188eu: cleanup declarations in rtw_pwrctrl.cMichael Straube
Replace tabs with spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20191123151635.155138-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: rtl8188eu: remove unnecessary parentheses in rtw_pwrctrl.cMichael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20191123151635.155138-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-14staging: rtl8188eu: remove unnecessary conversion to boolMichael Straube
Comparsions evaluate to bool, explicit conversion with ternary operator is overly verbose and unnecessary, so remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20191013131249.34422-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18Staging: rtl8188eu: core: rtw_pwrctrl.c: Fix a comparision warning.Sanjana Sanikommu
Move the constant to the right side of comparision. Issue found by checkpatch.pl semantic patch results for rtw_ap.c WARNING:Comparision should place the constant on the right side of the test. Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22staging: rtl8188eu: rename LedControl8188eu to avoid CamelCaseMichael Straube
Rename the function LedControl8188eu to avoid CamelCase. LedControl8188eu -> led_control_8188eu Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-15staging: rtl8188eu: cleanup comparsions to falseMichael Straube
Cleanup remaining comparsions to false. if(x == false) -> if(!x) Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-25staging: rtl8188eu: Remove unnecessary parenthesesNathan Chancellor
Clang warns when multiple pairs of parentheses are used for a single conditional statement. drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((pwrpriv->rpwm == pslv)) { ~~~~~~~~~~~~~~^~~~~~~ drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: remove extraneous parentheses around the comparison to silence this warning if ((pwrpriv->rpwm == pslv)) { ~ ^ ~ drivers/staging/rtl8188eu/core/rtw_pwrctrl.c:295:21: note: use '=' to turn this equality comparison into an assignment if ((pwrpriv->rpwm == pslv)) { ^~ = drivers/staging/rtl8188eu/hal/odm.c:1062:27: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ ~~~~~~~~~~~~~~~~~~~~^~~~ drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: remove extraneous parentheses around the comparison to silence this warning if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ ~ ^ ~ drivers/staging/rtl8188eu/hal/odm.c:1062:27: note: use '=' to turn this equality comparison into an assignment if ((pregpriv->wifi_spec == 1))/* (pmlmeinfo->HT_enable == 0)) */ ^~ = Link: https://github.com/ClangBuiltLinux/linux/issues/163 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-21staging: rtl8188eu: remove blank linesMichael Straube
Remove unrequired blank lines as reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26staging: rtl8188eu: add SPDX identifiersMichael Straube
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>
2017-10-18rtl8188eu: Fix a possible sleep-in-atomic bug in _rtw_pwr_wakeupJia-Ju Bai
The driver may sleep under a spinlock, and the function call path is: rtw_set_802_11_disassociate(acquire the spinlock) _rtw_pwr_wakeup usleep_range --> may sleep To fix it, usleep_range is replaced with udelay. This bug is found by my static analysis tool and my code review. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18staging: rtl8188eu: Convert timers to use timer_setup()Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Juliana Rodrigues <juliana.orod@gmail.com> Cc: Ivan Safonov <insafonov@gmail.com> Cc: Gargi Sharma <gs051095@gmail.com> Cc: sayli karnik <karniksayli1995@gmail.com> Cc: Yamanappagouda Patil <goudapatilk@gmail.com> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Victor Carvajal <carva005@gmail.com> Cc: Sebastian Haas <sehaas@deebas.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging:rtl8188eu Fix coding style issuesJanani Sankara Babu
This patch aims to solve coding style issues by placing constants on the right side of the test Signed-off-by: Janani Sankara Babu <jananis37@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17staging:rtl8188eu Fix use __func__ for function nameJanani Sankara Babu
This patch fixes the WARNING: Prefer using '"%s...", __func__' to using this function's name, in a string Signed-off-by: Janani Sankara Babu <jananis37@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging: rtl8188eu: fixed 'braces are not necessary for single statement ↵Yamanappagouda Patil
blocks'. Fixed checkpatch.pl warnings in rtl8188eu module core folder files. Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03staging: rtl8188eu: In core directory, fixed 'missing a balnk line after ↵Yamanappagouda Patil
declarations' warnings. Fixed checkpatch.pl warnings in rtl8188eu/core directory. Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging:r8188eu: remove wrappers for LedControl8188eu functionIvan Safonov
There is no reason to use these wrappers. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging:r8188eu: remove pm_netdev_open functionIvan Safonov
netdev_open and ips_netdrv_open are used instead of pm_netdev_open. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutexBinoy Jayan
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should be written as one. Semaphores are going away in the future. _enter_pwrlock was using down_interruptible(), so the lock could be broken by sending a signal. This could be a bug, because nothing checks the return code here. Hence, using mutex_lock instead of the interruptible version. Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock, _exit_pwrlock and _rtw_down_sema. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: rtl8188eu: Remove license paragraph with mailing addressKyle Kuffermann
This fixes the issue reported by checkpatch.pl: "Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL." in all files for the rtl8188eu driver. Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng
Remove rtw_get_passing_time_ms function and adjust type of relevant variables. Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24drivers: staging: rtl8188eu Refactored rtw_free_assoc_resourcesBuţiu Alexandru Octavian
Refactored rtw_free_assoc_resources to avoid sparse warnings about different contexts for basic lock Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16staging: rtl8188eu: remove unused functionSudip Mukherjee
The inline function rtw_set_ips_deny() was only defined but was never used. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16Staging: rtl8188eu: Eliminate use of _init_timerVaishali Thakkar
This patch introduces the use of API function setup_timer instead of driver specific function init_timer as it is the preferred and standard way to set and setup the timer. To be compatible with the changes, argument types of referenced functions are changed. Also, definition of function _init_timer is removed as it is no longer needed after this change. Here, these cases are handled using Coccinelle and semantic patch used for this is as follows: @@ expression x, y; identifier a, b;@@ - _init_timer (&x, y, a, b); + setup_timer (&x, a, (unsigned long)b); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: rtw_pwrctrl: removed space before semicolon.Surya Seetharaman
WARNING: space prohibited before semicolon Signed-off-by: Surya Seetharaman<suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: rtw_pwrctrl: removed a checkpatch warning.Surya Seetharaman
WARNING: void function return statements are not generally useful Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03Staging: rtl8188eu: rtw_pwrctrl: fixed checkpatch warning.Surya Seetharaman
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30staging: rtl8188eu: core: Remove useless cast on void pointerTapasweni Pathak
void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Build tested it. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09staging: rtl8188eu: Use msecs_to_jiffies() instead of rtw_ms_to_systime()navin patidar
Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09staging: rtl8188eu: Remove P2P supportnavin patidar
We've already removed non-standard ioctl handlers used by driver to support P2P mode. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09staging: rtl8188eu: Remove usb_osintf.h header file.navin patidar
Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: rtl8188eu: Move usb_[read, write]() declarations to usb_ops_linux.hnavin patidar
Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: rtl8188eu: Remove function _rtw_read32()navin patidar
_rtw_read32() is a wrapper function, being used to call usb_read32(). Call usb_read32() directly and drop _rtw_read32(). Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: rtl8188eu:Move rtw_hw_[suspend, resume]() to rtw_pwrctrl.cnavin patidar
rtw_hw_[suspend,resume]() functions are used only in rtw_pwrctrl.c, so move these functions there. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: rtl8188eu: Remove bCardDisableWOHSM from struct adapternavin patidar
driver doesn't use value stored in bCardDisableWOHSM. Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: rtl8188eu: Remove pbuddy_adapter from struct adapternavin patidar
Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26staging: rtl8188eu: Remove unused function rtw_interface_ps_func()navin patidar
Signed-off-by: navin patidar <navin.patidar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: rtl8188eu: use time_before/time_after and change type of ips_deny_timeManuel Schölling
To be future-proof and for better readability the time comparisons are modified to use time_before/_after() instead of plain, error-prone math. To suppress compiler warnings the type of ips_deny_time was changed. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>