summaryrefslogtreecommitdiffstats
path: root/drivers/staging/r8188eu/include/rtw_io.h
AgeCommit message (Collapse)AuthorFilesLines
2022-10-22staging: r8188eu: Remove unused macrosDeepak R Varma1-14/+0
Simple variants of macros PlatformEFIOWrite and PlatformEFIORead are defined but never used. As they do not appear to be designed for anything significant, we can remove them to avoid unexpected usage. Suggested-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Deepak R Varma <drv@mailo.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/efaf637a14b6f7fdd0178e2aecf8abf17e6922f6.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-22staging: r8188eu: Add space between function & macro parametersDeepak R Varma1-14/+14
Space required between function and macro parameters to improve code readability. This Linux kernel coding style guideline resolves following error reported by checkpatch script: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Deepak R Varma <drv@mailo.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/ce200b3a986628f943dfb0c4e412276793e59bbc.1666299151.git.drv@mailo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: add error handling of rtw_read32Pavel Skripkin1-1/+1
rtw_read32() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read32() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/583c3d21c46066275e4fc8da5ba4fd0e3679335b.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: add error handling of rtw_read16Pavel Skripkin1-1/+1
rtw_read16() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read16() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/06b45afda048d0aeddeed983c2318680fe6265f5.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10staging: r8188eu: add error handling of rtw_read8Pavel Skripkin1-1/+1
rtw_read8() reads data from device via USB API which may fail. In case of any failure previous code returned stack data to callers, which is wrong. Fix it by changing rtw_read8() prototype and prevent caller from touching random stack data Signed-off-by: Pavel Skripkin <paskripkin@gmail.com> Link: https://lore.kernel.org/r/c8f8ef4f14db3ba2478a87d5be6eb768a093dfaf.1654629778.git.paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-07staging: r8188eu: fix declaration to match 'foo *bar'Daniel Watson1-1/+1
put '*' next to variable to match kernel style from checkpatch Signed-off-by: Daniel Watson <ozzloy@challenge-bot.com> Link: https://lore.kernel.org/r/20220607061113.32633-1-ozzloy@challenge-bot.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-03staging: r8188eu: only the bulk in ep is used for network dataMartin Kaiser1-1/+1
All supported devices use a single bulk in endpoint for receiving network data. The rtw_read_port function needs no addr parameter. The ff_hwaddr in struct recv_priv is also a constant value. We can use RECV_BULK_IN_ADDR directly. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211126173205.21352-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-03staging: r8188eu: rtw_read_port needs no cnt parameterMartin Kaiser1-1/+1
The cnt parameter in the rtw_read_port function is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211126173205.21352-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove struct _io_opsPavel Skripkin1-25/+0
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-09-17staging: r8188eu: remove core/rtw_io.cPavel Skripkin1-18/+1
There are only unused functions and macros and one function which can be open-coded. So, removed core/rtw_io.c at all, removed core/rtw_io.c from Makefile and open-coded rtw_init_io_priv 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-14-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write_port_cancel()Pavel Skripkin1-2/+1
Remove the unnecessary _rtw_write_port_cancel() and usb_write_port_cancel() and embed their code into the caller (i.e., rtw_write_port_cancel()). _rtw_write_port_cancel() is a mere redefinition of rtw_write_port_cancel() and it is unneeded. usb_write_port_cancel() was the only functions assigned to the (*_usb_write_port_cancel) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-13-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_read_port_cancel()Pavel Skripkin1-2/+1
Remove the unnecessary _rtw_read_port_cancel() and usb_read_port_cancel() and embed their code into the caller (i.e., rtw_read_port_cancel()). _rtw_read_port_cancel() is a mere redefinition of rtw_read_port_cancel() and it is unneeded. usb_read_port_cancel() was the only functions assigned to the (*_usb_read_port_cancel) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-12-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write_port()Pavel Skripkin1-3/+1
Remove the unnecessary _rtw_write_port() and usb_write_port() and embed their code into the caller (i.e., rtw_write_port()). _rtw_write_port() is a mere redefinition of rtw_write_port() and it is unneeded. usb_write_port() was the only functions assigned to the (*_usb_write_port) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-11-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_read_port()Pavel Skripkin1-3/+1
Remove the unnecessary _rtw_read_port() and usb_read_port() and embed their code into the caller (i.e., rtw_read_port()). _rtw_read_port() is a mere redefinition of rtw_read_port() and it is unneeded. usb_read_port() was the only functions assigned to the (*_usb_read_port) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-10-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_writeN()Pavel Skripkin1-3/+1
Remove the unnecessary _rtw_writeN() and usb_writeN() and embed their code into the caller (i.e., rtw_writeN()). _rtw_writeN() is a mere redefinition of rtw_writeN() and it is unneeded. usb_writeN() was the only functions assigned to the (*_usb_writeN) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-9-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write32()Pavel Skripkin1-3/+1
Remove the unnecessary _rtw_write32() and usb_write32() and embed their code into the caller (i.e., rtw_write32()). _rtw_write32() is a mere redefinition of rtw_write32() and it is unneeded. usb_write32() was the only functions assigned to the (*_usb_write32) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-8-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write16()Pavel Skripkin1-3/+1
Remove the unnecessary _rtw_write16() and usb_write16() and embed their code into the caller (i.e., rtw_write16()). _rtw_write16() is a mere redefinition of rtw_write16() and it is unneeded. usb_write16() was the only functions assigned to the (*_usb_write16) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-7-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of usb_write8()Pavel Skripkin1-3/+1
Remove the unnecessary _rtw_write8() and usb_write8() and embed their code into the caller (i.e., rtw_write8()). _rtw_write8() is a mere redefinition of rtw_write8() and it is unneeded. usb_write8() was the only functions assigned to the (*_usb_write8) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-6-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of rtw_read32()Pavel Skripkin1-2/+1
Remove the unnecessary _rtw_readr32() and usb_read32() and embed their code into the caller (i.e., rtw_read32()). _rtw_read32() is a mere redefinition of rtw_read32() and it is unneeded. usb_read32() was the only functions assigned to the (*_usb_read32) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-5-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of rtw_read16()Pavel Skripkin1-2/+1
Remove the unnecessary _rtw_read16() and usb_read16() and embed their code into the caller (i.e., rtw_read16()). _rtw_read16() is a mere redefinition of rtw_read16() and it is unneeded. usb_read16() was the only functions assigned to the (*_usb_read16) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-4-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove the helpers of rtw_read8()Pavel Skripkin1-2/+1
Remove the unnecessary _rtw_read8() and usb_read8() and embed their code into the caller (i.e., rtw_read8()). _rtw_read8() is a mere redefinition of rtw_read8() and it is unneeded. usb_read8() was the only functions assigned to (*_usb_read8) pointer, so we can simply remove it and make a direct call. This patch is in preparation for the _io_ops structure removal. 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-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-17staging: r8188eu: remove usb_{read,write}_mem()Pavel Skripkin1-4/+0
Remove usb_{read,write}_mem() because they are unused. 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-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-13staging: r8188eu: remove unused function prototypeMartin Kaiser1-2/+0
There's no rtw_write_scsi function in this driver. Remove its prototype. Acked-by: Michael Straube <straube.linux@gmail.com> Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210908085747.32254-2-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-07-30staging: r8188eu: fix include directory messGreg Kroah-Hartman1-2/+2
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: Convert header copyright info to SPDX format, part 3Larry Finger1-19/+2
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 Potter1-0/+387
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>