summaryrefslogtreecommitdiff
path: root/drivers/staging/r8188eu/include/usb_ops.h
AgeCommit message (Collapse)Author
2022-04-04staging: r8188eu: convert rtw_inc_and_chk_continual_urb_error() to boolMichael Straube
Function rtw_inc_and_chk_continual_urb_error() returns boolean values. Change its return type from int to bool. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: convert rtw_usb_bulk_size_boundary() to boolMichael Straube
Function rtw_usb_bulk_size_boundary() returns boolean values. Change its return type from u8 to bool. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: refactor rtw_inc_and_chk_continual_urb_error()Michael Straube
Refactor rtw_inc_and_chk_continual_urb_error(). Return directly instead of using a return variable and initialize the variable 'value' at declaration. This shortens the code and improves readability. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-04staging: r8188eu: refactor rtw_usb_bulk_size_boundary()Michael Straube
Using ternary operator to set a variable to true or false is not needed. Convert two such uses of ternary operator in rtw_usb_bulk_size_boundary() to just use the condition and return the value directly instead of using a return variable. This shortens the code and improves readability. While at it, remove an unneeded line break from the function head. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20220329103756.6740-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-17staging: r8188eu: fix lines modified by DBG_88E cleanupPhillip Potter
A number of style problems were left behind by the DBG_88E cleanup: (1) Empty if/else blocks. (2) Parenthesised if/while statements containing only one line. (3) Entire blocks which server zero purpose after removal of DBG_88E. (4) Various warnings about whitespace, and constant comparison order. (5) Use of __constant_htons instead when htons should be used. Fix up these issues across the driver in any file touched by the previous cleanup. Long line warnings will be addresses in a later patch. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-13-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-17staging: r8188eu: remove remaining DBG_88E call from include/usb_ops.hPhillip Potter
Remove the one remaining DBG_88E call from include/usb_ops.h. After some thought, it makes more sense to just entirely strip all of these calls, so that debugging code in the driver can be more consistent and useful going forwards. Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20220216010709.791-9-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-15staging: r8188eu: remove ishighspeed from dvobj_privMartin Kaiser
There's no need to store the usb device speed in struct dvobj_priv. We can read the speed from struct usb_device. dvobj_priv has a pointer to the usb_device. Reorder one if-statement to make the code clearer. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220209192842.99399-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-10-10staging: r8188eu: chip_type is write-onlyMartin Kaiser
chip_type in struct adapter is never read. Remove the component and the code to initialise it. Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211005200821.19783-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove struct _io_opsPavel Skripkin
Finally struct _io_ops is unused, so remove it. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Co-developed-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/20210917071837.10926-15-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-26staging: r8188eu: remove an unused enumMartin Kaiser
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 Kaiser
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-05staging: r8188eu: Remove wrappers for atomic operationsLarry Finger
These wrappers were useful when this driver had the hooks for Windows, but are no longer needed. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210802192721.23110-4-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: fix include directory messGreg Kroah-Hartman
The driver seems to want to include a specific directory for all include files on the build path, but that breaks when trying to build only the module directory, or when building with "O=" option. Fix this up by making all includes for the driver be relative locations. Reported-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210730144227.1770212-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: remove rtw_usb_control_msg() macroGreg Kroah-Hartman
It is a wrapper around usb_control_msg() that does nothing, so remove the macro and just call the correct USB function instead in the one place it is used. Link: https://lore.kernel.org/r/20210730092417.1014392-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: remove rtw_usb_bulk_msg() macroGreg Kroah-Hartman
No one is using this wrapper macro, so just remove it as it is pointless. Link: https://lore.kernel.org/r/20210730092417.1014392-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: Remove tests of kernel versionLarry Finger
In the GitHub repository from which this driver was derived, old kernels had to be supported. Now that the driver is included in the kernel, this code can be removed as well as all mention of version.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210729170930.23171-3-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-30staging: r8188eu: Convert header copyright info to SPDX format, part 3Larry Finger
Before this driver can be incorporated in the drivers/net/wireless tree, the copyright info in all files must be converted to SPDX notation. This patch converts the next 49 files. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20210729164814.32097-4-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-28staging: r8188eu: introduce new include dir for RTL8188eu driverPhillip Potter
This patchset is split in order to keep the file sizes down. This include directory is part of the newer/better driver from GitHub modified by Larry Finger. Import this as the basis for all future work going forward. Suggested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Phillip Potter <phil@philpotter.co.uk> Link: https://lore.kernel.org/r/20210727232219.2948-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>