Commit graph

1994 commits

Author SHA1 Message Date
Sanjana Sanikommu
0842eabb6f staging: rtl8188eu: core: rtw_recv.c: fix a space issue
Fix a space issue around the below operators mentioned in CHECK.
Issue found by checkpatch.pl semantic patch results for
rtw_recv.c..

CHECK: spaces preferred around '%' (ctx:VxV)
CHECK: spaces preferred around '&' (ctx:VxV)
CHECK: spaces preferred around '+' (ctx:VxV)
CHECK: spaces preferred around '<<' (ctx:VxV)

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:50:11 +01:00
Sanjana Sanikommu
42f56fef67 staging: rtl8188eu: core: rtw_ap.c: Fix multiple blank lines
Remove multiple blank lines.
Issue found by checkpatch.pl semantic patch results for rtw_ap.c

CHECK: Please dont use multiple blank lines.

Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:47:53 +01:00
Hugo Lange
df9ce52c8a staging: rtl8188eu: remove unnecessary braces from if/else
Removed unnecessary braces for single blocks.

Signed-off-by: Hugo Lange <hugolange7000@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:06:08 +01:00
Robert Eshleman
173e3e69b2 staging: rtl8188eu: cleanup spacing style
This patch fixes a few spacing warnings from checkpatch.pl,
as well as an incorrect spacing between a function type and
the function name.

Signed-off-by: Robert Eshleman <bobbyeshleman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18 07:05:21 +01:00
Michael Straube
9f22637b00 staging: rtl8188eu: remove unused P2P_PRIVATE_IOCTL_SET_LEN
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-28 08:45:28 +01:00
Michael Straube
c329a8fd58 staging: rtl8188eu: remove unused enum P2P_PROTO_WK_ID
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-28 08:45:28 +01:00
Michael Straube
2c62d36c81 staging: rtl8188eu: cleanup comparsions to NULL in rtl8188eu_xmit.c
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-26 11:52:46 +01:00
Michael Straube
423c16f4bf staging: rtl8188eu: add spaces around '*' in rtl8188e_cmd.c
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-26 11:52:46 +01:00
Michael Straube
5241d965b4 staging: rtl8188eu: remove unused function declarations
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-26 11:52:46 +01:00
Michael Straube
87dd57588a staging: rtl8188eu: remove blank line between declarations
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-26 11:52:46 +01:00
Michael Straube
0143802620 staging: rtl8188eu: cleanup declarations in rtl8188e_cmd.c
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-26 11:52:46 +01:00
Michael Straube
00fa3661a4 staging: rtl8188eu: remove unnecessary parentheses in rtl8188e_cmd.c
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-26 11:52:46 +01:00
Stephen Martin
8126c7c188 staging: rtl8188eu: fix bad indentation for conditional statement
Fixed else block indentation

