aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-09-01Merge tag 'staging-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds139-0/+80179
Pull IIO and staging driver updates from Greg KH: "Here is the big set of staging and IIO driver updates for 5.15-rc1. Also included in here are the counter driver subsystem updates as the IIO drivers needed them. Lots of churn in some staging drivers, we dropped the "old" rtl8188eu driver and replaced it with a newer version of the driver that had been maintained out-of-tree by Larry with the end goal of actually being able to get this driver out of staging eventually. Despite that driver being "newer" the line count of this pull request is going up. Some drivers moved out of staging as well, which is always nice to see, that is why there are additions to the mfc and misc driver subsystems. All of these were acked by the various subsystem maintainers involved. But by far, as normal, it's coding style cleanups all over the drivers/staging/ tree in here. Full details of these changes are in the shortlog. All of these have been in linux-next for a while with no reported problems" [ Note: the r8188eu merge clashed with commit 89939e890605 ("staging: rtlwifi: use siocdevprivate") from the networking tree. When resolving the issue, I noted that the whole r8188eu rtw_android code is dead since commit ae7471cae00a ("staging: r8188eu: remove rtw_ioctl function"). End result: the merge resolution was to throw all of that away, rather than do the mindless fixup to code that isn't actually reachable - Linus ] * tag 'staging-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (551 commits) staging: vt6655: Remove filenames in files staging: r8188eu: add extra TODO entries staging: vt6656: Remove filenames in files staging: wlan-ng: fix invalid assignment warning staging: r8188eu: rename fields of struct rtl_ps staging: r8188eu: remove ODM_DynamicPrimaryCCA_DupRTS() staging: r8188eu: rename fields of struct dyn_primary_cca staging: r8188eu: rename struct field Wifi_Error_Status staging: r8188eu: Provide a TODO file for this driver staging: r8188eu: remove unneeded variable staging: r8188eu: remove unneeded conversions to bool staging: r8188eu: remove {read,write}_macreg staging: r8188eu: core: remove condition with no effect staging: r8188eu: remove ethernet.h header file staging: r8188eu: remove ip.h header file staging: r8188eu: remove if_ether.h header file staging: r8188eu: make rtw_deinit_intf_priv return void staging: r8188eu: use is_multicast_ether_addr in os_dep/recv_linux.c staging: r8188eu: use is_multicast_ether_addr in hal/rtl8188eu_xmit.c staging: r8188eu: use is_multicast_ether_addr in core/rtw_xmit.c ...
2021-08-28staging: r8188eu: add extra TODO entriesPhillip Potter1-0/+3
Add entry for CFG80211 to reflect that it is currently being worked on and is a desirable feature to have for this driver. Leave entries for LIB80211 and MAC80211 in case anyone else wishes to work on them - they can always be removed later, but MAC80211 in particular would certainly be good to aim for. Also, include an entry for improving error handling, as this is another goal of the cleanup effort. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210828000231.1458-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: rename fields of struct rtl_psMichael Straube2-38/+41
Rename fields of struct rtl_ps to avoid camel case. PreCCAState -> pre_cca_state CurCCAState -> cur_cca_state PreRFState -> pre_rf_state CurRFState -> cur_rf_state Rssi_val_min -> rssi_val_min Reg874 -> reg_874 RegC70 -> reg_c70 Reg85C -> reg_85c RegA74 -> reg_a74 Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: remove ODM_DynamicPrimaryCCA_DupRTS()Michael Straube2-9/+0
Function ODM_DynamicPrimaryCCA_DupRTS() is unused, remove it. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: rename fields of struct dyn_primary_ccaMichael Straube2-7/+7
Rename fields of struct dyn_primary_cca to avoid camel case. PriCCA_flag -> pri_cca_flag DupRTS_flag -> dup_rts_flag Monitor_flag -> monitor_flag Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210827094144.13290-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <phil@philpotter.co.uk> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210827100813.18610-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <zealci@zte.com.cn> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn> Link: https://lore.kernel.org/r/20210825061531.69678-1-deng.changcheng@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-27staging: r8188eu: remove unneeded conversions to boolJing Yangyang1-5/+5
Found with scripts/coccinelle/misc/boolconv.cocci. Reported-by: Zeal Robot <zealci@zte.com.cn> Reviewed-by: Pavel Skripkin <paskripkin@gmail.com> Acked-by: Michael Straube <straube.linux@gmail.com> Acked-by: Phillip Potter <phil@philpotter.co.uk> Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn> Link: https://lore.kernel.org/r/20210824063443.59724-1-deng.changcheng@zte.com.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <paskripkin@gmail.com> Acked-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/d591e29d77da73790c71f7a8e508a8b16fd48f65.1629789580.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <phil@philpotter.co.uk> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com> Link: https://lore.kernel.org/r/YSFgrLUfXzgcT6k4@user Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210824123621.10801-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
2021-08-26staging: r8188eu: remove unnecessary parenthesesMichael Straube1-2/+2
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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
2021-08-26staging: r8188eu: clean up the usb_writeNMartin Kaiser1-10/+5
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>
2021-08-26staging: r8188eu: clean up the usb_writeXY functionsMartin Kaiser1-42/+8
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>
2021-08-26staging: r8188eu: clean up the usb_readXY functionsMartin Kaiser1-23/+7
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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <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>
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 <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Link: https://lore.kernel.org/r/1629450505-28247-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: use GFP_ATOMIC under spinlockMichael Straube1-1/+1
kmalloc() in function update_bcn_wps_ie() is called under a spinlock so the allocation have to be atomic. -> update_beacon() <- takes a spinlock -> update_bcn_vendor_spec_ie() -> update_bcn_wps_ie() Fixes: 79f712ea994de ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()") Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210819152914.17482-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: fix scheduling while atomic bugsMichael Straube1-2/+2
These allocations are sometimes done under a spin lock so they have to be atomic. The function call tree is: -> update_beacon() <- takes a spin lock -> update_BCNTIM() -> set_tx_beacon_cmd() Fixes: 79f712ea994de ("staging: r8188eu: Remove wrappers for kalloc() and kzalloc()") Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20210819092423.4349-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-19staging: r8188eu: Remove empty rtw_mfree_xmit_priv_lock()Fabio M. De Francesco1-6/+0
Remove rtw_mfree_xmit_priv_lock() because it is empty. Remove its only call from within _rtw_free_xmit_priv(). Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210819050808.28825-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-19staging: r8188eu: remove rtw_update_mem_stat macro and associated flagsPhillip Potter1-20/+0
Remove the unused rtw_update_mem_stat macro and the associated flags from include/osdep_service.h as this is all dead code. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210818234853.208448-8-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-19staging: r8188eu: remove function _rtw_zvmallocPhillip Potter2-10/+0
Remove the function _rtw_zvmalloc from os_dep/osdep_service.c, as this function is now unused and is just an inline wrapper around vmalloc which zeroes out the memory. All previous callers have been converted to use vzalloc. Also remove the declaration from include/osdep_service.h. It is considered generally bad practice to declare functions as inline in the majority of cases, as not only can this qualifier be ignored by the compiler but the compiler generally makes good decisions about inlining anyway. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210818234853.208448-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-19staging: r8188eu: remove rtw_zvmalloc preprocessor definitionPhillip Potter1-1/+0
Remove rtw_zvmalloc preprocessor definition from include/osdep_service.h as it now has no callers. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210818234853.208448-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-19staging: r8188eu: convert all rtw_zvmalloc calls to vzalloc callsPhillip Potter9-13/+13
Convert all rtw_zvmalloc calls within the driver to use the existing kernel vzalloc function, which has the same semantics. Also rewrite the two places where it is mentioned in comments to say vzalloc, and remove the redundant cast to struct adapter * in ./os_dep/usb_intf.c as vzalloc returns void *. The reason for the conversion is that rtw_zvmalloc is just a preprocessor definition for _rtw_zvmalloc which itself is just an inline wrapper around vmalloc which then zeroes the memory out. As vzalloc does the same thing via usage of __GFP_ZERO, this code is redundant and can subsequently be removed. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210818234853.208448-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>