Commit graph

1136216 commits

Author SHA1 Message Date
Martin Kaiser
ae85931f8f staging: r8188eu: check destination address in OnAction
All subfunctions of OnAction check if the destination address matches the
local interface's address. It's simpler to move this check to OnAction.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-14-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:05 +01:00
Martin Kaiser
9001c5029d staging: r8188eu: rtw_action_public_decache's token is a u8
Both callers of rtw_action_public_decache pass a u8 value for the token
parameter. We can change token from s32 to u8 and remove the code for
token < 0.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-13-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:05 +01:00
Martin Kaiser
8161a83358 staging: r8188eu: remove return value from on_action_public_default
The only caller of on_action_public_default does not check the return
value. We can make it a void function.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-12-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:05 +01:00
Martin Kaiser
a399a3b052 staging: r8188eu: remove return value from on_action_public_vendor
The only caller of on_action_public_vendor does not check the return
value. We can make it a void function.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-11-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:04 +01:00
Martin Kaiser
a05159da5a staging: r8188eu: clean up on_action_public
Use the struct mgmt to read the action_code. This is much simpler than
parsing the message ourselves.

Add a comment about reading the action code. All members of the action
enum start with an action_code byte. It does not matter which member we
use.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:04 +01:00
Martin Kaiser
fc47cb05cf staging: r8188eu: replace GetAddr1Ptr call in OnAction_p2p
Define a struct ieee80211_mgmt in OnAction_p2p and use it to check the
destination address. This replaces a call to the driver-specific
GetAddr1Ptr function.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:04 +01:00
Martin Kaiser
e246bf42ef staging: r8188eu: replace switch-case with if
OnAction_p2p has a switch-case statement where only a single case is
handled. Use if instead, this makes the code shorter and easier to read.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:04 +01:00
Martin Kaiser
b31b29788f staging: r8188eu: remove category check in OnAction_p2p
The caller of OnAction_p2p has already checked the action category. We can
remove the check in OnAction_p2p.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:03 +01:00
Martin Kaiser
aa415931f9 staging: r8188eu: make OnAction_p2p static void
OnAction_p2p is called only by OnAction, its return value is not checked.
We can make it a static void function.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:03 +01:00
Martin Kaiser
b22b8618ab staging: r8188eu: make OnAction_back static void
OnAction_back is called only by OnAction, its return value is not checked.
We can make it a static void function.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:03 +01:00
Martin Kaiser
721d7f496a staging: r8188eu: make on_action_public static void
The on_action_public function is called only by OnAction. This function
also lives in rtw_mlme_ext.c and does not check the return value from
on_action_public.

We can make on_action_public a static void function.

The ret variable is no longer needed if we don't return a value. It can
be removed.

Reported-by: kernel test robot <lkp@intel.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:02 +01:00
Martin Kaiser
5998e31922 staging: r8188eu: remove duplicate category check
The caller of on_action_public has already checked the action category. We
can remove the check in on_action_public.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:02 +01:00
Martin Kaiser
5c4fb46e91 staging: r8188eu: replace a GetAddr1Ptr call
Define a struct ieee80211_mgmt and use it to read the destination address.

This replaces one call to the driver-specific GetAddr1Ptr function, which
should eventually be removed.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:09:02 +01:00
Nam Cao
336ccc31cd staging: rtl8712: fix potential memory leak
In r8712_init_drv_sw(), whenever any function call returns error, it is
returned immediately without properly cleaning up the other successfully
executed functions. This can cause memory leak.

Instead of return immediately, free all the allocated buffers first.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/0a3414b12031f6cdcba81a8725e91eb9567ff34f.1666688642.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:08:30 +01:00
Nam Cao
242443430d staging: rtl8712: check for return value of _r8712_init_xmit_priv()
The return value of _r8712_init_xmit_priv() is never checked and the driver
always continue execution as if all is well. This will cause problems
if, for example, buffers cannot be allocated and the driver continue and
use those buffers.

