Commit graph

43 commits

Author SHA1 Message Date
Michael Straube 056ef75860 staging: rtl8188eu: remove unnecessary parentheses in recv_linux.c
Remove unnecessary parentheses reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11 11:38:54 -08:00
Michael Straube c3da4dea60 staging: rtl8188eu: add spaces around '*' in recv_linux.c
Add spaces around '*' to conform with kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11 11:38:54 -08:00
Michael Straube c3c4b8e55f staging: rtl8188eu: use __func__ in recv_linux.c
Use __func__ instead of hardcoded function name.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11 11:38:53 -08:00
Michael Straube 247e415fbc staging: rtl8188eu: use is_multicast_ether_addr in recv_linux.c
Use is_multicast_ether_addr instead of custom IS_MCAST in
os_dep/recv_linux.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-08 14:23:15 +02:00
Michael Straube a98a5c27b5 staging: rtl8188eu: remove whitespace - coding style
Remove unrequired whitespace in some declarations,
fix an indentation and remove unrequired blank lines.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 22:46:01 +09:00
Michael Straube 71e9bd3ff8 staging: rtl8188eu: add SPDX identifiers
This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-26 11:58:22 +08:00
Ivan Safonov 00135fc5c3 staging:r8188eu: Remove rx_handler_data unnecessary read
Rx handler (assigned with netdev_rx_handler_register,
called from __netif_receive_skb()) uses value of dev->rx_handler_data.
The driver has no rx handler and does not need it, so remove rx_handler_data read.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-11 11:48:24 +02:00
Kees Cook b7749656e9 staging: rtl8188eu: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Juliana Rodrigues <juliana.orod@gmail.com>
Cc: Ivan Safonov <insafonov@gmail.com>
Cc: Gargi Sharma <gs051095@gmail.com>
Cc: sayli karnik <karniksayli1995@gmail.com>
Cc: Yamanappagouda Patil <goudapatilk@gmail.com>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Victor Carvajal <carva005@gmail.com>
Cc: Sebastian Haas <sehaas@deebas.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-18 15:33:15 +02:00
Ivan Safonov df47a14c2c staging:r8188eu: replace recv_frame->rx_(data|len|tail) with pkt->(data|len|tail) and remove unused recvframe_(put|pull|pull_tail)()
recv_frame->rx_(data|len|tail) duplicate pkt (skb) data|len|tail members
and require special functions recvframe_(put|pull|pull_tail)()
instead of skb_(put|pull|trim).
Replace rx_(data|len|tail) with pkt->(data|len|tail),
remove rx_(data|len|tail) and remove recvframe_(put|pull|pull_tail)().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09 13:22:09 +01:00
Ivan Safonov ee151399ac staging:r8188eu: remove unnecessary trace output in rtw_recv_indicatepkt()
Trace output for each received packet in rtw_recv_indicatepkt() is redudant.
Remove it.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-16 18:11:11 +01:00
Ivan Safonov bb5cd2e531 staging:r8188eu: remove rtw_os_recv_resource_alloc function
This simple function does not allocate any resource.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:14 +02:00
Ivan Safonov 2e2f78d078 staging:r8188eu: remove pkt_newalloc member of the recv_buf structure
This member does not used.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:31:15 +02:00
Kyle Kuffermann fb025382b4 staging: rtl8188eu: Remove license paragraph with mailing address
This fixes the issue reported by checkpatch.pl:

	"Do not include the paragraph about writing to the Free Software
	Foundation's mailing address from the sample GPL notice. The FSF
	has changed addresses in the past, and may do so again.  Linux
	already includes a copy of the GPL."

in all files for the rtl8188eu driver.

Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Shraddha Barke fc749a9a3d Staging: rtl8188eu: os_dep: recv_linux.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:01 -07:00
Sudip Mukherjee ea31f616b6 staging: rtl8188eu: remove unused define
_RECV_OSDEP_C_ was only defined here but never checked anywhere.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:17:59 -07:00
Sudip Mukherjee 469d3807e7 staging: rtl8188eu: rearrange code
Re-arrange the code to directly return success or failure, thus removing
the variable used in the function.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:17:59 -07:00
Sudip Mukherjee 0b47649c78 staging: rtl8188eu: make function void
The return value of rtw_os_recv_resource_alloc() is never checked, so
make it as void. Moreover as of now the function can not fail.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:17:58 -07:00
Sudip Mukherjee 1695cd29b2 staging: rtl8188eu: remove unused argument
The function rtw_os_recv_resource_alloc() only uses the argument
struct recv_frame *. So remove the other unused argument.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:17:58 -07:00
Vaishali Thakkar 28af7ea81e Staging: rtl8188eu: Eliminate use of _init_timer
This patch introduces the use of API function setup_timer
instead of driver specific function init_timer as it is
the preferred and standard way to set and setup the timer.
To be compatible with the changes, argument types of
referenced functions are changed. Also, definition of
function _init_timer is removed as it is no longer needed
after this change.

Here, these cases are handled using Coccinelle and
semantic patch used for this is as follows:

@@ expression x, y; identifier a, b;@@