Signed-off-by: Stephen Martin <lockwood@opperline.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19 11:14:14 +01:00
Michael Straube
da17ad1e6f staging: rtl8188eu: cleanup ODM_CmnInfoPtrArrayHook()
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-02-04 12:36:14 +01:00
Michael Straube
1c516c54ac staging: rtl8188eu: refactor rtw_reset_securitypriv()
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-30 15:40:58 +01:00
Michael Straube
46c36e5a03 staging: rtl8188eu: &array[0] -> array
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-30 15:40:58 +01:00
Michael Straube
d8e2a9a58e staging: rtl8188eu: remove unncessary asignment to cleanup long line
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-30 15:40:58 +01:00
Michael Straube
0a6286668b staging: rtl8188eu: cleanup declarations in mlme_linux.c
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-30 15:40:58 +01:00
Michael Straube
b543e1fdd1 staging: rtl8188eu: remove unnecessary initializations
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-30 15:40:58 +01:00
Michael Straube
48a254d7ff staging: rtl8188eu: cleanup comments in mlme_linux.c
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-30 15:40:58 +01:00
Greg Kroah-Hartman
d61b5d546a Merge 5.0-rc4 into staging-next
We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-28 08:17:02 +01:00
Stephen Martin
3060da7a19 staging: rtw_ieee80211: fix constant comparison warning
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-25 09:52:01 +01:00
Michael Straube
01f7e722aa staging: rtl8188eu: cleanup indenting issue in mlme_linux.c
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-18 10:34:01 +01:00
Michael Straube
6e3da68c7f staging: rtl8188eu: add spaces around operators in mlme_linux.c
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-18 10:34:01 +01:00
Michael Straube
9435bbd4b9 staging: rtl8188eu: add spaces around operators in os_intfs.c
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-18 10:34:01 +01:00
Michael Straube
58d37ddf75 staging: rtl8188eu: cleanup declarations in os_intfs.c
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-18 10:34:01 +01:00
Florian Büstgens
82f1cebe64 staging: rtl8188eu: Refactoring struct ndis_802_11_ssid from CamelCase to 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-15 17:31:52 +01:00
Michael Straube
5f74a8cbb3 staging: rtl8188eu: Add device code for D-Link DWA-121 rev B1
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-15 16:31:09 +01:00
Michael Straube
e94e6d1454 staging: rtl8188eu: remove unnecessary parentheses in os_intfs.c
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-15 16:19:32 +01:00
Gustavo A. R. Silva
891fd84760 staging: rtl8188eu: Replace kzalloc with kcalloc
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-15 16:08:04 +01:00
Larry Finger
7775665aad staging: rtl8188eu: Fix module loading from tasklet for WEP encryption
Commit 2b2ea09e74 ("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: 2b2ea09e74 ("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-07 15:27:59 +01:00
Larry Finger
84cad97a71 staging: rtl8188eu: Fix module loading from tasklet for CCMP encryption
Commit 6bd082af7e ("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: 6bd082af7e ("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>
2019-01-07 15:27:59 +01:00
Michael Straube
0fe6dc4d68 staging: rtl8188eu: cleanup brace coding style issues
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-19 08:32:33 +01:00
Michael Straube
241e15dbfc staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c
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-19 08:32:33 +01:00
Michael Straube
e54a823e90 staging: rtl8188eu: change return type of is_basicrate() to bool
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-19 08:32:33 +01:00
Michael Straube
79ebad324b staging: rtl8188eu: simplify null array initializations
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-19 08:32:33 +01:00
Michael Straube
b7d54304d9 staging: rtl8188eu: change order of declarations to improve readability
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-19 08:32:33 +01:00
Michael Straube
7a6394398f staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c
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-19 08:32:33 +01:00
Michael Straube
03449acb77 staging: rtl8188eu: constify some arrays
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-19 08:32:33 +01:00
Michael Straube
0ef9f86b93 staging: rtl8188eu: convert unsigned char arrays to u8
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-19 08:32:33 +01:00
Michael Straube
55fc57809a staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c
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-19 08:32:33 +01:00
Michael Straube
4f1a961ae1 staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI
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-19 08:32:33 +01:00
Michael Straube
25c641ec2a staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme_ext.c
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-19 08:30:29 +01:00
Michael Straube
011844addf staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c
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-19 08:30:29 +01:00
Michael Straube
7acaed81ab staging: rtl8188eu: add blank line after declarations
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-19 08:30:29 +01:00
Michael Straube
f20ac243ff staging: rtl8188eu: remove blank lines between declarations
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-19 08:30:29 +01:00
Michael Straube
83691365f1 staging: rtl8188eu: remove commented declarations in rtw_mlme_ext.c
Remove unused/commented declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-19 08:30:29 +01:00
Michael Straube
1673616a00 staging: rtl8188eu: replace tabs with spaces in rtw_mlme_ext.c
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-19 08:29:29 +01:00
Michael Straube
502b90d4c6 staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c
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-19 08:29:28 +01:00
Michael Straube
15f11e0ffc staging: rtl8188eu: reuse Hal_GetChnlGroup88E()
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-12 11:37:58 +01:00
Michael Straube
a793dbe926 staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()
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-12 11:37:58 +01:00
Michael Straube
83cbfb6bba staging: rtl8188eu: remove unused code in rtw_cmd.c
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-06 16:12:19 +01:00
Michael Straube
747c615edd staging: rtl8188eu: rename struct field Wifi_Error_Status
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>
2018-12-06 16:12:19 +01:00
Michael Straube
4fea3f99b5 staging: rtl8188eu: replace if else with ternary operator
Replace if else with a single call and ternary operator to
slightly reduce object file size. Also clears a checkpatch
warning: WARNING: Statements should start on a tabstop

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>
2018-12-06 16:12:19 +01:00
Michael Straube
d5fa6721f6 staging: rtl8188eu: write out multiplying in wifirate2_ratetbl_inx()
Write out multiplying in wifirate2_ratetbl_inx() to improve
readabilitiy and clear checkpatch issues with missing spaces
around '*' operator.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
497d6a7441 staging: rtl8188eu: add spaces around operators in rtw_wlan_util.c
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>
2018-12-06 16:12:18 +01:00
Michael Straube
3a3b5defd3 staging: rtl8188eu: cleanup long lines in rtw_wlan_util.c
Cleanup some lines over 80 characters by adding appropriate
line breaks and removing commented code.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
54b48fda9c staging: rtl8188eu: cleanup block comment in rtw_wlan_util.c
Cleanup a block comment to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
e2307b086c staging: rtl8188eu: cleanup declarations in rtw_wlan_util.c
Replace tabs with spaces and/or remove spaces in declarations
to cleanup whitespace. Remove unused/commented declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
a2871106b5 staging: rtl8188eu: remove unnecessary parentheses in rtw_wlan_util.c
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
3499477cd9 staging: rtl8188eu: simplify array initializations
Simplfy initialization of arrays with zero only values
to improve readability and save a line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
c61583b162 staging: rtl8188eu: refactor cckratesonly_included()
Refactor cckratesonly_included() to improve readability and slightly
reduce object file size. Also change the return type to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
3101957f4a staging: rtl8188eu: refactor cckrates_included()
Refactor cckrates_included() to improve readability and slightly
reduce object file size. Also change the return type to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06 16:12:18 +01:00
Michael Straube
2166e0f552 staging: rtl8188eu: cleanup comment in hal8188e_rate_adaptive.c
Cleanup comment in hal8188e_rate_adaptive.c.
Clears checkpatch warnings.

WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 09:42:27 +01:00
Michael Straube
a9236c0867 staging: rtl8188eu: cleanup alignment issues in hal8188e_rate_adaptive.c
Cleanup alignment issues 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>
2018-12-05 09:42:27 +01:00
Michael Straube
4b1ea01b50 staging: rtl8188eu: cleanup lines ending with '('
Cleanup lines ending with '(' in hal8188e_rate_adaptive.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 09:42:27 +01:00
Michael Straube
256b95bf09 staging: rtl8188eu: add spaces around operators in hal8188e_rate_adaptive.c
Add spaces around operators 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-05 09:42:26 +01:00
Michael Straube
ae4224fc83 staging: rtl8188eu: remove parentheses in hal8188e_rate_adaptive.c
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 09:42:26 +01:00
Michael Straube
8195b3e8d3 staging: rtl8188eu: use __func__ in hal8188e_rate_adaptive.c
Use __func__ instead of hardcoded function names.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 09:42:26 +01:00
Colin Ian King
c48f12e28d staging: rtl8188eu: fix spelling mistake "inferface" -> "interface"
Fix spelling mistake in module description text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 09:39:45 +01:00
Michael Straube
3253374714 staging: rtl8188eu: cleanup lines over 80 characters
Cleanup lines over 80 characters by replacing tabs with spaces
or adding appropriate line breaks.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:05 +01:00
Michael Straube
a08a9a6517 staging: rtl8188eu: correct indentation
Correct indentation to clear a checkpatch warning.
WARNING: suspect code indent for conditional statements (8, 24)

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:05 +01:00
Michael Straube
5e51ed1a90 staging: rtl8188eu: remove return from void function
Remove return from a void function to clear a checkpatch warning.
WARNING: void function return statements are not generally useful

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:05 +01:00
Michael Straube
c202e1ab78 staging: rtl8188eu: refactor if else statement
Refactor if else statement to clear checkpatch warnings.
WARNING: else is not generally useful after a break or return
WARNING: line over 80 characters

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:05 +01:00
Michael Straube
794f816566 staging: rtl8188eu: cleanup declarations in rtw_mlme.c
Replace tabs with spaces, remove spaces, remove blank lines
and break lines appropriatly in declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:05 +01:00
Michael Straube
2077ca1cd4 staging: rtl8188eu: remove rtw_android_set_block()
The function rtw_android_set_block() just returns zero. The only user
is the function rtw_android_priv_cmd(). The variable bytes_written is
initialized to zero and not changed before the use of
rtw_android_set_block(). Remove rtw_android_set_block() and it's only
use.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:04 +01:00
Michael Straube
1d9416d6d5 staging: rtl8188eu: use __func__ in rtw_mlme.c
Use __func__ instead of hardcoded function names.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:04 +01:00
Michael Straube
18bd05bb9c staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme.c
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:04 +01:00
Michael Straube
3f95106ea0 staging: rtl8188eu: cleanup remaining comparsions to true
Cleanup remaining comparsions to true.
if (x == true) -> if (x)
if (x != true) -> if (!x)
if (!x == true) -> if (!x)

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-26 20:59:04 +01:00
Michael Straube
b44beecab8 staging: rtl8188eu: remove variable from rtl8188eu_xmit_tasklet()
The local variable ret is only used to test the return value of the
call to rtl8188eu_xmitframe_complete(). Use the function directly in
the if test and remove the variable ret.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 10:58:45 +01:00
Michael Straube
fdf60cd7e6 staging: rtl8188eu: cleanup declarations in usb_ops_linux.c
Replace tabs with spaces and/or remove spaces in declarations
to cleanup whitespace.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 10:58:45 +01:00
Michael Straube
aa8591db2b staging: rtl8188eu: add spaces around '>>' and '&'
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>
2018-11-23 10:58:45 +01:00
Michael Straube
718d2523b9 staging: rtl8188eu: remove unnecessary parentheses
Remove unnecessary parentheses in usb_ops_linux.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 10:58:45 +01:00
Michael Straube
d6ad6d389d staging: rtl8188eu: correct spelling mistake in a comment
Correct spelling mistake in a comment reported by checkpatch.
checksumed -> checksummed

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 10:58:45 +01:00
Michael Straube
fa50658ec3 staging: rtl8188eu: remove braces from single if else statement
Remove braces from single line if else statement.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 10:58:45 +01:00
Michael Straube
c9ad9c49cc staging: rtl8188eu: cleanup line ending with a '('
Cleanup line ending with a '(' 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-11-23 10:58:45 +01:00
Michael Straube
c03b0ff72e staging: rtl8188eu: use __func__ in usb_ops_linux.c
Use __func__ instead of hardcoded function names.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-23 10:58:45 +01:00
Michael Straube
9e3bc2b0f4 staging: rtl8188eu: rename SwLed0 to avoid CamelCase
Rename struct field SwLed0 to avoid CamelCase.
SwLed0 -> sw_led

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:59 +01:00
Michael Straube
236b3d87e6 staging: rtl8188eu: rename LedControl8188eu to avoid CamelCase
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-11-22 11:14:59 +01:00
Michael Straube
86d0d29291 staging: rtl8188eu: cleanup a function comment
The comment for blink_handler() adds no extra information
in addition to the function name, so remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:59 +01:00
Michael Straube
87631cf279 staging: rtl8188eu: rename BlinkHandler to avoid CamelCase
Rename the function BlinkHandler to avoid CamelCase.
BlinkHandler -> blink_handler

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:59 +01:00
Michael Straube
dfd2fb58fc staging: rtl8188eu: rename SwLedOff to avoid CamelCase
Rename the function SwLedOff to avoid CamelCase.
SwLedOff -> sw_led_off

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:59 +01:00
Michael Straube
01b3ce533a staging: rtl8188eu: rename SwLedOn to avoid CamelCase
Rename the function SwLedOn to avoid CamelCase.
SwLedOn -> sw_led_on

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:58 +01:00
Michael Straube
3c73979334 staging: rtl8188eu: rename LedCfg to avoid CamelCase
Rename the variable LedCfg to avoid CamleCase.
LedCfg -> led_cfg

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:58 +01:00
Michael Straube
cfe0610fd7 staging: rtl8188eu: add spaces around '&' in rtl8188eu_led.c
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-11-22 11:14:58 +01:00
Michael Straube
5718ba5e8c staging: rtl8188eu: cleanup comments in rtl8188eu_led.c
Remove comments in rtl8188eu_led.c. The function names are well
descriptive.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:58 +01:00
Michael Straube
6a03492a77 staging: rtl8188eu: remove unnecessary parentheses in rtl8188eu_led.c
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-22 11:14:58 +01:00
Michael Straube
056ef75860 staging: rtl8188eu: remove unnecessary parentheses in recv_linux.c
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11 11:38:54 -08:00
Michael Straube
c3da4dea60 staging: rtl8188eu: add spaces around '*' in recv_linux.c
Add spaces around '*' to conform with 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-11-11 11:38:54 -08:00
Michael Straube
c3c4b8e55f staging: rtl8188eu: use __func__ in recv_linux.c
Use __func__ instead of hardcoded function name.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11 11:38:53 -08:00
Michael Straube
cb4e583db2 staging: rtl8188eu: cleanup long line in rtw_hal_xmit()
Cleanup a line over 80 characters in rtw_hal_xmit() by using
if(x) instead of if(x == true). Also clears a missing spaces
around '|' checkpatch issue.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
8a6b6868eb staging: rtl8188eu: change return type of rtw_hal_xmit()
The function rtw_hal_xmit() returns true or false.
Change the return type from s32 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
ddc95605ad staging: rtl8188eu: change return type of rtl8188eu_xmitframe_complete()
The function rtl8188eu_xmitframe_complete() returns true or false.
Change the return type from s32 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
bf58500ff4 staging: rtl8188eu: change type of a struct field
The field enable of struct recv_reorder_ctrl is only used for boolean
values, so change the type from u8 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
adc595cb5a staging: rtl8188eu: remove unnecessary ternary operator
The field accept_addba_req of struct mlme_ext_info has type bool.
Use the value of accept_addba_req directly instead of the ternary
operator in an asignment.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
636e10b89f staging: rtl8188eu: change type of is_cck_rate - style
The variable is_cck_rate is used for boolean values, so change the
type from u8 to bool. The initializations to zero and use of ternary
operator in the assignments are unnecessary, remove them as well.

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>
2018-11-07 12:41:00 +01:00
Michael Straube
755842d8c7 staging: rtl8188eu: rename variable isCCKrate - style
Rename the variable isCCKrate to avoid CamelCase.
isCCKrate -> is_cck_rate

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
ded11a81a7 staging: rtl8188eu: rename variable Max_spatial_stream - style
Rename the variable Max_spatial_stream to avoid CamelCase.
Max_spatial_stream -> max_spatial_stream

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Michael Straube
1a28bfdacd staging: rtl8188eu: simplify odm_evm_db_to_percentage()
Use clamp() to simplify code in odm_evm_db_to_percentage().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:41:00 +01:00
Colin Ian King
c4aacbb981 drivers: staging: rtl*: fix spelling mistake "Orginial" -> "Original"
Trivial fix to common spelling mistakes in some rtl* drivers

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07 12:35:10 +01:00
Colin Ian King
f549a60b8c staging: rtl8188eu: fix typo in function name rtw_sctx_chk_waring_status
Trivial fix to typo in function name, rename it to
rtw_sctx_chk_warning_status.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-05 15:25:39 +01:00
Mamta Shukla
95f7ed6b7d staging: rtl8188eu: core: Use sizeof(*p) instead of sizeof(struct P) for memory allocation
Use sizeof(*ptr) instead of sizeof(ptr_type) makes memory
allocation easy in case the type of pointer changes.
Fix all checkpatch reported issues for "CHECK: Prefer
kzalloc(sizeof(*<p>)...) over kzalloc(sizeof(struct <P>)...)".

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-19 21:10:45 +02:00
Michael Straube
bbf2f71e06 staging: rtl8188eu: cleanup comparsions to false
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-10-15 16:30:39 +02:00
Michael Straube
7fa3069dfc staging: rtl8188eu: remove whitespace - style
Remove extra space in variable declaration.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:16 +02:00
Michael Straube
18e1aec859 staging: rtl8188eu: rename Hal_MappingOutPipe() - style
Rename Hal_MappingOutPipe() to avoid CamelCase.
Hal_MappingOutPipe -> hal_mapping_out_pipe

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:16 +02:00
Michael Straube
30d046f2a7 staging: rtl8188eu: rename parameters of Hal_MappingOutPipe() - style
Rename parameters of Hal_MappingOutPipe() in header to avoid CamelCase
and match the names used in the function definition in hal_com.c.
pAdapter -> adapter
NumOutPipe -> numoutpipe

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:16 +02:00
Michael Straube
b96ec4e874 staging: rtl8188eu: rename parameter of hal_com_get_channel_plan() - style
Rename parameter of hal_com_get_channel_plan() in header to avoid
CamelCase and match the name used in the function definition in
hal_com.c. AutoLoadFail -> load_fail

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:16 +02:00
Michael Straube
b4a6b11cd2 staging: rtl8188eu: remove unused parameter of hal_com_get_channel_plan()
The parameter 'struct adapter *padapter' of hal_com_get_channel_plan()
is unused, so remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:16 +02:00
Michael Straube
aa906bb630 staging: rtl8188eu: rename HalSetBrateCfg() - style
Rename HalSetBrateCfg() to avoid CamelCase.
HalSetBrateCfg -> hal_set_brate_cfg

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:16 +02:00
Michael Straube
a7ce32d143 staging: rtl8188eu: rename parameters of HalSetBrateCfg() - style
Rename parameters of HalSetBrateCfg() in header to avoid CamelCase
and match the names used in the function definition in hal_com.c.
mBratesOS -> brates
BrateCfg -> rate_cfg

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:15 +02:00
Michael Straube
6d475d38e6 staging: rtl8188eu: remove unused parameter of HalSetBrateCfg()
The parameter 'struct adapter *adapt' of HalSetBrateCfg() is unused,
so remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:33:15 +02:00
Michael Straube
8525589130 staging: rtl8188eu: remove whitespace in qos_acm()
Remove whitespace in qos_acm() to improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:39 +02:00
Michael Straube
e0437819db staging: rtl8188eu: cleanup long lines in stop_sta_xmit()
Line break lines over 80 characters in stop_sta_xmit() to
clear checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:39 +02:00
Michael Straube
d7c252002b staging: rtl8188eu: cleanup long lines in rtw_get_sta_pending()
Line break lines over 80 characters in rtw_get_sta_pending() to
clear checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:39 +02:00
Michael Straube
909495c8db staging: rtl8188eu: cleanup block comments
Cleanup block comments to clear 'please, no space before tabs'
and 'line over 80 characters' checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:39 +02:00
Michael Straube
1330c795c5 staging: rtl8188eu: remove commented code
Remove unused commented code in the file core/rte_xmit.c.
Clears 'please, no space before tabs' and 'line over 80
characters' checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:39 +02:00
Michael Straube
f996f37471 staging: rtl8188eu: cleanup alignment issue
Clear a 'Alignment should match open parenthesis'
checkpatch issue.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:38 +02:00
Michael Straube
cac04b1fc6 staging: rtl8188eu: use __func__ in qos_acm()
Use __func__ instead of hardcoded name in qos_acm().
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:38 +02:00
Michael Straube
a66ecb24f2 staging: rtl8188eu: cleanup missing spaces around operators
Clear all missing spaces around operators checkpatch issues
in the file core/rtw_xmit.c. Use '+=' or '-=' where possible.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:32:38 +02:00
Colin Ian King
fde54ecea2 staging: rtl8188eu: fix spelling mistake "EINPROGESS" -> "EINPROGRESS"
Trivial fix to spelling mistake in RT_TRACE message text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:31:53 +02:00
Colin Ian King
2a5b8d97c6 staging: rtl8188eu: fix spelling mistake "Abnornally" -> "Abnormally"
Trivial fix to spelling mistake in ODM_RT_TRACE trace message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-14 13:31:53 +02:00
Michael Straube
10844575cc staging: rtl8188eu: remove whitespace - style
Replace tabs with spaces and/or remove extra spaces where
appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10 13:15:23 +02:00
Michael Straube
f8f4e529f3 staging: rtl8188eu: cleanup lines over 80 characters - style
Clear 'line over 80 characters' checkpatch warnings by adding
appropriate line breaks and moving a comment.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10 13:15:22 +02:00
Michael Straube
847a648e15 staging: rtl8188eu: add spaces around operators - style
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>
2018-10-10 13:15:22 +02:00
Michael Straube
f4256fc7f2 staging: rtl8188eu: use __func__ instead of hardcoded name - style
Use __func__ instead of hardcoded function name in rtw_xmit_entry().
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10 13:15:22 +02:00
Michael Straube
0f80b1c9f4 staging: rtl8188eu: add spaces around operators in odm_rtl8188e.c
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>
2018-10-09 15:17:28 +02:00
Michael Straube
9fd3ad9d8a staging: rtl8188eu: remove dead code from dm_fast_training_init()
The variable AntCombination is initialized to 2 and never changed.
So the else if path is never used. Remove the dead code and the
variable AntCombination.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:17:28 +02:00
Michael Straube
12f388a6ae staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h
Remove spaces and/or replace tabs with spaces in some declarations
in rtw_mlme_ext.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:17:28 +02:00
Michael Straube
c1ff246a8d staging: rtl8188eu: make struct field of action_handler const
The strings in the use of struct action_handler are constant.
Change the type of field str from 'char *' to 'const char *'.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:17:27 +02:00
Michael Straube
98962eb6d6 staging: rtl8188eu: make struct field of mlme_handler const
The strings in the uses of struct mlme_handler are constant.
Change the type of field str from 'char *' to 'const char *'.

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>
2018-10-09 15:17:27 +02:00
Michael Straube
e6d9855dd3 staging: rtl8188eu: change array type to const u8
Change the type of MCS_rate_1R from unsigned char to const u8.

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>
2018-10-09 15:17:27 +02:00
Michael Straube
3046430192 staging: rtl8188eu: rewrite if tests - style
Rewrite if tests to clear a 'line over 80 characters' and
'Comparisons should place the constant on the right side of the test'
checkpatch warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:17:27 +02:00
Michael Straube
e157c44a83 staging: rtl8188eu: cleanup array declaration - style
Cleanup array declaration to clear two 'line over 80 characters'
checkpatch warnings and improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:17:27 +02:00
Michael Straube
06b17ed6c0 staging: rtl8188eu: fix line over 80 characters - style
Line break array declaration to clear a 'line over 80 characters'
checkpatch warning. For consistency replace 0x0 with 0x00.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:17:27 +02:00
Michael Straube
0f912f9de1 staging: rtl8188eu: fix spelling mistake in comment
Fix a spelling mistake reported by checkpatch.
Caculate -> Calculate

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:41 -07:00
Michael Straube
f95268cb04 staging: rtl8188eu: remove braces from single if statement
Remove braces from single line if statement.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:41 -07:00
Michael Straube
cea7a2481b staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c
Remove unnecessary parentheses in odm_rtl8188e.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:41 -07:00
Michael Straube
44b676a635 staging: rtl8188eu: add spaces around '+' in fw.c
Add spaces around '+' in fw.c 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-10-02 15:20:41 -07:00
Michael Straube
c34344c274 staging: rtl8188eu: simplify block comment in pwrseq.c
Simplify block comment to a single line to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:41 -07:00
Michael Straube
bf80cee456 staging: rtl8188eu: correct block comment in bb_cfg.c
Correct block comment to clear a checkpatch warning.
WARNING: Block comments should align the * on each line

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:41 -07:00
Michael Straube
d88eb137ef staging: rtl8188eu: rename odm_SignalScaleMapping()
Rename odm_SignalScaleMapping to avoid CamelCase.
odm_SignalScaleMapping -> odm_signal_scale_mapping

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
2ac9464859 staging: rtl8188eu: rename variable in odm_SignalScaleMapping()
Rename variable in odm_SignalScaleMapping() to avoid CamelCase.
RetSig -> retsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
b8c8d48772 staging: rtl8188eu: rename parameter of odm_SignalScaleMapping()
Rename parameter of odm_SignalScaleMapping() to avoid CamelCase.
CurrSig -> currsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
af9c463da2 staging: rtl8188eu: rename odm_EVMdbToPercentage()
Rename odm_EVMdbToPercentage() to avoid CamelCase.
odm_EVMdbToPercentage -> odm_evm_db_to_percentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
de3bb2872e staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()
Rename parameter of odm_EVMdbToPercentage() to avoid CamelCase.
Value -> value

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
c8a2da5a2c staging: rtl8188eu: rename odm_QueryRxPwrPercentage()
Rename odm_QueryRxPwrPercentage() to avoid CamelCase.
odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
5bd4658ff1 staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()
Rename parameter of odm_QueryRxPwrPercentage() to avoid CamelCase.
AntPower -> antpower

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
d80c4b19bc staging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c
Replace tabs with spaces in odm_hwconfig.c where appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
079be54766 staging: rtl8188eu: add spaces around '*' in odm_hwconfig.c
Add spaces around '*' in odm_hwconfig.c 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-10-02 15:20:40 -07:00
Michael Straube
195d62c331 staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c
Add spaces around '+' in odm_hwconfig.c 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-10-02 15:20:40 -07:00
Michael Straube
e208cc3a60 staging: rtl8188eu: remove wrapper odm_SignalScaleMapping()
The function odm_SignalScaleMapping() is just a wrapper for
odm_SignalScaleMapping_92CSeries().

Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping()
and remove the wrapper.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
c7a248299a staging: rtl8188eu: rename odm_HWConfig
Rename source and header file to avoid CamelCase.
odm_HWConfig.c -> odm_hwconfig.c
odm_HWConfig.h -> odm_hwconfig.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:20:40 -07:00
Michael Straube
859df6aa0d staging: rtl8188eu: cleanup inconsistent indenting
Cleanup all inconsistent indenting reported by smatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-02 15:19:19 -07:00
Aymen Qader
96e47e30c0 staging: rtl8188eu: Skip unnecessary field checks
Skip unnecessary request field checks when the information element
pointer is null.

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:52 +02:00
Michael Straube
dee43f7ad3 staging: rtl8188eu: remove get_right_chnl_for_iqk()
The function get_right_chnl_for_iqk() only returns non zero values for
channels > 14. According to the TODO, code valid only for 5 GHz should
be removed.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Remove get_right_chnl_for_iqk() and the variable chn_index that is
used to save the return value. Replace the uses of chn_index with zero.

Remove the now unused define ODM_TARGET_CHNL_NUM_2G_5G.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:52 +02:00
Nathan Chancellor
71c2914448 staging: rtl8188eu: Use proper enum in rtl8188eu_config_rf_reg
Clang warns when an enumerated type is implicitly converted to another.

drivers/staging/rtl8188eu/hal/rf_cfg.c:180:25: warning: implicit
conversion from enumeration type 'enum rf90_radio_path' to different
enumeration type 'enum rf_radio_path' [-Wenum-conversion]
        rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset,
        ~~~~~~~~~~~~~~~        ^~~~~~~~~~~
1 warning generated.

Avoid this by using the equivalent value from the expected type,
rf_radio_path:

RF90_PATH_A = RF_PATH_A = 0

Link: https://github.com/ClangBuiltLinux/linux/issues/164
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:52 +02:00
Michael Straube
6505090a34 staging: rtl8188eu: use break to exit while loop
The variable bContinual is only used to break out of the while loop.
Remove the variable and use break instead.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:52 +02:00
Michael Straube
fb81fa138a staging: rtl8188eu: rename variable - style
Rename the return value variable in some functions in rtw_efuse.c
to avoid CamelCase. bRet -> ret

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:52 +02:00
Michael Straube
0fd8922c84 staging: rtl8188eu: do not line break function definition - style
Do not line break function definition. Clears a checkpatch issue.
CHECK: Lines should not end with a '('

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:52 +02:00
Michael Straube
5e9025d1c2 staging: rtl8188eu: simplify function comments - style
Simplify function comments. 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>
2018-09-28 14:30:52 +02:00
Colin Ian King
709a6a5339 staging: rtl8188eu: fix spelling mistake "transfoer_len" -> "transfer_len"
Trivial fix to spelling mistake in DBG_88E debug message text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:51 +02:00
Nathan Chancellor
6b9e49b25e staging: rtl8188eu: Simplify memcmp logical checks
Clang generates a warning when it sees a logical not followed by a
conditional operator like ==, >, or < because it thinks that the logical
not should be applied to the whole statement:

drivers/staging/rtl8188eu/core/rtw_ieee80211.c:293:8: warning: logical
not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]

It assumes the author might have made a mistake in their logic:

if (!a == b) -> if (!(a == b))

Sometimes that is the case; other times, it's just a super convoluted
way of saying 'if (a)' when b = 0:

if (!1 == 0) -> if (0 == 0) -> if (true)

Alternatively:

if (!1 == 0) -> if (!!1) -> if (1)

Simplify these comparisons so that Clang doesn't complain.

Link: https://github.com/ClangBuiltLinux/linux/issues/161
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:30:51 +02:00
Michael Straube
bfeb67ed4f staging: rtl8188eu: remove rtw_qos.h
There is only one struct in rtw_qos.h and it is only included from
drv_types.h. Move the struct into drv_types.h to reduce the number
of header files.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-25 21:08:43 +02:00
Michael Straube
9da94a7fc8 staging: rtl8188eu: remove unused rtw_scan_abort()
The function rtw_scan_abort() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-25 21:08:43 +02:00
Nathan Chancellor
44075b6414 staging: rtl8188eu: Remove unnecessary parentheses
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-09-25 21:06:18 +02:00
Colin Ian King
b4a2b208fb staging: rtl8188eu, rtl8723bs: fix spelling mistake "evet" -> "event"
Trivial fix to spelling mistake in RT_TRACE message

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-25 21:02:06 +02:00
Michael Straube
31ab98f0c8 staging: rtl8188eu: clean function definitions - style
Do not line break function definitions where not needed and
move the return type to the same line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-20 12:33:00 +02:00
Michael Straube
9b2cf1ffed staging: rtl8188eu: rename parameter of Hal_GetChnlGroup88E()
Rename function parameter of Hal_GetChnlGroup88E() to avoid CamelCase.
pGroup -> group

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-20 12:33:00 +02:00
Michael Straube
4aaf2b7312 staging: rtl8188eu: change return type of Hal_GetChnlGroup88E()
After the removal of code valid only for 5 GHz the function
Hal_GetChnlGroup88E returns always true.

Change the return type to void and remove the variable bIn24G.

Remove the tests for the return value and the variable bIn24G
from the only user Hal_ReadTxPowerInfo88E().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-20 12:33:00 +02:00
Michael Straube
0c8c0f744d staging: rtl8188eu: remove 5 GHz code from Hal_GetChnlGroup88E()
Remove code valid only for 5 GHz from Hal_GetChnlGroup88E().
This addresses the below TODO item.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-20 12:33:00 +02:00
Michael Straube
f4cd8d753a staging: rtl8188eu: simplify function comments
Simplify function comments to a single line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Michael Straube
508c745774 staging: rtl8188eu: fix lines over 80 characters
Wrap lines over 80 characters where appropriate to
clear checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Michael Straube
562fd259be staging: rtl8188eu: add missing spaces around operators
Add missing 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>
2018-09-18 13:30:18 +02:00
Michael Straube
2590e4e3a6 staging: rtl8188eu: fix comparsions to false
Use if(!x) instead of if(x == false).

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Michael Straube
50f2ea8bf8 staging: rtl8188eu: fix comparsions to true
Use if(x) instead of if(x == true).

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Michael Straube
116bcfdfcf staging: rtl8188eu: remove whitespace
Replace tabs with spaces or just remove spaces in declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Michael Straube
f14cbe6326 staging: rtl8188eu: remove unnecessary parentheses
Remove unnecessary parentheses as reported by checkpatch
and from conditionals.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Michael Straube
1ad53b2df9 staging: rtl8188eu: simplify calculation
Simplify calcualation:  * 10 / 2  can be reduced to  * 5
Also cleans missing spaces checkpatch issues.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:30:18 +02:00
Jia-Ju Bai
2051c6ae92 staging: rtl8188eu: Fix a sleep-in-atomic-context bug in issue_deauth_ex()
The driver may sleep with holding a spinlock.
The function call path (from bottom to top) in Linux-4.17 is:

[FUNC] msleep
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 1536:
	msleep in issue_deauth_ex
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 5110:
	issue_deauth_ex in disconnect_hdl
drivers/staging/rtl8188eu/core/rtw_cmd.c, 521:
	disconnect_hdl in rtw_disassoc_cmd
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c, 352:
	rtw_disassoc_cmd in rtw_set_802_11_infrastructure_mode
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c, 1002:
	rtw_set_802_11_infrastructure_mode in rtw_wx_set_wap
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c, 988:
	spin_lock_bh in rtw_wx_set_wap

To fix this bug, msleep() is replaced with mdelay().

This bug is found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:25:01 +02:00
Robert Węcławski
7af5bd0ca4 staging: rtl8188eu: remove code that is valid only for 5 GHz
Remove code that is used only for 5 GHz.
This addresses the below TODO item:

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Signed-off-by: Robert Węcławski <r.weclawski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-18 13:25:01 +02:00
Michael Straube
645923e441 staging: rtl8188eu: change array type to u8
The the last two parameters of write_cam() have type u8.
Change the type of the passed arrays from unsigned char to u8.
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>
2018-09-11 18:37:57 +02:00
Michael Straube
c1a0bb1779 staging: rtl8188eu: fix lines over 80 characters in rtw_led.c
Wrap lines over 80 characters where appropriate to
clear checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-11 18:35:16 +02:00
Michael Straube
ccfe34c01c staging: rtl8188eu: remove unnecessary parentheses in rtw_led.c
Remove unnecessary parentheses from conditionals.
Also clears 'Alignment should match open parenthesis'
checkpatch issue.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-11 18:35:16 +02:00
Michael Straube
00585495c4 staging: rtl8188eu: refactor SwLedControlMode1()
Refactor switch cases in SwLedControlMode1() to reduce
indentation level. 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>
2018-09-11 18:35:15 +02:00
Michael Straube
205d34e90f staging: rtl8188eu: remove unnecessary parentheses
Remove unnecessary parentheses to follow kernel coding style
and clean checkpatch issues.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 11:17:48 +02:00
Michael Straube
3e1de4d578 staging: rtl8188eu: remove whitespace
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-09-10 11:17:48 +02:00
Michael Straube
508258f63b staging: rtl8188eu: fix comparsions to true
Use if(x) instead of if(x == true).

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 11:17:48 +02:00
Michael Straube
8d42daff47 staging: rtl8188eu: Remove code valid only for 5 GHz
Remove code that is only valid for channels > 14.
This addresses the below TODO item.

- find and remove remaining code valid only for 5 GHz. Most of the obvious
  ones have been removed, but things like channel > 14 still exist.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 11:17:47 +02:00
Michael Straube
352ff6a4c1 staging: rtl8188eu: remove pointless comment
This comment adds no useful information to the code,
so remove it.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 11:17:47 +02:00
Michael Straube
a06058dcd6 staging: rtl8188eu: simplify function comment
Simplify function comment to a single line.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 11:17:47 +02:00
Jia-Ju Bai
c7f800ec97 staging: rtl8188eu: Fix two sleep-in-atomic-context bugs in rtw_chk_hi_queue_cmd()
usb_write_port_complete() in usb_ops_linux.c is a completion handler
function for the USB driver. So it should not sleep, but it is can sleep
according to the function call paths (from bottom to top) in Linux-4.16:

[FUNC] kzalloc(GFP_KERNEL)
drivers/staging/rtl8188eu/core/rtw_cmd.c, 1081:
	kzalloc in rtw_chk_hi_queue_cmd
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c, 604:
	rtw_chk_hi_queue_cmd in usb_write_port_complete

[FUNC] kzalloc(GFP_KERNEL)
drivers/staging/rtl8188eu/core/rtw_cmd.c, 1075:
	kzalloc in rtw_chk_hi_queue_cmd
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c, 604:
	rtw_chk_hi_queue_cmd in usb_write_port_complete

To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC.

These bugs are found by my static analysis tool DSAC.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-10 11:17:47 +02:00
Bhaskar Singh
fff12fcd60 staging: rtl8188eu: Removed unneeded variable
This patch removed unneeded variable named ret because this variable is
used only to return 0.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:29:39 +02:00
Bhaskar Singh
22d8eeb32a staging: rtl8188eu: Removed a function and coded inline
This patch removed function named rtw_malloc2d.

I removed this function because this function is used exactly once and
function call have some overhead also.

Maybe this will improve code runtime slightly.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:29:39 +02:00
Bhaskar Singh
6c352cfd12 staging: rtl8188eu: Removed code valid for 5GHz
This patch removes support for channels > 14. That is from the TODO which
says:

	-find and remove remaining code valid only for 5HGz. Most of
	obvious ones have been removed, but things like channel > 14 still
	exist.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:29:39 +02:00
Bhaskar Singh
0056d8bdea staging: rtl8188eu: Fix spelling mistake
This patch fix spelling mistakes in TODO.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:29:39 +02:00
Bhaskar Singh
34fbab5f0a staging: rtl8188eu: Removed unnecessary parentheses
Removed unnecessary parentheses and this resolve the check patch issue.

Structure dereference operator have higher precedence then Address of
operator So there is no need of parentheses.

This change is purely coding style in nature and should have not effect
on runtime code execution.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:22:39 +02:00
Michael Straube
c19636f5dc staging: rtl8188eu: use phydm_reg.h from rtlwifi
Use rtlwifi/phydm/phydm_reg.h instead of odm_reg.h and
remove the now unused odm_reg.h.

All defines from odm_reg.h are defined with the same values
in rtlwifi/phydm/phydm_reg.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:20:48 +02:00
Michael Straube
fa1deb227d staging: rtl8188eu: remove unused IS_MCAST
Remove the now unused IS_MCAST.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:20:48 +02:00
Michael Straube
2bd827a8d8 staging: rtl8188eu: use is_multicast_ether_addr in rtw_xmit.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
core/rtw_xmit.c. In all uses the address array is properly
aligned.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:20:48 +02:00
Michael Straube
e232f8841e staging: rtl8188eu: use is_multicast_ether_addr in rtw_recv.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
core/rtw_recv.c. In all uses the address array/memory is
properly aligned.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:20:48 +02:00
Michael Straube
3bd589eb93 staging: rtl8188eu: use is_multicast_ether_addr in rtw_security.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
core/rtw_security.c. In all uses the address array is properly
aligned.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:20:47 +02:00
Linus Torvalds
2475c515d4 Staging/IIO patches for 4.19-rc1
Here are the big staging/iio patches for 4.19-rc1.
 
 Lots of churn here, with tons of cleanups happening in staging drivers,
 a removal of an old crypto driver that no one was using (skein), and the
 addition of some new IIO drivers.  Also added was a "gasket" driver from
 Google that needs loads of work and the erofs filesystem.
 
 Even with adding all of the new drivers and a new filesystem, we are
 only adding about 1000 lines overall to the kernel linecount, which
 shows just how much cleanup happened, and how big the unused crypto
 driver was.
 
 All of these have been in the linux-next tree for a while now with no
 reported issues.
 
 Note, you will have a merge problem with a device tree IIO file and the
 MAINTAINERS file, both resolutions are easy, just take all changed.
 There will be a skein file merge issue as well, but that file got
 deleted so just drop that.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCW3g+2A8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykwGACfQZz3Ncvc7thHkZytxxqQnbx5JpkAn0yV5SvF
 yVXG9SA9yCTKVjYczZjZ
 =6t/x
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging and IIO updates from Greg KH:
 "Here are the big staging/iio patches for 4.19-rc1.

  Lots of churn here, with tons of cleanups happening in staging
  drivers, a removal of an old crypto driver that no one was using
  (skein), and the addition of some new IIO drivers. Also added was a
  "gasket" driver from Google that needs loads of work and the erofs
  filesystem.

  Even with adding all of the new drivers and a new filesystem, we are
  only adding about 1000 lines overall to the kernel linecount, which
  shows just how much cleanup happened, and how big the unused crypto
  driver was.

  All of these have been in the linux-next tree for a while now with no
  reported issues"

* tag 'staging-4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (903 commits)
  staging:rtl8192u: Remove unused macro definitions - Style
  staging:rtl8192u: Add spaces around '+' operator - Style
  staging:rtl8192u: Remove stale comment - Style
  staging: rtl8188eu: remove unused mp_custom_oid.h
  staging: fbtft: Add spaces around / - Style
  staging: fbtft: Erases some repetitive usage of function name - Style
  staging: fbtft: Adjust some empty-line problems - Style
  staging: fbtft: Removes one nesting level to help readability - Style
  staging: fbtft: Changes gamma table to define.
  staging: fbtft: A bit more information on dev_err.
  staging: fbtft: Fixes some alignment issues - Style
  staging: fbtft: Puts macro arguments in parenthesis to avoid precedence issues - Style
  staging: rtl8188eu: remove unused array dB_Invert_Table
  staging: rtl8188eu: remove whitespace, add missing blank line
  staging: rtl8188eu: use is_multicast_ether_addr in rtw_sta_mgt.c
  staging: rtl8188eu: remove whitespace - style
  staging: rtl8188eu: cleanup block comment - style
  staging: rtl8188eu: use is_multicast_ether_addr in rtl8188eu_xmit.c
  staging: rtl8188eu: use is_multicast_ether_addr in recv_linux.c
  staging: rtlwifi: refactor rtl_get_tcb_desc
  ...
2018-08-18 11:00:00 -07:00
Michael Straube
a621f75cb8 staging: rtl8188eu: remove unused mp_custom_oid.h
The header mp_custom_oid.h is not used, so remove it.
'git grep mp_custom_oid.h drivers/staging/rtl8188eu/'
returns nothing.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:26:40 +02:00
Colin Ian King
243638bc1c staging: rtl8188eu: remove unused array dB_Invert_Table
Array dB_Invert_Table is declared but not used, hence it is redundant
and can be removed.

Cleans up clang warning:
warning: ‘dB_Invert_Table’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:16 +02:00
Michael Straube
705030a151 staging: rtl8188eu: remove whitespace, add missing blank line
Replace tabs with spaces and/or remove spaces where appropriate.
Add a missing blank line after declarations.

Also clears checkpatch warnings.
WARNING: Statements should start on a tabstop
WARNING: suspect code indent for conditional statements (8, 17)

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:16 +02:00
Michael Straube
5c3bd8481c staging: rtl8188eu: use is_multicast_ether_addr in rtw_sta_mgt.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
core/rtw_sta_mgt.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:16 +02:00
Michael Straube
e18676cc6e staging: rtl8188eu: remove whitespace - style
Replace tabs with spaces and/or remove spaces where appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:16 +02:00
Michael Straube
353c6774bd staging: rtl8188eu: cleanup block comment - style
Cleanup a block comment to conform with kernel coding style.
Also cleans 'line over 80 characters' checkpatch warnings.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:16 +02:00
Michael Straube
d39e86cbd8 staging: rtl8188eu: use is_multicast_ether_addr in rtl8188eu_xmit.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
hal/rtl8188eu_xmit.c.

There is only one use, so remove the extra variable for the
result of IS_MCAST.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:15 +02:00
Michael Straube
247e415fbc staging: rtl8188eu: use is_multicast_ether_addr in recv_linux.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
os_dep/recv_linux.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:15 +02:00
Michael Straube
c5fe50aaa2 Revert "staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames"
On a Raven Ridge system with a r8188eu usb wifi device
commit 515ce733e8 ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames")
is causing two bugs and a warning in dmesg:

[   22.618465] BUG: scheduling while atomic: NetworkManager/489/0x00000202
[   22.618466] Modules linked in: amdkfd amd_iommu_v2 amdgpu nls_iso8859_1 nls_cp437 vfat fat r8188eu(C) edac_mce_amd
chash kvm_amd gpu_sched i2c_algo_bit ccp ttm rng_core lib80211 kvm snd_hda_codec_realtek snd_hda_codec_generic cfg80211
snd_hda_codec_hdmi snd_hda_intel input_leds drm_kms_helper irqbypass snd_hda_codec crct10dif_pclmul crc32_pclmul
ghash_clmulni_intel pcbc rfkill led_class mousedev joydev wmi_bmof snd_hda_core drm aesni_intel snd_hwdep aes_x86_64
crypto_simd cryptd glue_helper snd_pcm pcspkr sp5100_tco snd_timer r8169 k10temp agpgart i2c_piix4 snd mii syscopyarea
sysfillrect sysimgblt fb_sys_fops soundcore rtc_cmos evdev gpio_amdpt pinctrl_amd mac_hid wmi pcc_cpufreq acpi_cpufreq
crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto hid_generic usbhid hid sd_mod
[   22.618549]  ahci xhci_pci libahci xhci_hcd crc32c_intel libata usbcore scsi_mod usb_common
[   22.618554] Preemption disabled at:
[   22.618558] [<ffffffff94600954>] __dev_queue_xmit+0x74/0x910
[   22.618561] CPU: 3 PID: 489 Comm: NetworkManager Tainted: G         C        4.18.0-rc7-staging+ #14
[   22.618562] Hardware name: Gigabyte Technology Co., Ltd. A320M-S2H/A320M-S2H-CF, BIOS F23d 04/17/2018
[   22.618563] Call Trace:
[   22.618569]  dump_stack+0x5c/0x80
[   22.618571]  ? __dev_queue_xmit+0x74/0x910
[   22.618574]  __schedule_bug.cold.14+0x82/0x9b
[   22.618576]  __schedule+0x6fd/0x8b0
[   22.618578]  ? enqueue_task_fair+0xc3/0x730
[   22.618580]  schedule+0x32/0x90
[   22.618581]  schedule_timeout+0x311/0x4a0
[   22.618583]  ? _raw_spin_unlock_irqrestore+0x20/0x40
[   22.618585]  ? try_to_wake_up+0x231/0x480
[   22.618586]  wait_for_common+0x15f/0x190
[   22.618588]  ? wake_up_q+0x70/0x70
[   22.618597]  ? rtw_aes_encrypt+0x26f/0x290 [r8188eu]
[   22.618598]  wait_for_completion_killable+0x19/0x30
[   22.618601]  call_usermodehelper_exec+0x115/0x160
[   22.618603]  __request_module+0x1ac/0x3e2
[   22.618606]  ? netlink_broadcast_filtered+0x142/0x400
[   22.618607]  ? netlink_broadcast+0xf/0x20
[   22.618615]  rtw_aes_encrypt+0x26f/0x290 [r8188eu]
[   22.618622]  ? rtw_get_stainfo+0xe6/0x130 [r8188eu]
[   22.618629]  rtw_xmitframe_coalesce+0x950/0xb00 [r8188eu]
[   22.618631]  ? _raw_spin_lock_irqsave+0x25/0x50
[   22.618638]  rtw_hal_xmit+0x83/0x130 [r8188eu]
[   22.618645]  rtw_xmit+0x258/0x5d0 [r8188eu]
[   22.618652]  rtw_xmit_entry+0xe8/0x2e7 [r8188eu]
[   22.618654]  dev_hard_start_xmit+0xa5/0x240
[   22.618657]  sch_direct_xmit+0x150/0x340
[   22.618658]  __dev_queue_xmit+0x2f6/0x910
[   22.618661]  packet_sendmsg+0x948/0x15a7
[   22.618663]  ? attach_to_pi_owner+0x38/0x180
[   22.618666]  sock_sendmsg+0x33/0x40
[   22.618668]  __sys_sendto+0xee/0x160
[   22.618670]  ? memzero_explicit+0xa/0x10
[   22.618672]  ? urandom_read+0x120/0x270
[   22.618675]  __x64_sys_sendto+0x24/0x30
[   22.618677]  do_syscall_64+0x5b/0x170
[   22.618678]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   22.618680] RIP: 0033:0x7f0942790c12
[   22.618680] Code: 48 83 ec 18 44 89 4c 24 08 e8 9a f5 ff ff 44 8b 4c 24 08 4d 89 f8 45 89 f2 89 c5 4c 89 ea 4c 89 e6
89 df b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a 89 ef 48 89 44 24 08 e8 ca f5 ff ff 48 8b
[   22.618700] RSP: 002b:00007ffe2051be30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
[   22.618701] RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f0942790c12
[   22.618702] RDX: 0000000000000148 RSI: 0000559278761700 RDI: 0000000000000011
[   22.618703] RBP: 0000000000000000 R08: 00005592787aa860 R09: 0000000000000014
[   22.618703] R10: 0000000000000000 R11: 0000000000000293 R12: 0000559278761700
[   22.618704] R13: 0000000000000148 R14: 0000000000000000 R15: 00005592787aa860
[   22.620488] lib80211_crypt: registered algorithm 'CCMP'
[   22.620735] ------------[ cut here ]------------
[   22.620738] DEBUG_LOCKS_WARN_ON(val > preempt_count())
[   22.620744] WARNING: CPU: 3 PID: 489 at kernel/sched/core.c:3246 preempt_count_sub+0x5a/0x90
[   22.620749] Modules linked in: lib80211_crypt_ccmp amdkfd amd_iommu_v2 amdgpu nls_iso8859_1 nls_cp437 vfat fat
r8188eu(C) edac_mce_amd chash kvm_amd gpu_sched i2c_algo_bit ccp ttm rng_core lib80211 kvm snd_hda_codec_realtek
snd_hda_codec_generic cfg80211 snd_hda_codec_hdmi snd_hda_intel input_leds drm_kms_helper irqbypass snd_hda_codec
crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc rfkill led_class mousedev joydev wmi_bmof snd_hda_core drm
aesni_intel snd_hwdep aes_x86_64 crypto_simd cryptd glue_helper snd_pcm pcspkr sp5100_tco snd_timer r8169 k10temp
agpgart i2c_piix4 snd mii syscopyarea sysfillrect sysimgblt fb_sys_fops soundcore rtc_cmos evdev gpio_amdpt pinctrl_amd
mac_hid wmi pcc_cpufreq acpi_cpufreq crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 fscrypto
hid_generic
[   22.620792]  usbhid hid sd_mod ahci xhci_pci libahci xhci_hcd crc32c_intel libata usbcore scsi_mod usb_common
[   22.620803] CPU: 3 PID: 489 Comm: NetworkManager Tainted: G        WC        4.18.0-rc7-staging+ #14
[   22.620804] Hardware name: Gigabyte Technology Co., Ltd. A320M-S2H/A320M-S2H-CF, BIOS F23d 04/17/2018
[   22.620808] RIP: 0010:preempt_count_sub+0x5a/0x90
[   22.620809] Code: 14 f7 6b c3 e8 57 89 2d 00 85 c0 74 f6 8b 15 55 6a 5a 01 85 d2 75 ec 48 c7 c6 2e 01 e7 94 48 c7 c7
db b2 e5 94 e8 90 77 fd ff <0f> 0b c3 84 d2 75 c9 e8 2a 89 2d 00 85 c0 74 c9 8b 05 28 6a 5a 01
[   22.620842] RSP: 0018:ffffa1904133bc48 EFLAGS: 00010286
[   22.620844] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
[   22.620846] RDX: 0000000080000001 RSI: ffffffff94e82606 RDI: 00000000ffffffff
[   22.620847] RBP: ffff8eb4449eac00 R08: 0000001af4246984 R09: 00000000000003f1
[   22.620849] R10: ffffffff955f7700 R11: 0000000000000000 R12: ffff8eb4449eacac
[   22.620850] R13: ffff8eb4565da800 R14: ffff8eb453ca2000 R15: 0000000000000003
[   22.620852] FS:  00007f0944d69000(0000) GS:ffff8eb45ecc0000(0000) knlGS:0000000000000000
[   22.620853] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   22.620854] CR2: 00007ffe20518fa8 CR3: 0000000207844000 CR4: 00000000003406e0
[   22.620855] Call Trace:
[   22.620859]  _raw_spin_unlock+0x16/0x30
[   22.620862]  sch_direct_xmit+0x178/0x340
[   22.620866]  __dev_queue_xmit+0x2f6/0x910
[   22.620870]  packet_sendmsg+0x948/0x15a7
[   22.620873]  ? attach_to_pi_owner+0x38/0x180
[   22.620877]  sock_sendmsg+0x33/0x40
[   22.620880]  __sys_sendto+0xee/0x160
[   22.620885]  ? memzero_explicit+0xa/0x10
[   22.620887]  ? urandom_read+0x120/0x270
[   22.620891]  __x64_sys_sendto+0x24/0x30
[   22.620893]  do_syscall_64+0x5b/0x170
[   22.620896]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   22.620898] RIP: 0033:0x7f0942790c12
[   22.620899] Code: 48 83 ec 18 44 89 4c 24 08 e8 9a f5 ff ff 44 8b 4c 24 08 4d 89 f8 45 89 f2 89 c5 4c 89 ea 4c 89 e6
89 df b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a 89 ef 48 89 44 24 08 e8 ca f5 ff ff 48 8b
[   22.620925] RSP: 002b:00007ffe2051be30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
[   22.620928] RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f0942790c12
[   22.620929] RDX: 0000000000000148 RSI: 0000559278761700 RDI: 0000000000000011
[   22.620930] RBP: 0000000000000000 R08: 00005592787aa860 R09: 0000000000000014
[   22.620931] R10: 0000000000000000 R11: 0000000000000293 R12: 0000559278761700
[   22.620933] R13: 0000000000000148 R14: 0000000000000000 R15: 00005592787aa860
[   22.620936] ---[ end trace ecf9299fa6cc3176 ]---
[   22.620940] BUG: using __this_cpu_read() in preemptible [00000000] code: NetworkManager/489
[   22.620942] caller is __local_bh_enable_ip+0x50/0x80
[   22.620945] CPU: 3 PID: 489 Comm: NetworkManager Tainted: G        WC        4.18.0-rc7-staging+ #14
[   22.620946] Hardware name: Gigabyte Technology Co., Ltd. A320M-S2H/A320M-S2H-CF, BIOS F23d 04/17/2018
[   22.620947] Call Trace:
[   22.620950]  dump_stack+0x5c/0x80
[   22.620955]  check_preemption_disabled.cold.0+0x46/0x51
[   22.620958]  __local_bh_enable_ip+0x50/0x80
[   22.620961]  __dev_queue_xmit+0x450/0x910
[   22.620964]  packet_sendmsg+0x948/0x15a7
[   22.620967]  ? attach_to_pi_owner+0x38/0x180
[   22.620971]  sock_sendmsg+0x33/0x40
[   22.620973]  __sys_sendto+0xee/0x160
[   22.620976]  ? memzero_explicit+0xa/0x10
[   22.620978]  ? urandom_read+0x120/0x270
[   22.620982]  __x64_sys_sendto+0x24/0x30
[   22.620984]  do_syscall_64+0x5b/0x170
[   22.620986]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   22.620990] RIP: 0033:0x7f0942790c12
[   22.620991] Code: 48 83 ec 18 44 89 4c 24 08 e8 9a f5 ff ff 44 8b 4c 24 08 4d 89 f8 45 89 f2 89 c5 4c 89 ea 4c 89 e6
89 df b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3a 89 ef 48 89 44 24 08 e8 ca f5 ff ff 48 8b
[   22.621017] RSP: 002b:00007ffe2051be30 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
[   22.621020] RAX: ffffffffffffffda RBX: 0000000000000011 RCX: 00007f0942790c12
[   22.621021] RDX: 0000000000000148 RSI: 0000559278761700 RDI: 0000000000000011
[   22.621024] RBP: 0000000000000000 R08: 00005592787aa860 R09: 0000000000000014
[   22.621025] R10: 0000000000000000 R11: 0000000000000293 R12: 0000559278761700
[   22.621026] R13: 0000000000000148 R14: 0000000000000000 R15: 00005592787aa860