Check for return value of _r8712_init_xmit_priv() and return error (if any)
during probing.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/b550803561acf26af71f2377215c28b94435a644.1666688642.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:08:30 +01:00
Nam Cao
63b5e50571 staging: rtl8712: check for alloc fail in _r8712_init_recv_priv()
The function _r8712_init_recv_priv() and also r8712_init_recv_priv()
just returns silently if they fail to allocate memory. Change their
return type to int and add necessary checks and handling if they return
-ENOMEM

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/506ac35a667e511db568b06b86834fd0ceeba453.1666688642.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:08:30 +01:00
Nam Cao
c5a7eecdcd Revert "staging: r8712u: Tracking kmemleak false positives."
This reverts commit 5d3da4a20a.

This commit annotated false positive for kmemleak. The reasoning is that
the buffers are freed when the driver is unloaded. However, there is
actually potential memory leak when probe fails.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Nam Cao <namcaov@gmail.com>
Link: https://lore.kernel.org/r/26ce206b2c40c7db48c146aa6105789db9dfcc1a.1666688642.git.namcaov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:08:30 +01:00
Martin Kaiser
dbc97f832a staging: r8188eu: remove get_da
Replace the last get_da call with ieee80211_get_DA and remove the get_da
function.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221029171011.1572091-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:36 +01:00
Martin Kaiser
1a048cde49 staging: r8188eu: replace get_da with ieee80211_get_DA
Replace a call to the driver-specific get_da function with
ieee80211_get_DA from ieee80211.h.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221029171011.1572091-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:36 +01:00
Aaron Lawrence
1838742b1d staging: rtl8192e: rtllib_crypt_tkip: rewritten comparison to NULL
Rewritten a comparison to NULL with a negation operator in
accordance with the Linux kernel coding-style regulations. The fix
was directly recommended by the checkpatch script.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/ca33296630627020694f4b653580f689a8a3d1c7.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:20 +01:00
Aaron Lawrence
1f610736f7 staging: rtl8192e: rtllib_crypt_tkip: split multiple assignments
Split a multiple assignments statement to individual assignments
on different lines in accordance with the Linux kernel coding-style
regulations. Also repositioned comments on it and the statement
before for increased legibility. The multiple assignments issue
was found by the checkpatch script, with the comments legibility
issue were through direct observation.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/a9ab257d0042afd3b3231eefe4f58c0c3ac7649f.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:20 +01:00
Aaron Lawrence
8d1dcc729a staging: rtl8192e: rtllib_crypt_tkip: fixes on unbalanced braces
Added braces around needed arms of statements which needs them
in accordance with the Linux kernel coding-style regulations.
The issues were found with the help of the checkpatch script.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/641d8360c5f86b54efc96d7f8ef70be1371db480.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:20 +01:00
Aaron Lawrence
dcbdcfca13 staging: rtl8192e: rtllib_crypt_tkip: fixed alignment matching open parentheses
Aligned multiple lines to be at the same indentation of open
parentheses before it in accordance with the Linux kernel
coding-style regulations. The issues were found by running the
checkpatch script on the file.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/4253b94d6b7d94713afb02fa63d0a98686e77cc1.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:19 +01:00
Aaron Lawrence
6360fc2233 staging: rtl8192e: rtllib_crypt_tkip: blank line before close brace removal
Removed multiple blank lines that are not necessary before a closing
brace. The issues were found with the checkpatch script and were
dealt with in accordance with the Linux kernel coding-style guidelines.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/1ba11754f1b1e39b1525a837b8493ba8434d5e3b.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:19 +01:00
Aaron Lawrence
130d7c4810 staging: rtl8192e: rtllib_crypt_tkip: multiple blank lines removal
Removed multiple unnecessary blank lines in accordance with the
Linux kernel coding-style regulations. The issues were reported by
the checkpatch script.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/f2103758c23f37b61fcbe14f8ed0da8d6b31f5c6.1666787061.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:07:19 +01:00
Yogesh Hegde
607732b42c staging: rtl8192e: Rename variables rateIndex and rateBitmap to avoid CamelCase
Rename variables
* rateIndex to rate_index
* rateBitmap to rate_bitmap
to avoid CamelCase which is not accepted by checkpatch.pl .

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
Link: https://lore.kernel.org/r/20221030133204.GA416592@zephyrus
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:06:11 +01:00
Aaron Lawrence
f369953d9c staging: rtl8192e: rtllib_module: remove unnecessary parentheses
This patch is intended to remove unnecessary parentheses in the
rtllib_module.c file following the Linux kernel coding-style
regulations. The modification is recommended by the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/20221027135627.vzc3woeuhrivozqz@plymouth
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:05:53 +01:00
Kang Minchul
95571b8db7 staging: r8188eu: make rtw_sta_flush to void
Make function rtw_sta_flush to void in order to
prevent cocci warning as follows:

  Unneeded variable: "ret". Return "0" on line 1031

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20221025170621.271903-5-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:05:18 +01:00
Kang Minchul
0a7bf6a948 staging: r8188eu: remove unnecessary variable in rtl8188eu_xmit
Return 0 directly instead of storing it in a variable.
This can prevent cocci warning as follows:

  Unneeded variable: "pull". Return "0" on line 298

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20221025170621.271903-4-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:05:17 +01:00
Kang Minchul
f67469fe65 staging: r8188eu: remove unnecessary vaiable in rtw_recv
Return _SUCCESS directly instead of storing it in a variable.
This can prevent cocci warning as follows:

  Unneeded variable: "ret". Return "_SUCCESS" on line 1516

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20221025170621.271903-3-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:05:17 +01:00
Kang Minchul
cbcab58a7c staging: r8188eu: remove unnecessary variable in ioctl_linux
Returning value 0 directly instead of storing it in variable ret.
This commit can prevent cocci warning as follows:

  Unneeded variable: "ret". Return "0" on line 3030

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20221025170621.271903-2-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:05:17 +01:00
Michael Straube
737143dc87 staging: r8188eu: use min() instead of ternary operator
Replace a ternary operator usage with the min() macro to improve
readability.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20221030081020.8533-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:04:22 +01:00
Emily Peri
2fe5dc3dcc staging: rtl8723bs: replace ternary statement with min_t macro
Ternary statements that pick the min of two values can be replaced by
the macro min_t(). This improves readability, since its quicker to
understand min_t(type, x, y) than x < y ? x : y. Issue found by
coccicheck.

