Commit graph

65 commits

Author SHA1 Message Date
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 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
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
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
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 e360c0ea43 staging: rtl8188eu: remove blank lines
Remove unrequired blank lines reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-24 14:02:00 +02:00
Michael Straube 71e9bd3ff8 staging: rtl8188eu: add SPDX identifiers
This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26 11:58:22 +08:00
Janani Sankara Babu f57329c6fc staging:rtl8188eu:hal Fix wrong comparison to False
This patch solves the warning "Using comparison to false is error prone"

Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-22 10:57:22 +02:00
Yamanappagouda Patil fc988e144c staging: rtl8188eu: Fixed "Missing a blank line after declarations".
Fixed checkpatch.pl "missing a blank line after declarations" waring
messages from rtl8188eu module.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06 09:17:01 +01:00
Ivan Safonov 660d7afff7 staging:r8188eu: remove bTXPowerTrackingInit member of odm_rf_cal structure
bTXPowerTrackingInit assigned, but not used.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:24 +02:00
Ivan Safonov 2e41434673 staging: r8188eu: remove RFType member of odm_dm_struct structure
rf_type is always equal to ODM_1T1R.
So, only RF PATH A exists for r8188eu device...

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-23 14:12:34 +02:00
Ivan Safonov 177aa53a0d staging: r8188eu: remove GET_HAL_DATA macro
GET_HAL_DATA replaced by its definition.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:33:49 +02:00
Ivan Safonov d7c952a366 staging: r8188eu: remove ODM_CmnInfoPtrArrayHook function
This function used once, and does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17 20:33:19 +02:00
Ivan Safonov 02f14ca423 staging: r8188eu: remove ODM_CmnInfoHook function
This function used once, and does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17 20:33:19 +02:00
Ivan Safonov 7399c2c395 staging: r8188eu: remove ODM_CmnInfoUpdate function
This function does not improve code readability.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17 20:33:19 +02:00
Kyle Kuffermann fb025382b4 staging: rtl8188eu: Remove license paragraph with mailing address
This fixes the issue reported by checkpatch.pl:

	"Do not include the paragraph about writing to the Free Software
	Foundation's mailing address from the sample GPL notice. The FSF
	has changed addresses in the past, and may do so again.  Linux
	already includes a copy of the GPL."

in all files for the rtl8188eu driver.

Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Ivan Safonov fd50e119e6 staging: rtl8188eu: remove FabVersion member of odm_dm_struct struct
Value of this variable is hardcoded
and used only to produce debug output.
Probably, FabVersion is useless.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Anish Bhatt 9c68ed09fe rtl8188eu : BIT() macro cleanup
Use the BIT(x) macro directly instead using multiple
BITX defines.

Signed-off-by: Anish Bhatt <anish@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:25:13 -07:00
Iban Rodriguez 19fac3bbe2 Staging: rtl8188eu: Correct coding style errors
Correct errors reported by checkpatch.pl because space prohibited
before ','.
Also split one line into two as it was longer than
80 characters

Signed-off-by: Iban Rodriguez <iban.rodriguez@ono.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:45:38 -07:00
Jakub Sitnicki 3abf4f984a staging: rtl8188eu: kill unused hal_data_8188e::fw_ractrl flag
Flag is never set. Remove it and the code that is dead because of it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:38:21 -07:00
Aya Mahfouz 07add2d38d staging: rtl8188eu: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:

@@
expression e, e1;
constant c;
@@

e =
-(e1
+e1
>>
-c);
+c;

@@
identifier i;
constant c;
type t;
expression e;
@@

t i =
-(e
+e
>>
-c);
+c;

@@
expression e, e1;
identifier f;
constant c;
@@

e1 = f(...,
-(e
+e
>>
-c)
+c
,...);

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:22:42 -08:00
Nicholas Mc Guire e914024d46 staging: rtl8188eu: odm: conditional setting with no effect
The if and the else branch code are identical - so the condition has no
effect on the effective code - this patch removes the condition and the
duplicated code. Due to this being a fall-through-if here - the first
if condition has no effect either - so it also can be removed.
struct mlme_priv is thus also no longer needed here.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:37:52 +08:00
Nicholas Mc Guire 3d272700d7 staging: rtl8188eu: odm: condition with no effect
The if and the else branch code are identical - so the condition has no
effect on the effective code - this patch removes the condition and the
duplicated code.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:37:52 +08:00
Jia He 7be921a226 staging: rtl8188eu: Fix coding style space related ERROR problems
This fixes space related ERROR reports by checkpatch.pl
Generated by $ git ls-files "drivers/staging/rtl8188eu/*.[ch]" | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --strict --types=SPACING
Already checked by text comparasion
$git diff -w
and binary comparasion of r8188eu.ko
$objdiff diff <old_commit> <new_commit>

