Larry Finger
96f0a54e8e
staging: r8188eu: Fix warning of array overflow in ioctl_linux.c
...
Building with -Warray-bounds results in the following warning plus others
related to the same problem:
CC [M] drivers/staging/r8188eu/os_dep/ioctl_linux.o
In function ‘wpa_set_encryption’,
inlined from ‘rtw_wx_set_enc_ext’ at drivers/staging/r8188eu/os_dep/ioctl_linux.c:1868:9:
drivers/staging/r8188eu/os_dep/ioctl_linux.c:412:41: warning: array subscript ‘struct ndis_802_11_wep[0]’ is partly outside array bounds of ‘void[25]’ [-Warray-bounds]
412 | pwep->KeyLength = wep_key_len;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from drivers/staging/r8188eu/os_dep/../include/osdep_service.h:19,
from drivers/staging/r8188eu/os_dep/ioctl_linux.c:4:
In function ‘kmalloc’,
inlined from ‘kzalloc’ at ./include/linux/slab.h:733:9,
inlined from ‘wpa_set_encryption’ at drivers/staging/r8188eu/os_dep/ioctl_linux.c:408:11,
inlined from ‘rtw_wx_set_enc_ext’ at drivers/staging/r8188eu/os_dep/ioctl_linux.c:1868:9:
./include/linux/slab.h:605:16: note: object of size [17, 25] allocated by ‘__kmalloc’
605 | return __kmalloc(size, flags);
| ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/slab.h:600:24: note: object of size [17, 25] allocated by ‘kmem_cache_alloc_trace’
600 | return kmem_cache_alloc_trace(
| ^~~~~~~~~~~~~~~~~~~~~~~
601 | kmalloc_caches[kmalloc_type(flags)][index],
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
602 | flags, size);
| ~~~~~~~~~~~~
Although it is unlikely that anyone is still using WEP encryption, the
size of the allocation needs to be increased just in case.
Fixes commit 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Fixes: 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net >
Cc: Phillip Potter <phil@philpotter.co.uk >
Cc: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20220531013103.2175-3-Larry.Finger@lwfinger.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-06-06 08:10:14 +02:00
Phillip Potter
5b7419ae1d
staging: r8188eu: fix rtw_alloc_hwxmits error detection for now
...
In _rtw_init_xmit_priv, we use the res variable to store the error
return from the newly converted rtw_alloc_hwxmits function. Sadly, the
calling function interprets res using _SUCCESS and _FAIL still, meaning
we change the semantics of the variable, even in the success case.
This leads to the following on boot:
r8188eu 1-2:1.0: _rtw_init_xmit_priv failed
In the long term, we should reverse these semantics, but for now, this
fixes the driver. Also, inside rtw_alloc_hwxmits remove the if blocks,
as HWXMIT_ENTRY is always 4.
Fixes: f94b47c6bd ("staging: r8188eu: add check for kzalloc")
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20220521204741.921-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-06-06 08:09:21 +02:00
Phillip Potter
6a31a95135
staging: r8188eu: remove include/rtw_debug.h
...
Remove include/rtw_debug.h, as all it now has are:
(1) A load of unused preprocessor definitions that expand to BIT(x)
variants.
(2) A preprocessor definition that expands to the name of the driver
and is only used in one place inside a pr_info_once call in
core/rtw_fw.c.
It is now surplus to requirements after fixing up the few places that
include the file.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20220519221047.6940-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-20 01:16:35 +02:00
Denis Efremov
bc10916e89
staging: r8188eu: prevent ->Ssid overflow in rtw_wx_set_scan()
...
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->Ssid[] array.
Fixes: 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Cc: stable <stable@vger.kernel.org >
Signed-off-by: Denis Efremov <denis.e.efremov@oracle.com >
Link: https://lore.kernel.org/r/20220518070052.108287-1-denis.e.efremov@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 19:35:47 +02:00
Dan Carpenter
4d0cc9e0e5
staging: r8188eu: delete rtw_wx_read/write32()
...
These debugging tools let you call:
status = usb_control_msg_recv/send(udev, 0, REALTEK_USB_VENQT_CMD_REQ,
REALTEK_USB_VENQT_READ/WRITE, value,
REALTEK_USB_VENQT_CMD_IDX, io_buf,
size, RTW_USB_CONTROL_MSG_TIMEOUT,
GFP_KERNEL);
with a user controlled "value" in the 0-0xffff range. It's not a valid
API.
Fixes: 2b42bd58b3 ("staging: r8188eu: introduce new os_dep dir for RTL8188eu driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/YoXS4OaD1oauPvmj@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:46:18 +02:00
Soumya Negi
464725a95d
staging: r8188eu: Remove multiple assignments
...
Conform to Linux coding style.
Issue found by checkpatch:-
CHECK: multiple assignments should be avoided
Signed-off-by: Soumya Negi <soumya.negi97@gmail.com >
Link: https://lore.kernel.org/r/20220519095012.5619-1-soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:46:14 +02:00
Jiasheng Jiang
f94b47c6bd
staging: r8188eu: add check for kzalloc
...
As kzalloc() may return null pointer, it should be better to
check the return value and return error if fails in order
to avoid dereference of null pointer.
Moreover, the return value of rtw_alloc_hwxmits() should also
be dealt with.
Fixes: 15865124fe ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn >
Link: https://lore.kernel.org/r/20220518075957.514603-1-jiasheng@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:45:56 +02:00
Vihas Makwana
455d5f02dc
staging: r8188eu: fix warnings in rtw_wlan_util
...
Refactor the code to fix following warnings:
WARNING: Comparisons should place the constant on the right side of the test
CHECK: Comparison to NULL could be written "p"
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220517140626.3716-4-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:44:43 +02:00
Vihas Makwana
43ea920179
staging: r8188eu: fix warnings in rtw_pwrctrl
...
Refactor the code to fix following warnings:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220517140626.3716-3-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:44:43 +02:00
Vihas Makwana
801626f71d
staging: r8188eu: fix warnings in rtw_p2p
...
Refactor the code to fix following warning:
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220517140626.3716-2-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:44:43 +02:00
Phillip Potter
ea32366a8f
staging: r8188eu: remove _drv_ defines from include/rtw_debug.h
...
Remove the following defines:
_drv_always_
_drv_emerg_
_drv_alert_
_drv_crit_
_drv_err_
_drv_warning_
_drv_notice_
_drv_info_
_drv_debug_
from include/rtw_debug.h, as they are no longer used anywhere in the
driver, and are unlikely to be ever again with the removal of the old
debugging/logging code.
Signed-off-by: Phillip Potter <phil@philpotter.co.uk >
Link: https://lore.kernel.org/r/20220516224640.90973-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:43:04 +02:00
Michael Straube
14afedb488
staging: r8188eu: remove HW_VAR_AC_PARAM_BE from SetHwReg8188EU()
...
Remove the HW_VAR_AC_PARAM_BE case from SetHwReg8188EU() and move the
functionality to the place where SetHwReg8188EU() is called. This is
part of the ongoing effort to get rid of the unwanted hal layer.
Signed-off-by: Michael Straube <straube.linux@gmail.com >
Link: https://lore.kernel.org/r/20220516054830.8702-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:33 +02:00
Martin Kaiser
381b6d7b9c
staging: r8188eu: assoc_rsp and assoc_rsp_len are not used
...
The assoc_rsp buffer in struct mlme_priv is not used. There's no need to
store an incoming association response after receiving an processing it.
Remove the buffer pointer and its length from struct mlme_priv.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220515155401.352742-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:23 +02:00
Martin Kaiser
c8bff2118e
staging: r8188eu: last_rx_mgnt_pkts is set but not used
...
last_rx_mgnt_pkts in struct stainfo_stats is set but not used.
Remove it.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220515155401.352742-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:23 +02:00
Martin Kaiser
4f44756e4f
staging: r8188eu: simplify error handling in recv_func_prehandle
...
Simplify the error handling in recv_func_prehandle. There's no need to
goto exit, this would be the next statement anyway.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220515155401.352742-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:23 +02:00
Martin Kaiser
6199160374
staging: r8188eu: remove obsolete comments
...
Remove some comments in HalPwrSeqCmd.c that contain no useful information.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220515155401.352742-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:23 +02:00
Martin Kaiser
c7711f1fa7
staging: r8188eu: use ieee80211 helper to check for beacon
...
Use the ieee80211_is_beacon helper to check if the incoming frame is a
beacon frame.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220515155401.352742-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:23 +02:00
Martin Kaiser
3194f684ac
staging: r8188eu: use defines for addba response status
...
Replace the numeric values with defines from ieee80211.h.
Suggested-by: Joe Perches <joe@perches.com >
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220515152759.335889-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:12 +02:00
Martin Kaiser
fed6328357
staging: r8188eu: use the tid in delba processing
...
Extract the tid from the delba frame regardless of the recipient/initiator
setting. Use the extracted tid when we process the delba frame.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Martin Kaiser
3266866812
staging: r8188eu: check for initiator vs recipient
...
For an incoming delba message, the code checks if the delba was sent by
the data initiator or by the data recipient.
Rewrite this check using the ieee80211 helpers, making the code easier to
understand.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Martin Kaiser
813586def1
staging: r8188eu: use BIT(tid) instead of manual shift
...
Use BIT(tid) instead of 1 << tid when we process an addba response.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Martin Kaiser
9465d2d915
staging: r8188eu: replace if with ternary operator
...
Replace an if statement with a ternary operator, making the code a tiny
bit shorter.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Martin Kaiser
d4170582c8
staging: r8188eu: merge process_addba_req into OnAction_back
...
The process_addba_req function is called only by OnAction_back. Merge the
two functions.
OnAction_back has already checked that psta != NULL, we can drop the check
in process_addba_req before merging the functions. We can also simplify
the parsing of the tid by using struct ieee80211.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Martin Kaiser
cfed805f82
staging: r8188eu: read addba resp tid from ieee80211_mgmt
...
Use the same code as ieee80211_process_addba_resp to calculate the tid
from the capability field of an addba response message.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Martin Kaiser
571cc06877
staging: r8188eu: get addba resp status from ieee80211_mgmt
...
Read the addba response status from struct ieee80211_mgmt instead of
parsing the incoming frame ourselves.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220514164740.282552-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:56 +02:00
Soumya Negi
1ebea42316
staging: r8188eu: Fix block comment format
...
Adhere to Linux coding style. Fix the below checkpatch warning:
WARNING: Block comments should align the * on each line
Signed-off-by: Soumya Negi <soumya.negi97@gmail.com >
Link: https://lore.kernel.org/r/20220513075107.23285-1-soumya.negi97@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:23 +02:00
Vihas Makwana
c0235e384e
staging: r8188eu: drop redundant if check
...
The check for ETH_P_IP is already performed in the outer if block
and inner if check is redundant. So drop the check.
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220508182400.22433-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:41:06 +02:00
Martin Kaiser
073d44eacc
staging: r8188eu: read back action code from ieee80211_mgmt
...
Read the back action code from struct ieee80211_mgmt.
struct ieee80211_mgmt contains an "action" union. Each of its members
starts with an 8-bit action code. Treat the union as addba_req when we
read the action code although we do not yet know if it is an addba_req.
This approach is similar to ieee80211_iface_process_skb.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220508161451.115847-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:40:56 +02:00
Martin Kaiser
e2b1711fb5
staging: r8188eu: use back action codes from ieee80211.h
...
Use the defines from ieee80211.h for the back action codes.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220508161451.115847-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:40:56 +02:00
Martin Kaiser
81900cf8a6
staging: r8188eu: read destination address from ieee80211_mgmt
...
For management frames, addr1 is the destination address (da). Read this
address from struct ieee80211_mgmt instead of calling a driver-specific
macro.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220508161451.115847-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:40:56 +02:00
Martin Kaiser
5b3903d555
staging: r8188eu: don't check the category in OnAction_back
...
Do not check the category in OnAction_back. OnAction has already checked
the category before calling OnAction_back.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220508161451.115847-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:40:56 +02:00
Martin Kaiser
5108b9838a
staging: r8188eu: read addr2 from ieee80211_mgmt
...
Define a struct ieee80211_mgmt variable in the OnAction_back function. Use
it to read addr2. For management frames, addr2 is the source address (sa).
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220508161451.115847-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:40:56 +02:00
Martin Kaiser
e41f7a5521
staging: r8188eu: remove unused IEEE_* defines
...
The IEEE_* defines in the driver's ieee80211.h header file are not used.
Remove them.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-10-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:39 +02:00
Martin Kaiser
64c62b697f
staging: r8188eu: use standard category defines
...
Replace some of the driver-specific defines for action categories with the
defines from ieee80211.h.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:39 +02:00
Martin Kaiser
87f4820238
staging: r8188eu: use ieee80211_mgmt for action category
...
Use the struct ieee80211_mgmt from ieee80211.h to read the action
category. There's no need to parse the incoming frame ourselves.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:39 +02:00
Martin Kaiser
11d2e7de0d
staging: r8188eu: replace OnAction_tbl with switch-case
...
OnAction_tbl has only three entries. It's simpler to use a switch
statement instead of iterating over the table.
We can then remove the table itself and struct action_handler, which was
used only for the table entries.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-7-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:38 +02:00
Martin Kaiser
42e00fbbba
staging: r8188eu: remove an unused category define
...
RTW_WLAN_CATEGORY_TDLS is not used. Remove the define.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:38 +02:00
Martin Kaiser
d0c9872117
staging: r8188eu: remove action_handler string
...
Remove the unused str component from struct action_handler and the
corresponding entries in OnAction_tbl.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:38 +02:00
Martin Kaiser
639880ea94
staging: r8188eu: remove unused action handler prototypes
...
For some action categories, we removed the handler function, but we forgot
the prototypes. Remove them as well.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:37 +02:00
Martin Kaiser
efba1df56f
staging: r8188eu: action category wmm is not used
...
The r8188eu driver does not handle the wmm action category. Remove the
empty handler function, the entry in OnAction_tbl and the define for the
category.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-3-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:37 +02:00
Martin Kaiser
d2dbac0c1b
staging: r8188eu: action category ht is not used
...
The r8188eu driver does not handle the ht action category. Remove the
empty handler function, the entry in OnAction_tbl and the define for the
category.
Signed-off-by: Martin Kaiser <martin@kaiser.cx >
Link: https://lore.kernel.org/r/20220502200652.143665-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:22:37 +02:00
Charlie Sands
72b901c1aa
staging: r8188eu: Remove broken rtw_p2p_get function.
...
Removes broken and unsafe rtw_p2p_get function and all of the code
associated with it from the r8188eu driver.
Signed-off-by: Charlie Sands <charlies256@protonmail.com >
Link: https://lore.kernel.org/r/Ymy7C/A2q+VzfBhO@sckzor-linux.localdomain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:20:02 +02:00
Vihas Makwana
3136dc6029
staging: r8188eu: drop redundant check in _rtw_free_mlme_priv
...
There's a NULL check on pmlmepriv in rtw_mlme.c:112 which makes no sense
as rtw_free_mlme_priv_ie_data() dereferences it unconditionally and it
would have already crashed at this point.
Remove this redundant check.
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220427165748.10584-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:19:15 +02:00
Jaehee Park
921f9c5870
staging: r8188eu: remove unused else condition
...
rtw_select_and_join_from_scanned_queue() cannot return '2' so this
else condition is unused. Remove this unnecessary else statement.
Suggested-by: Pavel Skripkin <paskripkin@gmail.com >
Signed-off-by: Jaehee Park <jhpark1013@gmail.com >
Link: https://lore.kernel.org/r/20220427153203.GA503502@jaehee-ThinkPad-X1-Extreme
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:19:15 +02:00
Vihas Makwana
fbfa3c6327
staging: r8188eu: remove unused semaphore "allrxreturnevt"
...
The semaphore allrxreturnevt of struct recv_priv is initialized but not
used anywhere in the code.
Remove the initialization and the structure member.
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220427190054.17841-1-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-05 23:19:14 +02:00
Vihas Makwana
92d995d158
staging: r8188eu: drop unnecessary wrapper _rtw_dequeue_cmd
...
Drop unnecessary wrapper _rtw_dequeue_cmd and move its logic to
rtw_dequeue_cmd.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220422193223.11948-8-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:34:36 +02:00
Vihas Makwana
957ab09b8c
staging: r8188eu: drop unnecessary wrapper _rtw_alloc_network
...
Drop unnecessary wrapper _rtw_alloc_network and move its logic to
rtw_alloc_network.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220422193223.11948-7-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:34:36 +02:00
Vihas Makwana
68df22cb61
staging: r8188eu: drop unnecessary wrapper _rtw_free_mlme_priv
...
Drop unnecessary wrapper _rtw_free_mlme_priv and move its logic to
rtw_free_mlme_priv.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220422193223.11948-6-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:34:36 +02:00
Vihas Makwana
09e841b333
staging: r8188eu: drop unnecessary wrapper _rtw_init_mlme_priv
...
Drop unnecessary wrapper _rtw_init_mlme_priv and move its logic to
rtw_init_mlme_priv.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220422193223.11948-5-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:34:36 +02:00
Vihas Makwana
8322ef200d
staging: r8188eu: drop unnecessary wrapper _rtw_init_evt_priv
...
Drop unnecessary wrapper _rtw_init_evt_priv and move its logic to
rtw_init_evt_priv.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Vihas Makwana <makvihas@gmail.com >
Link: https://lore.kernel.org/r/20220422193223.11948-4-makvihas@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:34:36 +02:00