summaryrefslogtreecommitdiffstats
path: root/drivers/staging/wilc1000
AgeCommit message (Collapse)Author
2019-07-14staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()Ajay Singh
commit 6419f818ababebc1116fb2d0e220bd4fe835d0e3 upstream. For the error path in wilc_wlan_initialize(), the resources are not cleanup in the correct order. Reverted the previous changes and use the correct order to free during error condition. Fixes: b46d68825c2d ("staging: wilc1000: remove COMPLEMENT_BOOT") Cc: <stable@vger.kernel.org> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20staging: wilc1000: Fix some double unlock bugs in wilc_wlan_cleanup()Dan Carpenter
If ->hif_read_reg() or ->hif_write_reg() fail then the code unlocks and keeps executing. It should just 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>
2019-04-17staging: wilc1000: Avoid GFP_KERNEL allocation from atomic contextAdham Abozaeid
txq_add_mgmt_pkt allocates memory while being called from atomic context so needs to use GFP_ATOMIC Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16staging: remove redundant 'default n' from KconfigBartlomiej Zolnierkiewicz
'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16staging: wilc1000: fix spelling mistake "dissconect" -> "disconnect"Colin Ian King
There is a spelling mistake in a netdev_err error message, fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16staging: wilc1000: give usleep_range a rangeNicholas Mc Guire
usleep_range() is called in non-atomic context so there is little point in setting min==max as the jitter of hrtimer is determined by interruptions anyway. usleep_range can only perform the intended coalescence if some room for placing the hrtimer is provided. Given the range of milliseconds the delay will be 2+ anyway - so make it 2-2.5 ms which gives hrtimers space to optimize without negatively impacting performance. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context.Tetsuo Handa
Since wilc_set_multicast_list() is called with dev->addr_list_lock spinlock held, we can't use GFP_KERNEL memory allocation. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Fixes: e624c58cf8eb ("staging: wilc1000: refactor code to avoid use of wilc_set_multicast_list global") Cc: Ajay Singh <ajay.kathat@microchip.com> Reviewed-by: Adham Abozaeid <adham.abozaeid@microchip.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16staging: wilc1000: drop explicit conversion to boolNicholas Mc Guire
As the expression evaluates to a boolean anyway (relational and logical operators) conversion with the ternary operator is not needed here as coccinelle notes (boolconv.cocci) Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29staging: wilc1000: assign scan result callback before starting the scanAdham Abozaeid
When scan is triggered, sometimes scan results are received before the scan result callback is assigned, causing the recieved results to be ignored. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-27staging: wilc1000: use cfg80211 ssid list instead of repacking itAdham Abozaeid
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>
2019-03-22staging: wilc1000: Remove return variables from wilc_spi.cNishka Dasgupta
Remove return variables from wilc_spi.c. Issue found with Coccinelle using ret.cocci. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-22staging: wilc1000: Remove return variable from host_interface.cNishka Dasgupta
Remove return variable from host_interface.c. Issue found with Coccinelle using ret.cocci. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: wilc1000: remove unnecessary local variablesHimadri Pandya
Remove unnecessary local variable "ret" and its assignments from functions wilc_set_tx_power and wilc_get_tx_power. Suggested by Coccinelle. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-18staging: wilc1000: Fix line over 80 charactersDebleena Sen
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>
2019-02-28staging: wilc1000: fix incorrent type in initializerBo YU
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>
2019-02-26staging: wilc1000: fix incorrent type assignmentBo YU
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>
2019-02-07staging: wilc1000: rename linux_wlan.c and linux_mon.cAjay Singh
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>
2019-02-07staging: wilc1000: remove 'linux_' prefix in function namesAjay Singh
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>
2019-02-07staging: wilc1000: rename wilc_frmw_to_linux()Ajay Singh
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>
2019-02-07staging: wilc1000: added 'wilc_' prefix for function in wilc_sdio.c fileAjay Singh
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>
2019-02-07staging: wilc1000: avoid function forward declaration in wilc_sdio.c fileAjay Singh
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>
2019-02-07staging: wilc1000: move macro and function prototype from wilc_wlan_if.h fileAjay Singh
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>
2019-02-07staging: wilc1000: add 'wilc_' prefix to have proper namespaceAjay Singh
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>
2019-02-07staging: wilc1000: fix to set correct value for 'vif_num'Ajay Singh
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>
2019-02-07staging: wilc1000: define p2p related static variable as constantsAjay Singh
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>
2019-02-07staging: wilc1000: move 'curr_channel' static variable in 'wilc' structAjay Singh
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>
2019-02-07staging: wilc1000: move static variable 'wlan_channel' to 'wilc' structAjay Singh
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>
2019-02-07staging: wilc1000: avoid use of static variable in linux_mon.cAjay Singh
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>
2019-02-07staging: wilc1000: avoid use of 'hif_deinit_lock' static variableAjay Singh
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>
2019-02-07staging: wilc1000: remove unused struct 'add_sta_param'Ajay Singh
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>
2019-02-07staging: wilc1000: add check before performing operation on net_deviceAjay Singh
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>
2019-02-07staging: wilc1000: avoid use of interface names for validationAjay Singh
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>
2019-02-07staging: wilc1000: use random number for cookie instead of pointerAjay Singh
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>
2019-02-07staging: wilc1000: refactor code to use cookie informationAjay Singh
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>
2019-02-07staging: wilc1000: refactor linux_wlan_init_test_config()Ajay Singh
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>
2019-02-07staging: wilc1000: remove use of 'terminated_handle' static variableAjay Singh
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>
2019-02-04staging: wilc1000: refactor scan() cfg80211 ops callbackAjay Singh
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>
2019-02-04staging: wilc1000: make use of iface type to identify p2p interfaceAjay Singh
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>
2019-02-04staging: wilc1000: rename timeout related macrosAjay Singh
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>
2019-02-04staging: wilc1000: remove unnecessary debug log messagesAjay Singh
Remove unnecessary debug log messages. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04staging: wilc1000: remove redundant macros for radiotapAjay Singh
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>
2019-02-04staging: wilc1000: remove conditional lock in wilc_wfi_deinit_mon_interface()Ajay Singh
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>
2019-02-04staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variableAjay Singh
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>
2019-01-30staging: wilc1000: remove redundant reset of station statisticsAdham Abozaeid
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>
2019-01-28Merge 5.0-rc4 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: wilc1000: avoid the use of typedef for function pointersAjay Singh
Remove typedef for function pointers. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: wilc1000: refactor handle_set_mcast_filter()Ajay Singh
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>
2019-01-18staging: wilc1000: remove 'disconnect_info' structureAjay Singh
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>
2019-01-18staging: wilc1000: refactor information message parsing logicAjay Singh
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>