Signed-off-by: Emily Peri <eperi1024@gmail.com>
Link: https://lore.kernel.org/r/Y1wh1zYMAbbKSrGB@marshmallow
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-31 09:04:18 +01:00
Michael Straube
8cd7565230 staging: r8188eu: remove unused macros from wifi.h
There are some unused macros in wifi.h. Remove them.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20221025152722.14926-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:26:39 +02:00
Aaron Lawrence
5f803b22bd staging: rtl8192e: rtllib_crypt_wep: multiple blank lines removal
Removal of multiple unnecessary blank lines in accordance with the
Linux kernel coding-style regulations. Said issues ware detected on
this file by the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Link: https://lore.kernel.org/r/20221025104402.xvbfobi7sdnwlqs2@plymouth
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:25:36 +02:00
Emily Peri
6e006508f6 staging: rtl8723bs: Fix indentation in conditional statements
Remove/add tabs in block statements in rtl8723bs/core to fix checkpatch
warnings for suspect code indent for conditionals.

Signed-off-by: Emily Peri <eperi1024@gmail.com>
Link: https://lore.kernel.org/r/Y1cH7br3mMcT4Dm5@marshmallow
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:25:21 +02:00
Aaron Lawrence
438b4ade12 Staging: rtl8192e: rtllib_tx: removed unnecessary blank line before a close brace
Removed a blank line before a closing brace as it is not necessary
as per the Linux coding-style regulations. The issue was flagged by
the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/234a3e8d21080ae2a1f75127a5c1a0ed131db924.1666612946.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:23:35 +02:00
Aaron Lawrence
73fb5660fc Staging: rtl8192e: rtllib_tx: fixed lines ending with an open parenthesis
Fixed several lines that end with an open parenthesis to not end
with it anymore, as per the Linux kernel coding-style regulations.
The issues were flagged by the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a8e67d281b4e9ab1254e0b58294f566994ac7d9d.1666612946.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:23:35 +02:00
Aaron Lawrence
5b773c5504 Staging: rtl8192e: rtllib_tx: added spaces around operators
Added multiple spaces around operators which needs it as per the
Linux kernel coding-style regulations. The issues were flagged by
the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b8bf422436ff4b2d9b530c61ebf814582ab8836a.1666612946.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:23:35 +02:00
Aaron Lawrence
2de698578f Staging: rtl8192e: rtllib_tx: fixed alignment matching open parenthesis
Aligned multiple statements to match the open parenthesis on the
line before it as per the Linux kernel coding-style regulations.
The issues were flagged by the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b9a984cf481018a8ef61e4a579cb307eaf1bdc56.1666612946.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:23:35 +02:00
Aaron Lawrence
db213ea614 Staging: rtl8192e: rtllib_tx: fixed multiple blank lines
Multiple blank lines are condensed into a single blank line as per
the Linux kernel coding-style regulations. The issues were flagged
by the checkpatch script.