Signed-off-by: Jia He <hejianet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 18:13:34 -08:00
navin patidar 368c75b98b staging: rtl8188eu: odm.h: Remove unused struct dyn_primary_cca
struct odm_dm_struct has a member of struct dyn_primary_cca,
which is initialized once and then never used by driver, so
we can remove struct dyn_promary_cca and code which initialize
it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar 8f4ece938a staging: rtl8188eu: Rework function ODM_AntennaDiversity_88E()
Rename CamelCase function name.
Remove unnecessary comments.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:13 -07:00
navin patidar db0ccdacd0 staging: rtl8188eu: Rework function ODM_AntennaDiversityInit_88E()
Rename CamelCase function name.
Remove unnecessary debugging messages.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar 6f1b7df415 staging: rtl8188eu: Remove odm_debug.c
Move a function and global variable from odm_debug.c to odm.c

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:47:12 -07:00
navin patidar 05103ff0b9 staging: rtl8188eu: Rework odm_TXPowerTrackingCallback_ThermalMeter_8188E()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 14:04:31 -07:00
navin patidar 7b98485c72 staging: rtl8188eu: Rework function rtl8188e_PHY_SetRFReg()
Rename CamelCase variables and function name.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-31 12:57:41 -07:00
navin patidar 9c6db65199 staging: rtl8188eu: Rework function PHY_SetBBReg()
Rename CamelCase variables and function name.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-31 12:57:40 -07:00
navin patidar ecd1f9b3f7 staging: rtl8188eu: Rework function PHY_QueryBBReg()
Rename CamelCase variables and function name.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-31 12:56:50 -07:00
navin patidar 83f53fceec staging: rtl8188eu: Remove dummy function odm_DynamicTxPower()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:11 -04:00
navin patidar 99ecfb06f8 staging: rtl8188eu: Remove function _rtw_read32()
_rtw_read32() is a wrapper function, being used to call usb_read32().
Call usb_read32() directly and drop _rtw_read32().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:02 -07:00
navin patidar e76484d00c staging: rtl8188eu: Remove function _rtw_write8()
_rtw_write8() is a wrapper function, being used to call usb_write8().
Call usb_write8() directly and drop _rtw_write8().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:02 -07:00
navin patidar fc15807956 staging: rtl8188eu: Remove function _rtw_write32()
_rtw_write32() is a wrapper function, being used to call usb_write32().
Call usb_write32() directly and drop _rtw_write32().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:01 -07:00
navin patidar 9caf175047 staging: rtl8188eu: Use ODM_REG_IGI_A_11N and ODM_BIT_IGI_11N in ODM_Write_DIG()
ODM_REG(IGI_A, pDM_Odm) and ODM_BIT(IGI, pDM_Odm) macros produce
ODM_REG_IGI_A_11N and ODM_BIT_IGI_11N respectively after preprocessing.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:38:08 -07:00
navin patidar a4e76443f7 staging: rtl8188eu: Remove unnecessary debugging message from ODM_Write_DIG()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:38:08 -07:00
navin patidar e4916f35f0 staging: rtl8188eu: Use ODM_REG_IGI_A_11N and ODM_BIT_IGI_11N in odm_DIGInit()
ODM_REG(IGI_A, pDM_Odm) and ODM_BIT(IGI, pDM_Odm) macros produce
ODM_REG_IGI_A_11N and ODM_BIT_IGI_11N respectively after preprocessing.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:38:08 -07:00
navin patidar 4bdfb1ce1b staging: rtl8188eu: Use "ODM_REG_CCK_CCA_11N" in ODM_Write_CCK_CCA_Thres()
Use "ODM_REG_CCK_CCA_11N" directly instead of using ODM_REG(CCK_CCA, pDM_Odm)
which produces same after preprocessing.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:38:08 -07:00
navin patidar b5e1e9126a staging: rtl8188eu:Remove function with empty defination odm_DynamicPrimaryCCA()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:58 +09:00
navin patidar 293f6c08c7 staging: rtl8188eu: Remove unused function ConvertTo_dB()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:57 +09:00
navin patidar ddd0d48085 staging: rtl8188eu: Remove unused function odm_SwAntDivChkAntSwitchCallback()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:57 +09:00
navin patidar 36622c97f0 staging: rtl8188eu: Remove unused funtion odm_DynamicTxPowerNIC()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:57 +09:00
navin patidar ba727007e7 staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskAPADSL()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:56 +09:00
navin patidar 53760485ba staging: rtl8188eu: Remove unused function odm_RefreshRateAdaptiveMaskMP()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:56 +09:00
navin patidar bd645d88bf staging:rtl8188eu: Remove unused function iodm_1R_CCA()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:56 +09:00
navin patidar 06dd47e3b6 staging: rtl8188eu: Remove unused function odm_DynamicBBPowerSavingInit()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:56 +09:00
navin patidar 86ff64405e staging: rtl8188eu: Remove function odm_DynamicBBPowerSaving()
odm_DynamicBBPowerSaving() has empty defination.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:56 +09:00
navin patidar ffb2507078 staging: rtl8188eu: Remove unused function odm_DIGbyRSSI_LPS()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:48:56 +09:00