summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wlan.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: wilc1000: remove unnecessary use of parenthesesAjay Singh2018-01-231-1/+1
| | | | | | | | | Fix "Unnecessary parentheses around" issue found by checkpatch.pl script.Remove the unnecessary parentheses to follow linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: removed enum typedef BUS_RELEASE_TAjay Singh2018-01-151-1/+1
| | | | | | | | | | This patch removes enum typedef BUS_RELEASE_T and define "enum bus_release" to use instead of typedef. checkpatch.pl not to add new typedef warning is fixed with this patch. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: removed enum typedef BUS_ACQUIRE_TAjay Singh2018-01-151-1/+1
| | | | | | | | | | This patch removes enum typedef BUS_ACQUIRE_T and define enum bus_acquire to use instead of typedef. checkpatch.pl not to add new typedef warning is fixed with this patch. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: removed enum typedef CHIP_PS_STATE_TAjay Singh2018-01-151-1/+1
| | | | | | | | | | This patch removes enum typedef CHIP_PS_STATE_T and introduce enum chip_ps_states to use instead of typedef. checkpatch.pl not to add new typedef warning is fixed with this patch. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add SPDX identifiers to all wilc100 filesGreg Kroah-Hartman2017-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the wilc100 driver files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Ganesh Krishna <ganesh.krishna@microchip.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Aditya Shankar <aditya.shankar@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: Fix bssid buffer offset in TxqAditya Shankar2017-11-061-1/+1
| | | | | | | | | | | | | | | | | Commit 46949b48568b ("staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler") updated the frame format sent from host to the firmware. The code to update the bssid offset in the new frame was part of a second patch in the series which did not make it in and thus causes connection problems after associating to an AP. This fix adds the proper offset of the bssid value in the Tx queue buffer to fix the connection issues. Fixes: 46949b48568b ("staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler") Cc: stable@vger.kernel.org Signed-off-by: Aditya Shankar <Aditya.Shankar@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: Alignment should match open parenthesisArushi Singhal2017-03-071-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>
* staging: wilc1000: remove unnecessary bracesElizabeth Ferdman2016-10-021-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>
* staging: wilc1000: wilc_wlan: Compress return logicNamrata A Shettar2016-10-021-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>
* staging: wilc1000: Merge assignment with returnRehas Sachdeva2016-09-201-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>
* staging: wilc1000: Replace semaphore cfg_event with completionBinoy Jayan2016-06-251-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>
* staging: wilc1000: Replace semaphore txq_add_to_head_cs with mutexBinoy Jayan2016-06-251-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>
* staging: wilc1000: Replace semaphore txq_event with completionBinoy Jayan2016-06-251-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>
* Staging: wilc1000: Freed memory in case of errorClaudiu Beznea2016-04-281-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>
* staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_get_valChaehyun Lim2016-03-291-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>
* staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_getChaehyun Lim2016-03-291-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>
* staging: wilc1000: change data type of wid argument in wilc_wlan_cfg_setChaehyun Lim2016-03-291-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>
* staging: wilc1000: else is not generally useful after a break or returnAnchal Jain2016-03-281-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>
* staging: wilc1000: removes an unnecessary if-conditionLeo Kim2016-03-281-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>
* staging: wilc1000: removes goto definitions from wilc_wlan_firmware_downloadLeo Kim2016-03-281-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>
* staging: wilc1000: removes function 'init_tcp_tracking()'Leo Kim2016-03-281-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>
* staging: wilc1000: Possible unnecessary 'out of memory' messageAnchal Jain2016-03-111-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>
* staging: wilc1000: wilc_wlan: Remove wrapper functionAmitoj Kaur Chawla2016-03-011-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>
* staging: wilc1000: Remove unnecessary 'else'Rehas Sachdeva2016-03-011-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>
* staging: wilc1000: Remove useless return variablesBhaktipriya Shridhar2016-02-251-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>
* staging: wilc1000: wilc_wlan.c: remove multiple blank lineTony Cho2016-02-251-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>
* staging: wilc1000: wilc_wlan.c: remove unnecessary blank linesTony Cho2016-02-251-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>
* staging: wilc1000: removes unnecessary retry 3 timesLeo Kim2016-02-251-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>
* staging: wilc1000: wilc_wlan_cfg_init: changes unused argumentLeo Kim2016-02-221-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>
* staging: wilc1000: removes unnecessary wilc_debug print logLeo Kim2016-02-221-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>
* staging: wilc1000: removes unnecessary wilc_debug print logLeo Kim2016-02-221-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>
* staging: wilc1000: replaces wilc_debug with netdev_errLeo Kim2016-02-221-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>
* staging: wilc1000: removes wilc_dbg()Leo Kim2016-02-221-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>
* staging: wilc1000: wilc_wlan.c: removes unnecessary log messagesChris Park2016-02-221-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>
* staging: wilc1000: wilc_wlan.c: removes PRINT_ERLeo Kim2016-02-221-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>
* staging: wilc1000: Modify tcp_process to return void rather than intJanani Ravichandran2016-02-191-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>
* staging: wilc1000: Remove unused functionAmitoj Kaur Chawla2016-02-191-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>
* staging: wilc1000: Remove initialization of static variablesEva Rachel Retuya2016-02-151-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>
* staging: wilc1000: remove parentheses on right hand side of assignmentAlison Schofield2016-02-111-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>
* staging: wilc1000: rename counter in wilc_send_config_pktChaehyun Lim2016-02-111-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>
* staging: wilc1000: remove initialization code of counter variableChaehyun Lim2016-02-111-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>
* staging: wilc1000: use int type for counter variableChaehyun Lim2016-02-111-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>
* staging: wilc1000: fix return type of wilc_send_config_pktChaehyun Lim2016-02-111-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>
* staging: wilc1000: remove unnecessary log message using GENERIC_DBG tagChris Park2016-02-071-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>
* staging: wilc1000: remove unused log message using the RX_DBG tagChris Park2016-02-071-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>
* staging: wilc1000: remove unnecessary wilc_rx_complete functionChris Park2016-02-071-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>
* staging: wilc1000: remove unused log message using the TX_DBG tagChris Park2016-02-071-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>
* staging: wilc1000: Optimize code of wilc_get_chipid functionChris Park2016-02-071-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>
* staging: wilc1000: remove warnings missing a blank line after declarationsChris Park2016-02-071-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>
* staging: wilc1000: remove unnecessary bracesChris Park2016-02-071-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>
OpenPOWER on IntegriCloud