Commit graph

68 commits

Author SHA1 Message Date
Bhaktipriya Shridhar bd37c43c8d staging: rtl8188eu: core: Remove casts of pointer to same type
Casting a pointer to a pointer of the same type is unnecessary, so remove
these unnecessary casts.

This was done with Coccinelle:

@@
type T;
T *ptr;
@@
- (T *)ptr
+ ptr

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhaktipriya Shridhar b383f2acbd staging: rtl8188eu: core: Remove unnecessary braces
This patch removes braces for single statement blocks. The warning
was detected using checkpatch.pl.
Coccinelle was used to make the change.

@@
expression e,e1;
@@

- if (e) {
+ if (e)
  e1;
- }

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 15:06:51 -08:00
Geliang Tang b9f1c275b6 staging: rtl8188eu: use list_first_entry_or_null()
Use list_first_entry_or_null() instead of list_empty() + container_of()
to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 19:00:46 -08:00
Andy Shevchenko fb27e19c08 staging: rtl8188eu: replace open-coded print_hex_dump()
No need to reinvent a wheel, i.e. print_hex_dump(). Replace an open-coded
variant by generic kernel helper.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 19:00:46 -08:00
Ivan Safonov 160edfddf7 staging: rtl8188eu: operator = replaced by += in loop increment
x = x + a and x += a equivalen, but second preferably.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 09:09:08 +09:00
Jakub Sitnicki 0a0796eb16 staging: rtl8188eu: Introduce monitor interface for IEEE 802.11 frames
This adds support for monitoring IEEE 802.11 Data and Management frames
received or transmitted by a RTL8188EU-based device handled by this
driver.

The monitor interface is not enabled by default and will be registered
only if monitor_enable module parameter is set to 1.  When enabled it
will show up as a monX network device, which can be used by the
userspace programs for monitoring network traffic.

It is intended as an exploratory/debugging tool for rtl8188eu driver.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-18 19:53:50 -07:00
Sudip Mukherjee b17c858def staging: rtl8188eu: remove multiple blank line
Multiple blank lines is against the kernel coding style and checkpatch
complains for that.

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 a45515f383 staging: rtl8188eu: remove unused function
The function rtw_init_recvframe() was not being used.

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 fbd0968708 staging: rtl8188eu: remove exit label
An exit label which does nothing except return, is not worth having. So
remove it.

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
Paul Gortmaker 04fbf979b3 rtl8188eu: don't duplicate ieee80211 constants for status/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

Note that a couple of them had slight wording differences, things like
INVALID vs. NOT_VALID or similar, so they are aligned with the global
naming conventions here, as dictated by compile testing.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:13 +02:00
Haneen Mohammed adb3d770d2 Staging: rtl8188eu: Remove parentheses around right side an assignment
Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:08:01 +01: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
Vaishali Thakkar 4d4efe3e95 Staging: rtl8188eu: Eliminate use of _set_timer
This patch introduces the use of API function mod_timer
instead of driver specific function _set_timer as it is
a more efficient and standard way to update the expire
field of an active timer. Also, definition of function
_set_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; expression y;@@

- _set_timer (&x, y);
+ mod_timer (&x, jiffies + msecs_to_jiffies (y));

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:04:55 +01:00
Sudip Mukherjee c78a964c25 staging: rtl8188eu: unneeded return variable
a variable is declared and initialized and then never updated in the
function.This default value is then used as the return from the
function.
So removed that unneeded return variable and returning that default
initial value directly.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:45:35 -08:00
Jia He 7be921a226 staging: rtl8188eu: Fix coding style space related ERROR problems
This fixes space related ERROR reports by checkpatch.pl
Generated by $ git ls-files "drivers/staging/rtl8188eu/*.[ch]" | \
  xargs ./scripts/checkpatch.pl -f --fix-inplace --strict --types=SPACING
Already checked by text comparasion
$git diff -w
and binary comparasion of r8188eu.ko
$objdiff diff <old_commit> <new_commit>