Revert the commit fixes the issues and dmesg looks good again.

Fixes: 515ce733e8 ("staging:r8188eu: Use lib80211 to encrypt (CCMP) tx frames")
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 11:22:10 +02:00
Michael Straube
1061bdba2f staging: rtl8188eu: remove unnecessary includes
In the header rtw_iol.h there is only one function declared.
Remove the include of rtw_iol.h from files that do not use
this function.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:23:28 +02:00
Michael Straube
b5c7af4139 staging: rtl8188eu: remove redundant include
The header osdep_service.h is included from drv_types.h,
so remove the redundant include.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:23:28 +02:00
Michael Straube
5eb438c9d2 staging: rtl8188eu: remove unnecessary parentheses
Remove unnecessary parentheses from if conditions.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:23:28 +02:00
Michael Straube
ac588ce4b5 staging: rtl8188eu: rename rtw_IOL_applied
Rename rtw_IOL_applied to be all lowercase.
rtw_IOL_applied -> rtw_iol_applied

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:23:28 +02:00
Michael Straube
ae3b4ed1a2 staging: rtl8188eu: use phydm_regdefine11n.h from rtlwifi
Use rtlwifi/phydm/phydm_regdefine11n.h instead of odm_RegDefine11N.h
and remove the now unused odm_RegDefine11N.h.

