- Aug 26, 2021
-
-
Michael Straube authored
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 <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-3-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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 <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Pavel Skripkin authored
rtw_deinit_intf_priv() always return success, so there is no need in return value Acked-by:
Michael Straube <straube.linux@gmail.com> Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Martin Kaiser <martin@kaiser.cx> Signed-off-by:
Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210823184059.19742-1-paskripkin@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-9-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-8-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-7-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-6-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, all buffers are properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-5-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-4-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Use is_multicast_ether_addr instead of custom macro IS_MCAST, the buffer is properly aligned. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-3-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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 <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823120106.9633-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Remove unnecessary parentheses to improve readability. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210822114014.21584-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
if (0) is never true, remove code that is never executed. Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210822114014.21584-1-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
The driver is for chips that do not operate in the 5 GHz band. Remove some 5 GHz related code. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Martin Kaiser <martin@kaiser.cx> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210823193028.12391-1-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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 <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210821155151.25822-1-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Larry Finger authored
The 16- and 32-bit quantities in the dhcp message definition must be big endian. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210821151459.26078-1-Larry.Finger@lwfinger.net Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Phillip Potter authored
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 <fmdefrancesco@gmail.com> Acked-by:
Michael <Straube<straube.linux@gmail.com> Signed-off-by:
Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210821105615.6307-1-phil@philpotter.co.uk Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xiangyang Zhang authored
The "pbackup_remainder_ie" variable is not freed when "pwps_ie_src" is null Fixes: 15865124 ("staging: r8188eu: introduce new core dir for RTL8188eu driver") Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Xiangyang Zhang <xyz.sun.ok@gmail.com> Link: https://lore.kernel.org/r/20210821081824.14745-1-xyz.sun.ok@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
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 889ed8b5 ("staging: rtl8188eu: set pipe only once") for the new r8188eu driver. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-10-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove function pointers which are not used by the r8188eu driver. Acked-by:
Michael Straube <straube.linux@gmail.com> Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-9-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove unnecessary variables, check the length. Acked-by:
Michael Straube <straube.linux@gmail.com> Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-8-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove unnecessary variables, summarize declarations and assignments. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-7-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove unnecessary variables, summarize declarations and assignments. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-6-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The VENDOR_READ and VENDOR_WRITE defines are not used. Acked-by:
Michael Straube <straube.linux@gmail.com> Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-5-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Replace the numeric values with USB constants to make their meaning clearer. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-4-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
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 788fde03 ("staging: rtl8188eu: use actual request type as parameter") for the new r8188eu driver. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-3-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
_HCI_OPS_OS_C_ is not used in the r8188eu driver. Remove it. Acked-by:
Michael Straube <straube.linux@gmail.com> Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-2-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
name is a const char * by default. This type should be ok for r8188eu. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Acked-by:
Michael Straube <straube.linux@gmail.com> Signed-off-by:
Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210821164859.4351-1-martin@kaiser.cx Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
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 <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210825100842.13217-1-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Len Baker authored
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 <keescook@chromium.org> Signed-off-by:
Len Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210824090039.GA7999@titan Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Len Baker authored
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 <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210824073643.GA7396@titan Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Len Baker authored
Avoid CameCase in the names of all local variables inside the function rtl8192_phy_SwChnlStepByStep(). Signed-off-by:
Len Baker <len.baker@gmx.com> Link: https://lore.kernel.org/r/20210824072545.7321-2-len.baker@gmx.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
remove rtw_set_802_11_bssid() function left unused after wext routines removal. Signed-off-by:
Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/b3d1756b6ae4be7ca4fc50e12bd7e10587a6020c.1629727333.git.fabioaiuto83@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
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 <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/0d745350ff3d411dda329b8c1e2261361570db6e.1629727333.git.fabioaiuto83@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
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 <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/5d4e7ab18005e69e8cc162619149d6fa93568875.1629727333.git.fabioaiuto83@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
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 <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/aa394052c8d81b4a00356adf5f98fc3c81f8b1d9.1629727333.git.fabioaiuto83@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Aiuto authored
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 <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/61c4bb20bbb6ce30e4ddd01aa73de3f686a99445.1629727333.git.fabioaiuto83@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sergio Paracuellos authored
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: b99cc3a2 ("staging: mt7621-pci: avoid custom 'map_irq' function") Cc: stable <stable@vger.kernel.org> Reported-by:
DENG Qingfang <dqfext@gmail.com> Signed-off-by:
Sergio Paracuellos <sergio.paracuellos@gmail.com> Link: https://lore.kernel.org/r/20210823170803.2108-1-sergio.paracuellos@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_remove_bcn_ie() is not used anywhere, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210819112200.32030-2-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Function rtw_add_bcn_ie() is not used anywhere, remove it. Acked-by:
Phillip Potter <phil@philpotter.co.uk> Signed-off-by:
Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210819112200.32030-1-straube.linux@gmail.com Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-