1
0
Fork 0
Commit Graph

25 Commits (8f481b50ea653ff0aea6accbb4bb02a15cf00531)

Author SHA1 Message Date
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