Signed-off-by: Jia He <hejianet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 18:13:34 -08:00
Tapasweni Pathak 60c8991148 staging: rtl8188eu: core: Remove useless cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:05:48 -07:00
navin patidar 0cccd45f0a staging: rtl8188eu: Remove mp( mesh point) mode support
We've already removed non-standard ioctl handlers, used by driver
to support mp mode.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:08:47 -07:00
navin patidar 27c8aac7a3 staging: rtl8188eu: Use get_unaligned_be16() instead of RTW_GET_BE16()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:14 -04:00
navin patidar f7091bc63a staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar 8d5bdece42 staging: rtl8188eu: Replace rtw_list_delete() with list_del_init()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar aa3f5ccb01 staging: rtl8188eu: Remove _rtw_init_listhead(), wrapper for INIT_LIST_HEAD()
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 9c4b0e70af staging: rtl8188eu: Remove rtw_is_list_empty(), wrapper for list_emty()
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 8466070080 staging: rtl8188eu: Remove function rtw_end_of_queue_search()
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 ae6787ad4a staging: rtl8188eu: Remove rtw_list_insert_tail(), wrapper for list_add_tail()
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 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 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 9fdbb46174 staging: rtl8188eu: Remove 'spinlock_t lock' from struct recv_priv
Remove unused variable 'spinlock_t lock'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:41:50 +09:00
navin patidar 948b60a903 staging: rtl8188eu: Remove 'semaphore allrxreturnevt' from struct recv_priv
Remove unused variable 'semaphore allrxreturnevt'.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 01:41:40 +09:00
Larry Finger 7ca83759a6 staging: r8188eu: Fix some sparse warnings
In a patch entitles "staging: r8188eu: Fix case where ethtype was never obtained
and always be checked against 0" (commit ID unknown), I introduce an endian error.
This patch fixes that, and removes two additional sparse warnings.

drivers/staging/rtl8188eu/core/rtw_recv.c:653:6: warning: symbol 'process_pwrbit_data' was not declared. Should it be static?
drivers/staging/rtl8188eu/core/rtw_recv.c:1828:5: warning: symbol 'enqueue_reorder_recvframe' was not declared. Should it be static?

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23 20:22:53 +09:00
navin patidar 5fe2f910f4 staging: rtl8188eu: Remove function rtw_enqueue_recvbuf()
rtw_enqueue_recvbuf() 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:29:10 -04:00
navin patidar 0521a2a6f9 staging: rtl8188eu: Remove function rtw_enqueue_recvbuf_to_head()
rtw_enqueue_recvbuf_to_head() 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:29:09 -04:00
navin patidar d27ab0b9df staging: rtl8188eu: Remove function rtw_dequeue_recvbuf()
rtw_dequeue_recvbuf() 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:29:09 -04:00
Konrad Zapalowicz 79bbb1b8a1 staging: rtl8188eu: fix spaces instead of tabs for rtw_recv.c
This commit fixes the following checkpatch errors:

rtl8188eu/core/rtw_recv.c
    - 1874: ERROR: code indent should use tabs where possible

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 15:50:33 -07:00
Larry Finger 33c84bc14c staging: r8188eu: Fix case where ethtype was never obtained and always be checked against 0
Zero-initializing ether_type masked that the ether type would never be
obtained for 8021x packets and the comparison against eapol_type
would always fail.

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16 13:07:19 -07:00
Larry Finger 9452bf5602 staging: r8188eu: Calling rtw_get_stainfo() with a NULL sta_addr will return NULL
This makes the follow-on check for psta != NULL pointless and makes
the whole exercise rather pointless. This is another case of why
blindly zero-initializing variables when they are declared is bad.

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-16 11:46:18 -07:00
Masanari Iida 40a46d8b40 staging: rtl8188eu: Fix typo in rtl8188eu/core
Fix spelling typo in comments and printk within
rtl8188eu/core

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 15:12:11 -08:00
Larry Finger bd86e98cb9 staging: r8188eu: Remove get_recvframe_data()
This inline function checks that the pointer is not NULL and then returns
the rx_data member. Unfortunately, all 3 callers of this function have
dereferenced that pointer before this routine is called. As the check for
NULL is useless, eliminate the routine.

