summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
Commit message (Collapse)AuthorAgeFilesLines
* staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' structAjay Singh2019-07-011-1/+1
| | | | | | | | Remove use of 'src_addr' element in wilc_vif, as the same information already copied to net_device->dev_addr. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove use of driver_handler_id & ifc_idAjay Singh2019-07-011-3/+2Star
| | | | | | | | Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to identify the handler. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: added support to dynamically add/remove interfacesAjay Singh2019-07-011-188/+347
| | | | | | | | | | | | | Removed the use of two hardcoded interfaces and added support to add/remove the network interfaces dynamically. Now the driver will have single default interface with name 'wlan0' and later other interface can be added from user space application e.g using 'iw add' command. Also taken care to maintain 'wilc_vif' as part of 'net_device' private data and 'wilc' struct as 'wiphy' private data. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add passive scan supportAdham Abozaeid2019-06-211-3/+9
| | | | | | | | Add passive scan support to the driver by passing the scan type to the HW and configure the HW scan time if configured by the cfg80211. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use cfg80211 ssid list instead of repacking itAdham Abozaeid2019-03-271-66/+3Star
| | | | | | | | | | Avoid repacking ssid values into struct wilc_probe_ssid, and use the cfg80211 provided struct to pass the ssid list to wilc_scan. With this change, struct wilc_probe_ssid, struct wilc_probe_ssid_info and function wilc_wfi_cfg_alloc_fill_ssid will not be needed anymore. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: Fix line over 80 charactersDebleena Sen2019-03-181-1/+2
| | | | | | | | | Break the line after '+' to remove the checkpatch.pl warning. Remove trailing whitespace after '+' if any: WARNING: line over 80 characters Signed-off-by: Debleena Sen <idebleenasen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add 'wilc_' prefix to have proper namespaceAjay Singh2019-02-071-11/+11
| | | | | | | | Cleanup patch to rename data structure and function name to have 'wilc_' prefix. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: define p2p related static variable as constantsAjay Singh2019-02-071-2/+2
| | | | | | | | Add constant qualifer for 'p2p_vendor_spec' & 'p2p_oui' static variable because they are treated like constant values. 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-10/+12
| | | | | | | 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-17/+19
| | | | | | | | 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: use random number for cookie instead of pointerAjay Singh2019-02-071-1/+1
| | | | | | | Use random number to assign to cookie value. 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-26/+25Star
| | | | | | | | 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: refactor scan() cfg80211 ops callbackAjay Singh2019-02-041-28/+27Star
| | | | | | | | Refactor scan() cfg80211 callback function and use correct value for valid channel number limit. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: make use of iface type to identify p2p interfaceAjay Singh2019-02-041-13/+6Star
| | | | | | | | Remove SSID string compare instead use interface type check for p2p client interface. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename timeout related macrosAjay Singh2019-02-041-2/+2
| | | | | | | Rename timeout related macros to have their unit clear from their name. 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-1/+2
| | | | | | | | 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 'disconnect_info' structureAjay Singh2019-01-181-6/+6
| | | | | | | | Remove 'disconnect_info' struct use because its passed values are not required in cfg_connect_result(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use single struct for 'connect' related parametersAjay Singh2019-01-181-11/+19
| | | | | | | | | Use single structure to store the connect request and response information. It helped in avoiding unnecessary buffer allocation to handle request and response flow. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename hidden_network related data structureAjay Singh2019-01-181-12/+13
| | | | | | | | Rename hidden_network related data structure to have more appropriate names, as it's used to keep search network SSID details. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use struct to pack join parameters for FWAjay Singh2019-01-181-1/+1
| | | | | | | | | Refactor code to use struct to construct the join parameters. Avoid use of extra buffer before sending to FW instead directly pass the struct pointer. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: make use of cfg80211_inform_bss_frame()Ajay Singh2019-01-181-28/+14Star
| | | | | | | | | Use cfg80211_inform_bss_frame() api instead of cfg80211_inform_bss() to inform cfg80211 about the BSS frame, to avoid unnecessary parsing of frame in driver. 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-309/+50Star
| | | | | | | | | | 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: refactor wilc_wlan_set_bssid()Ajay Singh2019-01-181-11/+5Star
| | | | | | | | Refactor code by making use of eth_zero_addr() to clear the mac address value in wilc_wlan_set_bssid(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: handle scan operation callback from cfg80211 contextAjay Singh2018-12-051-4/+9
| | | | | | | | | Refactor code to handle scan operation callback from cfg80211 context. No need to maintain 'scan_attr' struct as the wid command is directly sent to firmware from cfg80211 context. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid extra buffer copy while connect cfg opsAjay Singh2018-12-051-0/+2
| | | | | | | | | | Refactor the code to avoid the use of an extra buffer to store the connection related parameter. No need to call cfg80211_disconnected in case of failure to send the wid command to firmware, an error status is directly returned in cfg80211 connect callback. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid deferred handling of cfg80211 disconnect callbackAjay Singh2018-12-051-1/+1
| | | | | | | | | Refactor disconnect operation callback to handle from the cfg80211 context. The reason code is not required to pass as parameter to the function, so remove it. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: handle get_station() ops callback in cfg80211 contextAjay Singh2018-12-051-1/+1
| | | | | | | | | | Refactor code to handle the get_station() callback from cfg80211 context. Provided different API's to fetch the station statistics information in sync or async call. From cfg80211 get_station() ops callback calls the sync version of API. 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-2/+2
| | | | | | | | | 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: refactor wilc_set_wfi_drv_handler() to avoid deferred ↵Ajay Singh2018-12-051-1/+1
| | | | | | | | | | | | handling Avoid handling of WID_SET_DRV_HANDLER wid command in deferred approach. Instead of posting the wid to work queue now handle directly from the caller context. Remove 'is_sync' parameter from the API as it's not required anymore. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: handle station dump cfg ops from cfg80211 contextAjay Singh2018-12-051-1/+4
| | | | | | | | | | Refactor code to handle dump_station() callback from cfg80211 context. Instead of deferring issue of wid command now send it directly from cfg context. Also making use of wilc_get_rssi() error status in case there is a failure to post the wid command to the firmware. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: handle add beacon operation callback from cfg80211 contextAjay Singh2018-12-051-8/+2Star
| | | | | | | | | Refactor add/change beacon cfg80211 operation callback to handle from cfg context. Also avoided extra copy of information by packing directly in firmware expected format. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: handle add and edit station from the cfg80211 contextAjay Singh2018-12-051-33/+2Star
| | | | | | | | | | Refactor the code to avoid handling of add/edit stations using work queue and now set the wid value from caller context. Avoid making an extra copy of buffer and directly copy the data in firmware expected format. 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-72/+20Star
| | | | | | | | | | | 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: rename tsf_hi element of network_info structAjay Singh2018-11-121-3/+3
| | | | | | | | Rename 'tsf_hi' element in network_info struct as it's not used to store only the higher 32-bit value but the complete 64-bit tsf value. 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-28/+28
| | | | | | | 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: rename firmware related constants to follow better namespaceAjay Singh2018-11-121-4/+4
| | | | | | | | | Rename the firmware related macro by prefix with 'WILC_FW_' prefix for a better namespace. Also, move them to wilc_wlan_if.h file along with other FW related macros. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use proper namespace for macros in wilc_wlan_if.h headerAjay Singh2018-11-121-7/+7
| | | | | | | | | Rename the macros defined in wilc_wlan_if.h header to have clear namespace. As convention used 'WILC_FW_' prefix for constants defined for firmware and 'WILC_' prefix for driver constants. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: restructure macros used to handle security typeAjay Singh2018-11-121-26/+17Star
| | | | | | | | | Restructure the code to have a proper namespace for macro defined to handle the security types. Move them as part of wilc_wlan_if.h header as along with other macro defined for firmware. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use enum contants for mac status & added 'WILC_' prefixAjay Singh2018-11-121-1/+1
| | | | | | | | Clubbed mac status constants inside the enum constant and also added 'WILC_' prefix to have better namespace. 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-2/+2
| | | | | | | | 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: use macro from ieee80211.h in register frame api'sAjay Singh2018-11-121-2/+2
| | | | | | | | Make use of ieee80211.h provided macros and removed the extra macro defined for the same purpose. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: validate cfg parameters before scheduling the workAdham Abozaeid2018-11-111-4/+28
| | | | | | | | Validate cfg parameters after being called by cfg80211 in set_wiphy_params before scheduling the work executed in handle_cfg_param Signed-off-by: Adham Abozaeid <adham.abozaeid@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-31/+29Star
| | | | | | | | 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: remove use of unnecessary 'wilc_connected_ssid' variableAjay Singh2018-09-251-9/+15
| | | | | | | | | | 'wilc_connected_ssid' actually used to store the BSSID information for connected BSSID. 'wilc_vif' already has 'bssid' variable to store the same information. So refactor code to remove 'wilc_connected_ssid' and instead used 'wilc_vif' struct 'bssid' element. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid the use of 'hif_driver_comp' completion variableAjay Singh2018-09-251-1/+1
| | | | | | | | Instead of using extra completion variable to handle the sync call now using msg->is_sync flag to handle the sync call. 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_deinit_host_int()Ajay Singh2018-09-251-3/+1Star
| | | | | | | | Cleanup patch to use 'void' return type for wilc_deinit_host_int(), as its return value is not used in caller. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor wilc_netdev_init() to handle memory free in ↵Ajay Singh2018-09-101-1/+5
| | | | | | | | | | error path Refactor the wilc_netdev_init() to cleanup the memory for error scenario and remove unnecessary 'dev' pointer check. 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-10/+8Star
| | | | | | | | | 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 tcp_ack_filter algo related variables to 'wilc_vif' ↵Ajay Singh2018-09-101-2/+2
| | | | | | | | | | | 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: remove unused variable 'op_ifcs'Ajay Singh2018-09-101-5/+0Star
| | | | | | | | After code refactor in previous commit now 'op_ifcs' is not require any more, so remove it. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>