aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-05-15staging: rtl8188eu, rtl8723bs: fix spelling mistake "Cancle" -> "Cancel"Colin Ian King1-2/+2
Trivial fix to spelling mistakes in a comments and RT_TRACE text. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: checkpatch - fix typos in commentsMatthew Giassa1-8/+8
Resolving checkpatch issue: CHECK: 'Regsiter' may be misspelled - perhaps 'Register'? CHECK: 'Interrup' may be misspelled - perhaps 'Interrupt'? All instances resolved. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: checkpatch - remove mixed spaces/hard-tabsMatthew Giassa1-15/+15
Resolving checkpatch issue: WARNING: please, no space before tabs All instances resolved. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: checkpatch - remove multiple blank linesMatthew Giassa1-5/+0
Resolving checkpatch issue: CHECK: Please don't use multiple blank lines All instances resolved. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Do not use assignment in if conditionJustin Vreeland1-1/+2
Ensure checkpatch compliance Signed-off-by: Justin Vreeland <justin@jvreeland.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Fix spacing around '<'Justin Vreeland1-1/+1
Ensure checkpatch compliance Signed-off-by: Justin Vreeland <justin@jvreeland.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Fix pointer styleJustin Vreeland1-3/+3
Fix "(foo*)" should be "(foo *)" Fix "foo * bar" should be "foo *bar" Signed-off-by: Justin Vreeland <justin@jvreeland.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Move braces to same line as conditionalJustin Vreeland3-21/+18
Ensure checkpatch compliance Signed-off-by: Justin Vreeland <justin@jvreeland.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Macros with complex values should be enclosed in parenthesesJustin Vreeland1-1/+4
Enclosing macros with complex values ensures expression is evaluated as expected. Signed-off-by: Justin Vreeland <justin@jvreeland.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Wrap multi-line macros in do-while loopJustin Vreeland1-36/+45
Wrapping in do-while ensures macros are executed as expected. Signed-off-by: Justin Vreeland <justin@jvreeland.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Fix initialization of static variablesJustin Vreeland4-8/+8
Do not initialize static to 0 Do not initialize static to false Signed-off-by: Justin Vreeland <justin@jvreeland.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Fix coding style issuesAdheer Chandravanshi1-13/+10
checkpatch.pl reported errors for use of extra whitespaces in the function prototypes. Removed extra spaces to meet the coding standards. Signed-off-by: Adheer Chandravanshi <adheerchandravanshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: rtl8723bs: Fix checkpatch space errors in os_dep/sdio_ops_linux.cBingyu Zhou1-12/+12
Detected the follow errors by checkpatch.pl -f ERROR: spaces required around that '<' ERROR: space required after that ';' Signed-off-by: Bingyu Zhou <rain.by.zhou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-05Merge tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds174-0/+109150
Pull staging/IIO updates from Greg KH: "Here is the big staging tree update for 4.12-rc1. It's a big one, adding about 350k new lines of crap^Wcode, mostly all in a big dump of media drivers from Intel. But there's other new drivers in here as well, yet-another-wifi driver, new IIO drivers, and a new crypto accelerator. We also deleted a bunch of stuff, mostly in patch cleanups, but also the Android ION code has shrunk a lot, and the Android low memory killer driver was finally deleted, much to the celebration of the -mm developers. All of these have been in linux-next with a few build issues that will show up when you merge to your tree" Merge conflicts in the new rtl8723bs driver (due to the wifi changes this merge window) handled as per linux-next, courtesy of Stephen Rothwell. * tag 'staging-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1182 commits) staging: fsl-mc/dpio: add cpu <--> LE conversion for dpaa2_fd staging: ks7010: remove line continuations in quoted strings staging: vt6656: use tabs instead of spaces staging: android: ion: Fix unnecessary initialization of static variable staging: media: atomisp: fix range checking on clk_num staging: media: atomisp: fix misspelled word in comment staging: media: atomisp: kmap() can't fail staging: atomisp: remove #ifdef for runtime PM functions staging: atomisp: satm include directory is gone atomisp: remove some more unused files atomisp: remove hmm_load/store/clear indirections atomisp: kill off mmgr_free atomisp: clean up the hmm init/cleanup indirections atomisp: handle allocation calls before init in the hmm layer staging: fsl-dpaa2/eth: Add maintainer for Ethernet driver staging: fsl-dpaa2/eth: Add TODO file staging: fsl-dpaa2/eth: Add trace points staging: fsl-dpaa2/eth: Add driver specific stats staging: fsl-dpaa2/eth: Add ethtool support staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver ...
2017-04-28staging: rtl8723bs: declare private function as staticKenneth Hsu1-1/+2
This fixes a sparse warning regarding an undeclared symbol. Since the function is private to rtw_recv.c, it should be declared as static. Signed-off-by: Kenneth Hsu <kennethhsu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: rtl8723bs: Fix assignment in if condition in os_dep/sdio_intf.cBingyu Zhou1-5/+10
ERROR: do not use assignment in if condition Detected by scripts/checkpatch.pl -f Signed-off-by: Bingyu Zhou <rain.by.zhou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: rtl8723bs: rework debug configuration handlingArnd Bergmann11-59/+62
I ran into this warning during randconfig testing: drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_deinit': drivers/staging/rtl8723bs/os_dep/rtw_proc.c:738:25: error: unused variable 'drv_proc' [-Werror=unused-variable] drivers/staging/rtl8723bs/os_dep/rtw_proc.c: In function 'rtw_adapter_proc_replace': drivers/staging/rtl8723bs/os_dep/rtw_proc.c:762:25: error: unused variable 'drv_proc' [-Werror=unused-variable] The problem is that the code procfs code gets built even when CONFIG_PROC_FS is disabled, but some functions are turned into empty stubs then. This is easily addressed by adding an #ifdef around the definition of the CONFIG_PROC_DEBUG macro. However, I could not bear looking at the macro name that clashes with the Kconfig name space, so I also renamed it to simply PROC_DEBUG, along with the other rtl8723bs specific CONFIG_DEBUG_* macros that I renamed the same way. This is consistent with how we handle the same checks in the non-staging rtlwifi driver. As the code path for !CONFIG_PROC_DEBUG had not been tested properly, it turned out to be incorrect and requires adding 'static inline' annotations for the stub handlers, and moving some variables around. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: rtl8723bs: fix empty-body warningArnd Bergmann3-12/+14
The newly added driver causes lots of warnings like drivers/staging/rtl8723bs/core/rtw_recv.c: In function 'validate_recv_frame': drivers/staging/rtl8723bs/core/rtw_recv.c:1602:4: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] DBG_COUNTER(adapter->rx_logs.core_rx_pre_data_handled); drivers/staging/rtl8723bs/core/rtw_xmit.c: In function 'update_attrib': drivers/staging/rtl8723bs/core/rtw_xmit.c:726:3: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown); drivers/staging/rtl8723bs/hal/HalPhyRf.c: In function 'ODM_TXPowerTrackingCallback_ThermalMeter': drivers/staging/rtl8723bs/hal/HalPhyRf.c:146:4: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] drivers/staging/rtl8723bs/hal/HalPhyRf.c:529:6: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] drivers/staging/rtl8723bs/hal/HalPhyRf.c:559:6: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] When DBG_COUNTER() etc is defined as a non-empty macro, we get the intended behavior and no warning. Using no_printk() for printing helper functions as the added advantage of compile-time checking format strings Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: rtl8723bs: clean up identical code on an if statementColin Ian King1-5/+1
The two different paths for an if statement are identical and hence we can just replace it with the single statement. Detected by CoverityScan, CID#1428443 ("Identical code for different branches") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: rtl8723bs: remove redundant comparisons of unsigned ints with >= 0Colin Ian King1-3/+3
The comparison of mode >= 0 is redundant as mode is a u32 and this is always true. Remove this redundant code. Detected with CoverityScan ("Unsigned compared against 0") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-14staging: rtl8723bs: ensure cmd is large enough for %4s scanf formatColin Ian King1-1/+1
char array cmd is being scanned in using a %4s scanf format specifier and so cmd must be an array of 5 chars. Increase size to 5 chars to ensure we don't have an overflow. Detected with static analysis by cppcheck: "(error) Width 4 given in format string (no. 1) is larger than destination buffer 'cmd[4]', use %3s to prevent overflowing it." Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: rtl8723bs: fix spelling mistake: "acquire"Colin Ian King1-1/+1
trivial fix to spelling mistake in pr_info message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: rtl8723bs: fix spelling mistakes in RT_TRACE messagesColin Ian King3-3/+8
Fix a few spelling mistakes in RT_TRACE messages and split up wide lines to span multiple lines Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: rtl8723bs: force driver to be built as a module.Greg Kroah-Hartman1-0/+1
Due to the ton of global symbols, the driver has to be a module otherwise the build blows up if it is compiled into the kernel. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: rtl8723bs: remove null test before kfreeAishwarya Pant5-37/+15
kfree(..) on a NULL pointer is a no-op; the null test here is redundant. Detected by coccicheck. Signed-off-by: Aishwarya Pant <aishpant@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: rtl8723bs: Add missing include <linux/of.h> to fix compile errorHans de Goede1-1/+1
As reported by Stephen Rothwell when merging staging-next, drivers/staging/rtl8723bs/core/rtw_ieee80211.c does not compile due to of_get_property not being declared. Explicitly include <linux/of.h> to fix this compile error. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: core: rtw_cmd: drop unneeded null testsJulia Lawall1-4/+2
kfree returns immediately on NULL so the tests are not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: core: rtw_cmd: drop unneeded null testJulia Lawall1-2/+1
kfree returns immediately on NULL so the tests are not needed. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting error in core/rtw_pwrctrl.cLarry Finger1-1/+1
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_pwrctrl.c drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:641 LeaveAllPowerSaveModeDirect() warn: inconsistent indenting Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting problems in core/rtw_odm.cLarry Finger1-4/+6
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_odm.c drivers/staging/rtl8723bs/core/rtw_odm.c:109 rtw_odm_dbg_comp_msg() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_odm.c:146 rtw_odm_ability_msg() warn: if statement not indented Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.cLarry Finger1-13/+12
Smatch lists the following: CHECK drivers/staging/rtl8723bs/core/rtw_mlme_ext.c drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:525 _mgt_dispatcher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1595 OnAssocReq() error: buffer overflow 'pstapriv->sta_aid' 32 <= 32 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2391 dump_mgntframe_and_wait() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2420 dump_mgntframe_and_wait_ack() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4969 process_80211d() error: testing array offset 'i' after use. drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5738 linked_status_chk() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6459 sitesurvey_cmd_hdl() warn: inconsistent indenting The indenting problems were fixed with white-space changes. The error at line 1595 was the result of an off-by-one error in a for loop. The error at line 4969 was not fixed as that code lies inside a block of code that only is needed for 5G channels. This chip only works at 2.4 GHz. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix white-space errors in core/rtw_recv.cLarry Finger1-13/+8
Smart reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_recv.c drivers/staging/rtl8723bs/core/rtw_recv.c:598 portctrl() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_recv.c:838 sta2sta_data_frame() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_recv.c:1547 validate_recv_frame() warn: inconsistent indenting Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix some white-space errors in core/rtw_security.cLarry Finger1-240/+229
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_security.c drivers/staging/rtl8723bs/core/rtw_security.c:266 rtw_wep_encrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:433 rtw_seccalctkipmic() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:749 rtw_tkip_encrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:865 rtw_tkip_decrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1383 aes_cipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1415 aes_cipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1430 aes_cipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1582 rtw_aes_encrypt() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1651 aes_decipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1739 aes_decipher() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_security.c:1792 aes_decipher() warn: curly braces intended? drivers/staging/rtl8723bs/core/rtw_security.c:1809 aes_decipher() warn: inconsistent indenting All of the above are fixed with white-space changes. A few unneeded blank lines are deleted. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting problem in core/rtw_sta_mgt.cLarry Finger1-1/+1
Sparse reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_sta_mgt.c drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:25 _rtw_init_stainfo() warn: inconsistent indenting This problem is fixed with a white-spcae change. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix some indenting problems and a potential data overrunLarry Finger1-5/+5
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_wlan_util.c drivers/staging/rtl8723bs/core/rtw_wlan_util.c:67 cckrates_included() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_wlan_util.c:81 cckratesonly_included() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_wlan_util.c:815 rtw_camid_alloc() warn: should '1 << (cam_id)' be a 64 bit type? The first two are fixed with white-space changes. The third is fixed by restricting cam_id to be less than 32. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting mistakes in core/rtw_mlme.cLarry Finger1-19/+18
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_mlme.c drivers/staging/rtl8723bs/core/rtw_mlme.c:862 rtw_survey_event_callback() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme.c:1102 rtw_free_assoc_resources() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_mlme.c:1165 rtw_indicate_disconnect() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme.c:2830 rtw_restructure_ht_ie() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_mlme.c:2991 rtw_update_ht_cap() warn: inconsistent indenting All of there are simple white-space errors. A typo is also fixed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting mistakes in core/rtw_ieee80211.cLarry Finger1-8/+5
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_ieee80211.c drivers/staging/rtl8723bs/core/rtw_ieee80211.c:83 rtw_is_cckrates_included() warn: if statement not indented drivers/staging/rtl8723bs/core/rtw_ieee80211.c:98 rtw_is_cckratesonly_included() warn: if statement not indented These warnings are fixed with white-space changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting mistake in core/rtw_ap.cLarry Finger1-52/+47
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_ap.c drivers/staging/rtl8723bs/core/rtw_ap.c:382 expire_timeout_chk() warn: inconsistent indenting Fixing this requires changing the indentatikon of a long for loop. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix possible usage of NULL pointer in core/rtw_debug.cLarry Finger1-1/+0
Smatch reports the following: CHECK drivers/staging/rtl8723bs/core/rtw_debug.c drivers/staging/rtl8723bs/core/rtw_debug.c:454 proc_get_survey_info() error: we previously assumed 'phead' could be null (see line 453) drivers/staging/rtl8723bs/core/rtw_debug.c:455 proc_get_survey_info() warn: variable dereferenced before check 'phead' (see line 454) In the code, there are two successive calls to get_head(). The second is removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting problems in core/rtw_xmit.cLarry Finger1-5/+5
Smatch logs the following: CHECK drivers/staging/rtl8723bs/core/rtw_xmit.c drivers/staging/rtl8723bs/core/rtw_xmit.c:277 _rtw_init_xmit_priv() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_xmit.c:294 _rtw_free_xmit_priv() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_xmit.c:295 _rtw_free_xmit_priv() warn: inconsistent indenting drivers/staging/rtl8723bs/core/rtw_xmit.c:946 xmitframe_addmic() warn: inconsistent indenting These are fixed with white-space changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting problem for hal/hal_com.cLarry Finger1-5/+5
Smatch lists the following: CHECK drivers/staging/rtl8723bs/hal/hal_com_phycfg.c drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2090 Hal_ChannelPlanToRegulation() warn: inconsistent indenting Fixed by changing the white space. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indening problem in hal/hal_com_phycfg.cLarry Finger1-1/+1
Smatch reports the following: CHECK drivers/staging/rtl8723bs/hal/hal_com_phycfg.c drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:2090 Hal_ChannelPlanToRegulation() warn: inconsistent indenting This warning is fixed with a white-space change. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting problems in hal/HalHWImg8723B_BB.cLarry Finger1-3/+3
Smatch lists the following: CHECK drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c:314 ODM_ReadAndConfig_MP_8723B_AGC_TAB() warn: for statement not indented drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c:583 ODM_ReadAndConfig_MP_8723B_PHY_REG() warn: for statement not indented drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c:586 ODM_ReadAndConfig_MP_8723B_PHY_REG() warn: inconsistent indenting These were all fixed with white-space changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix potential usage while NULL error in hal/rtl8723b_hal_init.cLarry Finger1-6/+7
Smatch logs the following: CHECK drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:518 rtl8723b_FirmwareDownload() error: we previously assumed 'pFirmware' could be null (see line 382) Fixing this error required a rewrite of the error exits from this routine. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.cLarry Finger2-25/+15
Smatch lists the following: CHECK drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:470 rtw_cfg80211_ibss_indicate_connect() error: we previously assumed 'scanned' could be null (see line 466) drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:942 rtw_cfg80211_set_encryption() warn: inconsistent indenting drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:955 rtw_cfg80211_set_encryption() error: buffer overflow 'psecuritypriv->dot11DefKey' 4 <= 4 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1017 rtw_cfg80211_set_encryption() error: buffer overflow 'padapter->securitypriv.dot118021XGrpKey' 5 <= 5 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1216 cfg80211_rtw_set_default_key() warn: inconsistent indenting drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2498 rtw_cfg80211_monitor_if_xmit_entry() error: we previously assumed 'skb' could be null (see line 2495) drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2850 cfg80211_rtw_start_ap() warn: if statement not indented drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2860 cfg80211_rtw_start_ap() warn: if statement not indented drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3417 rtw_cfg80211_preinit_wiphy() warn: inconsistent indenting drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3547 rtw_wdev_alloc() info: ignoring unreachable code. The indenting warnings were fixed by simple white space changes. The section where 'scanned' could be null required an immediate exit from the routine at that point. A similar fix was required where 'skb' could be null. The two buffer overflow errors were caused by off-by-one errors. While locating these problems, another one was found in os_dep/ioctl_linux.c. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting mistake in os_dep/mlme_linux.cLarry Finger1-2/+2
Smatch reports the following warning: CHECK drivers/staging/rtl8723bs/os_dep/mlme_linux.c drivers/staging/rtl8723bs/os_dep/mlme_linux.c:149 rtw_os_indicate_disconnect() warn: inconsistent indenting Again, a simple change in the white space fixes this problem. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting warning in os_dep/os_intfs.cLarry Finger1-1/+1
Smatch logs the following warning: CHECK drivers/staging/rtl8723bs/os_dep/os_intfs.c drivers/staging/rtl8723bs/os_dep/os_intfs.c:1082 ips_netdrv_open() warn: inconsistent indenting A simple change in the white space handles this warning. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix dereference before check warning in os_dep/recv_linux.cLarry Finger1-2/+1
Smatch lists the following warning: CHECK drivers/staging/rtl8723bs/os_dep/recv_linux.c drivers/staging/rtl8723bs/os_dep/recv_linux.c:353 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 312) This warning is fixed by removing the test at line 353. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting warning in os_dep/rtw_proc.cLarry Finger1-1/+2
Smatch lists the following warning: CHECK drivers/staging/rtl8723bs/os_dep/rtw_proc.c drivers/staging/rtl8723bs/os_dep/rtw_proc.c:102 rtw_drv_proc_open() warn: inconsistent indenting This warning is fixed with a simple change in the white space. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-09staging: rtl8723bs: Fix indenting warning in os_dep/xmit_linux.cLarry Finger1-1/+1
Smatch issues the warning CHECK drivers/staging/rtl8723bs/os_dep/xmit_linux.c drivers/staging/rtl8723bs/os_dep/xmit_linux.c:42 _rtw_pktfile_read() warn: inconsistent indenting A simple indent changes fixes this. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>