Signed-off-by: Aaron Lawrence <t4rmin@zohomail.com>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/a3e044ff9e5b198af15ebc8b91fd048743881340.1666612946.git.t4rmin@zohomail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:23:35 +02:00
Martin Kaiser
5229004f80 staging: r8188eu: bCardDisableWOHSM is write-only
bCardDisableWOHSM in struct adapter is only written but never read.
It can be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221023170808.46233-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:22:52 +02:00
Martin Kaiser
e329c18341 staging: r8188eu: remove wait_ack param from _issue_probereq_p2p
The only caller of _issue_probereq_p2p sets wait_ack = false. Remove the
wait_ack parameter and the code that would run only if wait_ack == true.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221023170808.46233-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:22:52 +02:00
Martin Kaiser
9e9e26190e staging: r8188eu: NetworkTypeInUse is not in use
NetworkTypeInUse from struct wlan_bssid_ex is not used. Remove
NetworkTypeInUse itself, the code to set it and the enum for its
possible values.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221023170808.46233-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:22:51 +02:00
Martin Kaiser
2ce164e9b3 staging: r8188eu: don't set pcmd_obj components to 0
pcmd_obj was allocated with kzalloc, its memory is filled with 0s.
There's no need to set rsp and rspsz to NULL or 0 again.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221023170808.46233-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:22:51 +02:00
Martin Kaiser
ec6d910164 staging: r8188eu: use standard multicast addr check
Use is_multicast_ether_addr to check for a multicast address instead of
reimplementing this check in the driver.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221023170808.46233-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:22:51 +02:00
Martin Kaiser
8d5c6a1df1 staging: r8188eu: go2asoc is not needed
Remove the go2asoc variable in OnAuthClient and call start_clnt_assoc
directly. This makes the code a tiny bit shorter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221024081417.66441-18-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:19:39 +02:00
Martin Kaiser
d667d36d68 staging: r8188eu: remove an else branch
If we go into this else branch, go2asoc is 0. We can continue to the end
of the function. The final if condition will be false.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221024081417.66441-17-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:19:39 +02:00
Martin Kaiser
cb2cff04d0 staging: r8188eu: remove unnecessary return
Remove a return statement at the end of a function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221024081417.66441-16-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:19:39 +02:00
Martin Kaiser
3cf90ead51 staging: r8188eu: remove unnecessary else branch
Remove an else branch in OnAuthClient that is not needed.

If we go into the else branch, go2asoc is 0. We can simply continue and
the last if condition will be false.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221024081417.66441-15-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-25 19:19:39 +02:00