1
0
Fork 0
Commit Graph

15 Commits (3d8b1933eb1c3c94ef8667996dbff6994d5d552f)

Author SHA1 Message Date
Colin Ian King 9e269dcdec staging: rtlwifi: phydm: fix spelling mistake "Abnrormal" -> "Abnormal"
Trivial fix to spelling mistake in 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
Nathan Chancellor b99e0ce20f staging: rtlwifi: Remove unnecessary parentheses
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: warning:
equality comparison with extraneous parentheses [-Wparentheses-equality]
                } else if ((is_enable_la_mode == 1)) {
                            ~~~~~~~~~~~~~~~~~~^~~~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: remove
extraneous parentheses around the comparison to silence this warning
                } else if ((is_enable_la_mode == 1)) {
                           ~                  ^   ~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: use '='
to turn this equality comparison into an assignment
                } else if ((is_enable_la_mode == 1)) {
                                              ^~
                                              =
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/172
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-09 15:13:24 +02:00
Sabin Mihai Rapan dba1b8ac73 staging: rtlwifi: Fix "Trafic"->"Traffic"
Trivial fix to spelling mistake in comment text.

Signed-off-by: Sabin Mihai Rapan <sabin.rapan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17 09:05:14 +02:00
Colin Ian King 70ac74619c staging: rtlwifi: fix spelling mistake: "Platfoem" -> "Platform"
Trivial fix to spelling mistake in ODM_RT_TRACE message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25 18:44:13 +02:00
Colin Ian King fb28c0e0fe staging: rtlwifi: fix spelling mistake: "traking" -> "tracking"
Trivial fix to spelling mistake in ODM_RT_TRACE message text

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-11 11:48:24 +02:00
Colin Ian King cddef80270 staging: r8822be: fix typo in variable name "offest" -> "offset"
There are multiple occurrances of typos of "offest" that should be
"offset". Fix these.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:09:24 -07:00
Nathan Chancellor a67cfe3905 staging: rtlwifi: Replace license boilerplate with SPDX identifiers
This satisfies a checkpatch.pl warning and is the preferred method for
notating the license due to its lack of ambiguity.

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06 19:01:29 -07:00
Colin Ian King 250f26c584 staging: r8822be: fix typos in header guard macros
The macros for __PHYDMKFREE_H__ and __PHYDM_FEATURES_H__ contain
typos and don't match the #if guard check. Defined them correctly.

Cleans up clang warnings:
warning: '__PHYDMKFREE_H__' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]
warning: '__PHYDM_FEATURES_H__' is used as a header guard here, followed
by #define of a different macro [-Wheader-guard]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29 11:54:38 +02:00
Arushi Singhal 314af4f77c staging: rtlwifi: Remove nonessential semicolon
Remove non-essential semicolon after 'else' and 'switch' statements. Issue
found using semicolon.cocci Coccinelle script.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:01:11 -08:00
Santha Meena Ramamoorthy 3334a76c3a staging: rtlwifi: remove unneeded semicolon
Remove unneeded semicolon after 'while' and 'switch' statements. Issue
found using semicolon.cocci Coccinelle script.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:01:11 -08:00
Frank A. Cancio Bello 38b2b2e822 staging: rtlwifi: phydm: Remove useless parentheses
Remove unnecessary parentheses to comply with preferred coding style for
the linux kernel and avoid the following checkpatch's message:
'CHECK: Unnecessary parentheses around'.

Credits to checkpatch.

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18 15:53:50 +02:00
Kees Cook f8af6a3233 staging: rtlwifi: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly. Also drops unused odm timer code.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Cc: shaofu <shaofu@realtek.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18 15:52:39 +02:00
Larry Finger 43d15c2013 staging: rtl8822be: Keep array subscript no lower than zero
The kbuild test robot reports the following:
   drivers/staging//rtlwifi/phydm/phydm_dig.c: In function 'odm_pause_dig':
   drivers/staging//rtlwifi/phydm/phydm_dig.c:494:45: warning: array subscript is below array bounds [-Warray-bounds]
      odm_write_dig(dm, dig_tab->pause_dig_value[max_level]);

This condition is caused when a loop falls through. The fix is to pin
max_level to be >= 0.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
c: kbuild test robot <fengguang.wu@intel.com>
Fixes: 9ce99b04b5 staging: r8822be: Add phydm mini driver
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18 15:33:15 +02:00
Jérémy Lefaure 2595587d7e staging: rtlwifi: use ARRAY_SIZE
Using the ARRAY_SIZE macro improves the readability of the code. Also,
it is useless to use a variable to store this constant calculated at
compile time.

Found with Coccinelle with the following semantic patch:
@r depends on (org || report)@
type T;
T[] E;
position p;
@@
(
 (sizeof(E)@p /sizeof(*E))
|
 (sizeof(E)@p /sizeof(E[...]))
|
 (sizeof(E)@p /sizeof(T))
)

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03 18:34:56 +02:00
Ping-Ke Shih 9ce99b04b5 staging: r8822be: Add phydm mini driver
The RTL8822BE, an 802.11ac wireless network card, is now appearing in
new computers. Its driver is being placed in staging to reduce the time
that users of this new card will have access to in-kernel drivers.

New Realtek wireless devices have a new method for PHY control and
dynamic management. The RTL8822BE is the first of these devices, thus
there is additional code required.

In the final version, this code will be a separate module; however,
it is combined with the r8822be driver to minimize the interference
with the drivers in the wireless tree.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
Cc: Birming Chiu <birming@realtek.com>
Cc: Shaofu <shaofu@realtek.com>
Cc: Steven Ting <steventing@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-20 11:13:12 -07:00