aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
AgeCommit message (Collapse)Author
2015-10-29staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset functionIvan Safonov
This variable used only once in the beginning of the function, it can be removed. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: new variable for ↵Ivan Safonov
hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] frequent in this function, so it replaced by the power_level_offset new variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.cIvan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: Avoid CamelCase. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into ↵Ivan Safonov
two parts This is checkpatch fixes for hal/bb_cfg.c file: line over 80 characters. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesisIvan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: alignment should match open parenthesis. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in ↵Ivan Safonov
hal/bb_cfg.c This is checkpatch fixes for hal/bb_cfg.c file: unnecessary parentheses around <expr>. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in ↵Ivan Safonov
hal/bb_cfg.c This is checkpatch fixes for hal/bb_cfg.c file: spaces preferred around that '|'. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: operator = replaced by += in loop incrementIvan Safonov
x = x + a and x += a equivalen, but second preferably. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: occurrence of the 5 GHz code markedIvan Safonov
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-29staging: rtl8188eu: increment placed into for loop headerIvan Safonov
The increment at the end of the cycle, and it can be placed in the loop header. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ieIvan Safonov
This patch replaces while loop with for loop, because the initial condition and the increment clearly and briefly defined for this loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: unused MIN macro removedIvan Safonov
This patch removes unused MIN macro from include/rtw_security.h. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING ↵Ivan Safonov
macros removed This patch removes unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros from include/basic_types.h. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: unused SUCCESS and FAIL macros removedIvan Safonov
This patch removes unused SUCCESS and FAIL macros in include/basic_types.h. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: abs kernel macro used in simularity_compare functionIvan Safonov
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-29staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macroIvan Safonov
min (or max) kernel macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signalIvan Safonov
To limit the range of integers there is clamp macro. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macroIvan Safonov
ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: rtl8188eu: Remove unnecessary variablesAmitoj Kaur Chawla
Remove unnecessary variable that can be replaced with a single line of code. The semantic patch used to find this is: // <smpl> @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; expression E; @@ - T i = E; ... when != i @@ type T; identifier i; @@ - T i; ... when != i // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: rtl8188eu: fix misleading indentationLuis de Bethencourt
Code is correct, i needs to be moved back by 2 to correct for the last iteration of the while loop, since READ_NEXT_PAIR advances two. Fixing the misleading indentation. Fix a smatch warning: drivers/staging/rtl8188eu/hal/rf_cfg.c:217 rtl88e_phy_config_rf_with_headerfile() warn: curly braces intended? Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24rtl8188eu : BIT() macro cleanupAnish Bhatt
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-17staging: r8188eu: Add _enter_critical_mutex() error handlingAlexey Khoroshilov
_enter_critical_mutex() is a simple call to mutex_lock_interruptible(), but there is no error handling code for it. The patch removes wrapper _enter_critical_mutex() and adds error handling for mutex_lock_interruptible(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: rtl8188eu: rtw_ieee80211: Remove unnecessary castShivani Bhardwaj
Explicit type conversion is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: rtl8188eu: rf_cfg: Remove useless castShivani Bhardwaj
Type conversion of variables can be done by compiler implicitly so, explicit conversions should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: rtl8188eu: spaces preferred around that + insertedIvan Safonov
This patch inserts spaces preferred around that '+' found by checkpatch. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: rtl8188eu: ARRAY_SIZE instead of sizeof/sizeof usedIvan Safonov
This patch inserts ARRAY_SIZE instead of sizeof(type array[])/sizeof(type), made arraylen variable constant and removes unnecessary default value in variable definition. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12Staging: rtl8188eu: core: Use ARRAY_SIZE macroShraddha Barke
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its type. Changes made using Coccinelle- @@ type T; T[] E; @@ - (sizeof(E)/sizeof(T)) + ARRAY_SIZE(E) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: rtl8188eu: unused macro read_next_pair removedIvan Safonov
Unused macro read_next_pair removed from rtl8188eu driver. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12Staging: rtl8188eu: Correct coding style errorsIban Rodriguez
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-02Staging: rtl8188eu: Correct two coding style errorsIban Rodriguez
Correct two errors reported by checkpatch.pl because space prohibited before ','. Also split both lines into multiple lines as they are longer than 80 characters Signed-off-by: Iban Rodriguez <iban.rodriguez@ono.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging:rtl8188eu style fixBryan Paul
Fixed style issue if comparison should place constant on right of test Signed-off-by: Bryan Paul <bryan.paul@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: rtl8188eu: Add missing includeLarry Finger
In commit 0a0796eb16f3, there is no include to mon.h, a newly created header file. This omission leads to the following Sparse warnings: CHECK drivers/staging/rtl8188eu/os_dep/mon.c drivers/staging/rtl8188eu/os_dep/mon.c:81:6: warning: symbol 'rtl88eu_mon_recv_hook' was not declared. Should it be static? drivers/staging/rtl8188eu/os_dep/mon.c:113:6: warning: symbol 'rtl88eu_mon_xmit_hook' was not declared. Should it be static? drivers/staging/rtl8188eu/os_dep/mon.c:167:19: warning: symbol 'rtl88eu_mon_init' was not declared. Should it be static? drivers/staging/rtl8188eu/os_dep/mon.c:188:6: warning: symbol 'rtl88eu_mon_deinit' was not declared. Should it be static? Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: rtl8188eu: Fix build error when CFG80211 is not selectedJakub Sitnicki
The kbuild test robot reports the following build error for i386-randconfig-c0-09230740: >> ERROR: "ieee80211_hdrlen" [drivers/staging/rtl8188eu/r8188eu.ko] undefined! Add a dependency on CFG80211 to fix it. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: rtl8188eu: issue_action_BA(): extract ADDBA_req pointerLuca Ceresoli
pmlmeinfo->ADDBA_req is accessed three times in this function, but it contributes to generating lines above 80 characters that are not easy to split in a nice way. Extract a pointer to it to make code slightly more concise and fix some lines over 80 characters. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: rtl8188eu: don't cast when calling rtw_set_fixed_ie()Luca Ceresoli
The 'pbuf' and 'source' arguments to rtw_set_fixed_ie() are (void *), the explicit typecasts are not needed. They just make code less readable. Also fix checkpatch issues in the lines touched: ERROR: space prohibited before that ',' (ctx:WxW) WARNING: line over 80 characters CHECK: Unnecessary parentheses around <var> Note: some of the modified lines are still over 80 characters because they are not fixable by just adding newlines. They will be fixed in a later patch. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: rtl8188eu: rtw_set_fixed_ie(): accept void* parametersLuca Ceresoli
rtw_set_ie() is a memcpy-like function, taking addresses of memory buffers among its parameters. Similarly to memcpy, change the parameters to be void*. This will allow to get rid of typecasts whenever it is called. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: rtl8188eu: remove useless commentLuca Ceresoli
This comment gives pretty much the same information as the name of the function that it immediately precedes. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18staging: rtl8188eu: Introduce monitor interface for IEEE 802.11 framesJakub Sitnicki
This adds support for monitoring IEEE 802.11 Data and Management frames received or transmitted by a RTL8188EU-based device handled by this driver. The monitor interface is not enabled by default and will be registered only if monitor_enable module parameter is set to 1. When enabled it will show up as a monX network device, which can be used by the userspace programs for monitoring network traffic. It is intended as an exploratory/debugging tool for rtl8188eu driver. Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14staging/rtl8188eu : Remove duplicated BIT() definitionsAnish Bhatt
The BIT() macro is already defined in bitops.h, remove duplicate definitions. Users of BIT() macro are expecting unsigned int/u32, so add typecasts where this creates a build warning. Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: os_dep: osdep_service.c: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: os_dep: mlme_linux.c: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: os_dep: recv_linux.c: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: hal: rtl8188eu_xmit.c: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: hal: Hal8188ERateAdaptive.c: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: hal: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12Staging: rtl8188eu: core: Remove explicit NULL comparisonShraddha Barke
Remove explicit NULL comparison and write it in its simpler form. Replacement done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12staging/rtl8188eu : Remove unused macro definitions.Anish Bhatt
WLAN_ETHHDR_LEN/WLAN_ETHADDR_LEN/WLAN_ADDR_LEN are unused, duplicate or unnecessary, remove. Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>