Commit graph

122 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 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 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 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 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 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
Santha Meena Ramamoorthy c41cd503d7 staging: rtl8188eu: place constant on the right side of test
Place constants on the right side of the test during comparisons to
conform to the Linux kernel coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-06 04:07:49 -08:00
Alfonso Lima Astor 62f9868990 staging: rtl8188eu: Remove extra spaces
Coding style problem detected by checkpatch.pl
ERROR: space prohibited before that ','

Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08 12:58:30 +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
Alex Briskin 57935a3f87 staging:r8188eu: Remove space before comma
Trivial style fix to remove unnecessary errors in checkpatch.pl

Signed-off-by: Alex Briskin <br.shurik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:56:17 +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 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 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
Ivan Safonov 274c4f2912 staging: r8188eu: remove rtl8188e_set_hal_ops function
rtl8188e_set_hal_ops do nothing.

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 2490fbf7b6 staging: r8188eu: rename rtl8188e_free_hal_data to rtw_hal_free_data
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 a5c2587435 staging: r8188eu: rename rtl8188e_init_dm_priv to rtw_hal_dm_init
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 f86fc9b0b6 staging: r8188eu: rename ReadChipVersion8188E to rtw_hal_read_chip_version
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 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 66fa5a4688 staging: r8188eu: rename rtl8188e_HalDmWatchDog to rtw_hal_dm_watchdog
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 c805976418 staging: r8188eu: rename rtl8188e_Add_RateATid to rtw_hal_add_ra_tid
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 1e24579b0a staging: r8188eu: rename AntDivBeforeLink8188E to rtw_hal_antdiv_before_linked
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 2865af357c staging: r8188eu: rename AntDivCompare8188E to rtw_hal_antdiv_rssi_compared
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 348526f75d staging: r8188eu: rename sreset_init_value to rtw_hal_sreset_init
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 35e224f3fd staging: r8188eu: remove sreset_get_wifi_status of hal_ops structure
Driver does not use it.

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 685adf8aa3 staging: r8188eu: rename rtl8188e_SetHalODMVar to rtw_hal_set_odm_var
And remove many 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 91d0696299 staging: r8188eu: rename hal_notch_filter_8188e to rtw_hal_notch_filter
And remove many 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
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
Rémy Oudompheng 3913c19ae7 staging: rtl8188eu: add missing delay in polling loops.
Previously the code could exit with failure too early.

Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Rémy Oudompheng ed73749426 staging: rtl8188eu: jiffies are unsigned long
Remove rtw_get_passing_time_ms function and adjust type
of relevant variables.

Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Ivan Safonov 32b5844e1f staging: rtl8188eu: occurrence of the 5 GHz code marked
Channel numbers greater than 14 are used here, which are possible only
for the 5 GHz frequency.

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
Luca Ceresoli 9431fda3ff staging: rtl8188eu: remove unused rtw_hal_write_rfreg
rtw_hal_write_rfreg() is never referenced, so remove it.

It used to be the only place where the write_rfreg callback was
called, so get rid of the function pointer as well.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:15:15 -07:00
Jakub Sitnicki 4221844a62 staging: rtl8188eu: fold rtl8188e_read_chip_version() into rtl8188e_SetHalODMVar()
Both rtl8188e_read_chip_version() and ReadChipVersion8188E() are used
only in one place.  Make ReadChipVersion8188E() a void function and
eliminate its wrapper - rtl8188e_read_chip_version().

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki a51d13037b staging: rtl8188eu: remove ROMVer from struct HAL_VERSION
ROM version on RTL8188EU is always 0.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki 3c71dd6c56 staging: rtl8188eu: remove RFtype from struct HAL_VERSION
RFtype in struct HAL_VERSION duplicates rf_type in struct
hal_data_8188e, and does not change.  Remove it and the macros that test
it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki e827aeedd0 staging: rtl8188eu: remove ICtype from struct HAL_VERSION
IC type on RTL8188EU is always 8188E.  Remove it and all the macros that
check it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki 3738408cc8 staging: rtl8188eu: remove RegulatorMode from struct hal_data_8188e
This field is not used anywhere.  Also, kill the rt_regulator_mode enum
which exists just for this field.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:08:31 -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
Rickard Strandqvist f225d04e4e staging: rtl8188eu: hal: rtl8188e_hal_init.c: Remove unused function
Remove the function GetEEPROMSize8188E() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:04:16 -08:00
Anjana Sasindran 8b21696c51 staging:drivers:staging:rtl8188eu:hal:rtl8188e_hal_init.c: Added a blank line after declaration
This patch fix a checkpatch.pl warning

WARNING:Missing blank line after declaration

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:29:26 -08:00
Tapasweni Pathak 08a3d85a01 staging: rtl8188eu: hal: Remove useless cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:05:49 -07:00
navin patidar 58964e8d73 staging: rtl8188eu: Remove unused function SetBcnCtrlReg()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-31 12:58:41 -07:00
navin patidar ba50fbc0ee staging: rtl8188eu: Rework function PHY_SwChnl8188E()
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