The defines from odm_RegDefine11N.h are defined with the same values
in rtlwifi/phydm/phydm_regdefine11n.h.

There is one define that is named different, but that one is not
used in the rtl8188eu code.

rtl8188eu: #define ODM_REG_RX_PATH_11N 0xC04
rtlwifi: #defnie ODM_REG_BB_RX_PATH_11N 0xC04

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-05 16:09:15 +02:00
David S. Miller
89b1698c93 Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
The BTF conflicts were simple overlapping changes.

The virtio_net conflict was an overlap of a fix of statistics counter,
happening alongisde a move over to a bonafide statistics structure
rather than counting value on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-02 10:55:32 -07:00
Michael Straube
d36255f148 staging: rtl8188eu: rename odm_RTL8188E - style
Rename source and header file to avoid CamelCase.
odm_RTL8188E.c -> odm_rtl8188e.c
odm_RTL8188E.h -> odm_rtl8188e.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
1a5c3d83c0 staging: rtl8188eu: remove unused rtw_remove_bcn_ie()
The function rtw_remove_bcn_ie() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
96b0b75941 staging: rtl8188eu: remove unused rtw_add_bcn_ie()
The function rtw_add_bcn_ie() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
ee34b7cb0f staging: rtl8188eu: remove unnecessary parentheses - style
Remove unnecessary parentheses to improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
55e12d6451 staging: rtl8188eu: fix comparsions to NULL - style
Use x instead of x != NULL.
Use !x instead of x == NULL.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
4235d7d88a staging: rtl8188eu: fix indentation - style
Fix indentation to clear checkpatch warnings.
WARNING: suspect code indent for conditional statements

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
8663b2e02c staging: rtl8188eu: use is_broadcast_ether_addr
Use is_broadcast_ether_addr instead of checking each byte of the
address array for 0xff. Shortens the code and improves readability.

