summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
Commit message (Collapse)AuthorAgeFilesLines
* staging: wilc1000: fix incorrent type in initializerBo YU2019-02-281-1/+1
| | | | | | | | | | | Fix sparse warning: drivers/staging/wilc1000//host_interface.c:444:49: warning: incorrect type in initializer (different address spaces) drivers/staging/wilc1000//host_interface.c:444:49: expected struct cfg80211_bss_ies const *ies drivers/staging/wilc1000//host_interface.c:444:49: got struct cfg80211_bss_ies const [noderef] <asn:4> *ies Signed-off-by: Bo YU <tsu.yubo@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix incorrent type assignmentBo YU2019-02-261-2/+2
| | | | | | | | | | | | | | | Fix sparse warning: drivers/staging/wilc1000/host_interface.c:450:30: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/host_interface.c:450:30: expected restricted __le16 [usertype] beacon_period drivers/staging/wilc1000/host_interface.c:450:30: got unsigned short [usertype] beacon_interval drivers/staging/wilc1000/host_interface.c:451:25: warning: incorrect type in assignment (different base types) drivers/staging/wilc1000/host_interface.c:451:25: expected restricted __le16 [usertype] cap_info drivers/staging/wilc1000/host_interface.c:451:25: got unsigned short [usertype] capability Signed-off-by: Bo YU <tsu.yubo@gmail.com> Reviewed-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename linux_wlan.c and linux_mon.cAjay Singh2019-02-073-1/+1
| | | | | | | | Rename linux_wlan.c and linux_mon.c to wilc_netdev.c and wilc_mon.c to include 'wilc_' prefix. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove 'linux_' prefix in function namesAjay Singh2019-02-072-14/+13Star
| | | | | | | Remove 'linux_' prefix and replace it with 'wilc_' namespace. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: rename wilc_frmw_to_linux()Ajay Singh2019-02-073-5/+5
| | | | | | | | 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: added 'wilc_' prefix for function in wilc_sdio.c fileAjay Singh2019-02-071-46/+46
| | | | | | | Cleanup patch to have proper follow clear namespace in wilc_sdio.c file. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid function forward declaration in wilc_sdio.c fileAjay Singh2019-02-071-48/+43Star
| | | | | | | | Cleanup patch to avoid function forward declaration by reordering the function. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: move macro and function prototype from wilc_wlan_if.h fileAjay Singh2019-02-075-36/+23Star
| | | | | | | | Move data structure and function prototype from 'wilc_wlan_if.h file. Now, this file contains constant specific to the firmware. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add 'wilc_' prefix to have proper namespaceAjay Singh2019-02-078-61/+61
| | | | | | | | 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: fix to set correct value for 'vif_num'Ajay Singh2019-02-071-2/+2
| | | | | | | | | | | | | Set correct value in '->vif_num' for the total number of interfaces and set '->idx' value using 'i'. Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") Fixes: 0e490657c721 ("staging: wilc1000: Fix problem with wrong vif index") Cc: <stable@vger.kernel.org> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.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-072-10/+13
| | | | | | | 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-072-17/+20
| | | | | | | | 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 static variable in linux_mon.cAjay Singh2019-02-071-5/+4Star
| | | | | | | | Define local variable for 'srcadd' & 'bssid' static variables and use ether_addr_copy() to copy value into them. 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-072-11/+11
| | | | | | | | 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: remove unused struct 'add_sta_param'Ajay Singh2019-02-071-11/+0Star
| | | | | | | Remove 'add_sta_param' structure as its not used now. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: add check before performing operation on net_deviceAjay Singh2019-02-071-4/+8
| | | | | | | | Before calling an operation on net_device check if that interface is available. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: avoid use of interface names for validationAjay Singh2019-02-071-74/+70Star
| | | | | | | | | | Avoid use of interface name i.e 'wlan0' & 'p2p0' to check the interface type in dev_state_ev_handler(). Now making use of netdev_ops and iface type to know interface. Reorder the functions to avoid the forward declaration after the above changes 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-074-85/+53Star
| | | | | | | | 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 linux_wlan_init_test_config()Ajay Singh2019-02-072-118/+83Star
| | | | | | | | Refactor linux_wlan_init_test_config() to use correct endianness for wid values and remove unnecessary code. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove use of 'terminated_handle' static variableAjay Singh2019-02-071-8/+7Star
| | | | | | | | Remove use of 'terminated_handle' variable and set the 'hif_drv' to NULL once it's free. 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-042-29/+28Star
| | | | | | | | 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-042-14/+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-044-9/+9
| | | | | | | 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: remove unnecessary debug log messagesAjay Singh2019-02-041-31/+0Star
| | | | | | | Remove unnecessary debug log messages. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove redundant macros for radiotapAjay Singh2019-02-041-3/+0Star
| | | | | | | Remove macro define which are already present in the included header. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: remove conditional lock in wilc_wfi_deinit_mon_interface()Ajay Singh2019-02-042-22/+8Star
| | | | | | | | | | wilc_wfi_deinit_mon_interface() calls unregister_netdev() which requires the rtnl lock again. Now move wilc_wfi_deinit_mon_interface() out of wilc_mac_close(). Also remove explicit call to wilc_mac_close() because unregister_netdev() takes care of calling wilc_mac_close(). 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-045-33/+34
| | | | | | | | 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 redundant reset of station statisticsAdham Abozaeid2019-01-301-20/+2Star
| | | | | | | | Driver sends configuration wids to reset connection statistics in the device, but the device already resets it when starting a new connection Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 5.0-rc4 into staging-nextGreg Kroah-Hartman2019-01-282-6/+6
|\ | | | | | | | | | | We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Staging: wilc1000: unlock on error in init_chip()Dan Carpenter2019-01-151-3/+4
| | | | | | | | | | | | | | | | | | When there is an error in init_bus() then we need to call release_bus() before we return. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: wilc1000: fix memory leak in wilc_add_rx_gtkGustavo A. R. Silva2019-01-151-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | In case *mode* happens to be different than WILC_AP_MODE and WILC_STATION_MODE, gtk_key is not released, hence leanding to a memory leak. So, in this case it is safer to release gtk_key just before returning to callers. Addresses-Coverity-ID: 1476020 ("Resource leak") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * staging: wilc1000: fix registration frame sizeJúlius Milan2019-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following sparse warnings: drivers/staging/wilc1000/host_interface.c:2360:30: warning: incorrect type in assignment (different base types) expected restricted __le32 [addressable] [assigned] [usertype] frame_type got restricted __le16 [usertype] <noident> Fixes: 147ccfd451024 ("staging: wilc1000: handle mgmt_frame_register ops from cfg82011 context") Signed-off-by: Július Milan <jmilan.dev@gmail.com> Reviewed-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: wilc1000: avoid the use of typedef for function pointersAjay Singh2019-01-185-28/+26Star
| | | | | | | | | | | | | | Remove typedef for function pointers. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: wilc1000: refactor handle_set_mcast_filter()Ajay Singh2019-01-183-25/+20Star
| | | | | | | | | | | | | | | | Refactor handle_set_mcast_filter() by making use of put_unaligned32() to pack the data instead of byte operation. 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-183-33/+12Star
| | | | | | | | | | | | | | | | 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: refactor information message parsing logicAjay Singh2019-01-181-50/+16Star
| | | | | | | | | | | | | | | | Refactor code to avoid maintaining an unnecessary buffer to keep the information type message ('I' msg type). 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-183-204/+84Star
| | | | | | | | | | | | | | | | | | 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-183-38/+38
| | | | | | | | | | | | | | | | 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-184-283/+142Star
| | | | | | | | | | | | | | | | | | 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: corrected order to pack join param bufferAjay Singh2019-01-181-4/+1Star
| | | | | | | | | | | | | | Modified packing order for join param as expected by firmware. 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-183-150/+50Star
| | | | | | | | | | | | | | | | | | 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-184-394/+86Star
| | | | | | | | | | | | | | | | | | | | 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-183-20/+21
| | | | | | | | | | | | | | | | | | | | 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: refactor wilc_wlan_set_bssid()Ajay Singh2019-01-182-12/+10Star
| | | | | | | | | | | | | | | | 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: make use of get_unaligned_le16/le32 to pack dataAjay Singh2019-01-182-26/+16Star
| | | | | | | | | | | | | | Make use of get_unaligned_le16/le32 framework api's to pack data. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: wilc1000: remove set but not used variable 'msa'YueHaibing2019-01-151-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/wilc1000/host_interface.c: In function 'wilc_parse_network_info': drivers/staging/wilc1000/host_interface.c:748:16: warning: variable 'msa' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | staging: wilc1000: make function wilc_get_stats_async staticMarko Stankovic2019-01-071-1/+1
|/ | | | | | | | | | Makes local function wilc_get_stats_async() static Cleans up sparse warning: symbol 'wilc_get_stats_async' was not declared. Should it be static? Signed-off-by: Marko Stankovic <dartnorris@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: wilc1000: fix missing read_write setting when reading dataColin Ian King2018-12-201-0/+1
| | | | | | | | | | | | | | Currently the cmd.read_write setting is not initialized so it contains garbage from the stack. Fix this by setting it to 0 to indicate a read is required. Detected by CoverityScan, CID#1357925 ("Uninitialized scalar variable") Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: stable <stable@vger.kernel.org> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>