aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-27staging: r8188eu: rename struct field Wifi_Error_StatusMichael Straube3-12/+12
Rename struct field Wifi_Error_Status to avoid camel case. Wifi_Error_Status -> wifi_error_status Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-27staging: r8188eu: Provide a TODO file for this driverFabio M. De Francesco1-0/+13
Provide a TODO file that lists the tasks that should be carried out in order to move this driver off drivers/staging. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Fabio M. De Francesco <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-27staging: r8188eu: remove unneeded variableJing Yangyang1-6/+3
Eliminate the following coccicheck warning: ./drivers/staging/r8188eu/os_dep/os_intfs.c:505:6-12: Unneeded variable "status". Return "_SUCCESS" on line 577 ./drivers/staging/r8188eu/os_dep/os_intfs.c:772: 4-7: Unneeded variable "ret". Return "_SUCCESS" on line 818 ./drivers/staging/r8188eu/os_dep/os_intfs.c:823:4-8: Unneeded variable "ret8". Return "_SUCCESS" on line 849 Reported-by: Zeal Robot <[email protected]> Signed-off-by: Jing Yangyang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-27staging: r8188eu: remove unneeded conversions to boolJing Yangyang1-5/+5
Found with scripts/coccinelle/misc/boolconv.cocci. Reported-by: Zeal Robot <[email protected]> Reviewed-by: Pavel Skripkin <[email protected]> Acked-by: Michael Straube <[email protected]> Acked-by: Phillip Potter <[email protected]> Signed-off-by: Jing Yangyang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove {read,write}_macregPavel Skripkin2-41/+0
These 2 functions are unused, so they can be simply removed Signed-off-by: Pavel Skripkin <[email protected]> Acked-by: Fabio M. De Francesco <[email protected]> Link: https://lore.kernel.org/r/d591e29d77da73790c71f7a8e508a8b16fd48f65.1629789580.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: core: remove condition with no effectSaurav Girepunje1-4/+1
Remove the condition with no effect (if == else) in rtw_led.c file. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Saurav Girepunje <[email protected]> Link: https://lore.kernel.org/r/YSFgrLUfXzgcT6k4@user Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove ethernet.h header fileMichael Straube5-28/+3
There are only two definitions from ethernet.h used in the driver. Namely: #define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ #define LLC_HEADER_SIZE 6 /* LLC Header Length */ Both are only used in the file core/rtw_recv.c. Replace the usage of ETHERNET_HEADER_SIZE with ETH_HLEN, move the definition of LLC_HEADER_SIZE into rtw_recv.h and remove the now unused ethernet.h header file. Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove ip.h header fileMichael Straube5-113/+0
The struct ip_options declared in ip.h is only unsed in the optlength macro which is also defined in ip.h and not used in the driver code. All other definitions/declarations in ip.h are duplicated from <include/uapi/linux/ip.h>. Remove the ip.h header file and its includes. Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove if_ether.h header fileMichael Straube4-97/+0
All constants, declarations and macros in if_ether.h are either duplicated from <uapi/linux/if_ether.h> or unused. Remove the file if_ether.h and its includes. Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: make rtw_deinit_intf_priv return voidPavel Skripkin1-4/+1
rtw_deinit_intf_priv() always return success, so there is no need in return value Acked-by: Michael Straube <[email protected]> Acked-by: Phillip Potter <[email protected]> Acked-by: Martin Kaiser <[email protected]> Signed-off-by: Pavel Skripkin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in os_dep/recv_linux.cMichael Straube1-1/+1
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in hal/rtl8188eu_xmit.cMichael Straube1-2/+1
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_xmit.cMichael Straube1-9/+6
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_security.cMichael Straube1-4/+4
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_recv.cMichael Straube1-10/+10
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_mp.cMichael Straube1-2/+2
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: use is_multicast_ether_addr in core/rtw_mlme.cMichael Straube1-2/+2
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: ensure proper alignment for eth address buffersMichael Straube2-9/+9
Add __aligned(2) to eth address buffers in structs rx_pkt_attrib and pkt_attrib to ensure proper alignment for usage with functions from <linux/etherdevice.h> Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unnecessary parenthesesMichael Straube1-2/+2
Remove unnecessary parentheses to improve readability. Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove dead codeMichael Straube1-4/+1
if (0) is never true, remove code that is never executed. Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove 5 GHz codeMichael Straube1-22/+8
The driver is for chips that do not operate in the 5 GHz band. Remove some 5 GHz related code. Acked-by: Phillip Potter <[email protected]> Acked-by: Martin Kaiser <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove cmd_osdep.h header fileMichael Straube3-23/+5
All functions declared in the cmd_osdep.h header file are only used in a single c source file. Make the functions static and remove the header file and its includes. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: Make mult-byte entities in dhcp header be big endianLarry Finger1-7/+7
The 16- and 32-bit quantities in the dhcp message definition must be big endian. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Larry Finger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: change declaration of Efuse_Read1ByteFromFakeContentPhillip Potter1-11/+3
Remove forward declaration of Efuse_Read1ByteFromFakeContent function from core/rtw_efuse.c, as the function is defined in full directly after this and therefore this forward declaration is redundant. In addition, convert the storage class of the function to static, as the function is only used with rtw_efuse.c, and tidy up the signature alignment. Acked-by: Fabio M. De Francesco <[email protected]> Acked-by: Michael Straube<[email protected]> Signed-off-by: Phillip Potter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: Fix a resource leak in update_bcn_wps_ieXiangyang Zhang1-1/+2
The "pbackup_remainder_ie" variable is not freed when "pwps_ie_src" is null Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Acked-by: Michael Straube <[email protected]> Signed-off-by: Xiangyang Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: set pipe only onceMartin Kaiser1-7/+8
Set the pipe for reading or writing in usbctrl_vendorreq only once. There's no need to set it again for every retry. This patch is an adaptation of commit 889ed8b5e374 ("staging: rtl8188eu: set pipe only once") for the new r8188eu driver. Acked-by: Phillip Potter <[email protected]> Acked-by: Michael Straube <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unused members of struct _io_opsMartin Kaiser1-3/+0
Remove function pointers which are not used by the r8188eu driver. Acked-by: Michael Straube <[email protected]> Acked-by: Phillip Potter <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: clean up the usb_writeNMartin Kaiser1-10/+5
Remove unnecessary variables, check the length. Acked-by: Michael Straube <[email protected]> Acked-by: Phillip Potter <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: clean up the usb_writeXY functionsMartin Kaiser1-42/+8
Remove unnecessary variables, summarize declarations and assignments. Acked-by: Phillip Potter <[email protected]> Acked-by: Michael Straube <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: clean up the usb_readXY functionsMartin Kaiser1-23/+7
Remove unnecessary variables, summarize declarations and assignments. Acked-by: Phillip Potter <[email protected]> Acked-by: Michael Straube <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove an unused enumMartin Kaiser1-4/+0
The VENDOR_READ and VENDOR_WRITE defines are not used. Acked-by: Michael Straube <[email protected]> Acked-by: Phillip Potter <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: rewrite usb vendor request definesMartin Kaiser1-2/+2
Replace the numeric values with USB constants to make their meaning clearer. Acked-by: Phillip Potter <[email protected]> Acked-by: Michael Straube <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8188eu: use actual request type as parameterMartin Kaiser1-34/+12
At the moment, usbctrl_vendorreq's requesttype parameter must be set to 1 for reading and 0 for writing. It's then converted to the actual bmRequestType for the USB control request. We can simplify the code and avoid this conversion if the caller passes the actual bmRequestType. This patch is an adaptation of commit 788fde031027 ("staging: rtl8188eu: use actual request type as parameter") for the new r8188eu driver. Acked-by: Phillip Potter <[email protected]> Acked-by: Michael Straube <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unused defineMartin Kaiser1-2/+0
_HCI_OPS_OS_C_ is not used in the r8188eu driver. Remove it. Acked-by: Michael Straube <[email protected]> Acked-by: Phillip Potter <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unnecessary castMartin Kaiser1-1/+1
name is a const char * by default. This type should be ok for r8188eu. Acked-by: Phillip Potter <[email protected]> Acked-by: Michael Straube <[email protected]> Signed-off-by: Martin Kaiser <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8723bs: remove header file ethernet.hMichael Straube4-18/+5
The header file ehternet.h defines only two constants. #define ETHERNET_HEADER_SIZE 14 /* Ethernet Header Length */ #define LLC_HEADER_SIZE 6 /* LLC Header Length */ Both are only used in the file core/rtw_recv.c and ETHERNET_HEADER_SIZE just duplicates the in-kernel constant ETH_HLEN. Replace the usage of ETHERNET_HEADER_SIZE with ETH_HLEN, move the definition of LLC_HEADER_SIZE into rtw_rev.h (renamed to LLC_HEADER_LENGTH) and remove the now unused header file ethernet.h. Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging/rtl8192u: Prefer kcalloc over open coded arithmeticLen Baker1-3/+3
As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. In this case these aren't actually dynamic sizes: both sides of the multiplication are constant values. However it is best to refactor these anyway, just to keep the open-coded math idiom out of code. So, use the purpose specific kcalloc() function instead of the argument size * count in the kzalloc() function. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Len Baker <[email protected]> Link: https://lore.kernel.org/r/20210824090039.GA7999@titan Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging/rtl8192u: Initialize variables in the definition blockLen Baker1-6/+3
Initialize the pre_cmd_cnt, post_cmd_cnt and rf_cmd_cnt variables in the definition block as it is not necessary to do this in the middle of the function. Signed-off-by: Len Baker <[email protected]> Link: https://lore.kernel.org/r/20210824073643.GA7396@titan Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging/rtl8192u: Avoid CamelCase in names of variablesLen Baker1-48/+47
Avoid CameCase in the names of all local variables inside the function rtl8192_phy_SwChnlStepByStep(). Signed-off-by: Len Baker <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8723bs: remove unused rtw_set_802_11_bssid() functionFabio Aiuto2-65/+0
remove rtw_set_802_11_bssid() function left unused after wext routines removal. Signed-off-by: Fabio Aiuto <[email protected]> Link: https://lore.kernel.org/r/b3d1756b6ae4be7ca4fc50e12bd7e10587a6020c.1629727333.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8723bs: remove functions notifying wext eventsFabio Aiuto4-48/+1
remove functions that once were meant to notify wext events to userspace. Now they are donig nothing useful so just remove them. Signed-off-by: Fabio Aiuto <[email protected]> Link: https://lore.kernel.org/r/0d745350ff3d411dda329b8c1e2261361570db6e.1629727333.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8723bs: fix logical continuation issueFabio Aiuto1-3/+3
fix the following post-commit hook checkpatch issue: CHECK: Logical continuations should be on the previous line 52: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:389: + if (padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_ + || padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_WTMIC_ CHECK: Logical continuations should be on the previous line 53: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:390: + || padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_WTMIC_ + || padapter->securitypriv.dot11PrivacyAlgrthm == _AES_) Signed-off-by: Fabio Aiuto <[email protected]> Link: https://lore.kernel.org/r/5d4e7ab18005e69e8cc162619149d6fa93568875.1629727333.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8723bs: fix code indent issuesFabio Aiuto1-6/+6
fix the following post commit hook checkpatch issues: ERROR: code indent should use tabs where possible 2463: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:388: + if (padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_$ ERROR: code indent should use tabs where possible 2464: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:389: + || padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_WTMIC_$ ERROR: code indent should use tabs where possible 2465: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:390: + || padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)$ ERROR: code indent should use tabs where possible 2466: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:391: + /* WPS open need to enable multicast */$ ERROR: code indent should use tabs where possible 2467: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:392: + /* check_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS) == true) */$ ERROR: code indent should use tabs where possible 2468: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:393: + rtw_hal_set_hwreg(padapter, HW_VAR_OFF_RCR_AM, null_addr);$ Signed-off-by: Fabio Aiuto <[email protected]> Link: https://lore.kernel.org/r/aa394052c8d81b4a00356adf5f98fc3c81f8b1d9.1629727333.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: rtl8723bs: remove obsolete wext supportFabio Aiuto3-3101/+1
cfg80211 has been fully implemented so remove all wext and wext private handlers and their registration. Now wext userspace calls can be managed via cfg80211 wext compatibility. Signed-off-by: Fabio Aiuto <[email protected]> Link: https://lore.kernel.org/r/61c4bb20bbb6ce30e4ddd01aa73de3f686a99445.1629727333.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: mt7621-pci: fix hang when nothing is connected to pcie portsSergio Paracuellos1-2/+11
When nothing is connected to pcie ports, each port is set to reset state. When this occurs, next access result in a hang on boot as follows: mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK) mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK) mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK) [ HANGS HERE ] Fix this just detecting 'nothing is connected state' to avoid next accesses to pcie port related configuration registers. Fixes: b99cc3a2b6b6 ("staging: mt7621-pci: avoid custom 'map_irq' function") Cc: stable <[email protected]> Reported-by: DENG Qingfang <[email protected]> Signed-off-by: Sergio Paracuellos <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unused function rtw_remove_bcn_ie()Michael Straube2-40/+0
Function rtw_remove_bcn_ie() is not used anywhere, remove it. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unused function rtw_add_bcn_ie()Michael Straube2-65/+0
Function rtw_add_bcn_ie() is not used anywhere, remove it. Acked-by: Phillip Potter <[email protected]> Signed-off-by: Michael Straube <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: r8188eu: remove unneeded semicolonYang Li3-3/+3
Eliminate the following coccicheck warning: ./drivers/staging/r8188eu/hal/rtl8188e_rxdesc.c:73:66-67: Unneeded semicolon ./drivers/staging/r8188eu/hal/rtl8188e_hal_init.c:2225:68-69: Unneeded semicolon ./drivers/staging/r8188eu/core/rtw_xmit.c:615:75-76: Unneeded semicolon Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: wlan-ng: Avoid duplicate header in tx/rx framesKees Cook6-53/+39
Instead of open-coding the same header details in the tx/rx frames, directly include the actual struct. Rename associated variables to the more verbose of the two versions. This also has the benefit of being able to replace a field-spanning memcpy() with a direct assignment, helping clear the way for coming FORTIFY_SOURCE improvements. "diffoscope" reports no object code differences after this change, excepting the selection of different registers when switching from memcpy() to direct assignment: --- drivers/staging/wlan-ng/prism2usb.o.before +++ drivers/staging/wlan-ng/prism2usb.o.after ├── objdump --line-numbers --disassemble --demangle --reloc --no-show-raw-insn --section=.text {} │ @@ -4887,24 +4887,24 @@ │ sub %rdi,%rcx │ add $0x3c,%ecx │ shr $0x3,%ecx │ rep stos %rax,%es:(%rdi) │ mov $0x8,%eax │ movl $0x123,0x23e(%rbx) │ mov %ax,0x244(%rbx) │ - mov (%rdx),%rcx │ - mov %rcx,0x246(%rbx) │ - mov 0x8(%rdx),%rcx │ - mov %rcx,0x24e(%rbx) │ - mov 0x10(%rdx),%rcx │ - mov %rcx,0x256(%rbx) │ - mov 0x18(%rdx),%ecx │ - mov %ecx,0x25e(%rbx) │ - movzwl 0x1c(%rdx),%edx │ - mov %dx,0x262(%rbx) │ + mov (%rdx),%rax │ + mov %rax,0x246(%rbx) │ + mov 0x8(%rdx),%rax │ + mov %rax,0x24e(%rbx) │ + mov 0x10(%rdx),%rax │ + mov %rax,0x256(%rbx) │ + mov 0x18(%rdx),%eax │ + mov %eax,0x25e(%rbx) │ + movzwl 0x1c(%rdx),%eax │ + mov %ax,0x262(%rbx) │ cmpq $0x0,0x0(%rbp) │ movzwl 0x70(%rsi),%eax │ je 477a <hfa384x_drvr_txframe+0xba> │ add $0x8,%eax │ mov $0x44,%r12d │ mov %ax,0x264(%rbx) │ mov 0x70(%r13),%edx Cc: Romain Perier <[email protected]> Cc: Allen Pais <[email protected]> Cc: Ivan Safonov <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-08-26staging: wlan-ng: Remove pointless a3/a4 unionKees Cook9-62/+48
There is no need for the a3/a4 union. The two structs are identical except for the addition of a4. Excepting one place, the structs are only ever used in the union, and the union is always allocated at full size. The one instance of the a3-specific struct can be replaced with the full version, as no sizing information is used. Replace the union with the a4 version of the struct. "diffoscope" reports there are no object code differences after this change. Cc: Allen Pais <[email protected]> Cc: Romain Perier <[email protected]> Cc: Chen Lin <[email protected]> Cc: Ivan Safonov <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>