As required by is_broadcast_ether_addr, the address array sta_addr
is properly aligned in all uses. Thanks to Joe Perches.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:44:27 +02:00
Michael Straube
328cf8e779 staging: rtl8188eu: use is_multicast_ether_addr
Use is_multicast_ether_addr instead of custom IS_MCAST.
The variable for the result of IS_MCAST was only used in the
if conditional. So remove the extra variable and move the call
to is_multicast_ether_addr into the conditional.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-02 09:43:42 +02:00
Michael Straube
8d7430de98 staging: rtl8188eu: remove unnecessary parentheses
Remove unnecessary parentheses, also clears checkpatch issues about
missing spaces around '-'.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 11:02:25 +02:00
Michael Straube
47c8264e68 staging: rtl8188eu: fix comparsion to true
Use if(x) instead of if(x == true).

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 11:02:25 +02:00
Michael Straube
3da4a578ce staging: rtl8188eu: replace tabs with spaces
Replace tabs with spaces in function definition and variable
declarations.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 11:02:25 +02:00
Michael Straube
816f4a46e0 staging: rtl8188eu: remove redundant includes
Both osdep_service.h and drv_types.h are included from hal_intf.h,
so remove the redundant includes from hal_intf.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 11:02:25 +02:00
Michael Straube
30622c87c3 staging: rtl8188eu: remove unused should_forbid_n_rate()
The function should_forbid_n_rate() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 11:01:01 +02:00
Michael Straube
0a837d1ba5 staging: rtl8188eu: remove unused dump_txrpt_ccx_88e()
The function dump_txrpt_ccx_88e() is nerver used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 11:01:01 +02:00
Greg Kroah-Hartman
c7346797f5 Revert "staging:r8188eu: Use lib80211 to encrypt (TKIP) tx frames"
This reverts commit 0d4876f4e9 as it
breaks the build once 4.18-rc7 was merged into the staging-next tree.

