aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wlan.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-03-07staging: wilc1000: Alignment should match open parenthesisArushi Singhal1-5/+5
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: wilc1000: remove unnecessary bracesElizabeth Ferdman1-2/+2
Fix checkpatch warning "braces {} are not necessary for single statement blocks" to conform to linux kernel coding style. Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: wilc1000: wilc_wlan: Compress return logicNamrata A Shettar1-4/+2
Compress return logic. Done using Coccinelle : @@ local idexpression ret; expression e; @@ -ret= +return e; -return ret; Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20staging: wilc1000: Merge assignment with returnRehas Sachdeva1-2/+1
Instead of storing the return value into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-25staging: wilc1000: Replace semaphore cfg_event with completionBinoy Jayan1-7/+8
The semaphore 'cfg_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-25staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutexBinoy Jayan1-7/+4
The semaphore 'txq_add_to_head_cs' is a simple mutex, so it should be written as one. Semaphores are going away in the future. Also, removing the timeout scenario as the error handling code does not propagate the timeout properly. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-25staging: wilc1000: Replace semaphore txq_event with completionBinoy Jayan1-3/+5
The semaphore 'txq_event' is used as completion, so convert it to a struct completion type. Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-28Staging: wilc1000: Freed memory in case of errorClaudiu Beznea1-1/+4
This patch frees memory allocated inside wilc_wlan_txq_add_cfg_pkt() in case wilc_wlan_txq_add_to_head() fails. Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get_valChaehyun Lim1-2/+2
This patch changes data type of wid argument in wilc_wlan_cfg_get_val from u32 to u16. It is better to change data type of wid because wid has one of enum WID_T that is data type of u16. And, there is no need to use u16 type casting when calling wilc_wlan_cfg_get_wid_value function. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_getChaehyun Lim1-3/+2
This patch changes data type of wid argument in wilc_wlan_cfg_get from u32 to u16. It is better to change data type of wid because wid has one of enum WID_T that is data type of u16. And, there is no need to use u16 type casting when calling wilc_wlan_cfg_get_wid function. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-29staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_setChaehyun Lim1-2/+2
This patch changes data type of wid argument in wilc_wlan_cfg_set from u32 to u16. It is better to change data type of wid because wid has one of enum WID_T that is data type of u16. And, there is no need to use u16 type casting when calling wilc_wlan_cfg_set_wid function. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: wilc1000: else is not generally useful after a break or returnAnchal Jain1-11/+8
Remove else after a break. Because else is generally not useful after a break or return. Signed-off-by: Anchal Jain <anchalj109@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: wilc1000: removes an unnecessary if-conditionLeo Kim1-2/+0
This patch removes an unnecessary if-condition. Regardless of an if-condition is performed unconditionally '_end_' statement. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: wilc1000: removes goto definitions from wilc_wlan_firmware_downloadLeo Kim1-6/+2
This patch removes goto definitions from wilc_wlan_firmware_download function. Goto '_fail_1' feature is error return. It returns error type directly without result variable replacement as well. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28staging: wilc1000: removes function 'init_tcp_tracking()'Leo Kim1-6/+0
This patch removes function 'init_tcp_tracking()'. The function is an unnecessary return. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11staging: wilc1000: Possible unnecessary 'out of memory' messageAnchal Jain1-3/+1
Remove unnnecessary debug message. Problem detected by checkpatch. Signed-off-by: Anchal Jain <anchalj109@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01staging: wilc1000: wilc_wlan: Remove wrapper functionAmitoj Kaur Chawla1-6/+1
Remove is_tcp_ack_filter() which only returns the value of boolean variable `enabled` by replacing the only call site with the variable `enabled` itself. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01staging: wilc1000: Remove unnecessary 'else'Rehas Sachdeva1-2/+1
This patch removes the checkpatch.pl warning: else is not generally useful after a break or return Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25staging: wilc1000: Remove useless return variablesBhaktipriya Shridhar1-5/+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>
2016-02-25staging: wilc1000: wilc_wlan.c: remove multiple blank lineTony Cho1-1/+0
This patch removes the multiple blank line reported by checkpatch.pl. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25staging: wilc1000: wilc_wlan.c: remove unnecessary blank linesTony Cho1-4/+0
This patch removes unnecessary blank lines found by checkpatch.pl. Signed-off-by: Tony Cho <tony.cho@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25staging: wilc1000: removes unnecessary retry 3 timesLeo Kim1-4/+3
This patch removes unnecessary retry 3 times and related variable. Actually the retry 3 times sentence, don't retry at all. Repeats conditions are that until read a chip-id and written a register. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: wilc_wlan_cfg_init: changes unused argumentLeo Kim1-16/+1
This patch changes the argument of the wilc_wlan_cfg_init function, wilc_debug to void type because wilc_debug function is not used any more. In addition, finally removes wilc_debug and related variables. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: removes unnecessary wilc_debug print logLeo Kim1-3/+1
This patch removes unnecessary wilc_debug print log. The print log was written when if condition fail. The condition is chip-id check function. Also, replaces this condition with normal function. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: removes unnecessary wilc_debug print logLeo Kim1-3/+0
This patch removes unnecessary wilc_debug print log and the check routine. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: replaces wilc_debug with netdev_errLeo Kim1-3/+3
This patches replaces wilc_debug with netdev_err. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: removes wilc_dbg()Leo Kim1-2/+0
This patch removes wilc_dbg function because it's not any more. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: wilc_wlan.c: removes unnecessary log messagesChris Park1-3/+0
This patch removes unnecessary log messages. Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-22staging: wilc1000: wilc_wlan.c: removes PRINT_ERLeo Kim1-2/+0
This patches removes PRINT_ER that is unnecessary debug logs. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19staging: wilc1000: Modify tcp_process to return void rather than intJanani Ravichandran1-7/+1
tcp_process() returns int, which is not used anywhere. So, change function header to return void intead of int and remove all uses of the local variable ret, which is used as a return variable in the function. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-19staging: wilc1000: Remove unused functionAmitoj Kaur Chawla1-6/+0
Remove wilc_wlan_global_reset function since it is not used anywhere in this driver. This also silences the following sparse warning: drivers/staging/wilc1000/wilc_wlan.c:1120:6: warning: symbol 'wilc_wlan_global_reset' was not declared. Should it be static? Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-15staging: wilc1000: Remove initialization of static variablesEva Rachel Retuya1-1/+1
Address the following checkpatch errors: * ERROR: do not initialise statics to false * ERROR: do not initialise statics to 0x00 Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: wilc1000: remove parentheses on right hand side of assignmentAlison Schofield1-2/+2
Remove the unnecessary parens on right hand side of assignment. Found using Coccinelle: @@ identifier x; expression e1, e2; @@ - x = (e1 << e2) + x = e1 << e2 Signed-off-by: Alison Schofield <amsfield22@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: wilc1000: rename counter in wilc_send_config_pktChaehyun Lim1-16/+15
This patch renames the name of counter variable to i. This change makes more readability because wilc_send_config_pkt has a similar argument name as count. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: wilc1000: remove initialization code of counter variableChaehyun Lim1-1/+0
There is no need to set to 0 for counter variable before entering next for-loop statement because counter is initialized again in for-loop statement, so just remove it. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: wilc1000: use int type for counter variableChaehyun Lim1-1/+1
counter is used as for-loop control variable and indicating index of struct wid array so that it is better to use int type. There is no need to set to 0 when it is declared at the top of this function. It is initialized as 0 in for-loop statement. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11staging: wilc1000: fix return type of wilc_send_config_pktChaehyun Lim1-2/+3
wilc_send_config_pkt is returned 0 or -ETIMEDOUT according to return value of wilc_wlan_cfg_set or wilc_wlan_cfg_set. It is better to use int type to represent linux standard error code. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove unnecessary log message using GENERIC_DBG tagChris Park1-2/+0
This patch remove unnecessary log message using GENERIC_DBG tag. Needed log messages has changed netdev_dbg from PRINT_D. And removes variables that were used to log message. Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove unused log message using the RX_DBG tagChris Park1-5/+0
This patch remove unused log message using the RX_DBG tag Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove unnecessary wilc_rx_complete functionChris Park1-6/+1
This patch remove unnecessary wilc_rx_complete function because this function only print unused log message. remove unused has_packet variable nomore. Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove unused log message using the TX_DBG tagChris Park1-6/+3
This patch remove unused log message using the TX_DBG tag Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: Optimize code of wilc_get_chipid functionChris Park1-12/+7
This patch optimize code of wilc_get_chipid function. u8 type changed to boolean type and removed unnecessary if statement. Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove warnings missing a blank line after declarationsChris Park1-0/+1
This patch remove warnings reported by checkpatch.pl for missing a blank line after declarations Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove unnecessary bracesChris Park1-4/+4
This patch remove warnings reported by checkpatch.pl for unnecessary braces Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove useless functionChris Park1-9/+0
This patch remove useless function remove_TCP_related in wilc_wlan.c file Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: remove useless log messageChris Park1-106/+22
This patch remove useless log message in wilc_wlan.c file Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: fix warnings for line over 80 charactersChris Park1-13/+20
This patch fixes warnings reported by checkpatch.pl for line over 80 characters Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: rename pBssid of tx_complete_data structureLeo Kim1-1/+1
This patch renames pBssid variable of tx_complete_data structure to bssid to avoid camelcase. Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: pass vif to wilc_send_config_pktGlen Lee1-24/+33
This patch passes vif instead of wilc to wilc_send_config_pkt and it's related functions as well, because we need vif which is currently being used and vif has wilc as well. Change custom print with netdev_xxx format if there are custom print inside the functions we have changed. Function parameter of following functions are modified to vif. wilc_send_config_pkt wilc_wlan_cfg_set wilc_wlan_cfg_get wilc_wlan_cfg_commit wilc_wlan_txq_add_cfg_pkt wilc_wlan_txq_add_to_head Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07staging: wilc1000: move wilc_send_config_pkt to wilc_wlan.cGlen Lee1-0/+39
This patch moves the function wilc_send_config_pkt to wilc_wlan.c which handles transport since the purpose of the function is sending/getting of config information. coreconfiguator.[ch] will be rename with frame.[ch] later. The print codes of the function is removed also and they will be implemented with netdev_xx print format later. struct wid need to be moved to wilc_wlan_if.h which defines configure informations. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>