summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
AgeCommit message (Collapse)Author
2014-04-07Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12Scott Wood
2013-11-25staging: r8188eu: Fix AP modeLarry Finger
Two code lines were accidentally deleted. Restore them. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-13Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs updates from Al Viro: "All kinds of stuff this time around; some more notable parts: - RCU'd vfsmounts handling - new primitives for coredump handling - files_lock is gone - Bruce's delegations handling series - exportfs fixes plus misc stuff all over the place" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits) ecryptfs: ->f_op is never NULL locks: break delegations on any attribute modification locks: break delegations on link locks: break delegations on rename locks: helper functions for delegation breaking locks: break delegations on unlink namei: minor vfs_unlink cleanup locks: implement delegations locks: introduce new FL_DELEG lock flag vfs: take i_mutex on renamed file vfs: rename I_MUTEX_QUOTA now that it's not used for quotas vfs: don't use PARENT/CHILD lock classes for non-directories vfs: pull ext4's double-i_mutex-locking into common code exportfs: fix quadratic behavior in filehandle lookup exportfs: better variable name exportfs: move most of reconnect_path to helper function exportfs: eliminate unused "noprogress" counter exportfs: stop retrying once we race with rename/remove exportfs: clear DISCONNECTED on all parents sooner exportfs: more detailed comment for path_reconnect ...
2013-10-29staging: r8188eu: Fix sparse warnings in rtl_p2p.cLarry Finger
Sparse displays the following: CHECK drivers/staging/rtl8188eu/core/rtw_p2p.c drivers/staging/rtl8188eu/core/rtw_p2p.c:162:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_p2p.c:162:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_p2p.c:162:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_p2p.c:221:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_p2p.c:221:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_p2p.c:221:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_p2p.c:292:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_p2p.c:292:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_p2p.c:292:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_p2p.c:371:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_p2p.c:371:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_p2p.c:371:15: got restricted __le16 *<noident> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29staging: r8188eu: Fix sparse warnings in rtw_mlme_ext.cLarry Finger
Sparse displays the following: CHECK drivers/staging/rtl8188eu/core/rtw_mlme_ext.c drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1874:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1874:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:1874:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2221:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2221:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2221:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2583:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2583:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2583:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2750:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2750:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2750:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3002:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3002:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3002:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3197:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3197:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3197:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3311:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3311:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3311:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3563:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3563:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:3563:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4522:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4522:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4522:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4750:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4750:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4750:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4906:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4906:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4906:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5040:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5040:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5040:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5184:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5184:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5184:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5322:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5322:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5322:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5654:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5654:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5654:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5769:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5769:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5769:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5894:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5894:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5894:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5996:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5996:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:5996:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6066:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6066:15: expected unsigned short [usertype] *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6066:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6200:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6200:15: expected unsigned short *fctrl drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:6200:15: got restricted __le16 *<noident> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29staging: r8188eu: Fix sparse warnings in rtl8188e.cmd.cLarry Finger
Sparse displays the following: CHECK drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:285:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:285:15: expected unsigned short [usertype] *fctrl drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:285:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:368:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:368:15: expected unsigned short [usertype] *fctrl drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:368:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:403:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:403:15: expected unsigned short [usertype] *fctrl drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:403:15: got restricted __le16 *<noident> drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:465:15: warning: incorrect type in assignment (different base types) drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:465:15: expected unsigned short [usertype] *fctrl drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c:465:15: got restricted __le16 *<noident> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29staging: r8188eu: Fix sparse warnings in rtw_ieee80211.cLarry Finger
Sparse reports the following: CHECK drivers/staging/rtl8188eu/core/rtw_ieee80211.c drivers/staging/rtl8188eu/core/rtw_ieee80211.c:1593:14: warning: cast to restricted __le16 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-29staging: r8188eu: Set device type to wlanLarry Finger
The latest version of NetworkManager does not recognize the device as wireless without this change. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> # [3.12+] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-28staging: rtl8188eu: do not use comparisons on bool testsValentina Manea
This patch fixes coccinelle errors regarding comparisons used in bool tests. Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Reviewed-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-27drivers: staging: rtl8188eu: use 'ccflags-y' instead of EXTRA_CFLAGS in MakefileChen Gang
If command line use EXTRA_CFLAGS (e.g. "EXTRA_CFLAGS=-mmedium-calls" for arc architecture, with allmodconfig), it can not pass compiling, the related error: drivers/staging/rtl8188eu/core/rtw_ap.c:22:27: fatal error: osdep_service.h: No such file or directory Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-25rtl8188eu: remove dead codeAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-10-14staging: r8188eu: Convert driver to use external firmwareLarry Finger
As originally submitted, this driver acquired its firmware from data statements embedded in the source code. This information has been extracted into a binary file that has been accepted into the linux-firmware git repo as commit ffc47f1 entitled "rtlwifi: Add new firmware files for rtl8188eu". This patch switches the driver to use this file, and deletes the firmware data from the source. The TODO list is also updated. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: Remove unnecessary semicolonsJoe Perches
These aren't necessary after switch, if and while statements. Also remove some unnecessary braces where these semicolons were removed around single statement and some unnecessary blank lines. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11staging: r8188eu: Fix sparse warnings regarding static functionsValentina Manea
This fixes the following sparse warnings: * drivers/staging/rtl8188eu/core/rtw_cmd.c:221:5: warning: symbol 'rtw_cmd_filter' was not declared. Should it be static? * drivers/staging/rtl8188eu/core/rtw_cmd.c:1670:6: warning: symbol 'dynamic_chk_wk_hdl' was not declared. Should it be static? Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-08staging: r8188eu: Fix skb leak in usb_read_port_complete()Larry Finger
In the completion routine for a usb_fill_bulk_urb() call, an skb is leaked whenever the status of the USB transaction is not zero. A call to skb_put() is needed to fix the problem. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30Merge 3.12-rc3 into staging-nextGreg Kroah-Hartman
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26staging: r8188eu: Add new device IDLarry Finger
The DLink DWA-125 Rev D1 also uses this driver. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Sergey Kostanbaev <sergey.kostanbaev@gmail.com> Tested-by: Sergey Kostanbaev <sergey.kostanbaev@gmail.com> Cc: Sergey Kostanbaev <sergey.kostanbaev@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26staging: rtl8188eu: Fix typo in rtl8188eu/coreMasanari Iida
Correct spelling typo in rtl8188eu/core Signed-off-by: Masanari Iida <standby24x7@gmail.com> # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # On branch rtl8188eu-typo2 # Changes to be committed: # modified: drivers/staging/rtl8188eu/core/rtw_ap.c # modified: drivers/staging/rtl8188eu/core/rtw_br_ext.c # modified: drivers/staging/rtl8188eu/core/rtw_cmd.c # modified: drivers/staging/rtl8188eu/core/rtw_efuse.c # modified: drivers/staging/rtl8188eu/core/rtw_ieee80211.c # modified: drivers/staging/rtl8188eu/core/rtw_mlme.c # modified: drivers/staging/rtl8188eu/core/rtw_mlme_ext.c # modified: drivers/staging/rtl8188eu/core/rtw_security.c # Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26staging: rtl8188eu: Fix typo in rtl8188eu/includeMasanari Iida
Correct spelling typo in rtl8188eu/include Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26staging: rtl8188eu: Fix typo in rtl8188eu/os_depMasanari Iida
Correct spelling typo in rtl8188eu/os_dep Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26staging: rtl8188eu: Fix typo in rtl8188eu/halMasanari Iida
Correct spelling typo in rtl8188eu/hal Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: r8188eu: Add files for new drive: Cocci spatch "noderef"Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: r8188eu: Cocci spatch "noderef"Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: r8188eu: Add files for new drive: Cocci spatch "noderef"Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: r8188eu: remove needless check before usb_free_urb()Wei Yongjun
usb_free_urb(NULL) is safe and this check is not required. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25Merge 3.12-rc2 into staging-next.Greg Kroah-Hartman
This resolves the merge problem with two iio drivers that Stephen Rothwell pointed out. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in rtl8188eu/core/rtw_xmit.cLarry Finger
Smatch reports the following: CHECK drivers/staging/rtl8188eu/core/rtw_xmit.c drivers/staging/rtl8188eu/core/rtw_xmit.c:1570 dequeue_one_xmitframe() info: ignoring unreachable code. This code uses a while construction that has an unconditional break. This part of the code was restructured to use an if statement and the dead code was removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warnings in core/rtw_recv.cLarry Finger
Smatch reports the following: drivers/staging/rtl8188eu/core/rtw_recv.c:211 rtw_free_recvframe() warn: variable dereferenced before check 'precvframe' (see line 207) drivers/staging/rtl8188eu/core/rtw_recv.c:1803 amsdu_to_msdu() warn: variable dereferenced before check 'sub_skb' (see line 1784) The code was rearranged to eliminate the dereference before the check. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in hal/HalPhyRf_8188e.cLarry Finger
Smatch reported the following warning: drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c:1876 PHY_APCalibrate_8188E() info: ignoring unreachable code. Once the unreachable code was removed, the entire routine was removed, which led to the warning that phy_APCalibrate_8188E() was not used. It was also deleted along with some unused defines. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in core/rtw_wlan_util.cLarry Finger
A misplaced _func_exit_ macro leads to the following smatch warning: drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1105 rtw_check_bcn_info() info: ignoring unreachable code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warnings in odm_HWConfig.cLarry Finger
Smatch reports the following warnings: drivers/staging/rtl8188eu/hal/odm_HWConfig.c:302 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxPwr' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:319 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxMIMOSignalStrength' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:322 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyStaRpt->path_rxsnr' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:322 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyInfo->RxSNR' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:323 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'pPhyStaRpt->path_rxsnr' 2 <= 2 drivers/staging/rtl8188eu/hal/odm_HWConfig.c:323 odm_RxPhyStatus92CSeries_Parsing() error: buffer overflow 'dm_odm->PhyDbgInfo.RxSNRdB' 2 <= 2 These warnings are again due to the number of radio patchs being increased to 3 without adjustments to the array sizes. A duplicate and redundant definition was also removed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warnings in core/rtw_xmit.cLarry Finger
Smatch reports the following: drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:1500 hal_EfusePgPacketWriteData() info: ignoring unreachable code. drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2188 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2190 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2196 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_CCK_Base[rfPath]' 14 <= 14 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2197 Hal_ReadTxPowerInfo88E() error: buffer overflow 'pHalData->Index24G_BW40_Base[rfPath]' 14 <= 14 The first of these is trivial. The rest are due to an off-by-one error in a loop over the channels. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warnings for hal/rtl8188e_phycfg.cLarry Finger
Smatch reports the following: drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c:857 getTxPowerIndex88E() error: buffer overflow 'pHalData->BW20_24G_Diff' 2 <= 2 drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c:864 getTxPowerIndex88E() error: buffer overflow 'pHalData->BW20_24G_Diff' 2 <= 2 The array in question is large enough to handle RADIO_PATH_X, where X is A or B. The lines in question refer to RADIO_PATH_C, which is defined as 2. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in os_dep/ioctl_linux.cLarry Finger
Smatch reports the following: drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4891 set_group_key() warn: missing break? reassigning 'keylen' As it suggests, there is a missing break statement. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warnings in os_dep/ioctl_linux.cLarry Finger
Smatch reports the following: drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:941 rtw_wx_set_pmkid() warn: add some parenthesis here? drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:1042 rtw_wx_get_range() warn: assigning (-78) to unsigned variable 'range->avg_qual.level' drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:2629 rtw_get_ap_info() warn: add some parenthesis here? drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4043 rtw_rereg_nd_name() warn: add some parenthesis here? drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4052 rtw_rereg_nd_name() warn: add some parenthesis here? The warnings calling for adding parentheses all have "if (!memcmp() == true)" and are fixed by removing the "==true" part. The warning where a negative number is stored in an unsigned variable is fixed by biasing the result by 256. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in hal/usb_ops_linux.cLarry Finger
Smatch reports the following warning: drivers/staging/rtl8188eu/hal/usb_ops_linux.c:614 usb_read_port() warn: variable dereferenced before check 'precvbuf' (see line 611) Fixing this particular warning required some refactoring of the code. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in os_dep/osdep_service.cLarry Finger
Smatch reports the following warning: drivers/staging/rtl8188eu/os_dep/osdep_service.c:634 rtw_change_ifname() warn: variable dereferenced before check 'padapter' (see line 630) The dereference in question is deferred until the validity of 'padapter' is verified. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix a smatch warnings in core/rtw_recv.cLarry Finger
Smatch reports the following: drivers/staging/rtl8188eu/os_dep/recv_linux.c:227 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 139) The test in this location is removed and added in the free routine. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix some smatch errors in core/rtw_efuse.cLarry Finger
Smatch reports the following situations: drivers/staging/rtl8188eu/core/rtw_efuse.c:589 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 drivers/staging/rtl8188eu/core/rtw_efuse.c:598 rtw_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 drivers/staging/rtl8188eu/core/rtw_efuse.c:681 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 drivers/staging/rtl8188eu/core/rtw_efuse.c:690 rtw_BT_efuse_map_write() error: buffer overflow 'newdata' 8 <= 8 In these cases, it is possible to write beyond the end of an array. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Remove unreachable code in core/rtw_br_ext.cLarry Finger
In this file, a "return -1" immediately follows a "return 0". Remove the second line. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.Larry Finger
Smatch shows the following warning: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code. The cause is a module exit tracing statement after a return. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in os_dep/usb_intf.cLarry Finger
Smatch reports the following warning: CHECK drivers/staging/rtl8188eu/os_dep/usb_intf.c drivers/staging/rtl8188eu/os_dep/usb_intf.c:740 rtw_usb_if1_init() info: redundant null check on padapter->HalData calling kfree() Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.cLarry Finger
Smatch reports the following warning: "drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:8328 mlme_evt_hdl() error: buffer overflow 'wlanevents' 24 <= 24" 8321 /* checking if event code is valid */ 8322 if (evt_code >= MAX_C2HEVT) { ^^^^^^^^^^^^^^^^^^^^^^ 8323 RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nEvent Code(%d) mismatch!\n", evt_code)); 8324 goto _abort_event_; 8325 } 8326 8327 /* checking if event size match the event parm size */ 8328 if ((wlanevents[evt_code].parmsize != 0) && ^^^^^^^^^^^^^^^^^^^^ 8329 (wlanevents[evt_code].parmsize != evt_sz)) { 8330 RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, 8331 ("\nEvent(%d) Parm Size mismatch (%d vs %d)!\n", 8332 evt_code, wlanevents[evt_code].parmsize, evt_sz)); 8333 goto _abort_event_; 8334 } This warning results because the number of items in "enum rtw_c2h_event", which determines the value of MAX_C2HEVT, is one more than in "struct wlanevents". Adding an extra dummy event to the latter fixes the problem. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.cLarry Finger
Smatch reports the following warning: "drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2008 Hal_ReadPowerValueFromPROM_8188E() error: buffer overflow 'pwrInfo24G->IndexBW40_Base[rfPath]' 5 <= 5" drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c 2005 /* 2.4G default value */ 2006 for (group = 0; group < MAX_CHNL_GROUP_24G; group++) { 2007 pwrInfo24G->IndexCCK_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; 2008 pwrInfo24G->IndexBW40_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; The reason is that IndexCCK_Base[] has MAX_CHNL_GROUP_24G elements, but IndexBW40_Base is smaller by 1. Make them both have MAX_CHNL_GROUP_24G elements. Reported by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17Staging: rtl8188eu: rtw_wlan_util.c: Fixed checkpatch.pl warnings.Faris de Haan
Fixed a few of the coding style issues reported by checkpatch.pl Signed-off-by: Faris de Haan <farisdehaan@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17Staging: rtl8188eu: checkpatch.pl warnings removedFaris de Haan
Fixed some of the coding style issues reported by checkpatch.pl Signed-off-by: Faris de Haan <farisdehaan@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Adjust RX gainLarry Finger
In some circumstances, the performance of this driver is highly degraded, and ifconfig reports large numbers of dropped packets. By increasing the maximum RX gain from 0x3e to 0x4e, performance is greatly improved. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.Larry Finger
Smatch shows the following warning: drivers/staging/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code. The cause is a module exit tracing statement after a return. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.cLarry Finger
Smatch reports the following warning: "drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:8328 mlme_evt_hdl() error: buffer overflow 'wlanevents' 24 <= 24" 8321 /* checking if event code is valid */ 8322 if (evt_code >= MAX_C2HEVT) { ^^^^^^^^^^^^^^^^^^^^^^ 8323 RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nEvent Code(%d) mismatch!\n", evt_code)); 8324 goto _abort_event_; 8325 } 8326 8327 /* checking if event size match the event parm size */ 8328 if ((wlanevents[evt_code].parmsize != 0) && ^^^^^^^^^^^^^^^^^^^^ 8329 (wlanevents[evt_code].parmsize != evt_sz)) { 8330 RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, 8331 ("\nEvent(%d) Parm Size mismatch (%d vs %d)!\n", 8332 evt_code, wlanevents[evt_code].parmsize, evt_sz)); 8333 goto _abort_event_; 8334 } This warning results because the number of items in "enum rtw_c2h_event", which determines the value of MAX_C2HEVT, is one more than in "struct wlanevents". Adding an extra dummy event to the latter fixes the problem. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.cLarry Finger
Smatch reports the following warning: "drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2008 Hal_ReadPowerValueFromPROM_8188E() error: buffer overflow 'pwrInfo24G->IndexBW40_Base[rfPath]' 5 <= 5" drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c 2005 /* 2.4G default value */ 2006 for (group = 0; group < MAX_CHNL_GROUP_24G; group++) { 2007 pwrInfo24G->IndexCCK_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; 2008 pwrInfo24G->IndexBW40_Base[rfPath][group] = EEPROM_DEFAULT_24G_INDEX; The reason is that IndexCCK_Base[] has MAX_CHNL_GROUP_24G elements, but IndexBW40_Base is smaller by 1. Make them both have MAX_CHNL_GROUP_24G elements. Reported by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>