summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu
Commit message (Collapse)AuthorAgeFilesLines
* Staging: rtl8188eu: replace kzalloc and memcpy by kmemdupNiranjan Dighe2015-03-261-3/+2
| | | | | | | | This was generated by 'make coccicheck' using scripts at scripts/coccinelle/api/memdup.cocci. Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: remove dead codeMatteo Semenzato2015-03-261-13/+4
| | | | | | | | | The condition pxmitpriv->hwxmit_entry == 5 is always false because HWXMIT_ENTRY is always 4. Signed-off-by: Matteo Semenzato <mattew8898@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Add new variable to make code compactVatika Harlalka2015-03-261-78/+84
| | | | | | | | Introducing this variable leads to overall more code compactness and increases readability. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Refactor repititive code to loop to increase compactnessVatika Harlalka2015-03-261-13/+13
| | | | | | | | Refactor repetitive code to loop so as to increase compactness and introduce newlines for readability. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Reduce line size to increase readabilityVatika Harlalka2015-03-261-16/+34
| | | | | | | Reduce line size to increase readability. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Delete spaceHatice ERTÜRK2015-03-231-4/+4
| | | | | | | | Deleted spaces before ','.Because it is prohibited by the kernel coding style. Error found with checkpatch.pl Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove extern as it is defined but never usedVatika Harlalka2015-03-202-2/+0
| | | | | | | | RTW_WPA_VERSION is removed as is declared and defined but never used in the code. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unused macrosVatika Harlalka2015-03-201-22/+0
| | | | | | | These macros are defined but never used in the code. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unused extern declarations.Vatika Harlalka2015-03-201-4/+0
| | | | | | | These externs are defined but not used anywhere in the code. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove timer handler macrosVaishali Thakkar2015-03-181-5/+0
| | | | | | | | | | | After the commit 28af7ea81e16 ("Staging: rtl8188eu: Eliminate use of _init_timer"), macros (RTW_TIMER_HDL_ARGS, RTW_TIMER_HDL_NAME, RTW_DECLARE_TIMER_HDL) are no longer needed. So, remove them. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove parentheses around right side an assignmentHaneen Mohammed2015-03-1611-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: rtl8188eu: remove break after returnSupriya Karanth2015-03-161-1/+0
| | | | | | | | | | | Remove "break" statement after a "return" statement as it does not get executed. Found by checkpatch.pl - break is not useful after a goto or return Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove intialization of static intsSupriya Karanth2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | static ints are initialized to 0 by the compiler. Explicit initialization is not necessary. Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL changes made using coccinelle script: @@ type T; identifier var; @@ static T var - =0 ; Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Eliminate use of _init_timerVaishali Thakkar2015-03-1612-49/+52
| | | | | | | | | | | | | | | | | | | | | This patch introduces the use of API function setup_timer instead of driver specific function init_timer as it is the preferred and standard way to set and setup the timer. To be compatible with the changes, argument types of referenced functions are changed. Also, definition of function _init_timer is removed as it is no longer needed after this change. Here, these cases are handled using Coccinelle and semantic patch used for this is as follows: @@ expression x, y; identifier a, b;@@ - _init_timer (&x, y, a, b); + setup_timer (&x, a, (unsigned long)b); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Eliminate use of _set_timerVaishali Thakkar2015-03-1611-56/+82
| | | | | | | | | | | | | | | | | | | | This patch introduces the use of API function mod_timer instead of driver specific function _set_timer as it is a more efficient and standard way to update the expire field of an active timer. Also, definition of function _set_timer is removed as it is no longer needed after this change. Here, these cases are handled using Coccinelle and semantic patch used for this is as follows: @@ expression x; expression y;@@ - _set_timer (&x, y); + mod_timer (&x, jiffies + msecs_to_jiffies (y)); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8188eu: core: rtw_security: Fix misspelled wordIoana Ciornei2015-03-161-6/+6
| | | | | | | | | This patch fixes the checkpatch.pl warning: WARNING: 'halfs' may be misspelled - perhaps 'halves'? Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: use %pM specifier instead of passing direct valuesMike Krinkin2015-03-161-4/+2
| | | | | | | | The patch converts code to use %pM specifier instead of pushing each byte via stack. Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unneeded return statementSomya Anand2015-03-151-2/+0
| | | | | | | | | | This patch removes unnecessary return statement from a void function and hence make it more compatible. This issue is identified by checkpatch.pl Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove redundant local variableSomya Anand2015-03-151-53/+28
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes a redundant variable "val" and adds inline return statements. It also adds a default case to the switch statement which returns 0 to keep the logic intact. It also removes a redundant variable "inx" and adds inline return statements. This issue is identified by the following coccinelle script. @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Use kcalloc instead of kzalloc.Navya Sri Nizamkari2015-03-151-1/+2
| | | | | | | | This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Use kcalloc instead of kzallocNavya Sri Nizamkari2015-03-151-1/+1
| | | | | | | | This patch uses kcalloc instead of kzalloc function. A coccinelle script was used to make this change. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8188eu: core: Removed unnecessary parenthesesTina Johnson2015-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parentheses around the right side of an assignment statement are unnecessary and hence removed. Coccinelle was used to produce the patch: @rule1@ identifier x,y; constant c; @@ ( x = -( y << c -) ; | x = -( y >> c -) ; | x = -( y + c -) ; | x = -( y - c -) ; ) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Remove unneeded parenthesesSomya Anand2015-03-091-1/+1
| | | | | | | | | | This patch removes unneeded parentheses from a if statement for better readability. This issue is identified by checkpatch.pl Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Fix trivial typos in commentsYannick Guerrini2015-03-062-13/+13
| | | | | | | | | Change 'disabed' and 'disabel' to 'disabled' Change 'inviation' to 'invitation' Change 'negoitation' to 'negotiation' Signed-off-by: Yannick Guerrini <yguerrini@tomshardware.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unnecessary return statementsSomya Anand2015-03-061-2/+0
| | | | | | | | | | This patch removes unnecessary return statement from a void function. This issue is identified by checkpatch.pl Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove redundant local variableSomya Anand2015-03-061-17/+7
| | | | | | | | | | | | | | | | | | | This patch removes a redundant variable "raid" and adds inline return statements. This issue is identified by the following coccinelle script: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: replace memset(x,0,ETH_ALEN)Aya Mahfouz2015-03-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eth_zero_addr() is a wrapper function for memset if 0 is going to be assigned to a mac address. The aforementioned function replaces memset. In addition, linux/etherdevice.h was included as a header since it is the file that define the inline function eth_zero_addr(). The changes were carried out using the following coccinelle script: @header@ @@ #include <linux/etherdevice.h> @eth_zero_addr@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @eth_broadcast_addr@ identifier e; @@ -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN); +eth_broadcast_addr(e); @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @ @@ + #include <linux/etherdevice.h> + @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> + @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: remove extra parentheses around right bit shift operationsAya Mahfouz2015-03-064-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* staging: rtl8188eu: Remove memset.Navya Sri Nizamkari2015-03-011-1/+0
| | | | | | | | | The memory area set by the call to memset is immediately overwritten by the subsequent call to memcpy. Hence, remove that redundant memset. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Add blank line after declarationsNavya Sri Nizamkari2015-03-011-0/+1
| | | | | | | | | This patch removes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: Compress two statements into one.Navya Sri Nizamkari2015-03-011-9/+6
| | | | | | | | | | | | | | | | | | | | | | This patch removes the use of a variable used only for returning a value. The following coccinelle script was used to discover it: @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; It also fixes the checkpatch.pl warning about line being over 80 characters, in the lines where changes were made. Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unused variableVatika Harlalka2015-03-011-9/+1
| | | | | | | | 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>
* staging: rtl8188eu: os_dep: remove unused variableAya Mahfouz2015-03-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes a variable that was simply used to store the return value of a function call before returning it. The issue was detected and resolved using the following coccinelle script: @@ identifier len,f; @@ -int len; ... when != len when strict -len = +return f(...); -return len; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Move variable assignmentVatika Harlalka2015-03-011-1/+1
| | | | | | | | 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>
* Staging: rtl8188eu: Remove braces from single statement blockVatika Harlalka2015-03-011-2/+1
| | | | | | | | Remove braces from single statement if condition to follow kernel coding convention. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unnecessary codeVatika Harlalka2015-02-261-20/+1
| | | | | | | 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>
* staging: rtl8188eu: rewrite the right hand side of an assignmentAya Mahfouz2015-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rewrite the right hand side of an assignmentAya Mahfouz2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rewrite the right hand side of an assignmentAya Mahfouz2015-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8188eu: rewrite the right hand side of an assignmentAya Mahfouz2015-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Replace if-else block with switch-caseVatika Harlalka2015-02-261-8/+16
| | | | | | | | | Replace if-else block with switch-case to make it more compact and increase readability. Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Refactor conditional code to increase readabilityVatika Harlalka2015-02-261-9/+3
| | | | | | | | 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>
* Staging: rtl8188eu: Combine two loops to increase readabilityVatika Harlalka2015-02-261-3/+3
| | | | | | | | | 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>
* Staging: rtl8188eu: Remove unnecessary if conditionVatika Harlalka2015-02-261-36/+1
| | | | | | | | 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>
* Staging: rtl8188eu: Remove unused macrosKatie Dunne2015-02-261-28/+0
| | | | | | | Removes macro definitions that are unused elsewhere Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8188eu: Remove unnecessary variableVatika Harlalka2015-02-261-3/+2
| | | | | | | | 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>
* Staging: rtl8188eu: Refactored code to increase readilityVatika Harlalka2015-02-261-20/+12
| | | | | | | | 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>
* Staging: rtl8188eu: Replace ternary operator with existing macroVatika Harlalka2015-02-261-3/+2
| | | | | | | | 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>
* Staging: rtl8188eu: Remove redundant if conditionVatika Harlalka2015-02-261-8/+2
| | | | | | | 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>
* Staging: rtl8188eu: Add blank line after declarationsMelike Yurtoglu2015-02-261-0/+1
| | | | | | | | WARNING: "Missing a blank line after declarations" That was found by running checkpatch Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud