Ajay Singh
382726d134
wilc1000: changes for SPI communication stall issue found with Iperf
...
Added retry mechanism to ensure VMM enable bit is set during the
block transfer of data between host and WILC FW.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201208103739.28597-1-ajay.kathat@microchip.com
2020-12-10 20:48:13 +02:00
Colin Ian King
9b0467ed9a
wilc1000: remove redundant assignment to pointer vif
...
The assignment to pointer vif is redundant as the assigned value
is never read, hence it can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Acked-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201203174316.1071446-1-colin.king@canonical.com
2020-12-07 18:34:17 +02:00
Ajay Singh
339754ffdb
wilc1000: added queue support for WMM
...
Added multiple queues[BK,BE,VI,VO] to handle different priority data
packets. Before adding a packet to the queue, checked its priority from
the header, and then add to the suitable queue. The limit for each queue
is maintained separately. Also while passing the packets to the firmware
via VMM take care to select data packets based on priority and available
space.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201125114059.10006-6-ajay.kathat@microchip.com
2020-12-02 21:38:12 +02:00
Ajay Singh
9c172f30b4
wilc1000: call complete() for failure in wilc_wlan_txq_add_cfg_pkt()
...
Added complete() call for failure case in wilc_wlan_txq_add_cfg_pkt().
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201125114059.10006-5-ajay.kathat@microchip.com
2020-12-02 21:38:11 +02:00
Ajay Singh
66aea5d198
wilc1000: free resource in wilc_wlan_txq_add_mgmt_pkt() for failure path
...
Before returing from wilc_wlan_txq_add_mgmt_pkt() invoke tx_complete_fn()
callback to free up allocated memory for failure case.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201125114059.10006-4-ajay.kathat@microchip.com
2020-12-02 21:38:10 +02:00
Ajay Singh
dd460e2ac0
wilc1000: free resource in wilc_wlan_txq_add_net_pkt() for failure path
...
Before returing from wilc_wlan_txq_add_net_pkt() invoke tx_complete_fn()
callback to free up allocated memory for failure cases.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201125114059.10006-3-ajay.kathat@microchip.com
2020-12-02 21:38:08 +02:00
Ajay Singh
c04fabacb7
wilc1000: added 'ndo_set_mac_address' callback support
...
Added support for 'ndo_set_mac_address call' callback to allow change of
interface MAC address.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20201125114059.10006-2-ajay.kathat@microchip.com
2020-12-02 21:38:07 +02:00
Huang Guobin
55bd149978
net: wilc1000: clean up resource in error path of init mon interface
...
The wilc_wfi_init_mon_int() forgets to clean up resource when
register_netdevice() failed. Add the missed call to fix it.
And the return value of netdev_priv can't be NULL, so remove
the unnecessary error handling.
Fixes: 588713006e ("staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variable")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Huang Guobin <huangguobin4@huawei.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200917123019.206382-1-huangguobin4@huawei.com
2020-09-21 16:02:13 +03:00
Dinghao Liu
9a19a939ab
wilc1000: Fix memleak in wilc_bus_probe
...
When devm_clk_get() returns -EPROBE_DEFER, spi_priv
should be freed just like when wilc_cfg80211_init()
fails.
Fixes: 854d66df74 ("staging: wilc1000: look for rtc_clk clock in spi mode")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn >
Acked-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200820055256.24333-1-dinghao.liu@zju.edu.cn
2020-08-27 13:02:48 +03:00
Dinghao Liu
8d95ab34b2
wilc1000: Fix memleak in wilc_sdio_probe
...
When devm_clk_get() returns -EPROBE_DEFER, sdio_priv
should be freed just like when wilc_cfg80211_init()
fails.
Fixes: 8692b047e8 ("staging: wilc1000: look for rtc_clk clock")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn >
Acked-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200820054819.23365-1-dinghao.liu@zju.edu.cn
2020-08-27 13:01:31 +03:00
Ajay Singh
c83e2a6e2f
wilc1000: Move wilc1000 SDIO ID's from driver source to common header file
...
Moved macros used for Vendor/Device ID from wilc1000 driver to common
header file and changed macro name for consistency with other macros.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Acked-by: Ulf Hansson <ulf.hansson@linaro.org >
Acked-by: Pali Rohár <pali@kernel.org >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200717051134.19160-1-ajay.kathat@microchip.com
2020-08-02 18:12:23 +03:00
Luc Van Oostenryck
cce0e08301
wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK
...
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type defining 'NETDEV_TX_OK' but this
driver returns '0' instead of 'NETDEV_TX_OK'.
Fix this by returning 'NETDEV_TX_OK' instead of '0'.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200629104009.84077-1-luc.vanoostenryck@gmail.com
2020-07-14 20:53:29 +03:00
Ajay Singh
b52b331a89
wilc1000: use API version number info along with firmware filename
...
Added version number info along with firmware name so driver can pick
the correct revision of FW file. Moved FW filename macro as part of
driver code & added MODULE_FIRMWARE to specify FW needed by module.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200710051826.3267-6-ajay.kathat@microchip.com
2020-07-14 20:52:27 +03:00
Ajay Singh
0b3dd675ed
wilc1000: use unified single wilc1000 FW binary
...
Modify WILC1000 binary filename to use single unified wilc1000 FW.
A single wilc1000 binary is used for different wilc1000 revisions.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200710051826.3267-5-ajay.kathat@microchip.com
2020-07-14 20:52:25 +03:00
Ajay Singh
9bdcbdafc6
wilc1000: fix compiler warning for 'wowlan_support' unused variable
...
Avoid below reported warning found when 'CONFIG_PM' config is
undefined.
'warning: unused variable 'wowlan_support' [-Wunused-const-variable]'
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200710051826.3267-4-ajay.kathat@microchip.com
2020-07-14 20:52:24 +03:00
Ajay Singh
1b3dd77430
wilc1000: use strlcpy to avoid 'stringop-truncation' warning
...
Make use 'strlcpy' instead of 'strncpy' to overcome 'stringop-truncation'
compiler warning.
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
Link: https://lore.kernel.org/r/20200710051826.3267-3-ajay.kathat@microchip.com
2020-07-14 20:52:23 +03:00
Ajay Singh
5625f965d7
wilc1000: move wilc driver out of staging
...
WILC1000 is an IEEE 802.11 b/g/n IoT link controller module. The
WILC1000 connects to Microchip AVR/SMART MCUs, SMART MPUs, and other
processors with minimal resource requirements with a simple
SPI/SDIO-to-Wi-Fi interface.
WILC1000 driver has been part of staging for few years. With
contributions from the community, it has improved significantly. Full
driver review has helped in achieving the current state.
The details for those reviews are captured in 1 & 2.
[1]. https://lore.kernel.org/linux-wireless/1537957525-11467-1-git-send-email-ajay.kathat@microchip.com/
[2]. https://lore.kernel.org/linux-wireless/1562896697-8002-1-git-send-email-ajay.kathat@microchip.com/
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com >
Signed-off-by: Kalle Valo <kvalo@codeaurora.org >
2020-06-26 08:46:46 +03:00