summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_dm.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8192u: Convert u4bAcParam to little-endianTuomo Rinne2017-05-151-0/+1
| | | | | | | | | | | | The commit 9304b5b0d4fe ("staging: rtl8192u: Fix sparse warnings in r8192U_dm.c") adds casting of le16 from cpu endianness. Therefore constructing u4bAcParam potentially using big-endian order. This patch converts the u4bAcParam parameter back to little-endian after it has been constructed. Hence on big-endian architectures the parameter will remain as little-endian. Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Improve code readabilityTuomo Rinne2017-05-151-9/+19
| | | | | | | | Split the u4bAcParam parameter construction to multiple lines for easier readability. Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Remove unnecessary scopeTuomo Rinne2017-05-151-34/+32
| | | | | | | | Remove scope unnecessary scope that is already enforced by the if statements scope. Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: fix spelling mistake in variable name *attentuationColin Ian King2017-04-281-28/+28
| | | | | | | | Fix the spelling of a bunch of variables, from *attentuation to *attenuation. No functional change. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Remove multiple assignmentsGargi Sharma2017-03-161-4/+9
| | | | | | | | | | | | | | | | | | | This patch removes multiple assignments by factorizing them. This was done with Coccinelle for the if branch. For the else part the change was done manually since Coccinelle only detects constants. Braces were also added to the else part to remove the checkpatch warning, "braces should be on all arms of if-else statements". @@ identifier i1,i2; constant c; @@ - i1=i2=c; + i1=c; + i2=c; Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Fix sparse warnings in r8192U_dm.cMatthieu Simon2017-03-091-4/+4
| | | | | | | | | | Fix these warnings: drivers/staging//rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted __le16 drivers/staging//rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted __le16 drivers/staging//rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted __le16 Signed-off-by: Matthieu Simon <gmatthsim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove useless type conversionBhumika Goyal2016-09-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Some type conversions like casting a pointer to a pointer of same type, casting to the original type using addressof(&) operator etc. are not needed. Therefore, remove them. Done using coccinelle: @@ type t; t *p; t a; @@ ( - (t)(a) + a | - (t *)(p) + p | - (t *)(&a) + &a ) Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Convert long if-else block to switch-caseBhumika Goyal2016-02-201-12/+40
| | | | | | | | Replace long if-else block with switch-case to make it more readable and compact. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_dm: Replace MSECS with msecs_to_jiffiesAmitoj Kaur Chawla2016-02-141-3/+6
| | | | | | | | | | | | | | | | | | Replace driver specific macro MSECS with msecs_to_jiffies(). This was found using the following Coccinelle semantic patch: //<smpl> @@ expression e; @@ - MSECS(e) + msecs_to_jiffies(e) //</smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: use to_delayed_workGeliang Tang2016-02-071-2/+2
| | | | | | | Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: BIT() macro cleanupAnish Bhatt2015-10-131-6/+11
| | | | | | | | 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>
* staging: rtl8192u: remove bool comparisonsLuis de Bethencourt2015-07-221-4/+4
| | | | | | | Remove explicit true/false comparisons to bool variables. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Removed redundant bool comparisons in r8192U_dm.cHarisangam Sharvari2015-06-121-6/+6
| | | | | | | | This patch was detected with the help of coccinelle tool. The redundant comparisons of bool variables are removed in r8192U_dm.c. Signed-off-by: Harisangam Sharvari <sharisan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: fixed multiple spelling errors.Carlos E. Garcia2015-05-081-1/+1
| | | | | | | Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Rename struct to avoid CamelCaseCristina Opriceana2015-03-181-1/+1
| | | | | | | | | | | | | | | | | | | This patch renames struct DRxPathSel to dynamic_rx_path_sel in order to keep the notations consistent and to remove the warning: "CHECK: Avoid CamelCase". Done with coccinelle: @@ @@ struct -DRxPathSel +dynamic_rx_path_sel {...} @@ @@ struct -DRxPathSel +dynamic_rx_path_sel Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Do not add new typedefsCristina Opriceana2015-03-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the dig_t and DRxPathSel type definitions in order to avoid the following warning: "WARNING: Do not add new typedefs". Done with coccinelle and this script: @r@ type t; identifier id; @@ typedef struct id {...} t; @script:python get_name@ t << r.t; tdres; @@ coccinelle.tdres = t.replace("_t", ""); @r_match@ type r.t; identifier r.id; identifier get_name.tdres; @@ -typedef struct -id +tdres {...} -t ; @r_replace@ type r.t; identifier get_name.tdres; @@ -t +struct tdres Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove parentheses around right side an assignmentHaneen Mohammed2015-03-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: rtl8192u: Combine initialization using setup_timerSomya Anand2015-03-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. So, this patch combines the multiline code for timer initialization using the function setup_timer. This issue is identified via coccinelle script. @@ expression E1, E2, E3; type T; @@ - init_timer(&E1); ... ( - E1.function = E2; ... - E1.data = (T)E3; + setup_timer(&E1, E2, (T)E3); | - E1.data = (T)E3; ... - E1.function = E2; + setup_timer(&E1, E2, (T)E3); | - E1.function = E2; + setup_timer(&E1, E2, 0); ) Signed-off-by: Somya Anand <somyaanand214@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: drivers: Bool initializations should use true/falseCristina Opriceana2015-03-061-2/+2
| | | | | | | | | This patch replaces bool initializations of 1/0 with true/false in order to increase readability and respect the standards. Warning found by coccinelle. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Fix duplicate conditional branchVaishali Thakkar2015-03-061-2/+2
| | | | | | | | Replace duplicate branch with correct value. This branch is supposed to work for low thresh value. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Replace TRUE and FALSE macrosKsenija Stanojevic2015-03-011-23/+23
| | | | | | | | Replace all occurrences of TRUE and FALSE by true and false respectively. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Refactor heavy nestingLorenzo Stoakes2015-01-281-15/+12
| | | | | | | | | This patch fixes warnings raised by checkpatch.pl relating to heavily indented lines in r8192U_dm.c by refactoring code to achieve the same outcome indented by one less tab. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove redundant codeLorenzo Stoakes2015-01-281-85/+68
| | | | | | | | This patch fixes warnings/errors raised by checkpatch.pl relating to redundant code in r8192U_dm.c. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: fix whitespace and alignmentLorenzo Stoakes2015-01-281-980/+624
| | | | | | | | | This patch fixes warnings/errors raised by checkpatch.pl relating to whitespace in r8192U_dm.c, removes inconsistent whitespace, and additionally fixes some vertical alignment issues. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: fix commentsLorenzo Stoakes2015-01-281-391/+416
| | | | | | | | This patch fixes errors raised by checkpatch.pl relating to use of C99 comments in r8192U_dm.c, and cleans up existing ANSI C comments. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: removed an unnecessary else statementKarthik Nayak2015-01-171-9/+7
| | | | | | | | As per checkpatch warning, removed an unnecessary else statement proceeding an if statement with a return. Signed-off-by: Karthik Nayak <karthik.188@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: delete successive assignments to the same locationJiayi Ye2014-10-281-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Successive assignments to the same location is meaningless and can be deleted. The Coccinelle semantic patch was used to find cases. @@ expression e1,e2,e3; @@ ( (<+...e1++...+>)=e2; | (<+...e1--...+>)=e2; | (<+...++e1...+>)=e2; | (<+...--e1...+>)=e2; | e1=e2; e1 = <+...e1...+>; | *e1=e2; *e1=e3; ) Signed-off-by: Jiayi Ye <yejiayily@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Remove unused codeTapasweni Pathak2014-10-201-4/+0
| | | | | | | | | | | | Below return statement dm_send_rssi_tofw function has dead code. This patch removes dead code from dm_send_rssi_tofw. This was detected by smatch. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Remove defined but unused functionEbru Akagunduz2014-10-201-79/+0
| | | | | | | | | | This patch fixes "symbol 'dm_change_rxpath_selection_setting' was not declared. Should it be static?" sparse warning in r8192U_dm.c After setting it as static, it causes to unused function sparse warning, because it is not used anywhere. Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8192u: Fix space required after that ',' errorsGreg Donald2014-08-301-12/+12
| | | | | | | Fix checkpatch.pl space required after that ',' errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: Convert __FUNCTION__ to __func__Joe Perches2014-05-251-6/+6
| | | | | | | Use the normal mechanism for emitting a function name. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: fix checkpatch braces warningRui Miguel Silva2014-05-031-4/+2
| | | | | | | fix some code style related to the use of braces in a one statement block Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Delete duplicate function declarations and extern keywordAna Rey2014-03-191-41/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Delete the duplicate function declarations in r8192U_dm.c. These function declarations are defined in r8192U_dm.h. Also, delete the 'extern' keyword of these function definitions. Fix the following sparse warnings: CHECK drivers/staging/rtl8192u/r8192U_dm.c drivers/staging/rtl8192u/r8192U_dm.c:159:1: warning: function 'init_hal_dm' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:179:13: warning: function 'deinit_hal_dm' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:245:17: warning: function 'hal_dm_watchdog' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:278:13: warning: function 'init_rate_adaptive' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:878:17: warning: function 'dm_txpower_trackingcallback' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:1609:13: warning: function 'dm_cck_txpower_adjust' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:1776:13: warning: function 'dm_change_dynamic_initgain_thresh' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:2543:13: warning: function 'dm_init_edca_turbo' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:2782:17: warning: function 'dm_rf_pathcheck_workitemcallback' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:3142:13: warning: function 'dm_fsync_timer_callback' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:3481:13: warning: function 'dm_shadow_init' with external linkage has definition Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Delete 'DM_CTSToSelfSetting' function in r8192U_dm.cAna Rey2014-03-191-20/+0
| | | | | | | | | | | | Delete the DM_CTSToSelfSetting function that is not used in anywhere in the driver. Fix sparse warnings: drivers/staging/rtl8192u/r8192U_dm.c:2623:6: warning: symbol 'DM_CTSToSelfSetting' was not declared. Should it be static? Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Delete 'dm_change_fsync_setting' function in r8192U_dm.cAna Rey2014-03-191-16/+0
| | | | | | | | | | | | | Delete the 'dm_change_fsync_setting' function that is not used in anywhere in the driver. Fix sparse warnings: drivers/staging/rtl8192u/r8192U_dm.c:1812:6: warning: symbol 'dm_change_fsync_setting' was not declared. Should it be static? Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:rtl8192u: drop explicit externsHimangi Saraogi2014-03-181-14/+14
| | | | | | | | | | | | | | | | | | | | | | This patch removes use of explicit extern specifier and quietens the sparse warnings: drivers/staging/rtl8192u/r8192U_dm.c:159:1: warning: function 'init_hal_dm' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:179:13: warning: function 'deinit_hal_dm' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:245:17: warning: function 'hal_dm_watchdog' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:278:13: warning: function 'init_rate_adaptive' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:878:17: warning: function 'dm_txpower_trackingcallback' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:1609:13: warning: function 'dm_cck_txpower_adjust' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:1776:13: warning: function 'dm_change_dynamic_initgain_thresh' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:1846:1: warning: function 'dm_change_fsync_setting' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:1863:1: warning: function 'dm_change_rxpath_selection_setting' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:2543:13: warning: function 'dm_init_edca_turbo' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:2663:13: warning: function 'DM_CTSToSelfSetting' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:2782:17: warning: function 'dm_rf_pathcheck_workitemcallback' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:3142:13: warning: function 'dm_fsync_timer_callback' with external linkage has definition drivers/staging/rtl8192u/r8192U_dm.c:3481:13: warning: function 'dm_shadow_init' with external linkage has definition Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove #ifndef RTL8192U and the code inside itXenia Ragiadakou2013-09-251-8/+0
| | | | | | | | This patch removes the unused code inside #ifndef RTL8192U header guard and the guard itself, since RTL8192U is defined. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove #ifndef RTL8190P guard from r8192U_dm.cXenia Ragiadakou2013-09-251-6/+0
| | | | | | | | This patch removes #ifndef RTL8190P header guard since RTL8190P is not defined anywhere in rtl8192u code. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove code inside #ifdef RTL8190P in r8192U_dm.cXenia Ragiadakou2013-09-251-125/+12
| | | | | | | | This patch removes the unused code that resides inside #ifdef RTL8190P header guard since RTL8190P is not defined. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove unused dm_gpio_change_rf_callback()Xenia Ragiadakou2013-09-251-73/+0
| | | | | | | | | This patch removes dm_gpio_change_rf_callback() because it is not called anywhere and it resides inside an #ifdef RTL8192E guard while RTL8192E is not defined. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove #ifdef RTL8192U guard in r8192U_dm.cXenia Ragiadakou2013-09-251-4/+0
| | | | | | | | This patch removes #ifdef RTL8192U header guards from r8192U_dm.c, since RTL8192U is defined in the included r8192U.h header. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove dm_check_rfctrl_gpio()Xenia Ragiadakou2013-09-251-42/+0
| | | | | | | | This patch removes dm_check_rfctrl_gpio() because it does nothing when RTL8192U is defined. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove cmpk_message_handle_tx()Xenia Ragiadakou2013-09-251-8/+0
| | | | | | | | | | | The function cmpk_message_handle_tx() is called only in r8192U_dm.c in two places. The first call resides outside an #ifdef RTL8192U guard, and since RTL8192U is defined this call can be removed. At the other site this function is called, there is no check on its return value. Since cmpk_message_handle_tx() does not do anything else other than returning true, it can be safely removed. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: fix read_nic_* functionsXenia Ragiadakou2013-06-061-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_nic_*() functions are defined in r8192U_core.c. They call internally usb_control_msg() to read the nic registers and return the value read. Following a remark made by Dan Carpenter, if usb_control_msg() fails, the value returned will be invalid. To accommodate for this, this patch changes the functions to take a pointer as argument to set the value read and return 0 on success and the error status on failure, so that callers of read_nic_*() can check the return status. Some other fixes introduced in read_nic_*() functions are: The expressions (1<<EPROM_*_SHIFT) used to address and set the individual bits of the eeprom register were replaced with EPROM_*_BIT bitmasks to make the code more intuitive. EPROM_*_BIT bitmasks were defined in r8192U_hw.h and EPROM_*_SHIFT were removed. In netdev_err(), which is called in case of failure, the hardcoded function name in the error log message was replaced with __func__ to reduce line size. Also, from the error log message, it was omitted the word "Timeout" and it is just reported the error code since the failure can not only be due to timeout expiration but also due to a memory allocation failure. In case of timeout expiration, usb_start_wait_urb() prints an appropriate log message when debug is enabled. Finally, some minor fixes to the coding style were applied in lines affected by the above changes, including the removal of ifdef DEBUG_RX (the debugging of reads and writes of the nic registers shall be done with explicit check on their return status which will be added in a follow on patch). Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: remove whitespace after '(' and before ')' in r8192U_dm.cXenia Ragiadakou2013-05-161-25/+25
| | | | | | | | | This patch fixes the following checkpatch errors, in r8192U_dm.c: ERROR: space prohibited after that open parenthesis '(' ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: fix whitespace around ~ in r8192U_dm.cXenia Ragiadakou2013-05-161-2/+2
| | | | | | | | This patch fixes the following checkpatch error: ERROR: space prohibited after that '~' Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* STAGING: rtl8192u: fix checkpatch error by adding space after switchXenia Ragiadakou2013-05-131-3/+3
| | | | | | | | This patch fixes the following checkpatch error: ERROR: space required before the open parenthesis '(' Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* STAGING: rtl8192u: fix checkpatch error about pointer position in r8192U_dm.cXenia Ragiadakou2013-05-121-21/+21
| | | | | | | | This patch fixes the pointer position in r8192U_dm.c to meet the kernel coding style conventions. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/rtl8192u: do not init statics to 0Sebastian Hahn2013-01-071-20/+20
| | | | | | | Fix the checkpatch error "do not initialize statics to 0 or NULL" Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/rtl8192u: cleanfile runSebastian Hahn2013-01-071-81/+80
| | | | | | | | Run cleanfile on all files inside drivers/staging/rtl819u Signed-off-by: Sebastian Hahn <snsehahn@cip.cs.fau.de> Signed-off-by: Jennifer Naumann <Jennifer.Naumann@informatik.stud.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud