aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-06-28staging: wilc1000: move the allocation of cmd out of wilc_enqueue_cmd()Ajay Singh1-399/+544
Instead of allocating the host_if_cmd in wilc_enqueue_cmd() now moved the allocation of cmd in the caller. Added the NULL check for 'hif_workqueue' before posting the work queue in wilc_enqueue_cmd(). 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>
2018-06-28staging: wilc1000: remove unused marco related to HIF commandsAjay Singh1-36/+0
After removing the multiplexing of hif commands in hif_if_work() macros prefix with 'HOST_IF_MSG_' are not required. Also 'id' field in host_if_msg is not required anymore. 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>
2018-06-28staging: wilc1000: remove host_if_work() to handle TODO list issueAjay Singh1-296/+278
Remove multiplexing of command at host_if_work(). Make use of function pointer instead of command ID to track individual work_struct separately. Modified the handler function to take work_struct pointer as argument and its return type is changes to void. Now prototype of 'handle_' function is same work_struct i.e. 'void (*fun)(struct struct *)' to register with work_queue. Removed host_if_work() because its not required now. 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>
2018-06-28staging: wilc1000: Use common structs to parse ip packetsThibaut Robert1-28/+15
Use structs ethhdr, iphdr and tcphdr instead of manual parsing in tcp_process. This commit fix handling of ip packets containing options. It also fixes the following sparse warning: drivers/staging/wilc1000//wilc_wlan.c:201:19: warning: cast to restricted __be16 Signed-off-by: Thibaut Robert <thibaut.robert@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-17staging: wilc1000: move 'txq_spinlock_flags' from 'wilc' structure to local variableAjay Singh2-4/+3
Cleanup patch to remove 'txq_spinlock_flags' element in 'wilc' and used local variable 'flag' in wilc_wlan_txq_filter_dup_tcp_ack(). 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>
2018-06-17staging: wilc1000: remove 'rxq_entries' from 'wilc' structAjay Singh2-6/+2
Removed unnecessary 'rxq_entries' element from 'wilc' struct, as its value is not used. 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>
2018-06-17staging: wilc1000: use list_head to maintain 'rxq_entry_t elements in rx queueAjay Singh4-20/+12
Make use of 'list_head' data structure to maintain the rx buffer queue. Modified wilc_wlan_rxq_add() to add the element at the tail by using list_head API and wilc_wlan_rxq_remove() to remove the element from head. 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>
2018-06-17staging: wilc1000: use list_head to maintain 'txq_entry_t' elements of tx queueAjay Singh4-49/+19
Use list_head data structure for the doubly linked list instead of own implementation. Only 'txq_head' is required, so removed the txq_tail pointer from 'wilc' structure. Following functions are modified to provide data using list_head API's wilc_wlan_txq_remove() wilc_wlan_txq_remove_from_head() wilc_wlan_txq_add_to_tail() wilc_wlan_txq_add_to_head() wilc_wlan_txq_get_first() wilc_wlan_txq_get_next() 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>
2018-05-25staging: wilc1000: Avoid overriding rates_no while parsing ies element.Adham Abozaeid1-11/+13
Commit d4b4aaba515a ("staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()") introduced a bug by not keeping the rates_no value while parsing ies elements. It also increments auth_total_cnt as a pointer instead of its reference. This commit fixes the bug by passing reference to rates_no to host_int_parse_join_bss_param() and by incrementing reference of auth_total_cnt Fixes: d4b4aaba515a (staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()) Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-25staging: wilc1000: fix spelling mistake: "Preamle" -> "Preamble"Colin Ian King1-1/+1
Trivial fix to spelling mistake in netdev_err error message Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: refactor host_int_parse_assoc_resp_info() to remove unused codeAjay Singh3-70/+11
Remove 'connect_resp_info' structure as most of its elements are not used. Modified wilc_parse_assoc_resp_info() to directly parse and fill value in connect_info structure variable. Remove use of 'assoc_resp_len' variable. get_assoc_resp_cap_info() & get_asoc_id() functions are remove as its not used anymore. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: remove s8idxarray to avoid datatype in variable nameAjay Singh1-3/+1
Cleanup patch to have variable names as per linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: remove unused 'lock' varible in 'wilc_priv' structureAjay Singh1-1/+0
Cleanup patch to remove the unused variable from 'wilc_priv' structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: added comments for mutex and spinlock_tAjay Singh2-3/+4
Added comments for mutex and spinlock_t to avoid checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: remove 'flag' argument from wilc_mac_indicate()Ajay Singh4-20/+9
Remove 'flag' function parameter in wilc_mac_indicate() as only one condition was handled using that parameter. Also removed unnecessary call to wilc_mac_indicate() as no operation was performed in that function call. After above changes below macros are not required anymore. WILC_MAC_INDICATE_STATUS 0x1 WILC_MAC_INDICATE_SCAN 0x2 This changes also helped in resolving the line over 80 chars issue found by checkatpch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: added #define for setting radiotap headerAjay Singh1-6/+5
Added new macro to resolve below checkpatch issues in linux_mon. "Lines should not end with a '('" Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in wilc_sdio structAjay Singh1-1/+2
Fix line over 80 chars issue found by checkpatch.pl script by placing the comment message above the macro preprocessor. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: refactor del_station() to avoid parenthesis misalignmentAjay Singh1-8/+10
Refactor the code to fix open parenthesis alignment issue reported by checkpatch.pl script in del_station(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: rename u8security to avoid datatype in variable nameAjay Singh1-10/+10
Cleanup patch to avoid use of datatype in variable name to follow as per linux coding style. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars issue in connect()Ajay Singh1-12/+17
Fix line over 80 characters in connect() by using temporary variables. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in scan()Ajay Singh1-2/+5
Fix line over 80 characters issues found by checkpatch.pl script with the help of local variable. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 characters in add_key()Ajay Singh1-10/+9
Fix line over 80 character issue found by checkpatch.pl script in add_key(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in wilc_create_wiphy() declarationAjay Singh1-1/+2
Fix line over 80 characters issue found by checkpatch.pl script in function declaration. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in get_station()Ajay Singh1-1/+3
Fix line over 80 characters issue in get_station(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in wilc_wfi_cfg_tx_vendor_spec()Ajay Singh1-7/+7
Fix line over 80 characters issues reported by checkpatch.pl script in wilc_wfi_cfg_tx_vendor_spec() by using temporary variable. Simplified 'if else' condition with 'if'. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 charas in wilc_wfi_remain_on_channel_expired()Ajay Singh1-9/+7
Refactor wilc_wfi_remain_on_channel_expired() to avoid line over 80 character issue reported by checkpatch.pl script. Also assigned value in the variable at the time of declaration. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: use kmemdup instead of kmalloc in add_network_to_shadow()Ajay Singh1-3/+6
Use kmemdup instead of kmalloc & memcpy in add_network_to_shadow(). Also added code to set 'ies_len' to zero in case of memory allocation failure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in add_network_to_shadow()Ajay Singh1-27/+25
Fix line over 80 characters issue reported by checkpatch in add_network_to_shadow() by using temporary variable. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: rename clear_duringIP() to avoid camelCase issueAjay Singh1-2/+2
Rename clear_duringIP() function to avoid camelCase issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx()Ajay Singh1-1/+1
Fix below checkpatch issue found in mgmt_tx() Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct p2p_mgmt_data)...) Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: use sizeof(*wdev) to allocate memory in wilc_wfi_cfg_alloc()Ajay Singh1-1/+1
Fix below reported checkpatch issues in wilc_wfi_cfg_alloc(). kzalloc(sizeof(*wdev)...) over kzalloc(sizeof(struct wireless_dev) Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in linux_monAjay Singh1-7/+7
Fix line over 80 char issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: replace kmalloc with kmemdup() in handle_connect_timeout()Ajay Singh1-4/+5
Instead of kmalloc and memcpy use kmemdup in handle_connect_timeout(). Also return -ENOMEM incase of failure to allocate the memory. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in host_int_parse_assoc_resp_info()Ajay Singh1-4/+5
Fix line over 80 characters issue in host_int_parse_assoc_resp_info() by using shorter name for the local variable. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 characters in host_int_parse_join_bss_param()Ajay Singh1-116/+131
Split host_int_parse_join_bss_param() to avoid the line over 80 character issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars issue in host_int_handle_disconnect()Ajay Singh1-4/+4
Fix line over 80 char issue in host_int_handle_disconnect() by using temp variable to hold the 'wilc_connect_result' function pointer. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 characters issue in handle_connect()Ajay Singh1-4/+2
Fix line over 80 character issue found by checkpatch.pl script by aligning the input argument in function call. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: fix line over 80 chars in handle_key()Ajay Singh1-22/+37
Fix checkpatch reported issue of line over 80 char in handle_key(). Introduced new functions by spliting existing function to address the checkpatch issue. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: remove 'ret' variable in handle_key()Ajay Singh1-12/+5
Remove the use of unnecessary 'ret' variable and use existing 'result' variable to hold the status. Also changed type of 'result' from s32 to int to confirm with the function return type. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: wilc1000: added complete() call for error scenario in handle_key()Ajay Singh1-8/+11
During memory allocation failure in handle_key() the complete() was not called for comp_test_key_block event. So now added the code to call complete() for event during error scenario. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: wilc1000: Remove unnecessary array index checkNathan Chancellor1-1/+1
This statment triggers GCC's -Wtype-limit since key_index is an unsigned integer so it cannot be less than zero. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: wilc1000: Remove useless functionNathan Chancellor3-22/+5
GCC warns that 'wid' is unused in wilc_remove_key and it's correct; the variable is only local. Get rid of the function (since it just returns zero) and shuffle the remaining code into one if statement. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: wilc1000: Remove unused variablesNathan Chancellor2-18/+0
GCC warns these variables are all set but never used so remove them. Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: rename WILC_WFI_band_2ghz variable to avoid mixedcaseAjay Singh1-7/+7
Rename 'WILC_WFI_band_2ghz' to avoid mixedcase for variable name. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: rename 'during_ip_time' macro to have uppercase name for macroAjay Singh1-2/+2
Rename 'during_ip_time' to 'DURING_IP_TIME_OUT' to have uppercase letter for macros(#define). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: use is_broadcast_ether_addr check for broadcast addressAjay Singh1-2/+1
Make use of is_broadcast_ether_addr() to check if mac address is broadcast address. Remove static 'broadcast', as its not needed after use of is_broadcast_ether_addr(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: move macro after the #include file in wilc_wfi_netdeviceAjay Singh1-9/+9
Cleanup patch to organize macro in a file together after #include statements. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: remove unnecessary header file inclusion for wilcAjay Singh11-86/+6
Remove the unnecessary file inclusion in the source code. Also follow the convension to first include the system header then project specific header files. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: remove unnecessary static function defination in wilc_spiAjay Singh1-3/+0
Cleanup patch to remove the unnecessary code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-03staging: wilc1000: remove unused macros in host_interfaceAjay Singh1-4/+2
Cleanup patch to remove the unused macro mentioned below. Also move macro up along with other macro declaration. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>