- _init_timer (&x, y, a, b);
+ setup_timer (&x, a, (unsigned long)b);

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:07:15 +01:00
navin patidar 7ebd4cba67 staging: rtl8188eu: Remove wrapper function _rtw_reordering_ctrl_timeout_handler()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:16:10 -07:00
navin patidar a16d66b8fe staging: rtl8188eu: Remove unused function rtw_os_read_port()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:16:10 -07:00
navin patidar 1ce39848e1 staging: rtl8188eu: Remove function _rtw_memset()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar 17452ee9d3 staging: rtl8188eu: Merge usb_ops.h into usb_ops_linux.h
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:25:47 -04:00
navin patidar 2478a1ce2e staging: rtl8188eu: Remove function _rtw_read_port()
_rtw_read_port() is a wrapper function, being used to call usb_read_port().
use usb_read_port() directly and drop _rtw_read_port().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:01 -07:00
navin patidar cba1ce6277 staging: rtl8188eu: Remove function rtw_os_recvbuf_resource_free()
Use usb_free_urb() instead of rtw_os_recvbuf_resource_free() to free URB.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:41:51 +09:00
navin patidar 65ae271b17 staging: rtl8188eu: Remove function rtw_hostapd_mlme_rx()
rtw_hostapd_mlme_rx() has empty defination, so we can remove it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:41:51 +09:00
navin patidar 5aae05964e staging: rtl8188eu: Remove function rtw_os_recv_resource_free()
rtw_os_recv_resource_free() has empty defination, so we can remove it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:41:51 +09:00
navin patidar db7bf478c8 staging: rtl8188eu: Remove function rtw_os_recv_resource_init()
rtw_os_recv_resource_init() has empty defination, so we can remove it.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:41:51 +09:00
navin patidar 09c3fbba88 staging: rtl8188eu: Remove 'u8 *pbuf' from struct recv_buf
Instead of using pbuf to pass sbk data pointer to usb_fill_bulk_urb(),
we can use precvbuf->pskb->data to do that.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:11 -04:00
navin patidar a1f3b3fdba staging: rtl8188eu: Remove 'u32 ref_cnt' from struct recv_buf
Driver isn't making any use of value stored in variable ref_cnt.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:11 -04:00
navin patidar 74e250e479 staging: rtl8188eu: Remove 'u32 len' from struct recv_buf
Remove unused variable 'u32 len'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:11 -04:00
navin patidar f0f4499d70 staging: rtl8188eu: Remove 'pallocated_buf' from struct recv_buf
pallocated_buf is not being used by driver.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:11 -04:00
navin patidar e205cae24d staging: rtl8188eu: Remove 'irp_pending' from struct recv_buf
irp_pending is initialized to false inside rtw_os_recvbuf_resource_alloc()
and value of irq_pending never changed after that, so 'if (!precvbuf->irp_pending)'
inside rtw_os_read_port() function will be always true.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:10 -04:00
navin patidar c11f3fff32 staging: rtl8188eu: Remove pdata, phead, ptail and pend from struct recv_buf
Driver is not making use of value stored in removed variables.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:10 -04:00
navin patidar afdd36ef9c staging: rtl8188eu: Remove 'int transfer_len' from struct recv_buf
Driver is not making any use of value stored in this variable.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03 20:30:10 -04:00
Larry Finger f31cca8e92 staging: r8188eu: Remove union wrapping of recv_frame
We have now removed everthing from the union except the struct. The union
can be deleted, the struct renamed, and the referencing of members of the
struct becomes a lot simpler.

Some, but not all, of the problems noted by checkpatch.pl have been fixed.

Sugggested-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-15 12:34:44 -08:00
navin patidar 48d68b06b2 staging: rtl8188eu: remove header file ethernet.h
"ethernet.h" is included in three files but only "rtw_recv.c" using two macros
defined in "ethernet.h", so move used macros in "rtw_recv.c" and
remove "include/ethernet.h" header file and inclusion of this header file.

v2:
First version of this patch failed to apply.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-12 09:32:18 -08:00
Larry Finger f578b5d33e staging: r8188eu: Remove _func_enter and _func_exit macros
These debugging macros are seldom used for debugging once the driver
is working. If routine tracing is needed, it can be added on an
individual basis.

In a few cases, removal of the exit macro left a bare label. In these
cases, a go to that label was replaced by a return.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:41:15 -08:00
Larry Finger f42f52aaf9 staging: r8188eu: Replace wrapper around _rtw_memcmp()
This wrapper is replaced with a simple memcmp(). As the wrapper inverts the
logic of memcmp(), care needed to be taken.

This patch also adds one include of vmalloc.h that was missed in a previous
patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:41:13 -08:00
Larry Finger c01fb49636 staging: r8188eu: Replace rtw_get_current_time() with jiffies
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20 08:57:45 -08:00
Wei Yongjun a4ec93d8b4 staging: r8188eu: remove needless check before usb_free_urb()
usb_free_urb(NULL) is safe and this check is not required.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:48:46 -07:00
Larry Finger 9b276d2bd2 staging: r8188eu: Fix a smatch warnings in core/rtw_recv.c
Smatch reports the following:
drivers/staging/rtl8188eu/os_dep/recv_linux.c:227 rtw_recv_indicatepkt() warn: variable dereferenced before check 'precv_frame' (see line 139)

The test in this location is removed and added in the free routine.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:47:45 -07:00
Larry Finger 5adef66acf staging: r8188eu: Add files for new driver - part 19
This commit adds files os_dep/os_intfs.c, os_dep/recv_linux.c,
and os_dep/rtw_android.c.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-22 10:20:11 -07:00