Commit graph

47 commits

Author SHA1 Message Date
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 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 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
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 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
Mihaela Muraru 574a5998cc staging: rtl8188eu: Remove braces from single statement blocks
This patch fix a coding style issue, by removing braces {} from single
statement blocks.

Issue found by checkpatch.pl.

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-03 18:22:23 +02:00
Aviv Palivoda e06c1f6b4f staging: rtl8188eu: Put constant on right side of comparison
Constants should be on the right side of comparisons.

Issue found by checkpatch.pl script.

Signed-off-by: Aviv Palivoda <palaviv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15 08:16:39 +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
Mihaela Muraru 42178baf4a Staging: rtl8188eu: hal: Compress return logic into one line
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@

-ret =
+return
        e;
-return ret;

Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:27:32 +02: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 85a7dc225d staging:r8188eu: refactor rtl88eu_dm_txpower_tracking_callback_thermalmeter function
Remove is2t and rf local variables from this function.

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 b39db0b160 staging:r8188eu: remove NumTotalRFPath member of hal_data_8188e structure
NumTotalRFPath is 1 for r8188eu chip.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:23 +02:00
Ivan Safonov ffc2ab44f4 staging:r8188eu: remove rf_chip member of hal_data_8188e structure
This member is constant.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:22 +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 16eda427a3 staging: r8188eu: remove rf_type member of hal_data_8188e structure
rf_type is always equal to RF_1T1R.

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 1ac7c98699 staging: r8188eu: rename phy_set_bw_mode to rtw_hal_set_bwmode
And remove two one-line wrappers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 11:30:03 +02:00
Ivan Safonov bada35ba84 staging: r8188eu: rename phy_sw_chnl to rtw_hal_set_chan
And remove two one-line wrappers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 11:30:03 +02:00
Ivan Safonov 76098bcb30 staging: r8188eu: rename phy_query_rf_reg to rtw_hal_read_rfreg
And remove two one-line wrappers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 11:30:02 +02:00
Ivan Safonov 5cd3809eb9 staging: r8188eu: remove bNotifyChannelChange member of struct adapter
Default value of this variable used only to produce debug output.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 11:23:21 +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
Andrew Bradford 816c2db010 staging: rtl8188eu: Remove RF_PATH_C & RF_PATH_D
RTL8188EE has a maximum of 2 RF paths (chains) so paths C and D are not
needed to support this part.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:06:51 -08:00
Ivan Safonov 016c6bbaf1 staging: rtl8188eu: abs kernel macro used in simularity_compare function
abs macro is useful for determining the difference between the two integers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 09:09:08 +09: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
Sudip Mukherjee 9393d34e49 staging: rtl8188eu: remove unused variables
These variables were being set but not used afterwards.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:23:11 -07:00
Haneen Mohammed adb3d770d2 Staging: rtl8188eu: Remove parentheses around right side an assignment
Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:08:01 +01:00
Vatika Harlalka 3fe9065801 Staging: rtl8188eu: Remove unused variable
Remove unused variable assignment for is2t and assign
sim_bitmap at declaration to make the code more compact.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:22:05 -08:00
Vatika Harlalka 179e7dcde4 Staging: rtl8188eu: Move variable assignment
Variable path_on is assigned explicitly in the if branch and so
its assignment outside can be moved to the else branch.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:20:00 -08:00
Vatika Harlalka 0395e554f8 Staging: rtl8188eu: Remove unnecessary code
Code removed as variables assigned are not used anywhere.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 15:25:08 -08:00
Vatika Harlalka 294a7fcc85 Staging: rtl8188eu: Refactor conditional code to increase readability
Remove the nested conditionals. The if and else-if have the same
code so they are combined to make the code more compact.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Vatika Harlalka 4ceb7f7233 Staging: rtl8188eu: Combine two loops to increase readability
The first loop assigns values to ofdm_index array and the
second checks for boundary conditions. They are combined and
a comment is added to increase clarity.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Vatika Harlalka 1d6871f8dc Staging: rtl8188eu: Remove unnecessary if condition
Remove this branch as is2t is defined false and is not
modified. The variable value32 is then unused.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Vatika Harlalka 065be69f26 Staging: rtl8188eu: Remove unnecessary variable
Remove unnecessary variable and replace its uses with previously
defined variable.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:54:12 -08:00
Vatika Harlalka 4c3fa64038 Staging: rtl8188eu: Refactored code to increase readility
Refactored the conditional code to make it more compact.
Replaced the ternary operators with abs() macro to increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:48 -08:00
Vatika Harlalka d5dd06ea01 Staging: rtl8188eu: Replace ternary operator with existing macro
Replace ternary operator with existing abs() macro to increase
code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:48 -08:00
Vatika Harlalka 8e2c69b62d Staging: rtl8188eu: Remove redundant if condition
Remove redundant if condition as !result is always false.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:47 -08:00
Vatika Harlalka 93ab486d3f Staging: rtl8188eu: Changed array and loop construct
This function only required the array from the 14th element
onwards. Therefore, the array size is reduced and the loop
counter is modified so as to start from 0.
Also, the assignment of variable place is redundant as it is
initialized again in the loop.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -08:00
Vatika Harlalka efb8d49794 Staging: rtl8188eu: Replace unneeded switch-case block
Replace switch-case block with single if statement to
increase code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -08:00
Vatika Harlalka 9734d632bb Staging: rtl8188eu: Remove unnecessary variable
Remove unneccessary variable and replace its uses with another
variable which is previously defined.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -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 d9124e064d staging: rtl8188eu: Remove HalPhyRf_8188e.c
Move functions from HalPhyRf_8188e.c to phy.c .

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 14:05:51 -07:00
Nicolas Thery f60705fd13 staging: rtl8188eu: include missing header
This patch fixes the following sparse warnings:

drivers/staging/rtl8188eu/hal/phy.c:46:5: warning: symbol
'phy_query_bb_reg' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/phy.c:56:6: warning: symbol
'phy_set_bb_reg' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/phy.c:129:5: warning: symbol
'phy_query_rf_reg' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/phy.c:140:6: warning: symbol
'phy_set_rf_reg' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/phy.c:228:6: warning: symbol
'phy_set_tx_power_level' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/phy.c:324:6: warning: symbol
'phy_set_bw_mode' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/phy.c:360:6: warning: symbol 'phy_sw_chnl'
was not declared. Should it be static?

Signed-off-by: Nicolas Thery <nthery@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06 22:02:17 -07:00
navin patidar fb393d260d staging: rtl8188eu: Rework function rtl8188e_PHY_RF6052SetOFDMTxPower()
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:58:40 -07:00
navin patidar c5db81acf4 staging: rtl8188eu: Rework function rtl8188e_PHY_RF6052SetCckTxPower()
Rename CamelCase variables and function name.
Remove redundant variable TurboScanOff.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-31 12:58:40 -07:00
navin patidar 2027324402 staging: rtl8188eu: Rework function rtl8188e_PHY_RF6052SetBandwidth()
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:58:40 -07:00
navin patidar 238bd31e2e staging: rtl8188eu: Rename rtl8188e_phycfg.c to phy.c
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
Renamed from drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c (Browse further)