aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/microchip/wilc1000/sdio.c
AgeCommit message (Collapse)AuthorFilesLines
2023-08-01wifi: wilc1000: remove use of has_thrpt_enh3 flagPrasurjya Rohan Saikia1-93/+10
The 'enhance throughput flow' algorithm is used by default. So older sections of the code are removed so as to always use this new algorithm. Signed-off-by: Prasurjya Rohan Saikia <[email protected]> Acked-by: Ajay Kathat <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-11-01wifi: wilc1000: sdio: fix module autoloadingMichael Walle1-0/+1
There are no SDIO module aliases included in the driver, therefore, module autoloading isn't working. Add the proper MODULE_DEVICE_TABLE(). Cc: [email protected] Signed-off-by: Michael Walle <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-08-30wifi: wilc1000: fix DMA on stack objects[email protected]1-6/+33
Sometimes 'wilc_sdio_cmd53' is called with addresses pointing to an object on the stack. Use dynamically allocated memory for cmd53 instead of stack address which is not DMA'able. Fixes: 5625f965d764 ("wilc1000: move wilc driver out of staging") Reported-by: Michael Walle <[email protected]> Suggested-by: Michael Walle <[email protected]> Signed-off-by: Ajay Singh <[email protected]> Reviewed-by: Michael Walle <[email protected]> Tested-by: Michael Walle <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-07-27wifi: wilc1000: add 'isinit' flag for SDIO bus similar to SPIAjay Singh1-0/+13
Similar to SPI priv data, add 'isinit' variable in SDIO priv. Make use of the state to invoke hif_init() once, and acquire the lock before accessing hif function. Signed-off-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2022-05-11wilc1000: use fixed function base register value to access SDIO_FBR_ENABLE_CSAAjay Singh1-1/+1
The function number was not correct(reset to 0) when host resumes from suspend state. Use hardcoded value in function base information register(FBR base address) to re-initialize correctly on host resume. Signed-off-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-12-20wilc1000: fix double free error in probe()Dan Carpenter1-0/+2
Smatch complains that there is a double free in probe: drivers/net/wireless/microchip/wilc1000/spi.c:186 wilc_bus_probe() error: double free of 'spi_priv' drivers/net/wireless/microchip/wilc1000/sdio.c:163 wilc_sdio_probe() error: double free of 'sdio_priv' The problem is that wilc_netdev_cleanup() function frees "wilc->bus_data". That's confusing and a layering violation. Leave the frees in probe(), delete the free in wilc_netdev_cleanup(), and add some new frees to the remove() functions. Fixes: dc8b338f3bcd ("wilc1000: use goto labels on error path") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/20211217150311.GC16611@kili
2021-09-21wilc1000: handle read failure issue for clockless registersAjay Singh1-0/+1
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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-08-21wilc1000: use devm_clk_get_optional()Claudiu Beznea1-8/+6
Use devm_clk_get_optional() for rtc clock: it simplifies a bit the code. Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-08-21wilc1000: dispose irq on failure pathClaudiu Beznea1-2/+3
Dispose IRQ on failure path. Signed-off-by: Claudiu Beznea <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-08-21wilc1000: use goto labels on error pathClaudiu Beznea1-6/+10
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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-03-15wilc1000: write value to WILC_INTR2_ENABLE registerMarcus Folkesson1-1/+1
Write the value instead of reading it twice. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Marcus Folkesson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-08-27wilc1000: Fix memleak in wilc_sdio_probeDinghao Liu1-2/+3
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 <[email protected]> Acked-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-08-02wilc1000: Move wilc1000 SDIO ID's from driver source to common header fileAjay Singh1-4/+2
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 <[email protected]> Acked-by: Ulf Hansson <[email protected]> Acked-by: Pali Rohár <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-06-26wilc1000: move wilc driver out of stagingAjay Singh1-0/+1023
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/[email protected]/ [2]. https://lore.kernel.org/linux-wireless/[email protected]/ Signed-off-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]>