- 22 Apr, 2022 2 commits
-
-
Artur Bujdoso authored
Clean up unreferenced definitions in hal headers and code. Signed-off-by:
Artur Bujdoso <artur.bujdoso@gmail.com> Link: https://lore.kernel.org/r/YmD/I19v8sJLrOQo@cruxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Currently, these three get_key functions return -1 when the provided len value is less a specific key length value, which can result in buffer overflow depending on how the returned value is used. These functions are used in three places in ieee80211/ieee80211_wx.c: ieee80211_wx_get_encode() : The behavior of this function will be unchanged. ieee80211_wx_get_encode_ext() : The result of the get_key function is written to ext->key_len, resulting in a buffer overflow if the result is negative. ieee80211_wx_set_encode() : The behavior of this function will change. When len is less than the key length value, it will set a default key of all 0. Suggested-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/Yl/7QPKXer7YtXOs@bertieSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 20 Apr, 2022 33 commits
-
-
Solomon Tan authored
This patch addresses the checkpatch.pl flag that there should not be a space after a cast. Signed-off-by:
Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220419124318.8028-1-wjsota@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Duoming Zhou authored
There is a deadlock in rtllib_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | rtllib_send_beacon() rtllib_beacons_stop() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | rtllib_send_beacon_cb() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold ieee->beacon_lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need ieee->beacon_lock in position (2) of thread 2. As a result, rtllib_beacons_stop() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_irqsave(), which could let timer handler to obtain the needed lock. Signed-off-by:
Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220417141641.124388-1-duoming@zju.edu.cnSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Duoming Zhou authored
There is a deadlock in ieee80211_beacons_stop(), which is shown below: (Thread 1) | (Thread 2) | ieee80211_send_beacon() ieee80211_beacons_stop() | mod_timer() spin_lock_irqsave() //(1) | (wait a time) ... | ieee80211_send_beacon_cb() del_timer_sync() | spin_lock_irqsave() //(2) (wait timer to stop) | ... We hold ieee->beacon_lock in position (1) of thread 1 and use del_timer_sync() to wait timer to stop, but timer handler also need ieee->beacon_lock in position (2) of thread 2. As a result, ieee80211_beacons_stop() will block forever. This patch extracts del_timer_sync() from the protection of spin_lock_irqsave(), which could let timer handler to obtain the needed lock. Signed-off-by:
Duoming Zhou <duoming@zju.edu.cn> Link: https://lore.kernel.org/r/20220417135407.109536-1-duoming@zju.edu.cnSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rebecca Mckeever authored
Add " == 0" to the condition in both else if branches to address a possible bug. strcmp returns 0 when its arguments are equal, which evaluates to false, often leading to errors when used in if statements. Currently, the statement in the first else if branch does not execute when its arguments are equal, but it does execute when crypt->ops->name equals any string other than "WEP" or "TKIP". Similarly, the second else if branch does not execute when its arguments are equal, and it only executes when crypt->ops->name equals "TKIP". The else branch never executes. It is unlikely that this is working as intended. Reviewed-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Rebecca Mckeever <remckee0@gmail.com> Link: https://lore.kernel.org/r/20220416102434.97567-1-remckee0@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
Variable negative is being assigned a value that is never read, it is being re-assigned later. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/staging/iio/resolver/ad2s1210.c:502:3: warning: Value stored to 'negative' is never read [deadcode.DeadStores] Signed-off-by:
Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220418134603.81336-1-colin.i.king@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Replace macro VNSvInPortB with ioread8. Avoid cast of the return value is possible with one exception. The name of macro and the arguments use CamelCase which is not accepted by checkpatch.pl Since there are more than one checkpatch issue per line, more steps are rquired to fix. Signed-off-by:
Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/fd71797d9d55d53f95c5c4e2df826bf85dd4626a.1650094595.git.philipp.g.hortmann@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Replace macro MACvGPIOIn with VNSvInPortB. Next patch will replace all macros VNSvInPortB with ioread8. The names of macros and the arguments use CamelCase which is not accepted by checkpatch.pl Since there are more than one checkpatch issue per line, more steps are rquired to fix. Signed-off-by:
Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/0a3c3eb0d4dad544fa281b34c5a70d4a3ab2d9f1.1650094595.git.philipp.g.hortmann@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Solomon Tan authored
This patch gets rid of the following error from checkpatch.pl: WARNING: Unnecessary typecast of c90 int constant. Signed-off-by:
Solomon Tan <solomonbstoner@protonmail.ch> Link: https://lore.kernel.org/r/YlxGTMBsLqdOIrpC@ArchDesktopSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Soumya Negi authored
Adhere to linux coding style. Reported by checkpatch: CHECK: Please use a blank line after function/struct/union/enum declarations Signed-off-by:
Soumya Negi <soumya.negi97@gmail.com> Link: https://lore.kernel.org/r/20220416191745.7079-1-soumya.negi97@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
Relocate the only macro MAKEWORD that is in use and remove file tmacro.h. File needs to be changed anyhow because of use of CamelCase which is not accepted by checkpatch.pl. Reduced code provides a better overview. Signed-off-by:
Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20220416191622.GA11596@matrix-ESPRIMO-P710Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio M. De Francesco authored
The Unisys sub-tree of drivers/staging contains three drivers for the "Unisys Secure Partition" (s-Par(R)): visorhba, visorinput, visornic. They have no maintainers, in fact the only one that is listed in MAINTAINERS has an unreacheable email address. During 2021 and 2022 several patches have been submitted to these drivers but nobody at Unisys cared of reviewing the changes. Probably, also the "sparmaintainer" internal list of unisys.com is not anymore read by interested Unisys' engineers. Therefore, remove the drivers/staging/unisys directory and delete the relevant entries in the MAINTAINERS, Kconfig, Makefile files, then remove also the drivers/visorbus directory which is not anymore needed (it contained the driver for the virtualized bus for the Unisys s-Par firmware). Cc: David Kershner <david.kershner@unisys.com> Cc: <sparmaintainer@unisys.com> Cc: Ken Cox <jkc@redhat.com> Suggested-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20220414103217.32058-1-fmdefrancesco@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The structures rtw_ieee80211_hdr rtw_ieee80211_hdr_3addr rtw_ieee80211_hdr_3addr_qos in drivers/staging/r8188eu/include/ieee80211.h just duplicate the in-kernel structures from include/linux/ieee80211.h. ieee80211_hdr ieee80211_hdr_3addr ieee80211_qos_hdr Remove the rtw_ prefixed structures and use the in-kernel versions. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220418180916.11311-1-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ivan Safonov authored
Driver allocates eighth urbs per xmit_buf, but uses only first urb. Allocation of seven remaining urbs wastes memory for nothing. Reviewed-by:
Pavel Skripkin <paskripkin@gmail.com> Signed-off-by:
Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20220417163608.42917-1-insafonov@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Use ARRAY_SIZE instead of hard-coding the number of entries in the mlme_sta_tbl array. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220417102221.466524-7-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Replace the DoReserved function pointer with NULL in mlme_sta_tbl. We can skip the function call for reserved subtypes. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220417102221.466524-6-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
mlme_sta_tbl is an array of struct mlme_handler. mlme_handler's num and str components are not used. The code in mgt_dispatcher uses the subtype number of the incoming frame to select the array entry for compiling the repsonse. We can remove struct mlme_handler and make mlme_sta_tbl an array of function pointers. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220417102221.466524-5-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The index calculation in mgt_dispatcher does not use the frame type. The 4-bit right shift ignores protocol version and frame type. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220417102221.466524-4-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The driver's local GetFrameSubType macro returns both frame type and subtype. Use the ieee80211 framework to extract the two fields. This shows more clearly that both type and subtype are read. Convert everything to host endianness before we use bit operations. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220417102221.466524-3-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Check only once in mgt_dispatcher that the receiver address is the local address or the broadcast address. The second identical check can be removed. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220417102221.466524-2-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mahak Gupta authored
reported by checkpatch: Comparisons should place the constant on the right side of the test. Fix these warnings. Signed-off-by:
Mahak Gupta <mahak_g@cs.iitr.ac.in> Link: https://lore.kernel.org/r/20220414230757.19348-1-mahak_g@cs.iitr.ac.inSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
We should access the fields of fwhdr only if the check for firmware header existence is true. Move the affected code into the if block that checks firmware header existence. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-9-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use pr_info_once() instead of a static variable and an if statement to log the firmware version only once. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-8-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The local variables fw_version, fw_subversion, fw_signature in rtl8188e_firmware_download() are only used in one place. Use the assigned values directly and remove the variables to make the code shorter and cleaner. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-7-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use sizeof() instead of hardcoding the firmware header size and add a compile time check to ensure struct rt_firmware_hdr has the correct size. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-6-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Rename the fields of struct rt_firmware_hdr to avoid camel case. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-5-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unnecessary comments from struct rt_firmware_hdr. While at it align the in-line comments. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-4-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Convert the u32 fields of struct rt_firmware_hdr to __le32 for consistency. Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-3-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The size of struct rt_firmware_hdr is 36 bytes. $ pahole -C rt_firmware_hdr drivers/staging/r8188eu/r8188eu.o struct rt_firmware_hdr { __le16 Signature; /* 0 2 */ u8 Category; /* 2 1 */ u8 Function; /* 3 1 */ __le16 Version; /* 4 2 */ u8 Subversion; /* 6 1 */ /* XXX 1 byte hole, try to pack */ u16 Rsvd1; /* 8 2 */ u8 Month; /* 10 1 */ u8 Date; /* 11 1 */ u8 Hour; /* 12 1 */ u8 Minute; /* 13 1 */ __le16 RamCodeSize; /* 14 2 */ u8 Foundry; /* 16 1 */ u8 Rsvd2; /* 17 1 */ /* XXX 2 bytes hole, try to pack */ __le32 SvnIdx; /* 20 4 */ u32 Rsvd3; /* 24 4 */ u32 Rsvd4; /* 28 4 */ u32 Rsvd5; /* 32 4 */ /* size: 36, cachelines: 1, members: 17 */ /* sum members: 33, holes: 2, sum holes: 3 */ /* last cacheline: 36 bytes */ }; But the header in the firmware file is only 32 bytes long. The hexdump of rtl8188eufw.bin shows that the field Rsvd1 should be u8 instead of __le16. OFFSET rtl8188eufw.bin ----------------------------------------------------------- 0x00000000 E1 88 10 00 0B 00 01 00 01 21 11 27 30 36 00 00 0x00000010 2D 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x00000000 E1 88 10 00 0B 00 01 00 01 21 11 27 30 36 00 00 ^ ^ ^ ^ ^ ^ Subversion Rsvd1 Month Date Hour Minute With the change of field Rsvd1 from __le16 to u8 the structure has the correct size 32. $ pahole -C rt_firmware_hdr drivers/staging/r8188eu/r8188eu.o struct rt_firmware_hdr { __le16 Signature; /* 0 2 */ u8 Category; /* 2 1 */ u8 Function; /* 3 1 */ __le16 Version; /* 4 2 */ u8 Subversion; /* 6 1 */ u8 Rsvd1; /* 7 1 */ u8 Month; /* 8 1 */ u8 Date; /* 9 1 */ u8 Hour; /* 10 1 */ u8 Minute; /* 11 1 */ __le16 RamCodeSize; /* 12 2 */ u8 Foundry; /* 14 1 */ u8 Rsvd2; /* 15 1 */ __le32 SvnIdx; /* 16 4 */ u32 Rsvd3; /* 20 4 */ u32 Rsvd4; /* 24 4 */ u32 Rsvd5; /* 28 4 */ /* size: 32, cachelines: 1, members: 17 */ /* last cacheline: 32 bytes */ The wrong size had no effect because the header size is hardcoded to 32 where it is used in the code and the fields after Subversion are not used. Fixes: 7884fc0a ("staging: r8188eu: introduce new include dir for RTL8188eu driver") Acked-by:
Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220417175441.13830-2-straube.linux@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Adrien Thierry authored
Fix issue reported by checkpatch: CHECK: struct mutex definition without comment FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:64: Signed-off-by:
Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-6-athierry@redhat.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Adrien Thierry authored
Fix issue reported by checkpatch: CHECK: struct mutex definition without comment FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:14: Signed-off-by:
Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-5-athierry@redhat.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Adrien Thierry authored
Fix issue reported by checkpatch: CHECK: No space is necessary after a cast FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:240: Signed-off-by:
Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-4-athierry@redhat.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Adrien Thierry authored
Fix issue reported by checkpatch: CHECK: Lines should not end with a '(' FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:85: Signed-off-by:
Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-3-athierry@redhat.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Adrien Thierry authored
Explain SND_BCM2835 config option in more detail to fix checkpatch warning: WARNING: please write a help paragraph that fully describes the config symbol FILE: drivers/staging/vc04_services/bcm2835-audio/Kconfig:2 Signed-off-by:
Adrien Thierry <athierry@redhat.com> Link: https://lore.kernel.org/r/20220414181622.102049-2-athierry@redhat.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 Apr, 2022 5 commits
-
-
Colin Ian King authored
Don't populate the read-only array EWC11NHTCap on the stack but instead make it static const. Also makes the object code a little smaller. Remove comment. Signed-off-by:
Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220414103650.297396-1-colin.i.king@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aliya Rahmani authored
Added tabs for indent to fix the checkpatch error. Signed-off-by:
Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220413204648.60358-1-aliyarahmani786@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aliya Rahmani authored
Remove redundant parentheses reported by checkpatch. Signed-off-by:
Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220413182303.34807-1-aliyarahmani786@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Aliya Rahmani authored
Remove the unnecessary space immediately after a cast. Identified by checkpatch: CHECK: No space is necessary after a cast. Signed-off-by:
Aliya Rahmani <aliyarahmani786@gmail.com> Link: https://lore.kernel.org/r/20220413113531.31224-1-aliyarahmani786@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
pkg_newalloc in struct recv_buf is not used. Remove it. Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220413200742.276806-5-martin@kaiser.cxSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-