summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8188eu
AgeCommit message (Collapse)Author
2019-03-21staging: rtl8188eu: Fix potential NULL pointer dereference of kcallocAditya Pakki
hwxmits is allocated via kcalloc and not checked for failure before its dereference. The patch fixes this problem by returning error upstream in rtl8723bs, rtl8188eu. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Acked-by: Mukesh Ojha <mojha@codeaurora.org> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28staging: rtl8188eu: remove unused P2P_PRIVATE_IOCTL_SET_LENMichael Straube
Defined P2P_PRIVATE_IOCTL_SET_LEN is not used in the driver code, so remove it from wifi.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-28staging: rtl8188eu: remove unused enum P2P_PROTO_WK_IDMichael Straube
Enumeration P2P_PROTO_WK_ID is not used in the driver code, so remove it from wifi.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: rtl8188eu: cleanup comparsions to NULL in rtl8188eu_xmit.cMichael Straube
Use !x instead of x == NULL. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: rtl8188eu: add spaces around '*' in rtl8188e_cmd.cMichael Straube
Add spaces around '*' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: rtl8188eu: remove unused function declarationsMichael Straube
There are no definitions of odm_DIGbyRSSI_LPS(), ODM_PhyStatusQuery() and ODM_MacStatusQuery() in the driver code. So remove the unused declarations from the headers odm.h and odm_hwconfig.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: rtl8188eu: remove blank line between declarationsMichael Straube
Remove unnecessary blank line between declarations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: rtl8188eu: cleanup declarations in rtl8188e_cmd.cMichael Straube
Replace tabs with spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: rtl8188eu: remove unnecessary parentheses in rtl8188e_cmd.cMichael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: rtl8188eu: fix bad indentation for conditional statementStephen Martin
Fixed else block indentation Signed-off-by: Stephen Martin <lockwood@opperline.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04staging: rtl8188eu: cleanup ODM_CmnInfoPtrArrayHook()Michael Straube
Convert single case switch to if statement to cleanup and simplify code in ODM_CmnInfoPtrArrayHook(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30staging: rtl8188eu: refactor rtw_reset_securitypriv()Michael Straube
Move the declaration of 'psec_priv' out of the else path and use it in the if path as well to improve readability. Also clears line over 80 characters checkpatch warnings. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30staging: rtl8188eu: &array[0] -> arrayMichael Straube
Change '&array[0]' to just 'array' in rtw_reset_securitypriv(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30staging: rtl8188eu: remove unncessary asignment to cleanup long lineMichael Straube
Instead of first asign 'wrqu.data.length = p - buff' use 'p - buff' directly in min_t() in the subsequent asignment. Clears a line over 80 characters checkpatch warning. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30staging: rtl8188eu: cleanup declarations in mlme_linux.cMichael Straube
Replace tabs with spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30staging: rtl8188eu: remove unnecessary initializationsMichael Straube
The local variables backup_index, backup_counter and backup_time in rtw_reset_securitypriv() are all asigned before their uses, so initialization to zero is not necessary. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-30staging: rtl8188eu: cleanup comments in mlme_linux.cMichael Straube
Cleanup comments to avoid lines over 80 characters and follow kernel style for block comments. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-28Merge 5.0-rc4 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-25staging: rtw_ieee80211: fix constant comparison warningStephen Martin
Fixed comparison on right side of test warnings. Signed-off-by: Stephen Martin <lockwood@opperline.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: rtl8188eu: cleanup indenting issue in mlme_linux.cMichael Straube
Cleanup indenting issue reported by checkpatch. CHECK: Alignment should match open parenthesis Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: rtl8188eu: add spaces around operators in mlme_linux.cMichael Straube
Add spaces around '+' and '-' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: rtl8188eu: add spaces around operators in os_intfs.cMichael Straube
Add spaces around '+', '<<' and '*' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: rtl8188eu: cleanup declarations in os_intfs.cMichael Straube
Replace tabs with spaces and/or remove extra spaces in declarations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8188eu: Refactoring struct ndis_802_11_ssid from CamelCase to ↵Florian Büstgens
correct code style. rtl8188eu uses CamelCase for many struct members. Refactors the ndis_802_11_ssid members Ssid and SsidLength to keep correct code style. Issue found by checkpatch. Signed-off-by: Florian Büstgens <flbue@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8188eu: Add device code for D-Link DWA-121 rev B1Michael Straube
This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/a0619a07cd1e Signed-off-by: Michael Straube <straube.linux@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8188eu: remove unnecessary parentheses in os_intfs.cMichael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: rtl8188eu: Replace kzalloc with kcallocGustavo A. R. Silva
Replace kzalloc() function with its 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a, b, gfp) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: rtl8188eu: Fix module loading from tasklet for WEP encryptionLarry Finger
Commit 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a WEP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, which can be forced by calling lib80211_get_crypto_ops() directly rather than indirectly through try_then_request_module(). With this change, no BUG messages are logged. Fixes: 2b2ea09e74a5 ("staging:r8188eu: Use lib80211 to decrypt WEP-frames") Cc: Stable <stable@vger.kernel.org> # v4.17+ Cc: Michael Straube <straube.linux@gmail.com> Cc: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: rtl8188eu: Fix module loading from tasklet for CCMP encryptionLarry Finger
Commit 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt") causes scheduling while atomic bugs followed by a hard freeze whenever the driver tries to connect to a CCMP-encrypted network. Experimentation showed that the freezes were eliminated when module lib80211 was preloaded, which can be forced by calling lib80211_get_crypto_ops() directly rather than indirectly through try_then_request_module(). With this change, no BUG messages are logged. Fixes: 6bd082af7e36 ("staging:r8188eu: use lib80211 CCMP decrypt") Cc: Stable <stable@vger.kernel.org> # v4.17+ Reported-and-tested-by: Michael Straube <straube.linux@gmail.com> Cc: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: cleanup brace coding style issuesMichael Straube
Cleanup brace coding style issues reported by checkpatch. ERROR: space required before the open brace '{' WARNING: braces {} are not necessary for single statement blocks CHECK: Unbalanced braces around else statement Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.cMichael Straube
Add spaces around '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: change return type of is_basicrate() to boolMichael Straube
The function is_basicrate() returns true or false, so change the return type from int to bool. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: simplify null array initializationsMichael Straube
Simplfy initialization of null arrays to improve readability and save some lines. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: change order of declarations to improve readabilityMichael Straube
Change the order of array declarations in rtw_mlme_ext.c to improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: make some arrays static in rtw_mlme_ext.cMichael Straube
Make some arrays that are only used in rtw_mlme_ext.c static and remove the corresponding extern declarations from rtw_mlme_ext.h. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: constify some arraysMichael Straube
The values of these arrays in rtw_mlme_ext.c and rtw_wlan_util.c are never changed, so make them const. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: convert unsigned char arrays to u8Michael Straube
Change the type of some arrays from unsigned char to u8. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.cMichael Straube
The array REALTEK_96B_IE is already declared in rtw_mlme.h, so remove the declaration in rtw_mlme_ext.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUIMichael Straube
The arrays WFD_OUI and WMM_INFO_OUI are not used anywhere, so remove them. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.cMichael Straube
Remove unnecessary parentheses, most of them reported by checkpatch. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.cMichael Straube
Remove comments from 'endif's where the corresponding 'if' is just a few lines above to improve readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: add blank line after declarationsMichael Straube
Add a missing blank line after declarations in rtw_mlme_ext.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: remove blank lines between declarationsMichael Straube
Remove blank lines between declarations in rtw_mlme_ext.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: remove commented declarations in rtw_mlme_ext.cMichael Straube
Remove unused/commented declarations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: replace tabs with spaces in rtw_mlme_ext.cMichael Straube
Replace tabs with spaces where appropriate. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.cMichael Straube
Replace tabs with spaces and/or remove spaces in declarations. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8188eu: reuse Hal_GetChnlGroup88E()Michael Straube
Use Hal_GetChnlGroup88E() instead of duplicating it's code in get_rx_power_val_by_reg(). Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()Michael Straube
Zeroing the array result[m][n] and setting only the values at even 'n's simplifies the code and slightly reduces object file size. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06staging: rtl8188eu: remove unused code in rtw_cmd.cMichael Straube
Remove unused/commented code in rtw_cmd.c. Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06staging: rtl8188eu: rename struct field Wifi_Error_StatusMichael Straube
Rename struct field Wifi_Error_Status to avoid CamelCase. Wifi_Error_Status -> wifi_error_status Signed-off-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>