Cc: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 10:46:38 +02:00
Greg Kroah-Hartman
c88b94a9f4 Merge 4.18-rc7 into staging-next
We want the staging changes in here for testing and merge issues.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-30 10:13:15 +02:00
Michael Straube
8cc7be34c6 staging: rtl8188eu: remove unused rtw_calculate_wlan_pkt_size_by_attribue()
The function rtw_calculate_wlan_pkt_size_by_attribue() also defined as
rtw_wlan_pkt_size() is never used, so remove it. Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:19:40 +02:00
Michael Straube
6da0bda8d7 staging: rtl8188eu: replace tabs with spaces
Replace tabs with spaces, clears a checkpatch 'line over 80 characters'
warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:19:40 +02:00
Michael Straube
c39f4bb98e staging: rtl8188eu: fix comparsions to NULL - coding style
Use !x instead of x == NULL.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:19:40 +02:00
Michael Straube
12f3ccfbc5 staging: rtl8188eu: remove unused rtw_get_oper_choffset()
The function rtw_get_oper_choffset() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:08:03 +02:00
Michael Straube
c60b03effc staging: rtl8188eu: remove unused rtw_get_oper_bw()
The function rtw_get_oper_bw() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:08:03 +02:00
Michael Straube
b045b42915 staging: rtl8188eu: remove unused CAM_empty_entry()
The function CAM_empty_entry() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:08:03 +02:00
Michael Straube
891f6de39c staging: rtl8188eu: remove unused ODM_RASupport_Init()
The function ODM_RASupport_Init() is never used, so remove it.
Discovered by cppcheck.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-29 10:08:03 +02:00