summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
Commit message (Collapse)AuthorAgeFilesLines
* staging: wilc1000: move current_tx_rate enum to wilc_wlan_if.h fileAjay Singh2018-11-123-17/+17
| | | | | | | | | Move 'current_tx_rate' enum to wilc_wlan_if.h, to have it along with the other FW related to constants. Also added prefix to have a better namespace. 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-127-135/+138
| | | | | | | | | 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-123-36/+38
| | | | | | | | | 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-124-13/+16
| | | | | | | | 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: move sdio_cmd52 & sdio_cmd53 struct to source fileAjay Singh2018-11-122-19/+19
| | | | | | | | Moved sdio_cmd52 & sdio_cmd53 struct from wilc_wlan_if.h, as its used in wilc_sdio.cfile. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unused macros and struct members in host_interface.hAjay Singh2018-11-121-11/+0Star
| | | | | | | | Cleanup patch to remove the unused macros and struct members in host_interface.h header file. 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-124-7/+5Star
| | | | | | | | 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-123-7/+4Star
| | | | | | | | 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: Remove unused mutex cfg_values_lockAdham Abozaeid2018-11-112-11/+0Star
| | | | | | | | After removing cfg_values member, cfg_values_lock that was used to protect it can also be removed. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: Don't keep a copy of wiphy parameters in the driverAdham Abozaeid2018-11-112-14/+0Star
| | | | | | | host_if_drv.cfg_values is a write only member, and can be removed Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: validate cfg parameters before scheduling the workAdham Abozaeid2018-11-112-45/+48
| | | | | | | | 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 unused flags in handle_cfg_param()Adham Abozaeid2018-11-083-254/+0Star
| | | | | | | | | handle_cfg_param() receives a bit map that describes what to be changed. Some of these bits flags aren't referred to from elsewhere and can be removed. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove coreconfigurator.h fileAjay Singh2018-11-053-73/+59Star
| | | | | | | | | Remove the coreconfigurator header file, as its source file is deleted after code refactor. Moved the required structure and prototypes to hostinterface header. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove coreconfigurator.c fileAjay Singh2018-11-054-132/+118Star
| | | | | | | | | After use of framework API's most of the redundant functions are removed in coreconfigurator.c file. Now moved left over function to host_interface file and deleted the coreconfigurator.c file. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary MAX_STRING_LEN macroAjay Singh2018-11-051-2/+1Star
| | | | | | | Cleanup patch to remove the use of unnecessary 'MAX_STRING_LEN' macro. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor wilc_parse_assoc_resp_info()Ajay Singh2018-11-052-16/+10Star
| | | | | | | | | Refactor wilc_parse_assoc_resp_info() function by removing the use of get_asoc_status() API. For parsing assoc response use the struct and avoided the use of offset macros to extract the ies information. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid line over 80 chars in wilc_parse_network_info()Ajay Singh2018-11-051-27/+26Star
| | | | | | | | Use shorter name for 'network_info' variable to avoid line over 80 chars issue. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor get_bssid() functionAjay Singh2018-11-051-22/+7Star
| | | | | | | | | | | Refactor get_bssid() by making use of 'ieee80211_mgmt' struct. Instead of passing the memory offset now using structure element to fetch the bssid information. Returning the pointer to bssid from get_bssid() instead of filing the input argument. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unused code in coreconfiguratorAjay Singh2018-11-052-165/+0Star
| | | | | | | | After refactoring of wilc_parse_network_info(), some of the functions and macro are not required, so removed the unused code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor wilc_parse_network_info() using kernel framework ↵Ajay Singh2018-11-051-35/+55
| | | | | | | | | | api's Refactor wilc_parse_network_info() by making use of cfg80211.h provided API. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: prefer 'help' in KConfigIoannis Valasakis2018-10-111-4/+4
| | | | | | | | | Fix for a style warning using the help without the deprecated help included between dashes. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix incorrect allocation size for structureColin Ian King2018-09-281-1/+1
| | | | | | | | | | | | Currently the allocation for str_vals is for the sizeof the pointer rather than the size of the structure. Fix this. Detected by smatch "wilc_wlan_cfg_init() error: not allocating enough data 392 vs 8" Fixes: acceb12a9f8b ("staging: wilc1000: refactor code to avoid static variables for config parameters") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: return exact error of register_netdev() from ↵Ajay Singh2018-09-251-4/+10
| | | | | | | | | | | | | | wilc_netdev_init() Refactor wilc_netdev_init() to return the error code received from register_netdev() during the failure condition. Earlier discussion link [1]. https://www.spinics.net/lists/linux-wireless/msg177304.html Suggested-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor wilc_set_multicast_list() functionAjay Singh2018-09-251-10/+10
| | | | | | | | | | | | | | | | Refactor wilc_set_multicast_list() by making below changes: o use kmalloc_array o remove unnecessary res o add u8 *cur_mc o use i as index o use '%pM' extension in netdev_dbg() The below checkpatch issue is also resolved after code refactor. 'spaces preferred around that '/' (ctx:VxV)' Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use usleep_range() in place of udelay()Ajay Singh2018-09-251-1/+1
| | | | | | | | | | Changes to avoid the below checkpatch warning: 'usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt;' Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unnecessary option used with ccflags-y in MakefileAjay Singh2018-09-251-2/+0Star
| | | | | | | | Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in ccflag-y in Makefile. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove wilc_debugfs.c file as its not usedAjay Singh2018-09-252-118/+2Star
| | | | | | | | | | | Deleted wilc_debugfs.c file as it's not used. Earlier discussion link: [1]. https://www.spinics.net/lists/linux-wireless/msg176076.html Suggested-by: Greg KH <gregkh@linuxfoundation.org> 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-253-31/+38
| | | | | | | | 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 unnecessary memset in sdio_init() & wilc_spi_init()Ajay Singh2018-09-252-6/+1Star
| | | | | | | | Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to zero as the buffer was allocated using kzalloc(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid use of 'g_spi' static variableAjay Singh2018-09-251-22/+36
| | | | | | | | | Instead of using static variable 'g_spi' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free is taken care in wilc_netdev_cleanup(). 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-253-20/+36
| | | | | | | | | 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: remove use of unnecessary 'wilc_connected_ssid' variableAjay Singh2018-09-253-35/+15Star
| | | | | | | | | | '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-254-15/+15
| | | | | | | | 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: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals'Ajay Singh2018-09-252-9/+9
| | | | | | | | Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more appropriate for structure to store the values of string configuration. 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-256-70/+138
| | | | | | | | | 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-253-12/+17
| | | | | | | | | | | | 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: remove unused wid from cfg structAjay Singh2018-09-251-107/+0Star
| | | | | | | | | | | Cleanup patch to remove the unused element stored in cfg struct. Removed those wid from the cfg variables whose value is not fetched(GET_CFG) from the code. In case the wid is only set to the firmware then there is need to store them as part of cfg variables, so removed the unused code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove unused wid type valuesAjay Singh2018-09-251-4/+0Star
| | | | | | | Cleanup patch to remove the wid type not used in the code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte structAjay Singh2018-09-251-1/+1
| | | | | | | | Use the correct datatype for storing the byte value in 'wilc_cfg_byte' struct. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: set default value of cfg response type in ↵Ajay Singh2018-09-251-2/+1Star
| | | | | | | | | | | wilc_wlan_cfg_indicate_rx() Handle the setting of default value for 'wilc_cfg_rsp' type for all cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this value to know the type of the received message. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: refactor wilc_wlan_parse_info_frame() functionAjay Singh2018-09-251-8/+4Star
| | | | | | | | | Return 'void' from wilc_wlan_parse_info_frame() as same constant value is returned always. Also removed the 'size' from input parameter as its not used in the function. 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_cfg_indicate_rx()Ajay Singh2018-09-252-8/+4Star
| | | | | | | | | Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(), as its return value is not used in caller. The value set in 'rsp' argument is used to get the success status. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack()Ajay Singh2018-09-251-3/+1Star
| | | | | | | | Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always return value '1' and its not used by the caller. 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' tcp ack filter functionsAjay Singh2018-09-251-9/+6Star
| | | | | | | | | | | Use 'void' return type for below functions as they always return '0' and their return value is not used by caller. add_tcp_pending_ack() update_tcp_session() add_tcp_pending_ack() Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head()Ajay Singh2018-09-251-8/+3Star
| | | | | | | | Use 'void' return for wilc_wlan_txq_add_to_head() as its always return '0' value. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: use 'void' return type for host_int_get_assoc_res_info()Ajay Singh2018-09-251-6/+5Star
| | | | | | | | | Change return type to 'void' for host_int_get_assoc_res_info() as its return value is not used. 'rcvd_assoc_resp_info_len' parameter value is used to know the status. 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 ↵Ajay Singh2018-09-252-3/+2Star
| | | | | | | | | | wilc_wfi_deinit_mon_interface() Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same value always return. 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-252-4/+2Star
| | | | | | | | 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: change return type to 'void' for lock init & deinit functionsAjay Singh2018-09-251-6/+2Star
| | | | | | | | Cleanup patch to use 'void' return type for wlan_deinit_locks() & wlan_init_locks(), as same value is return. 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-252-4/+2Star
| | | | | | | | 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>