- 17 Jan, 2023 40 commits
-
-
Martin Kaiser authored
Remove struct reg_protocol_rd. It's not used in the r8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-11-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The dev_power_down function is not present in the r8188eu driver. Remove its prototype. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The rtw_write_scsi function is not present in the r8188eu driver. Remove its prototype. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the prototypes for attrib read and write functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
struct io_queue is not used in the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove some prototypes for async write functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove some prototypes for async read functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove some prototypes for ioreq functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove some prototypes for io functions which are not present in the r8188eu driver. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
struct io_priv has only one member (and a pointer to the enclosing struct adapter). We can remove struct io_priv and move its member directly into struct adapter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111195640.306748-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
usb_kill_urb handles a NULL parameter. There's no need for NULL checks before we call usb_kill_urb. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230111100201.251905-1-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the if clause in usb_write_port_complete and process the urb status regardless of bSurpriseRemoved, bDriverStopped and bWritePortCancel. The only possible results of urb status processing are updates to bSurpriseRemoved and bDriverStopped. All of the three status variable are set to true only if the whole USB processing has to be stopped (when the driver is unloaded or when the system goes to sleep). It's no problem if one of the "stop everything" variables is already set and the urb status processing sets another one. This patch removes the last goto in usb_write_port_complete. It's also part of the ongoing effort to limit the use of the "stop everything" variables. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The regs parameter of the usb_write_port_complete function is not used. We can remove it. We can also remove the macro to hide the regs parameter when usb_write_port_complete is used as callback function for an urb transfer. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
This trivial patch reformats the usb_write_port_complete function. Hopefully, this makes the code a bit easier to read. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Refactor the satus handling in usb_write_port_complete. Make it clearer what happens for each status and avoid all the goto statements. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230110205626.183516-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
vcs_setting in struct xmit_priv is not used any more. We can remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-13-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The vcs component in struct xmit_priv is set but not used. We can remove vcs and the rtw_update_protection function, whose only job is to set vcs. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-12-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The vcs_type component of struct xmit_priv is not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-11-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove unused defines for Queue Select Value in TxDesc. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
txirp_cnt in struct xmit_priv is initialised but never read. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
hal_xmit_handler is not used by the r8188eu driver. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-8-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
dir_dev in struct adapter is not used by the r8188eu driver. It can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-7-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The switch statement in usb_write_port_complete has only one single case. Replace it with an if statement. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-6-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
voq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove voq_cnt and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-5-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
viq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove viq_cnt and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-4-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
bkq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove bkq_cnt and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-3-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
beq_cnt in struct xmit_priv is initialised, incremented and decremented but never read. Remove beq_cnt and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Acked-by: Pavel Skripkin <paskripkin@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230109212852.75612-2-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michael Straube authored
Convert the function rtw_writeN() away from returning _FAIL or _SUCCESS which uses inverted error logic. Use the common error logic instead. Return 0 for success and negative values for failure. Signed-off-by: Michael Straube <straube.linux@gmail.com> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20230108123804.3754-1-straube.linux@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The _rtw_init_xmit_priv function calls rtw_alloc_hwxmits to allocate memory for pxmitpriv->hwxmits (this is an array of struct hw_xmit). This allocation uses kzalloc, the allocated memory is initialised with 0. After the allocation, _rtw_init_xmit_priv calls rtw_init_hwxmits to set an element of each hw_xmit to 0. This is not necessary, we can remove the rtw_init_hwxmits call and the now unused function rtw_init_hwxmits. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-20-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove the unused function parameter phwxmit from function dequeue_one_xmitframe. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-19-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
There's no need to call rtw_free_xmitframe before we dequeue the first frame. pxmitframe is always NULL at this point, rtw_free_xmitframe will do nothing in this case. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-18-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove tx_retevt from struct xmit_priv. This semaphore is initialised but not used. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-17-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Remove terminate_xmitthread_sema from struct xmit_priv. This semaphore is initialised but not used. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-16-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The bm_pending queue in struct xmit_priv is initialised but not used. It can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-15-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The dma_transfer_addr component in struct xmit_buf is initialised but not used. Remove it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-14-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The bpending array in struct xmit_buf is unused. Remove it. (struct xmit_buf is not part of the interface between the kernel driver and the device's firmware. It's safe to remove components from this struct.) Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-13-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
The qos_option variable in function rtw_make_wlanhdr should be a boolean as it's set to true or false. We can directly set it to pqospriv->qos_option instead of using a default value and if statements. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-12-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Simplify the error handling in rtw_make_wlanhdr. Exit immediately instead of jumping to the end of the function. We don't have to do any clean-up. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-11-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
Reorder the code in rtw_make_wlanhdr to make the function simpler. There's a large if statement to check that we process only data frames. Revert the condition and exit for non-data frames. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-10-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Martin Kaiser authored
We do not need the psta check in the while loop of rtw_xmitframe_coalesce. psta is already checked near the start of the function and is not modified afterwards. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150 Link: https://lore.kernel.org/r/20221230180646.91008-9-martin@kaiser.cxSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-