aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/microchip/wilc1000/wlan_cfg.c
Commit message (Collapse)AuthorAgeFilesLines
* wifi: wilc1000: avoid buffer overflow in WID string configuration[email protected]2025-09-031-10/+27
| | | | | | | | | | | | | | | | | | | | Fix the following copy overflow warning identified by Smatch checker. drivers/net/wireless/microchip/wilc1000/wlan_cfg.c:184 wilc_wlan_parse_response_frame() error: '__memcpy()' 'cfg->s[i]->str' copy overflow (512 vs 65537) This patch introduces size check before accessing the memory buffer. The checks are base on the WID type of received data from the firmware. For WID string configuration, the size limit is determined by individual element size in 'struct wilc_cfg_str_vals' that is maintained in 'len' field of 'struct wilc_cfg_str'. Reported-by: Dan Carpenter <[email protected]> Closes: https://lore.kernel.org/linux-wireless/[email protected] Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Ajay Singh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
* wifi: wilc1000: get correct length of string WID from received config packetAjay Singh2022-07-271-2/+3
| | | | | | | | | For string type WID packet, the data length is received as 16-bit value so use 'get_unaligned_le16' conversion API to extract the correct length. Signed-off-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* wifi: wilc1000: add WID_TX_POWER WID in g_cfg_byte arrayAjay Singh2022-07-271-0/+1
| | | | | | | | | | WID_TX_POWER WID value is fetched from the firmware so it should be added in'g_cfg_byte' array to store the data which is received from firmware. Signed-off-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* wilc1000: add new WID to pass wake_enable information to firmwareAjay Singh2021-09-211-0/+1
| | | | | | | | | | | 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 <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
* wilc1000: move wilc driver out of stagingAjay Singh2020-06-261-0/+413
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]>