Reported-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:36:16 -08:00
Larry Finger c24e0ba3f2 staging: r8188eu: Remove get_recvframe_len()
This simple routine is replaced by a simple access of the len member.

Reported-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:36:16 -08: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
Larry Finger 44630dee03 staging: r8188eu: Remove unnecessary list_head entry from recv_frame union
Struct recv_frame_hdr already contains a list head. This one is pointless.

Suggested-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
Larry Finger 05c9bc1f36 staging: r8188eu: Fix Smatch warnings
Smatch reports the following:

core/rtw_ieee80211.c:489 rtw_get_wpa_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:491 rtw_get_wpa_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:493 rtw_get_wpa_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:495 rtw_get_wpa_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:497 rtw_get_wpa_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:505 rtw_get_wpa2_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:507 rtw_get_wpa2_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:509 rtw_get_wpa2_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:511 rtw_get_wpa2_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:513 rtw_get_wpa2_cipher_suite() warn: add some parenthesis here?
core/rtw_ieee80211.c:534 rtw_parse_wpa_ie() warn: add some parenthesis here?
core/rtw_ieee80211.c:579 rtw_parse_wpa_ie() warn: add some parenthesis here?
core/rtw_ieee80211.c:649 rtw_parse_wpa2_ie() warn: add some parenthesis here?
core/rtw_ieee80211.c:803 rtw_get_wps_attr() warn: add some parenthesis here?
core/rtw_ieee80211.c:1213 rtw_get_p2p_ie() warn: add some parenthesis here?
core/rtw_ieee80211.c:1248 rtw_get_p2p_attr() warn: add some parenthesis here?
core/rtw_mlme.c:258 _rtw_find_network() warn: add some parenthesis here?
core/rtw_mlme.c:1581 rtw_check_join_candidate() warn: this array is probably non-NULL. 'pmlmepriv->assoc_ssid.Ssid'
core/rtw_mlme.c:1843 SecIsInPMKIDList() warn: add some parenthesis here?
core/rtw_mlme_ext.c:4189 on_action_public_vendor() warn: add some parenthesis here?
core/rtw_recv.c:1157 validate_recv_mgnt_frame() warn: add some parenthesis here?
core/rtw_xmit.c:671 xmitframe_addmic() warn: add some parenthesis here?
hal/rtl8188e_mp.c:206 Hal_MPT_CCKTxPowerAdjustbyIndex() error: buffer overflow 'CCKSwingTable_Ch1_Ch13' 33 <= 255
hal/rtl8188e_mp.c:215 Hal_MPT_CCKTxPowerAdjustbyIndex() error: buffer overflow 'CCKSwingTable_Ch14' 33 <= 255

Not listed here is one remaining buffer overflow message that I believe to be an error in Smatch.

These warnings were reported by Dan Carpenter.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14 09:22:19 -08:00
Larry Finger cf867c3930 staging: r8188eu: Fix more Smatch warnings and errors
After updating Smatch, the following new errors and warnings are reported:

drivers/staging/rtl8188eu/core/rtw_recv.c:368 recvframe_chkmic() warn: variable dereferenced before check 'psecuritypriv' (see line 364)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:2642 rtw_wps_start() warn: variable dereferenced before check 'pdata' (see line 2636)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4461 rtw_dbg_port() error: we previously assumed 'pregpriv' could be null (see line 4453)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:4473 rtw_dbg_port() error: we previously assumed 'pregpriv' could be null (see line 4469)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-14 09:18:39 -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 c44e5e39c3 staging: r8188eu: Eliminate macro to get next list item
The driver contains a macro that gets the next item in a linked list.
Replace it with a simple copy of the pointer.

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 bea8810043 staging: r8188eu: Replace misspelled local container macro
This driver has its own implementation of a "container_of" macro. It
is replaced with the standard container_of version. Most of these
are a straight one-to-one replacement; however, a few of the instances
referred to the member of a union. Those were replaced with the
struct that is part of that union.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:41:14 -08:00