- 22 Apr, 2022 15 commits
-
-
Solomon Tan authored
Use the in-kernel structure and flags instead of defining a separate one. The rtw_ieee80211_channel structure and flags can be replaced by the ieee80211_channel defined in include/net/cfg80211.h since the flags serve the same purpose and the ieee80211_channel struct includes the elements used in the rtw_ieee80211_channel struct. Signed-off-by: Solomon Tan <wjsota@gmail.com> Link: https://lore.kernel.org/r/20220421235237.4218-1-wjsota@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Correct misspellings in the comments. Issue found with checkpatch. Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/56b25e4394396823d52f1fe1b312c5a307aea0fc.1650568579.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Use tabs instead of spaces. Issue found with checkpatch. WARNING: suspect code indent for conditional statements Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/fd4a66013be081bc5adb491c6dc7774362d1ac82.1650568579.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Author comments "Added by Albert" and "Added by Annie" are sprinkled through the file. These comments are not useful and can be removed. Suggested-by: Alison Schofield <alison.schofield@intel.com> Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/dd22bbe6b018aadec620d1ef8215e19852099f7c.1650568579.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Delete spaces before tabs in the comments. Issue found with checkpatch. WARNING: please, no space before tabs Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/1b1e8cda03ca5d3fdf26c511da76258f7a2ab8d5.1650568579.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jaehee Park authored
Remove braces for single statement block to minimize the number of empty lines, without loss of readability. Issue found with checkpatch. WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Jaehee Park <jhpark1013@gmail.com> Link: https://lore.kernel.org/r/b96ae957e2ddc519e56813a1c56e770168f67a2d.1650568579.git.jhpark1013@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the empty function OnAction_dls and its entry in OnAction_tbl. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220421200805.192083-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the empty function OnAction_qos and its entry in OnAction_tbl. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220421200805.192083-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
One of the entries in OnAction_tbl refers to on_action_spct. This function reads some information but it performs no action. Remove on_action_spct and its entry in OnAction_tbl. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220421200805.192083-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Unlike mlme_sta_tbl, OnAction_tbl is an array of structs. OnAction iterates over the array to find the entry for a specific action category. No action is performed if a category has no entry. We can remove the entries that point to the dummy function DoReserved. These were the last users of DoReserved, the function itself can be removed as well. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220421200805.192083-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the empty OnAtim function. We can set the function pointer in mlme_sta_tbl to NULL if no action is required for this management frame subtype. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220421200449.191983-1-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Haowen Bai authored
The rtllib_rx_assoc_resp() function has a signedness bug because it's a declared as a u16 but it return -ENOMEM. When you look at it more closely it returns a mix of error codes including 0xcafe, -ENOMEM, and a->status which is WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG. This is a mess. Clean it up to just return standard kernel error codes. We can print out the a->status before returning a regular error code. The printks in the caller need to be adjusted as well. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1650529277-7893-1-git-send-email-baihaowen@meizu.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Haowen Bai authored
The region set by the call to memset is immediately overwritten by the subsequent call to memcpy. So we drop redundant memset. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Link: https://lore.kernel.org/r/1650532843-28132-1-git-send-email-baihaowen@meizu.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
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 25 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>
-