summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wfi_netdevice.h
Commit message (Collapse)AuthorAgeFilesLines
* staging: wilc1000: rename wilc_frmw_to_linux()Ajay Singh2019-02-071-1/+1
| | | | | | | | Rename wilc_frmw_to_linux() to wilc_frmw_to_host() to be remove the _linux suffix. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move 'curr_channel' static variable in 'wilc' structAjay Singh2019-02-071-0/+1
| | | | | | | Avoid the use of static variable and move it as part of wilc structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move static variable 'wlan_channel' to 'wilc' structAjay Singh2019-02-071-0/+1
| | | | | | | | Avoid use of static variable 'wlan_channel' by moving it inside the wilc structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid use of 'hif_deinit_lock' static variableAjay Singh2019-02-071-0/+2
| | | | | | | | Avoid use of static variable 'hif_deinit_lock' and move it as part of wilc struct. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor code to use cookie informationAjay Singh2019-02-071-1/+1
| | | | | | | | Make use of cookie information to pass to wpa_s and handle cookie value received in the cfg80211_ops callbacks. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variableAjay Singh2019-02-041-0/+1
| | | | | | | | Avoid use of static variable for monitor net_device and move it inside wilc structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove the use of scan shadow bufferAjay Singh2019-01-181-3/+0Star
| | | | | | | | | | Remove scan shadow buffer, which is used to store a copy of scan results. Instead, use cfg80211 provided API's to retrieve required info. Remove the helper functions which are operating on shadow buffer, as it's not require now. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use 'struct' to pack cfg header frame in ↵Ajay Singh2019-01-181-1/+1
| | | | | | | | | | wilc_wlan_cfg_commit() Make use of 'struct' to pack cfg header in wilc_wlan_cfg_commit() instead of byte by byte filling. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: handle key related cfg operation from cfg80211 contextAjay Singh2018-12-051-1/+1
| | | | | | | | | Refactor add/delete key operation to handle directly from cfg80211 context. Also, avoid an extra copy of the information in hif layer and directly fill the buffer in firmware format. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use mutex lock to synchronized sending 'wid' cmd to firmwareAjay Singh2018-12-051-1/+2
| | | | | | | | | | | | Use mutex lock to protect the issuing of wid cmd to the firmware. Currently the wid commands are synchronized by use of hif_workqueue work queue. Now, these changes are required to synchronize the access to wid command, so the commands can be issued directly from cfg80211 context and 'WILC_wq' thread. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid the use of the static variable to configure wiphy ↵Ajay Singh2018-12-051-0/+60
| | | | | | | | | | | struct Refactor code to avoid the use of static variables to configure the 'wiphy' structure. Now move static variables as part of 'priv' data so it helped to maintain this information per interface. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: added 'WILC_' prefix for constants to have clear namespaceAjay Singh2018-11-121-4/+4
| | | | | | | For better namespace added 'WILC_' prefix for driver specific constants. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use WLAN_PMKID_LEN macro from ieee80211.h headerAjay Singh2018-11-121-1/+0Star
| | | | | | | | Make use of WLAN_PMKID_LEN macro provided by ieee80211.h header instead of PMKID_LEN. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove p2p related static variables to wilc_vif structAjay Singh2018-09-251-0/+7
| | | | | | | | Avoid use of static variable and move them as part of private data(wilc_priv) struct. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid use of 'g_sdio' static variableAjay Singh2018-09-251-0/+1
| | | | | | | | | Instead of using static variable 'g_sdio' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free during deinitialization. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor code to avoid static variables for config parametersAjay Singh2018-09-251-0/+2
| | | | | | | | | Refactor the code in wilc_wlan_cfg.c file to avoid the use of static variables. Move the static variables as part of wilc struct and also dynamically allocating memory for keeping those variables. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' ↵Ajay Singh2018-09-251-1/+1
| | | | | | | | | | | | struct Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg' and only have the string type configuration values in 'wilc_mac_cfg' struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte' array. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid()Ajay Singh2018-09-251-1/+1
| | | | | | | | Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(), as its always returns the same value. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move 'wilc_connecting' static variable to 'wilc_vif' structAjay Singh2018-09-101-0/+1
| | | | | | | | | Move static variable 'wilc_connecting' as part of 'wilc_vif' private struct. Remove "wilc_" prefix from name as its already part of wilc_vif struct. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move 'chip_ps_state' static variable as part of 'wilc' structAjay Singh2018-09-101-0/+1
| | | | | | | Move the static variable as part of 'wilc' priv struct. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use short names to fix over 80 issue in tcp_process()Ajay Singh2018-09-101-3/+3
| | | | | | | | | | | | Use short variable names to avoid line over 80 chars checkpatch warning in tcp_process(). struct pending_acks_info --> struct pending_ack int tcp_pending_ack_idx --> int ack_idx u32 pending_ack --> u32 pending_ack_idx Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move tcp_ack_filter algo related variables to 'wilc_vif' ↵Ajay Singh2018-09-101-0/+27
| | | | | | | | | | | struct Avoid use of static variables and move them as part of wilc_vif struct. Move all the parameters related to tcp_ack_filter algo to wilc_vif struct. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename 'dummy_statistics' variable to 'periodic_stat'Ajay Singh2018-09-101-1/+1
| | | | | | | | Cleanup patch to use appropriate variable name to fetch the periodic statistics. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move 'periodic_rssi' as part of 'wilc_vif' structAjay Singh2018-09-101-1/+2
| | | | | | | | | Refactor code to move 'periodic_rssi' as part of wilc_vif struct. Move 'dummy_statistics' from 'wilc' struct to 'wilc_vif' to maintain for each interface separately. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move hif_workqueue static variables to 'wilc' structureAjay Singh2018-09-101-0/+1
| | | | | | | | Avoid use of static variable hif_workqueue and move it inside 'wilc' structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move static variable clients_count to 'wilc' structureAjay Singh2018-09-101-0/+1
| | | | | | | | Avoid use of static variable 'clients_count' and move it part of 'wilc' structure. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move during_ip_timer & wilc_optaining_ip to 'wilc_vif' structAjay Singh2018-09-101-0/+2
| | | | | | | | | | | | | Move global variable 'wilc_during_ip_timer' and 'wilc_optaining_ip' to 'wilc_vif' structure. Rename these variables like below wilc_during_ip_timer -> during_ip_timer wilc_optaining_ip -> obtaining_ip. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: moved last_scanned_shadow & last_scanned_cnt to wilc_priv ↵Ajay Singh2018-09-101-0/+2
| | | | | | | | | | | | | struct Avoid use of static variables and moved the varibles as part of private data. last_scanned_shadow & last_scanned_cnt variable is moved to 'wilc_priv' to maintain for each interface. After moving static variable, clear_shadow_scan() doesn't require check 'op_ifcs' count as now for each interface the againg timer is initiated. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move 'aging_timer' static variable to wilc_priv structAjay Singh2018-09-101-1/+1
| | | | | | | | | | Moved 'aging_timer' to wilc_priv struct instead of having it as static variable. As 'aging_timer' is maintained for each interfaces so 'op_ifcs' check is not required before the timer_setup() and del_timer_sync() call. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move 'wilc_enable_ps' global variable into 'wilc' structAjay Singh2018-09-101-0/+1
| | | | | | | | | Instead of having 'wilc_enable_ps' as global variable moved it to 'wilc' structure. Rename 'wilc_enable_ps' to 'enable_ps' as its already part of 'wilc' structure Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: added Microchip copyright notice headerAjay Singh2018-08-051-0/+5
| | | | | | | | | | Cleanup the copyright notice header from the WILC1000 files. Replace copyright header of 'Atmel' & 'NewportMedia' with 'Microchip & its subsidiaries'. Also added the same copyright notice header for all wilc1000 driver source and header files. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: added comments for 'hif_cs' mutex lockAjay Singh2018-08-021-0/+1
| | | | | | | | Added comments for 'hif_cs' mutex to avoid checkpatch.pl reported issues. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary comments and comments descriptionAjay Singh2018-08-021-5/+0Star
| | | | | | | | Cleanup patch to remove the unnecessary comments and commented code. Also updated description for few of comments. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use descriptor-based interface for GPIOAjay Singh2018-07-241-1/+2
| | | | | | | | | | | | | | Now making use of descriptor-based interface instead of integer-based interface for IRQ GPIO. Added device tree binding reference for WILC SDIO and SPI interface module. Also moved the code to free gpio descriptor in module remove as the reference was fetched in probe function. Updated the TODO file Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename variable from 'gpio' to 'gpio_irq'Ajay Singh2018-07-241-1/+1
| | | | | | | | | Rename from 'gpio' to 'gpio_irq', so its inlcude the information about the purpose of GPIO. 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: remove gpio parameter from wilc_netdev_init()Ajay Singh2018-07-241-1/+1
| | | | | | | | | | Instead of passing the gpio as parameter to wilc_netdev_init() now setting its value after finishing wilc_netdev_init() call. Avoided passing of extra parameter to wilc_netdev_init(). 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: remove the mutliple #define used for same macroAjay Singh2018-07-211-0/+5
| | | | | | | | | | | | | | Moved the same #define in common header file instead of having their declartion in different files. Below macros are moved to header file: TCP_ACK_FILTER_LINK_SPEED_THRESH DEFAULT_LINK_SPEED GET_PKT_OFFSET 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: remove unnecessary elements from 'wilc_priv' structAjay Singh2018-07-211-7/+0Star
| | | | | | | | Remove unused elements from 'wilc_priv' structure. 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: remove unused elements in 'wilc' structAjay Singh2018-07-211-4/+0Star
| | | | | | | | Cleanup patch to remove unused elements from 'wilc' struct. 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: move 'txq_spinlock_flags' from 'wilc' structure to local ↵Ajay Singh2018-06-171-2/+0Star
| | | | | | | | | | | variable 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>
* staging: wilc1000: remove 'rxq_entries' from 'wilc' structAjay Singh2018-06-171-1/+0Star
| | | | | | | | | 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>
* staging: wilc1000: use list_head to maintain 'rxq_entry_t elements in rx queueAjay Singh2018-06-171-2/+1Star
| | | | | | | | | | | 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>
* staging: wilc1000: use list_head to maintain 'txq_entry_t' elements of tx queueAjay Singh2018-06-171-2/+1Star
| | | | | | | | | | | | | | | | | | | 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>
* staging: wilc1000: remove unused 'lock' varible in 'wilc_priv' structureAjay Singh2018-05-141-1/+0Star
| | | | | | | 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>
* staging: wilc1000: added comments for mutex and spinlock_tAjay Singh2018-05-141-2/+3
| | | | | | | 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>
* staging: wilc1000: remove 'flag' argument from wilc_mac_indicate()Ajay Singh2018-05-141-1/+1
| | | | | | | | | | | | | | | | 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>
* staging: wilc1000: move macro after the #include file in wilc_wfi_netdeviceAjay Singh2018-05-031-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>
* staging: wilc1000: remove unnecessary header file inclusion for wilcAjay Singh2018-05-031-20/+1Star
| | | | | | | | | 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>
* staging: wilc1000: rename WILC_WFI_mon_priv to avoid uppercase for struct nameAjay Singh2018-05-031-1/+1
| | | | | | | Cleanup patch to avoid 'struct' name with uppercase letters. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary file and function header commentsAjay Singh2018-05-031-7/+0Star
| | | | | | | | Cleanup patch to remove the unnecessary comments used for file and functions header. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>