summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu/core
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of ↵Hans de Goede2016-06-171-1/+1
| | | | | | | | | | | | | | | | | | sizeof type." This reverts commit b5e12ec38331 ("Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type."). This commit is wrong, the rtw_malloc2d helper function takes the size of the array elements as its 3th argument, whereas sizeof(*eFuseWord) gives the size of a pointer instead of the size of a u16. Since sizeof(void *) > sizeof(u16) this has no adverse effects, but it is still wrong. Cc: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove return at end of void function callNicholas Sim2016-03-281-17/+0
| | | | | | | | Remove unnecessary return statements from last lines of void function call (several) Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: rtw_mlme: Clean up tests if NULL returned on failureBhaktipriya Shridhar2016-03-281-4/+4
| | | | | | | | | | | | | | | | | | | | Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rtw_mlme_ext: Clean up tests if NULL returned on failureBhaktipriya Shridhar2016-03-281-13/+13
| | | | | | | | | | | | | | | | | | | | Some functions like kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rtw_cmd: Clean up tests if NULL returned on failureBhaktipriya Shridhar2016-03-281-22/+22
| | | | | | | | | | | | | | | | | | | | Some functions like kmalloc/kzalloc return NULL on failure. When NULL represents failure, !x is commonly used. This was done using Coccinelle: @@ expression *e; identifier l1; @@ e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...); ... - e == NULL + !e Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type.Sandhya Bankar2016-03-281-1/+1
| | | | | | | Use sizeof type *pointer instead of sizeof type. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove return at end of void function callNicholas Sim2016-03-281-1/+0
| | | | | | | Remove unnecessary return statement from last line of void function call Signed-off-by: Nicholas Sim <nicholassimws@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Remove license paragraph with mailing addressKyle Kuffermann2016-03-2816-80/+0
| | | | | | | | | | | | | | 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>
* Staging: rtl8188eu: Remove function rtw_freq2chBhumika Goyal2016-03-111-17/+0
| | | | | | | | Remove function rtw_freq2ch as it is never used anywhere in the kernel. Also, remove the function prototype. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: removed unnecessary check in core/rtw_ap.cClaudiu Beznea2016-03-111-67/+64
| | | | | | | | | This patch removes unnecessary "if (true)" check in update_BCNTIM() from core/rtw_ap.c file. After this remove the code alignment was necessary. Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Use !x instead of x==NULL.Sandhya Bankar2016-03-111-2/+2
| | | | | | | Use !x instead of x==NULL. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: rtw_efuse: Do not print message if kzalloc() failed.Sandhya Bankar2016-03-111-3/+1
| | | | | | | | Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Do not print message if kzalloc() failed.Sandhya Bankar2016-03-111-2/+1
| | | | | | | | Do not print message if kzalloc() failed. kzalloc() has its own messages. So no need to add extra one. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8188eu: Add spaces around arithmetic operatorsKyle Kuffermann2016-03-111-44/+44
| | | | | | | This fixes the checkpatch.pl issue: CHECK: spaces preferred around that '+' Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: FIELD_OFFSET macro replaced by offsetof macroIvan Safonov2016-03-111-2/+2
| | | | | | | FIELD_OFFSET and offsetof macro are equal Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: Remove NULL test before vfreeBhaktipriya Shridhar2016-03-112-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | vfree frees the virtually continuous memory area starting at addr. If addr is NULL, no operation is performed. So NULL test is not needed before vfree. This was done using Coccinelle: @@ expression x; @@ -if (x != NULL) vfree(x); @@ expression x; @@ -if (x != NULL) { vfree(x); x = NULL; -} Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: Remove useless return variablesBhaktipriya Shridhar2016-03-111-3/+1
| | | | | | | | | | | | | | | | | | | | | This patch removes unnecessary return variables and compresses the return logic. The coccinelle script that finds and fixes this issue is: @@ type T; identifier i,f; constant C; @@ - T i; ...when != i when strict ( return -C; | - i = + return f(...); - return i; ) Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: Remove casts of pointer to same typeBhaktipriya Shridhar2016-03-111-5/+5
| | | | | | | | | | | | | | | | | Casting a pointer to a pointer of the same type is unnecessary, so remove these unnecessary casts. This was done with Coccinelle: @@ type T; T *ptr; @@ - (T *)ptr + ptr Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Remove unnecessary paranthesesBhaktipriya Shridhar2016-03-111-1/+1
| | | | | | | | | | | | | | | | | | Removed parantheses on the right hand side of assignments as they are not needed. This was done with Coccinelle: @@ expression a, b; @@ a = - ( b - ) ; Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: Remove unnecessary bracesBhaktipriya Shridhar2016-02-201-8/+4
| | | | | | | | | | | | | | | | | | This patch removes braces for single statement blocks. The warning was detected using checkpatch.pl. Coccinelle was used to make the change. @@ expression e,e1; @@ - if (e) { + if (e) e1; - } Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu/core: Coding style fix, avoid line over 80 charactersColin Vidal2016-02-201-1/+2
| | | | | | | | Jump a new line after and operator of the test. It avoids to exceed 80 chars line, and remove a checkpatch warning. Signed-off-by: Colin Vidal <colin@cvidal.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu/core: Coding style fix, set constant operand on right in ↵Colin Vidal2016-02-201-2/+2
| | | | | | | | | tests Remove a checkpatch warning, putting constant operant on right of two tests. Signed-off-by: Colin Vidal <colin@cvidal.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu/core: Coding style fix, set conform spaces between ↵Colin Vidal2016-02-201-2/+2
| | | | | | | | | | | identifiers And a space after include keyword, making the preprocessor more readable, and remove an unexpected space between a type and variable name. Signed-off-by: Colin Vidal <colin@cvidal.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu/core: remove paragraph which mention FSF address in ↵Colin Vidal2016-02-201-4/+0
| | | | | | | | | | | comment header As FSF address changed in the past, and can change in the future, remove the address paragraph in the comment header, and avoid a warning of checkpatch. Signed-off-by: Colin Vidal <colin@cvidal.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: Use put_unaligned_le16Amitoj Kaur Chawla2016-02-201-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the use of function put_unaligned_le16. This is done using the following Coccinelle semantic patch: //<smpl> @@ identifier tmp; expression ptr; expression y,e; type T; @@ - tmp = cpu_to_le16(y); <+... when != tmp - memcpy(ptr, (T)&tmp, ...); + put_unaligned_le16(y,ptr); ...+> ? tmp = e @@ type T; identifier tmp; @@ - T tmp; ...when != tmp //</smpl> Corresponding header file has been added too. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: core: rtw_xmit.c: Remove NULL test before vfreeBhumika Goyal2016-02-201-5/+2
| | | | | | | | | The function vfree tests whether the argument is NULL and returns immediately. So NULL test is not needed before vfree. Also remove blank line between function calls. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: core: rtw_mlme.c: Remove NULL test before vfreeBhumika Goyal2016-02-201-4/+2
| | | | | | | | | The function vfree tests whether the argument is NULL and returns immediately. So NULL test before vfree is not needed. Also remove braces around if branch as they are no longer needed. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Remove unnecessary pointer castJanani Ravichandran2016-02-111-1/+1
| | | | | | | | | | | | | | | Remove unnecessary pointer cast. Issue found using the following Coccinelle semantic patch. @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: use list_first_entry_or_null()Geliang Tang2016-02-075-105/+48
| | | | | | | | Use list_first_entry_or_null() instead of list_empty() + container_of() to simplify the code. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: print OUI with %*phAndy Shevchenko2016-02-071-2/+2
| | | | | | | | There is no need to pass each byte as a parameter when printing values in hex format. We rather use %*ph specifier for that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: replace open-coded print_hex_dump()Andy Shevchenko2016-02-071-23/+16
| | | | | | | | No need to reinvent a wheel, i.e. print_hex_dump(). Replace an open-coded variant by generic kernel helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: core: rtw_debug: fixed a parentheses coding style issueChris Elliott2016-02-071-7/+7
| | | | | | | Removed unnecessary parentheses. Signed-off-by: Chris Elliott <chris@uksysadmin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove an extra spaceAlexey Tulia2016-02-071-1/+1
| | | | | | | drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1377 check_assoc_AP() warn: inconsistent indenting Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rtw_mlme_ext.c: simplify call to issue_action_BA()Luca Ceresoli2016-02-071-4/+4
| | | | | | | | | | Using the ternary operator allows to more concisely write the same code, and to stay within 80 characters without even increasing the number of lines. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rename camelcase bAcceptAddbaReqLuca Ceresoli2016-02-072-3/+4
| | | | | | | | | | | | There is such a field both in struct mlme_ext_info and in struct registry_priv. Rename both. Also fix checkpatch issue in the lines touched: WARNING: line 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>
* staging: rtl8188eu: rtw_mlme_ext.c: remove commented codeLuca Ceresoli2016-02-071-1/+0
| | | | | | | | | | This line is connented since the initial import in commit 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4") and there's no comment stating how it could ever be useful. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: don't cast to void* when calling memset()Luca Ceresoli2016-02-073-20/+20
| | | | | | | | | The first argument to memset() is (void *), the explicit typecasts are not needed. They just make code less readable. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: add spaces around binary '*'Luca Ceresoli2016-02-071-2/+2
| | | | | | | | | Fix checkpatch issue: CHECK: spaces preferred around that '*' (ctx:VxV) Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: goto removedIvan Safonov2015-11-151-54/+13
| | | | | | | malloc error handling moved into one place. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: goto replaced by 'else' branchIvan Safonov2015-11-151-14/+11
| | | | | | | goto is not needed here. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: unused macros removedIvan Safonov2015-11-151-7/+0
| | | | | | | IS_* and GET_CVID_* macros have not been used. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: fix space prohibited before that ','Abdul Hussain2015-11-151-3/+3
| | | | | | | | This patch fixes the following checkpatch.pl error: fix space prohibited before that ',' Signed-off-by: Abdul Hussain <hussain.abdul@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: while loop replaced by for loopIvan Safonov2015-11-151-8/+1
| | | | | | | Here is more suitable for loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: do .. while (0) loop replaced by while (...) loopIvan Safonov2015-11-151-6/+2
| | | | | | | It is a simple and clear representation of this loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng2015-11-154-30/+44
| | | | | | | | 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>
* staging: rtl8188eu: core: Change function parameter to boolAmitoj Kaur Chawla2015-11-151-1/+1
| | | | | | | Change int wait_ack to bool wait_ack as it only takes true or false as its argument. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: Remove wrapper functionAmitoj Kaur Chawla2015-11-151-17/+24
| | | | | | | | | | Remove wrapper function issue_probereq() that can be replaced by a single line of code and rename _issue_probereq() to issue_probereq(). This patch also fixes line over 80 characters checkpatch.pl warning. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Remove unused functionAmitoj Kaur Chawla2015-11-151-5/+0
| | | | | | | Remove function that is declared but not called anywhere. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: core: rtw_ap : Remove unnecessary functionsAmitoj Kaur Chawla2015-11-151-53/+1
| | | | | | | Drop unnecessary functions that are declared but not being used. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: operator = replaced by += in loop incrementIvan Safonov2015-10-291-3/+3
| | | | | | | 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>
OpenPOWER on IntegriCloud