#
5ed821a8 |
| 01-Jul-2024 |
Jozef Hopko <jozef.hopko@altana.com> |
wifi: wilc1000: fix ies_len type in connect path
[ Upstream commit 39ab8fff623053a50951b659e5f6b72343d7d78c ]
Commit 205c50306acf ("wifi: wilc1000: fix RCU usage in connect path") made sure that th
wifi: wilc1000: fix ies_len type in connect path
[ Upstream commit 39ab8fff623053a50951b659e5f6b72343d7d78c ]
Commit 205c50306acf ("wifi: wilc1000: fix RCU usage in connect path") made sure that the IEs data was manipulated under the relevant RCU section. Unfortunately, while doing so, the commit brought a faulty implicit cast from int to u8 on the ies_len variable, making the parsing fail to be performed correctly if the IEs block is larger than 255 bytes. This failure can be observed with Access Points appending a lot of IEs TLVs in their beacon frames (reproduced with a Pixel phone acting as an Access Point, which brough 273 bytes of IE data in my testing environment).
Fix IEs parsing by removing this undesired implicit cast.
Fixes: 205c50306acf ("wifi: wilc1000: fix RCU usage in connect path") Signed-off-by: Jozef Hopko <jozef.hopko@altana.com> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://patch.msgid.link/20240701-wilc_fix_ies_data-v1-1-7486cbacf98a@bootlin.com Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
4bfd20d5 |
| 05-Jan-2024 |
Alexis Lothoré <alexis.lothore@bootlin.com> |
wifi: wilc1000: fix RCU usage in connect path
[ Upstream commit 205c50306acf58a335eb19fa84e40140f4fe814f ]
With lockdep enabled, calls to the connect function from cfg802.11 layer lead to the follo
wifi: wilc1000: fix RCU usage in connect path
[ Upstream commit 205c50306acf58a335eb19fa84e40140f4fe814f ]
With lockdep enabled, calls to the connect function from cfg802.11 layer lead to the following warning:
============================= WARNING: suspicious RCU usage 6.7.0-rc1-wt+ #333 Not tainted ----------------------------- drivers/net/wireless/microchip/wilc1000/hif.c:386 suspicious rcu_dereference_check() usage! [...] stack backtrace: CPU: 0 PID: 100 Comm: wpa_supplicant Not tainted 6.7.0-rc1-wt+ #333 Hardware name: Atmel SAMA5 unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x34/0x48 dump_stack_lvl from wilc_parse_join_bss_param+0x7dc/0x7f4 wilc_parse_join_bss_param from connect+0x2c4/0x648 connect from cfg80211_connect+0x30c/0xb74 cfg80211_connect from nl80211_connect+0x860/0xa94 nl80211_connect from genl_rcv_msg+0x3fc/0x59c genl_rcv_msg from netlink_rcv_skb+0xd0/0x1f8 netlink_rcv_skb from genl_rcv+0x2c/0x3c genl_rcv from netlink_unicast+0x3b0/0x550 netlink_unicast from netlink_sendmsg+0x368/0x688 netlink_sendmsg from ____sys_sendmsg+0x190/0x430 ____sys_sendmsg from ___sys_sendmsg+0x110/0x158 ___sys_sendmsg from sys_sendmsg+0xe8/0x150 sys_sendmsg from ret_fast_syscall+0x0/0x1c
This warning is emitted because in the connect path, when trying to parse target BSS parameters, we dereference a RCU pointer whithout being in RCU critical section. Fix RCU dereference usage by moving it to a RCU read critical section. To avoid wrapping the whole wilc_parse_join_bss_param under the critical section, just use the critical section to copy ies data
Fixes: c460495ee072 ("staging: wilc1000: fix incorrent type in initializer") Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105075733.36331-3-alexis.lothore@bootlin.com Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
da5deb0d |
| 05-Jan-2024 |
Alexis Lothoré <alexis.lothore@bootlin.com> |
wifi: wilc1000: fix declarations ordering
[ Upstream commit 535733e90e5d8912ebeccebb05b354a2d06ff459 ]
Reorder parameters declaration in wilc_parse_join_bss_param to enforce reverse christmas tree
wifi: wilc1000: fix declarations ordering
[ Upstream commit 535733e90e5d8912ebeccebb05b354a2d06ff459 ]
Reorder parameters declaration in wilc_parse_join_bss_param to enforce reverse christmas tree
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240105075733.36331-2-alexis.lothore@bootlin.com Stable-dep-of: 205c50306acf ("wifi: wilc1000: fix RCU usage in connect path") Signed-off-by: Sasha Levin <sashal@kernel.org>
show more ...
|
#
9ce4bb09 |
| 21-Apr-2023 |
Amisha Patel <amisha.patel@microchip.com> |
wifi: wilc1000: fix for absent RSN capabilities WFA testcase
Mandatory WFA testcase CT_Security_WPA2Personal_STA_RSNEBoundsVerification-AbsentRSNCap, performs bounds verfication on Beacon and/or Pro
wifi: wilc1000: fix for absent RSN capabilities WFA testcase
Mandatory WFA testcase CT_Security_WPA2Personal_STA_RSNEBoundsVerification-AbsentRSNCap, performs bounds verfication on Beacon and/or Probe response frames. It failed and observed the reason to be absence of cipher suite and AKM suite in RSN information. To fix this, enable the RSN flag before extracting RSN capabilities.
Fixes: cd21d99e595e ("wifi: wilc1000: validate pairwise and authentication suite offsets") Signed-off-by: Amisha Patel <amisha.patel@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20230421181005.4865-1-amisha.patel@microchip.com
show more ...
|
#
292a089d |
| 20-Dec-2022 |
Steven Rostedt (Google) <rostedt@goodmis.org> |
treewide: Convert del_timer*() to timer_shutdown*()
Due to several bugs caused by timers being re-armed after they are shutdown and just before they are freed, a new state of timers was added called
treewide: Convert del_timer*() to timer_shutdown*()
Due to several bugs caused by timers being re-armed after they are shutdown and just before they are freed, a new state of timers was added called "shutdown". After a timer is set to this state, then it can no longer be re-armed.
The following script was run to find all the trivial locations where del_timer() or del_timer_sync() is called in the same function that the object holding the timer is freed. It also ignores any locations where the timer->function is modified between the del_timer*() and the free(), as that is not considered a "trivial" case.
This was created by using a coccinelle script and the following commands:
$ cat timer.cocci @@ expression ptr, slab; identifier timer, rfield; @@ ( - del_timer(&ptr->timer); + timer_shutdown(&ptr->timer); | - del_timer_sync(&ptr->timer); + timer_shutdown_sync(&ptr->timer); ) ... when strict when != ptr->timer ( kfree_rcu(ptr, rfield); | kmem_cache_free(slab, ptr); | kfree(ptr); )
$ spatch timer.cocci . > /tmp/t.patch $ patch -p1 < /tmp/t.patch
Link: https://lore.kernel.org/lkml/20221123201306.823305113@linutronix.de/ Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Acked-by: Pavel Machek <pavel@ucw.cz> [ LED ] Acked-by: Kalle Valo <kvalo@kernel.org> [ wireless ] Acked-by: Paolo Abeni <pabeni@redhat.com> [ networking ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
cd21d99e |
| 23-Nov-2022 |
Phil Turnbull <philipturnbull@github.com> |
wifi: wilc1000: validate pairwise and authentication suite offsets
There is no validation of 'offset' which can trigger an out-of-bounds read when extracting RSN capabilities.
Signed-off-by: Phil T
wifi: wilc1000: validate pairwise and authentication suite offsets
There is no validation of 'offset' which can trigger an out-of-bounds read when extracting RSN capabilities.
Signed-off-by: Phil Turnbull <philipturnbull@github.com> Tested-by: Ajay Kathat <ajay.kathat@microchip.com> Acked-by: Ajay Kathat <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221123153543.8568-2-philipturnbull@github.com
show more ...
|
#
f01272ee |
| 01-Aug-2022 |
Kalle Valo <kvalo@kernel.org> |
wifi: wilc1000: fix spurious inline in wilc_handle_disconnect()
Sparse warns:
drivers/net/wireless/microchip/wilc1000/hif.h:218:35: error: marked inline, but without a definition
Remove the inline
wifi: wilc1000: fix spurious inline in wilc_handle_disconnect()
Sparse warns:
drivers/net/wireless/microchip/wilc1000/hif.h:218:35: error: marked inline, but without a definition
Remove the inline, it's not needed.
Reported-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Acked-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220801110440.13144-1-kvalo@kernel.org
show more ...
|
#
ad3e683a |
| 20-Jul-2022 |
Ajay Singh <ajay.kathat@microchip.com> |
wifi: wilc1000: cancel the connect operation during interface down
Cancel the ongoing connection request to avoid any issue if the interface is set down before the connection request is completed. h
wifi: wilc1000: cancel the connect operation during interface down
Cancel the ongoing connection request to avoid any issue if the interface is set down before the connection request is completed. host_int_handle_disconnect was already available, so renamed it and used the same API for 'ndio_close' cb.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220720160302.231516-6-ajay.kathat@microchip.com
show more ...
|
#
b95eb7f0 |
| 14-Jun-2022 |
Shaul Triebitz <shaul.triebitz@intel.com> |
wifi: cfg80211/mac80211: separate link params from station params
Put the link_station_parameters structure in the station_parameters structure (and remove the station_parameters fields already exis
wifi: cfg80211/mac80211: separate link params from station params
Put the link_station_parameters structure in the station_parameters structure (and remove the station_parameters fields already existing in link_station_parameters). Now, for an MLD station, the default link is added together with the station.
Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
show more ...
|
#
0e703de3 |
| 24-May-2022 |
Ajay Singh <ajay.kathat@microchip.com> |
wifi: wilc1000: add IGTK support
Add support to handle IGTK keys which are required for MFP to FW. Index ID 4 and 5 are used to store the IGTK key.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.
wifi: wilc1000: add IGTK support
Add support to handle IGTK keys which are required for MFP to FW. Index ID 4 and 5 are used to store the IGTK key.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220524120606.9675-4-ajay.kathat@microchip.com
show more ...
|
#
c5b331d4 |
| 24-May-2022 |
Ajay Singh <ajay.kathat@microchip.com> |
wifi: wilc1000: add WPA3 SAE support
Enable SAE authentication for AP and STA mode. In STA mode, allow the driver to pass the auth frames which are received from firmware to userspace application(ho
wifi: wilc1000: add WPA3 SAE support
Enable SAE authentication for AP and STA mode. In STA mode, allow the driver to pass the auth frames which are received from firmware to userspace application(hostapd) so that SAE authentication is offloaded to userspace.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220524120606.9675-3-ajay.kathat@microchip.com
show more ...
|
#
3c76ec88 |
| 24-May-2022 |
Ajay Singh <ajay.kathat@microchip.com> |
wifi: wilc1000: remove WEP security support
Deprecated WEP security for WILC driver as well as in firmware from 15.6 FW release onwards. After WEP security removal, freeup some codespace which helpe
wifi: wilc1000: remove WEP security support
Deprecated WEP security for WILC driver as well as in firmware from 15.6 FW release onwards. After WEP security removal, freeup some codespace which helped to add new features like WPA3 etc.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220524120606.9675-2-ajay.kathat@microchip.com
show more ...
|
#
b530d5f3 |
| 10-Dec-2021 |
David Mosberger-Tang <davidm@egauge.net> |
wilc1000: Improve WILC TX performance when power_save is off
The wakeup and sleep commands need to be sent to the WILC chip only when it is in power save mode (PSM, as controlled by "iw dev wlan0 se
wilc1000: Improve WILC TX performance when power_save is off
The wakeup and sleep commands need to be sent to the WILC chip only when it is in power save mode (PSM, as controlled by "iw dev wlan0 set power_save on/off"). The commands are relatively costly, so it pays to skip them when possible.
iperf3 without this patch (no significant different with PSM on/off): TX 0.00-120.01 sec 140 MBytes 9.82 Mbits/sec RX 0.00-120.69 sec 283 MBytes 19.6 Mbits/sec
with this patch applied:
PSM off (TX is 46% improved, RX slightly improved; may not be significant): TX 0.00-120.00 sec 206 MBytes 14.4 Mbits/sec RX 0.00-120.48 sec 322 MBytes 22.4 Mbits/sec
PSM on (no significant change): TX 0.00-120.00 sec 140 MBytes 9.78 Mbits/sec RX 0.00-120.08 sec 257 MBytes 18.0 Mbits/sec
Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20211210203016.3680425-2-davidm@egauge.net
show more ...
|
#
f92b9f96 |
| 06-Dec-2021 |
David Mosberger-Tang <davidm@egauge.net> |
wilc1000: Fix copy-and-paste typo in wilc_set_mac_address
The messages appears to have been copied from wilc_get_mac_address and says "get" when it should say "set".
Signed-off-by: David Mosberger-
wilc1000: Fix copy-and-paste typo in wilc_set_mac_address
The messages appears to have been copied from wilc_get_mac_address and says "get" when it should say "set".
Signed-off-by: David Mosberger-Tang <davidm@egauge.net> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20211206232709.3192856-2-davidm@egauge.net
show more ...
|
#
0ec5408c |
| 16-Sep-2021 |
Ajay Singh <ajay.kathat@microchip.com> |
wilc1000: add new WID to pass wake_enable information to firmware
Add new WID(WID_WOWLAN_TRIGGER) to send wake_enable information to firmware. In 'set_wakeup' cfg80211_ops callback, the enable infor
wilc1000: add new WID to pass wake_enable information to firmware
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
show more ...
|
#
c8e2036e |
| 16-Sep-2021 |
Ajay Singh <ajay.kathat@microchip.com> |
wilc1000: move 'deinit_lock' lock init/destroy inside module probe
Move initialization & deinitialization of 'deinit_lock' mutex lock inside wlan_init_locks() & wlan_deinit_locks() API's respectivel
wilc1000: move 'deinit_lock' lock init/destroy inside module probe
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
show more ...
|
#
c04fabac |
| 25-Nov-2020 |
Ajay Singh <ajay.kathat@microchip.com> |
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@microch
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
show more ...
|
#
5625f965 |
| 25-Jun-2020 |
Ajay Singh <ajay.kathat@microchip.com> |
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 minima
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>
show more ...
|