- 25 Jan, 2022 40 commits
-
-
Marcelo Aloisio da Silva authored
Remove unnecessary braces reported by checkpatch.pl in rtw_xmit.c. Signed-off-by: Marcelo Aloisio da Silva <marcelo.as@aol.com> Link: https://lore.kernel.org/r/20220119034933.GA29744@snoopySigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the rtw_netif_stop_queue wrapper function. Call netif_tx_stop_all_queues directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-11-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the rtw_netif_start_queue wrapper function. Call netif_tx_start_all_queues directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the rtw_netif_wake_queue wrapper function. Call netif_tx_wake_all_queues directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The _set_timer wrapper function takes a timeout in milliseconds. Call msecs_to_jiffies to convert the timeout to jiffies. Don't do the calculation ourselves. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the _cancel_timer wrapper function and call del_timer_sync directly. None of the callers needs the bcancelled variable that's populated by _cancel_timer, these variables can be removed in the calling functions. rtw_surveydone_event_callback calls _cancel_timer only if it believes that the timer is currently running. We can drop this. It's safe to call del_timer_sync when the timer is not running. The timer in question, scan_to_timer, is used only for the site survey command (the rtw_survey functions) so we won't be stopping it while it's in use by someone else. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the rtw_list_delete wrapper function. Call list_del_init directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
PATH_LENGTH_MAX in osdep_service.h is not used and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The bitshift function from osdep_service.h is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove some unused macros from osdep_service.h. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove a group of external variables which are not used in osdep_service.h or in the files where osdep_service.h is included. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220115165536.231210-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_sta_mgt.c to use pr_debug, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. These calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-8-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_mlme_ext.c to use pr_debug or netdev_dbg appropriately, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove some commented out or unnecessary DBG_88E calls altogether. Some calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-7-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_ioctl_set.c to use netdev_dbg, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove one unnecessary DBG_88E call which was already commented out. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-6-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_mlme.c to use netdev_dbg, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove some unnecessary DBG_88E calls altogether as all they do is print the function name. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-5-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_iol.c to use pr_debug or netdev_dbg appropriately, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Some calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-4-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_xmit.c to use pr_debug or netdev_dbg appropriately, as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. Also remove some commented out DBG_88E calls altogether. Some calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-3-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
Convert the DBG_88E macro calls in core/rtw_ieee80211.c to use pr_debug as their information may be useful to observers, and this gets the driver closer to the point of being able to remove DBG_88E itself. These calls are at points in the call chain where use of dev_dbg or netdev_dbg isn't possible due to lack of device pointer, so plain pr_debug is appropriate here. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220110090020.6800-2-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jagath Jog J authored
Fix following checkpatch.pl warning by inserting blank line WARNING: Missing a blank line after declarations Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com> Link: https://lore.kernel.org/r/20220124034456.8665-4-jagathjog1996@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jagath Jog J authored
Fix following checkpatch.pl warning by placing single space between datatype and variable WARNING: please, no space before tabs Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com> Link: https://lore.kernel.org/r/20220124034456.8665-3-jagathjog1996@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jagath Jog J authored
Fix following checkpatch.pl error by placing opening { braces in previous line ERROR: that open brace { should be on the previous line Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com> Link: https://lore.kernel.org/r/20220124034456.8665-2-jagathjog1996@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gaston Gonzalez authored
Remove own module name definition and use KBUILD_MODNAME instead, which is the standard way of getting the module name. While at it, one realignment was made to improve readability. Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20220107234620.49900-3-gascoar@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gaston Gonzalez authored
MODULE_VERSION() is useless for in-tree drivers given that only the kernel version matters. Hence, remove it. While at it, one realignment was made to improve readability. Suggested by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Link: https://lore.kernel.org/r/20220107234620.49900-2-gascoar@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kees Cook authored
As done for rtl8723bs and r8188eu, drop get_recvframe_data(), as it introduces an impossible value (NULL) for the compiler to check code paths against which could result in nonsensical warnings. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Cc: Ivan Safonov <insafonov@gmail.com> Cc: linux-staging@lists.linux.dev Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220118193327.2822099-4-keescook@chromium.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kees Cook authored
When building with -Warray-bounds, the following warning is emitted: In file included from ./include/linux/string.h:253, from ./arch/x86/include/asm/page_32.h:22, from ./arch/x86/include/asm/page.h:14, from ./arch/x86/include/asm/thread_info.h:12, from ./include/linux/thread_info.h:60, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:78, from ./include/linux/rcupdate.h:27, from ./include/linux/rculist.h:11, from ./include/linux/sched/signal.h:5, from ./drivers/staging/rtl8723bs/include/drv_types.h:17, from drivers/staging/rtl8723bs/core/rtw_recv.c:7: In function 'memcpy', inlined from 'wlanhdr_to_ethhdr' at drivers/staging/rtl8723bs/core/rtw_recv.c:1554:2: ./include/linux/fortify-string.h:41:33: warning: '__builtin_memcpy' offset [0, 5] is out of the bounds [0, 0] [-Warray-bounds] 41 | #define __underlying_memcpy __builtin_memcpy | ^ This is because the compiler sees it is possible for "ptr" to be a NULL value, and concludes that it has zero size and attempts to copy to it would overflow. Instead, remove the get_recvframe_data() entirely, as it's not possible for this to ever be NULL. Additionally add missing NULL checks after recvframe_pull() (which are present in the rtl8712 driver). Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Phillip Potter <phil@philpotter.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Michael Straube <straube.linux@gmail.com> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: linux-staging@lists.linux.dev Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220118193327.2822099-3-keescook@chromium.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kees Cook authored
When building with -Warray-bounds, the following warning is emitted: In file included from ./include/linux/string.h:253, from ./arch/x86/include/asm/page_32.h:22, from ./arch/x86/include/asm/page.h:14, from ./arch/x86/include/asm/thread_info.h:12, from ./include/linux/thread_info.h:60, from ./arch/x86/include/asm/preempt.h:7, from ./include/linux/preempt.h:78, from ./include/linux/rcupdate.h:27, from ./include/linux/rculist.h:11, from ./include/linux/sched/signal.h:5, from ./drivers/staging/rtl8723bs/include/drv_types.h:17, from drivers/staging/rtl8723bs/core/rtw_recv.c:7: In function 'memcpy', inlined from 'wlanhdr_to_ethhdr' at drivers/staging/rtl8723bs/core/rtw_recv.c:1554:2: ./include/linux/fortify-string.h:41:33: warning: '__builtin_memcpy' offset [0, 5] is out of the bounds [0, 0] [-Warray-bounds] 41 | #define __underlying_memcpy __builtin_memcpy | ^ This is because the compiler sees it is possible for "ptr" to be a NULL value, and concludes that it has zero size and attempts to copy to it would overflow. Instead, remove the get_recvframe_data() entirely, as it's not possible for this to ever be NULL. Additionally add missing NULL checks after recvframe_pull() (which are present in the rtl8712 driver). Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Phillip Potter <phil@philpotter.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Michael Straube <straube.linux@gmail.com> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: linux-staging@lists.linux.dev Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220118193327.2822099-2-keescook@chromium.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Since the WF200 VID/PID are not reliable, it's recommended to declare it in the DT. Until now, if the device was not declared, the driver just printed a warning and continue. But, the risk of a collision is too high, the driver now returns an error. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-32-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
"config-file" is too broad. Replace it by "silabs,antenna-config-file" which is more explicit. The attribute "config-file" is probably not widely used. This patch obviously breaks setups that use this attribute. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-31-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Values "silabs,wfx-sdio" and "silabs,wfx-spi" are deprecated for a while now. We take advantage of getting out of the staging tree to drop them and start from a blank sheet. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-30-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
There is currently, a mismatch between the location of the firmware in linux-firmware and the path written in the driver. We take this opportunity to relocate the WF200 firmware in wfx/ instead of silabs/. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-29-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
"WF200" only designates the chip. To make a WiFi board, the chip must be associated with an antenna. The antenna configuration is located in separate files (aka PDS files in Silabs wording). Currently, user has to write in his DT something like: compatible = "silabs,wf200"; config = "brd4001a.pds"; It is far better to embed a list of known boards (chip + antenna) in the driver. So the user just have to declare: compatible = "silabs,brd4001a"; This patch add the configurations for the evaluation boards sold by Silabs. To provide a full plug-and-play experience, the associated PDS files[1] will be available in linux-firmware. This patch does not break compatibility with existing setups. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-28-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
ps_timeout should be in nl80211, not in debugfs. Let's remove it until the driver is accepted. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-27-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
It is not necessary to prefix error logs with the function name when an error message is unique in the code. Note this patch still prefixes the message 'received event for non-existent vif' with the function name since it is used several times. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-26-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
It seems that BUILD_BUG_ON_MSG() is a bit more popular. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-25-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Prefer fully named labels to handle errors instead of err0, err1, ... Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-24-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Some structs members were not properly aligned. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-23-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write code on 100 columns. This patch just unify the code to use 100 columns in every comments. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-22-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write code on 100 columns. This patch just unify the code to use 100 columns. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-21-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-20-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jérôme Pouiller authored
All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20220113085524.1110708-19-Jerome.Pouiller@silabs.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-