summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip
AgeCommit message (Collapse)Author
2021-10-20wilc1000: use eth_hw_addr_set()Jakub Kicinski
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it got through appropriate helpers. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20211018235021.1279697-13-kuba@kernel.org
2021-10-13wireless: Remove redundant 'flush_workqueue()' callsChristophe JAILLET
'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/0855d51423578ad019c0264dad3fe47a2e8af9c7.1633849511.git.christophe.jaillet@wanadoo.fr
2021-09-21wilc1000: increase config packets response wait timeout limitAjay Singh
Increase the WID config packet response timeout to have extra wait time for host to receive the response message from firmware. Sometimes the WID config response was timed out because of host interrupt latency. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-12-ajay.kathat@microchip.com
2021-09-21wilc1000: use correct write command sequence in wilc_spi_sync_ext()Ajay Singh
Instead of using double read for the same register, use the write register command after the read command. The correct sequence is to use the read value in write command instead of reading the same register again. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-11-ajay.kathat@microchip.com
2021-09-21wilc1000: add 'initialized' flag check before adding an element to TX queueAjay Singh
Add 'initialized' variable check before adding net/mgmt packet to TX queue as safety check before passing the commands to the firmware. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-10-ajay.kathat@microchip.com
2021-09-21wilc1000: invoke chip reset register before firmware downloadAjay Singh
Add the chip reset command to initialize the WILC chip before downloading the firmware. Also, put the chip in wake-up mode so it is ready to receive the firmware binary from the host. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-9-ajay.kathat@microchip.com
2021-09-21wilc1000: ignore clockless registers status response for SPIAjay Singh
During WILC chip wake-up sequence, the clockless status register sometimes reports failure even when the actual status is successful. So, for the clockless register, remove the incorrect error status reporting during the read and write command API's. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-8-ajay.kathat@microchip.com
2021-09-21wilc1000: handle read failure issue for clockless registersAjay Singh
For SPI bus, the register read fails after read/write to the clockless register during chip wakeup sequence. Add workaround to send CMD_RESET command during chip wake-up sequence to overcome the issue. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-7-ajay.kathat@microchip.com
2021-09-21wilc1000: add reset/terminate/repeat command support for SPI busAjay Singh
Add reset/terminate/repeat command for SPI module. In case of SPI commands failure, the host should issue a RESET command to WILC chip to recover from any temporary bus error. For now, the new command support is added and later the SPI read/write API's would be modified to make use of these commands for retry mechanism Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-6-ajay.kathat@microchip.com
2021-09-21wilc1000: configure registers to handle chip wakeup sequenceAjay Singh
Use the correct sequence to configure clockless registers for chip wake-up. The following sequence is expected from WILC chip for wakeup: - set wakeup bit in wakeup_reg register - after setting the wakeup bit, read back the clock status bit for wakeup complete. For SDIO/SPI modules, the wakeup sequence is the same except uses different register values so refactored the code to use common function for both SDIO/SPI bus. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-5-ajay.kathat@microchip.com
2021-09-21wilc1000: add new WID to pass wake_enable information to firmwareAjay Singh
Add new WID(WID_WOWLAN_TRIGGER) to send wake_enable information to firmware. In 'set_wakeup' cfg80211_ops callback, the enable information was not passed to firmware which is required to handle WOWLan trigger notification from firmware. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-4-ajay.kathat@microchip.com
2021-09-21wilc1000: fix possible memory leak in cfg_scan_result()Ajay Singh
When the BSS reference holds a valid reference, it is not freed. The 'if' condition is wrong. Instead of the 'if (bss)' check, the 'if (!bss)' check is used. The issue is solved by removing the unnecessary 'if' check because cfg80211_put_bss() already performs the NULL validation. Fixes: 6cd4fa5ab691 ("staging: wilc1000: make use of cfg80211_inform_bss_frame()") Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-3-ajay.kathat@microchip.com
2021-09-21wilc1000: move 'deinit_lock' lock init/destroy inside module probeAjay Singh
Move initialization & deinitialization of 'deinit_lock' mutex lock inside wlan_init_locks() & wlan_deinit_locks() API's respectively alongside other locks. After the movement, the client count variable(client_count) which is used for lock init/deinit is removed. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210916164902.74629-2-ajay.kathat@microchip.com
2021-08-29wilc1000: Convert module-global "isinit" to device-specific variableDavid Mosberger-Tang
Move static "isinit" variable to wilc_spi structure to allow multiple WILC1000 devices per machine. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210828151346.3012697-1-davidm@egauge.net
2021-08-21wilc1000: remove redundant codewengjianfeng
Some of the code is redundant, so goto statements are used to remove them Signed-off-by: wengjianfeng <wengjianfeng@yulong.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210705023731.31496-1-samirweng1979@163.com
2021-08-21wilc1000: use devm_clk_get_optional()Claudiu Beznea
Use devm_clk_get_optional() for rtc clock: it simplifies a bit the code. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210806081229.721731-4-claudiu.beznea@microchip.com
2021-08-21wilc1000: dispose irq on failure pathClaudiu Beznea
Dispose IRQ on failure path. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210806081229.721731-3-claudiu.beznea@microchip.com
2021-08-21wilc1000: use goto labels on error pathClaudiu Beznea
Use goto labels on error path for probe functions. This makes code easier to read. With this introduce also netdev_cleanup and call it where necessary. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210806081229.721731-2-claudiu.beznea@microchip.com
2021-06-15wilc1000: Fix clock name bindingTudor Ambarus
Documentation/devicetree/bindings/net/wireless/microchip,wilc1000.yaml requires an "rtc" clock name. drivers/net/wireless/microchip/wilc1000/sdio.c is using "rtc" clock name as well. Comply with the binding in wilc1000/spi.c too. Fixes: 854d66df74ae ("staging: wilc1000: look for rtc_clk clock in spi mode") Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210428025445.81953-1-tudor.ambarus@microchip.com
2021-04-18wilc1000: Remove duplicate struct declarationWan Jiabing
struct wilc is declared twice. One has been declared at 352nd line. Remove the duplicate. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210331023557.2804128-3-wanjiabing@vivo.com
2021-04-17wilc1000: fix a loop timeout conditionDan Carpenter
If the loop fails, the "while(trials--) {" loop will exit with "trials" set to -1. The test for that expects it to end with "trials" set to 0 so the warning message will not be printed. Fix this by changing from a post-op to a pre-op. This does mean that we only make 99 attempts instead of 100 but that's okay. Fixes: f135a1571a05 ("wilc1000: Support chip sleep over SPI") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/YFS5gx/gi70zlIaO@mwanda
2021-04-17wilc1000: Bring MAC address setting in line with typical Linux behaviorDavid Mosberger-Tang
Linux network drivers normally disallow changing the MAC address when the interface is up. This driver has been different in that it allows to change the MAC address *only* when it's up. This patch brings wilc1000 behavior more in line with other network drivers. We could have replaced wilc_set_mac_addr() with eth_mac_addr() but that would break existing documentation on how to change the MAC address. Likewise, return -EADDRNOTAVAIL (not -EINVAL) when the specified MAC address is invalid or unavailable. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210303194846.1823596-1-davidm@egauge.net
2021-04-17wilc1000: Add support for enabling CRCDavid Mosberger-Tang
The driver so far has always disabled CRC protection. This means any data corruption that occurrs during the SPI transfers could go undetected. This patch adds module parameters enable_crc7 and enable_crc16 to selectively turn on CRC7 (for command transfers) and CRC16 (for data transfers), respectively. The default configuration remains unchanged, with both CRC7 and CRC16 off. The performance impact of CRC was measured by running ttcp -t four times in a row on a SAMA5 device: CRC7 CRC16 Throughput: Standard deviation: ---- ----- ----------- ------------------- off off 1720 +/- 48 KB/s on off 1658 +/- 58 KB/s on on 1579 +/- 84 KB/s Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210227172818.1711071-4-davidm@egauge.net
2021-04-17wilc1000: Check for errors at end of DMA writeDavid Mosberger-Tang
After a DMA write to the WILC chip, check for and report any errors. This is based on code from the wilc driver in the linux-at91 repository. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210227172818.1711071-3-davidm@egauge.net
2021-04-17wilc1000: Introduce symbolic names for SPI protocol registerDavid Mosberger-Tang
The WILC1000 protocol control register has bits for enabling the CRCs (CRC7 for commands and CRC16 for data) and to set the data packet size. Define symbolic names for those so the code is more easily understood. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210227172818.1711071-2-davidm@egauge.net
2021-04-17wilc1000: Make SPI transfers work at 48MHzDavid Mosberger-Tang
For CMD_SINGLE_READ and CMD_INTERNAL_READ, WILC may insert one or more zero bytes between the command response and the DATA Start tag (0xf3). This behavior appears to be undocumented in "ATWILC1000 USER GUIDE" (https://tinyurl.com/4hhshdts) but we have observed 1-4 zero bytes when the SPI bus operates at 48MHz and none when it operates at 1MHz. This code is derived from the equivalent code of the wilc driver in the linux-at91 repository. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210227172818.1711071-1-davidm@egauge.net
2021-03-15wilc1000: use wilc handler as cookie in request_threaded_irq()Ajay Singh
Use same cookie for request_threaded_irq() & free_irq() to properly free IRQ during module unload. free_irq() already uses *wilc* handler so the changes are required for request_threaded_irq(). Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210225042302.17048-1-ajay.kathat@microchip.com
2021-03-15wilc1000: write value to WILC_INTR2_ENABLE registerMarcus Folkesson
Write the value instead of reading it twice. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210224163706.519658-1-marcus.folkesson@gmail.com
2021-03-15wilc1000: Support chip sleep over SPIDavid Mosberger-Tang
chip_allow_sleep() only supported wakeup via SDIO, which made the driver unusable over SPI. This code is a straight forward port from the driver in the linux-at91 repository. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210224033317.1507603-1-davidm@egauge.net
2021-02-11wilc1000: Fix use of void pointer as a wrong struct typeVsevolod Kozlov
ac_classify() expects a struct sk_buff* as its second argument, which is a member of struct tx_complete_data. priv happens to be a pointer to struct tx_complete_data, so passing it directly to ac_classify() leads to wrong behaviour and occasional panics. Since there is only one caller of wilc_wlan_txq_add_net_pkt and it already knows the type behind this pointer, and the structure is already in the header file, change the function signature to use the real type instead of void* in order to prevent confusion. Signed-off-by: Vsevolod Kozlov <zaba@mm.st> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/YCQomJ1mO5BLxYOT@Vsevolods-Mini.lan
2021-02-06Merge tag 'wireless-drivers-next-2021-02-05' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.12 First set of patches for v5.12. A smaller pull request this time, biggest feature being a better key handling for ath9k. And of course the usual fixes and cleanups all over. Major changes: ath9k * more robust encryption key cache management brcmfmac * support BCM4365E with 43666 ChipCommon chip ID * tag 'wireless-drivers-next-2021-02-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: (35 commits) iwl4965: do not process non-QOS frames on txq->sched_retry path mt7601u: process tx URBs with status EPROTO properly wlcore: Fix command execute failure 19 for wl12xx mt7601u: use ieee80211_rx_list to pass frames to the network stack as a batch rtw88: 8723de: adjust the LTR setting rtlwifi: rtl8821ae: fix bool comparison in expressions rtlwifi: rtl8192se: fix bool comparison in expressions rtlwifi: rtl8188ee: fix bool comparison in expressions rtlwifi: rtl8192c-common: fix bool comparison in expressions rtlwifi: rtl_pci: fix bool comparison in expressions wlcore: Downgrade exceeded max RX BA sessions to debug wilc1000: use flexible-array member instead of zero-length array brcmfmac: clear EAP/association status bits on linkdown events brcmfmac: Delete useless kfree code qtnfmac_pcie: Use module_pci_driver mt7601u: check the status of device in calibration mt7601u: process URBs in status EPROTO properly brcmfmac: support BCM4365E with 43666 ChipCommon chip ID wilc1000: fix spelling mistake in Kconfig "devision" -> "division" mwifiex: pcie: Drop bogus __refdata annotation ... ==================== Link: https://lore.kernel.org/r/20210205161901.C7F83C433ED@smtp.codeaurora.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-01-22cfg80211: change netdev registration/unregistration semanticsJohannes Berg
We used to not require anything in terms of registering netdevs with cfg80211, using a netdev notifier instead. However, in the next patch reducing RTNL locking, this causes big problems, and the simplest way is to just require drivers to do things better. Change the registration/unregistration semantics to require the drivers to call cfg80211_(un)register_netdevice() when this is happening due to a cfg80211 request, i.e. add_virtual_intf() or del_virtual_intf() (or if it somehow has to happen in any other cfg80211 callback). Otherwise, in other contexts, drivers may continue to use the normal netdev (un)registration functions as usual. Internally, we still use the netdev notifier and track (by the new wdev->registered bool) if the wdev had already been added to cfg80211 or not. Link: https://lore.kernel.org/r/20210122161942.cf2f4b65e4e9.Ida8234e50da13eb675b557bac52a713ad4eddf71@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2021-01-14wilc1000: use flexible-array member instead of zero-length arrayTian Tao
Use flexible-array member introduced in C99 instead of zero-length array. Most of zero-length array was already taken care in previous patch [1]. [1]. https://patchwork.kernel.org/patch/11394197/ Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1608881703-37060-1-git-send-email-tiantao6@hisilicon.com
2021-01-14wilc1000: fix spelling mistake in Kconfig "devision" -> "division"Colin Ian King
There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20201216115808.12987-1-colin.king@canonical.com
2020-12-10wilc1000: changes for SPI communication stall issue found with IperfAjay Singh
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-07wilc1000: remove redundant assignment to pointer vifColin Ian King
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-02wilc1000: added queue support for WMMAjay Singh
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-02wilc1000: call complete() for failure in wilc_wlan_txq_add_cfg_pkt()Ajay Singh
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-02wilc1000: free resource in wilc_wlan_txq_add_mgmt_pkt() for failure pathAjay Singh
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-02wilc1000: free resource in wilc_wlan_txq_add_net_pkt() for failure pathAjay Singh
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-02wilc1000: added 'ndo_set_mac_address' callback supportAjay Singh
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-09-21net: wilc1000: clean up resource in error path of init mon interfaceHuang Guobin
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: 588713006ea4 ("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-08-27wilc1000: Fix memleak in wilc_bus_probeDinghao Liu
When devm_clk_get() returns -EPROBE_DEFER, spi_priv should be freed just like when wilc_cfg80211_init() fails. Fixes: 854d66df74aed ("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-27wilc1000: Fix memleak in wilc_sdio_probeDinghao Liu
When devm_clk_get() returns -EPROBE_DEFER, sdio_priv should be freed just like when wilc_cfg80211_init() fails. Fixes: 8692b047e86cf ("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-02wilc1000: Move wilc1000 SDIO ID's from driver source to common header fileAjay Singh
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-07-14wilc1000: let wilc_mac_xmit() return NETDEV_TX_OKLuc Van Oostenryck
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-14wilc1000: use API version number info along with firmware filenameAjay Singh
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-14wilc1000: use unified single wilc1000 FW binaryAjay Singh
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-14wilc1000: fix compiler warning for 'wowlan_support' unused variableAjay Singh
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-14wilc1000: use strlcpy to avoid 'stringop-truncation' warningAjay Singh
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