Commit graph

525 commits

Author SHA1 Message Date
Luca Ceresoli
782eddd748 staging: rtl8188eu: unexport internal functions
These are internal functions. Remove their declaration in rtw_mlme_ext.h
and make them static.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:22:05 -07:00
Luca Ceresoli
68345dd7bc staging: rtl8188eu: rtw_mlme_ext.c: unexport message callbacks
These are internal functions. Remove their declaration in rtw_mlme_ext.h
and make them static.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:22:05 -07:00
Luca Ceresoli
4e10234453 staging: rtl8188eu: rtw_mlme_ext.c: reorder message callbacks and tables
The message handling stored in mlme_sta_tbl and OnAction_tbl are internal and
will be declared static, and their declaration removed from rtw_mlme_ext.h, in
a later commit.

This would break compilation, since they are are referenced before their
definition.

Reorder these functions and the structures that hold them so that symbols are
defined before they are referenced, without the need for forward declarations.

This commit only reorders code, there is no content change.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:22:05 -07:00
Fabian Frederick
8a889aee58 Staging: rtl8188eu: use swap() in WMMOnAssocRsp()
Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:13:27 -07:00
Andrzej Pietrasiewicz
e703f23747 staging: rtl8188eu: eliminate spaces before commas
Eliminate "space prohibited before that ','" errors found by checkpatch,
but do this only to lines which after the patch is applied do not
exceed 80 characters. Out of that only those lines are changed, whose
context does not exceed 80 characters in each line. In other words the
changes are limited to cases where the patch generated is itself
checkpatch-correct.

Rebased onto next-20150605.

Signed-off-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-10 18:04:04 -07:00
Markus Böhme
bfee7c9665 staging: rtl8188eu: core/rtw_led.c: fix coding style issue
Convert spaces at the start of a line to a tab.

Signed-off-by: Markus Böhme <markus.boehme@mailbox.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:45:30 -07:00
Hari Prasath Gujulan Elango
ed701c4ab2 staging: rtl8188eu: use table to get channel plan from country code
Use a table to get a channel plan from a given country code.This was a
TODO mentioned as a comment in the driver.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:38:56 -07:00
Jakub Sitnicki
44af49b63e staging: rtl8188eu: Remove redundant CONFIG_88EU_AP_MODE tests
Remove #ifdef's enclosed by an #ifdef test for the same macro to improve
readability.

No code changes:

  md5, CONFIG_88EU_AP_MODE=y:
    b819a33f65133607ebc33b8999ee3a79  r8188eu.o.before
    b819a33f65133607ebc33b8999ee3a79  r8188eu.o.after

  md5, CONFIG_88EU_AP_MODE=n:
    94c84035d59285408b866a57b442276d  r8188eu.o.before
    94c84035d59285408b866a57b442276d  r8188eu.o.after

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 12:01:37 +09:00
Jagan Teki
0a36d5fbd9 staging: rtl8188eu: core: Fix line over 80 characters
This patch fixes line over 80 characters warninings while
running checkpatch.pl - "WARNING: line over 80 characters"

Signed-off-by: Jagan Teki <jteki@openedev.com>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:47:56 +09: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
Niranjan Dighe
da3c8deef6 Staging: rtl8188eu: replace kzalloc and memcpy by kmemdup
This was generated by 'make coccicheck' using scripts at
scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:16:19 +01:00
Matteo Semenzato
c181be7f32 Staging: rtl8188eu: remove dead code
The condition pxmitpriv->hwxmit_entry == 5 is always false because
HWXMIT_ENTRY is always 4.

Signed-off-by: Matteo Semenzato <mattew8898@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:13:13 +01:00
Hatice ERTÜRK
4c0dbe0a2e Staging: rtl8188eu: Delete space
Deleted spaces before ','.Because it is prohibited by the kernel coding style.
Error found with checkpatch.pl

Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-23 22:39:15 +01:00
Vatika Harlalka
2c4b2980ae Staging: rtl8188eu: Remove extern as it is defined but never used
RTW_WPA_VERSION is removed as is declared and defined but
never used in the code.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:29:27 +01: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
Ioana Ciornei
e7b1269db0 drivers: staging: rtl8188eu: core: rtw_security: Fix misspelled word
This patch fixes the checkpatch.pl warning:

WARNING: 'halfs' may be misspelled - perhaps 'halves'?

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:04:24 +01:00
Somya Anand
22e7f1e25b Staging: rtl8188eu: Remove unneeded return statement
This patch removes unnecessary return statement from a void
function and hence make it more compatible.

This issue is identified by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:10 +01:00
Somya Anand
1ce7948fe1 Staging: rtl8188eu: Remove redundant local variable
This patch removes a redundant variable "val" and adds
inline return statements. It also adds a default case
to the switch statement which returns 0 to keep the logic
intact.

It also removes a redundant variable "inx" and adds inline
return statements.

This issue is identified by the following coccinelle script.
@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:10 +01:00
Navya Sri Nizamkari
0507a1e52b staging: rtl8188eu: Use kcalloc instead of kzalloc.
This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15 18:41:09 +01:00
Tina Johnson
dce34aee00 drivers: staging: rtl8188eu: core: Removed unnecessary parentheses
Parentheses around the right side of an assignment statement are
unnecessary and hence removed. Coccinelle was used to produce the
patch:

@rule1@
identifier x,y;
constant c;
@@

(

 x =
-(
 y << c
-)
 ;
|
 x =
-(
 y >> c
-)
 ;
|
 x =
-(
 y + c
-)
 ;
|
 x =
-(
 y - c
-)
 ;

)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:37:22 +01:00
Somya Anand
acd3f6cf05 staging: rtl8188eu: Remove unneeded parentheses
This patch removes unneeded parentheses from a if statement
for better readability.

This issue is identified by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-09 13:19:17 +01:00
Somya Anand
3bd52fb13a Staging: rtl8188eu: Remove unnecessary return statements
This patch removes unnecessary return statement from a void
function.

This issue is identified by checkpatch.pl

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:30:07 -08:00
Somya Anand
aea42ee421 Staging: rtl8188eu: Remove redundant local variable
This patch removes a redundant variable "raid" and adds inline
return statements.

This issue is identified by the following coccinelle script:
@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:30:07 -08:00
Aya Mahfouz
07add2d38d staging: rtl8188eu: remove extra parentheses around right bit shift operations
Removes extra parentheses around bitwise right shift operations.
The cases handled here are when resultant values are assigned to
variables. The issue was detected and resolved using the following
coccinelle script:

@@
expression e, e1;
constant c;
@@

e =
-(e1
+e1
>>
-c);
+c;

@@
identifier i;
constant c;
type t;
expression e;
@@

t i =
-(e
+e
>>
-c);
+c;

@@
expression e, e1;
identifier f;
constant c;
@@

e1 = f(...,
-(e
+e
>>
-c)
+c
,...);

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 15:22:42 -08:00
Aya Mahfouz
10a8643b76 staging: rtl8188eu: rewrite the right hand side of an assignment
This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

This issue was detected and resolved using the following
coccinelle script:

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 15:24:15 -08:00
Vaishali Thakkar
e4504a1519 Staging: rtl8188eu: Use put_unaligned_le16
Using byte ordering functions and then memcpy() is risky and
prone to hide errors which are hard to track down. So, this
patch introduces the use of function put_unaligned_le16 which
makes the code clear. Here, use of variable tim_bitmap_le
and variable itself is removed. Also, to be compatible with the
changes header file is added too.

Coccinelle is used to do this change and semantic patch used for
this is as follows:

@a@
typedef __le16;
__le16 e16;
identifier tmp;
expression ptr;
expression y,e;
type T;
@@

- tmp = cpu_to_le16(y);

<+... when != tmp
(
- memcpy(ptr, (T)&tmp, \(2\|sizeof(__le16)\|sizeof(e16)\));
+ put_unaligned_le16(y,ptr);
|
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le16(y,ptr);
)
...+>
? tmp = e

@@ type T; identifier a.tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:34:17 -08:00
Nicholas Mc Guire
e971e8de38 staging: rtl8188eu: core: switch with redundant cases
A few redundant switch cases as well as a redundant if/else
within one of the cases was consolidated to a single call.
The cases are intentionally retained for documentation purposes.

case WIFI_REASSOCREQ,WIFI_PROBEREQ,WIFI_BEACON,WIFI_ACTION all
have the same effect - notably the also for WIFI_PROBEREQ where
the if/else is executing the same function.

These redundant cases could all be dropped and consolidated into
the default but probably it is better for documentation/readability
to leave them in the switch/case explicitly.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:37:52 +08:00
Kumar Amit Mehta
0137f1a019 staging: rtl8188eu: core: rtw_wlan_util.c: Fix for NULL dereference
In rtw_check_bcn_info(), check the return value of kzalloc() before
dereferencing it, to avoid NULL pointer dereference.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28 10:56:49 -08:00
Rickard Strandqvist
e575edfbd7 staging: rtl8188eu: core: rtw_mlme_ext.c: Remove unused function
Remove the function NULL_hdl() that is not used anywhere.

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:10:03 -08:00
Gangadhar Vukkesala
7aa36b4bc2 staging: rtl8188eu: Fixed a space coding style issue.
Fixed a space coding style issue which was found when running checkpatch.pl
script on rtw_ap.c.

Signed-off-by: Gangadhar Vukkesala <gangs.freelancer@gmail.com>
Reviewed-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:02:57 -08:00
Abel Moyo
74df1cd759 Staging: rtl8188eu: {core, hal, include}: Removed inline function
Removed inline function get_my_bssid and open coded all its references

Signed-off-by: Abel Moyo <abelmoyo.ab@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-17 14:02:57 -08:00
Greg Kroah-Hartman
deef2a118a Merge 3.18-rc7 into staging-work.
We want those staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:20:59 -08:00
Krzysztof Konopko
f4a52b40de rtl8188eu: Fix a typo in rtw_led.*
A rather obvious typo in one of the identifier has been found.  This patch
fixes the typo and ensures any lines changed do not exceed 80 characters
as indicated by scripts/checkpatch.pl

Signed-off-by: Krzysztof Konopko <kris@konagma.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 15:27:25 -08:00
Krzysztof Konopko
79a8641d9f rtl8188eu: Fix FSF_MAILING_ADDRESS in rtw_led.*
rtw_led.* files include Free Software Foundation's mailing address in
the sample GPL notice.  This is not desired and picked when running
scripts/checkpatch.pl.

Signed-off-by: Krzysztof Konopko <kris@konagma.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 15:27:25 -08:00
Larry Finger
33dc85c3c6 staging: r8188eu: Fix scheduling while atomic error introduced in commit fadbe0cd
In commit fadbe0cd52 entitled "staging:
rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()", the author failed
to note that the original code in the wrapper tested whether the caller
could sleep, and set the flags argument to kzalloc() appropriately.
After the patch, GFP_KERNEL is used unconditionally. Unfortunately, several
of the routines may be entered from an interrupt routine and generate
a BUG splat for every such call. Routine rtw_sitesurvey_cmd() is used in the
example below:

BUG: sleeping function called from invalid context at mm/slub.c:1240
in_atomic(): 1, irqs_disabled(): 0, pid: 756, name: wpa_supplicant
INFO: lockdep is turned off.
CPU: 2 PID: 756 Comm: wpa_supplicant Tainted: G        WC O   3.18.0-rc4+ #34
Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.20   04/17/2014
ffffc90005557000 ffff880216fafaa8 ffffffff816b0bbf 0000000000000000
ffff8800c3b58000 ffff880216fafac8 ffffffff8107af77 0000000000000001
0000000000000010 ffff880216fafb18 ffffffff811b06ce 0000000000000000
Call Trace:
 [<ffffffff816b0bbf>] dump_stack+0x4e/0x71
 [<ffffffff8107af77>] __might_sleep+0xf7/0x120
 [<ffffffff811b06ce>] kmem_cache_alloc_trace+0x4e/0x1f0
 [<ffffffffa0888226>] ? rtw_sitesurvey_cmd+0x56/0x2a0 [r8188eu]
 [<ffffffffa0888226>] rtw_sitesurvey_cmd+0x56/0x2a0 [r8188eu]
 [<ffffffffa088f00d>] rtw_do_join+0x22d/0x370 [r8188eu]
 [<ffffffffa088f6e8>] rtw_set_802_11_ssid+0x218/0x3d0 [r8188eu]
 [<ffffffffa08c3ca5>] rtw_wx_set_essid+0x1e5/0x410 [r8188eu]
 [<ffffffffa08c3ac0>] ? rtw_wx_get_rate+0x50/0x50 [r8188eu]
 [<ffffffff816938f1>] ioctl_standard_iw_point+0x151/0x3f0
 [<ffffffff81693d52>] ioctl_standard_call+0xb2/0xe0
 [<ffffffff81597df7>] ? rtnl_lock+0x17/0x20
 [<ffffffff816945a0>] ? iw_handler_get_private+0x70/0x70
 [<ffffffff81693ca0>] ? call_commit_handler+0x40/0x40
 [<ffffffff81693256>] wireless_process_ioctl+0x176/0x1c0
 [<ffffffff81693e79>] wext_handle_ioctl+0x69/0xc0
 [<ffffffff8159fe79>] dev_ioctl+0x309/0x5e0
 [<ffffffff810be9c7>] ? call_rcu+0x17/0x20
 [<ffffffff8156a472>] sock_ioctl+0x142/0x2e0
 [<ffffffff811e0c70>] do_vfs_ioctl+0x300/0x520
 [<ffffffff81101514>] ? __audit_syscall_entry+0xb4/0x110
 [<ffffffff81101514>] ? __audit_syscall_entry+0xb4/0x110
 [<ffffffff810102bc>] ? do_audit_syscall_entry+0x6c/0x70
 [<ffffffff811e0f11>] SyS_ioctl+0x81/0xa0
 [<ffffffff816ba1d2>] system_call_fastpath+0x12/0x17

Additional routines that generate this BUG are rtw_joinbss_cmd(),
rtw_dynamic_chk_wk_cmd(), rtw_lps_ctrl_wk_cmd(), rtw_rpt_timer_cfg_cmd(),
rtw_ps_cmd(), report_survey_event(), report_join_res(), survey_timer_hdl(),
and rtw_check_bcn_info().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 14:03:48 -08:00
Sudip Mukherjee
d48037f916 staging: rtl8188eu: unneeded NULL check
before these NULL checks we are already checking it for NULL, and if
it is NULL then we are jumping to the error label and handling
the error before returning.
So we can reach this part of the code only if the variable is known
to be not NULL, and if we already know that it is not NULL, then no
need to check it again.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:47:29 -08: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
Surya Seetharaman
2adc8c46b4 Staging: rtl8188eu: rtw_pwrctrl: removed space before semicolon.
WARNING: space prohibited before semicolon

Signed-off-by: Surya Seetharaman<suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:09:28 -08:00
Surya Seetharaman
1e39898b66 Staging: rtl8188eu: rtw_pwrctrl: removed a checkpatch warning.
WARNING: void function return statements are not generally useful

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:09:27 -08:00
Surya Seetharaman
86ca02dae7 Staging: rtl8188eu: rtw_pwrctrl: fixed checkpatch warning.
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:09:27 -08:00
Dilek Uzulmez
b7c12ca4df staging: rtl8188eu: Remove unnecessary else after return
This patch fixes checkpatch.pl warning in files of rtl8188eu
WARNING: else is not generally useful after a break or return

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:08:06 -08:00
Tapasweni Pathak
3cfab18ce5 staging: rtl8188eu: core: Improve cleanup code
The code is restructured such that kfree(efuseTbl) is not called
if the allocation of efuseTbl and such that kfree(eFuseWord) is not
called if the allocation of eFuseWord has failed.

To accomplish this a new label eFuseWord_failed has been added.

Suggested by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:12:05 -07:00
Tapasweni Pathak
a055b3cbb7 staging: rtl8188eu: core: Remove null check before kfree
kfree on NULL pointer is a no-op.

This patch uses the following semantic patch to find such an instance
where NULL check is present before kfree.

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:12:05 -07:00
Tapasweni Pathak
7499b702f0 staging: rt18188eu: Remove useless cast on NULL
Cast on NULL to a pointer type is not required. This
patch removes NULL casted to some pointer type.

The sematic patch used is:
@r@
type T;
@@
- (T *)NULL
+ NULL

Build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:09:15 -07:00
Tapasweni Pathak
f811be139e staging: rtl8188eu: Remove double test
Removed the duplicate test on memcmp(pIE->data, BROADCOM_OUI2, 3).

The semantic that find this problem is
// <smpl>
@@
expression E;
@@

(
* E
  || ... || E
|
* E
  && ... && E
)
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:09:15 -07: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
Gulsah Kose
9d9921e930 staging: rtl8188eu: core: Removed unnecessary return keyword.
This patch fixes
WARNING:  void function return statements are not generally useful
checkpatch.pl warning in rtw_efuse.c by using this coccinelle script

@r@
identifier i;
@@
void i(...)
{
...
-return;
}

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 12:20:15 -07:00
Gulsah Kose
0d20dac377 staging: rtl8188eu: core: Removed unnecessary parenthesis.
This patch removes unnecessarry parenthesis in rtw_security.c by
using this coccinelle script:

@r1@
expression e1,e2;
@@
if
- ((e1 == e2))
+ (e1 == e2)
{...}

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:20:56 -07:00
Tapasweni Pathak
a707edd236 staging: rtl8188eu: core: Remove redundant memset before memcpy
The region set by the call to memset, immediately overwritten by the
subsequent call to memcpy makes the memset redundant.

This patch removes the redundant memset before memcpy using the
following coccinelle script:

@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-28 15:41:42 +08:00
Jiayi Ye
7424a06090 staging: rtl8188eu: core: fix null dereference on exit path in rtw_mlme.c
If adapter is null, null dereference may occur. This patch fixes it.
The following Coccinelle semantic patch was used to find the case.

@@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

* if (E == NULL)
{
 ... when != if (E == NULL) S1 else S2
     when != E = E1
* E->f
 ... when any
 return ...;
}
else S3

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:05 +08:00
Jiayi Ye
c8cb5f2c78 staging: rtl8188eu: core: fixed msleep < 20ms can sleep for up to 20ms warning in rtw_efuse.c
This patch fixes following checkpatch.pl warning:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt

Signed-off-by: Jiayi Ye <yejiayily@gmail.comi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 12:20:44 +08:00
Heena Sirwani
9cc56fa827 Staging: rtl8188eu: core: Remove variable that is not very useful.
The following patch removes a variable which is not very useful using
coccinelle.
The following semaintic patch was used:
@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:12 +08:00
Tapasweni Pathak
049845dfd6 staging: rtl8188eu: core: Replace "the the " with "the"
This patch replace "the the " with "the".
The replacement couldn't be automated because sometimes
the first "the" was meant to be another word.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:12 +08:00
Ebru Akagunduz
6d36fe3edc staging: rtl8188eu: Fix prefer ether_addr_copy() over memcpy()
This patch fixes "Prefer ether_addr_copy() over memcpy()
if the Ethernet addresses are __aligned(2)" in rtw_ap.c
Pahole showed that the addresses are aligned.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:12 +08:00
Gulsah Kose
16e614e850 staging: rtl8188eu: core: Fixed wrong space error.
This patch fixes "foo     * bar" should be "foo   *bar" checkpatch.pl error in rtw_cmd.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:26:01 -07:00
Luca Ceresoli
708a7ec873 staging: rtl8188eu: fix missing blank lines after declarations
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-06 21:45:33 -07:00
navin patidar
e7e7068f60 staging: rtl8188eu: Declare Efuse_GetCurrentSize() as a static function
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:22 -07:00
navin patidar
1eb87e2206 staging: rtl8188eu: rtw_iol.c: Remove unused functions
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:22 -07:00
navin patidar
b5c391a4b0 staging: rtl8188eu: Remove unused function rtw_IOL_cmd_buf_dump()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:22 -07:00
navin patidar
678826f503 staging: rtl8188eu: Remove unused functions rtw_IOL_append_DELAY_[US, MS]_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:22 -07:00
navin patidar
94616fbc5c staging: rtl8188eu: Remove unused function rtw_IOL_exec_cmds_sync()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:21 -07:00
navin patidar
91ed283ab5 staging: rtl8188eu: Remove unused function rtw_IOL_append_WD_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:21 -07:00
navin patidar
a758a007ea staging: rtl8188eu: Remove unused function rtw_IOL_cmd_boundary_handle()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:21 -07:00
navin patidar
f549788fa0 staging: rtl8188eu: Remove unused function rtw_IOL_accquire_xmit_frame()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:21 -07:00
navin patidar
fe8717062d staging: rtl8188eu: Remove wrapper function _addba_timer_hdl()
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
b148cdd7b6 staging: rtl8188eu: Remove wrapper function _link_timer_hdl()
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
0120668adc staging: rtl8188eu: Remove wrapper function _survey_timer_hdl()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:16:09 -07:00
navin patidar
bd29334313 staging: rtl8188eu: Remove wrapper function _dynamic_check_timer_handlder()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:16:09 -07:00
navin patidar
14225ed0f2 staging: rtl8188eu: Remove wrapper function _rtw_scan_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:09 -07:00
navin patidar
457c3e90d5 staging: rtl8188eu: Remove wrapper function rtw_join_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:09 -07:00
Jeff Oczek
45c2fc821d staging: rtl8188eu: Fix static symbol sparse warnings
Fix sparse warnings:
drivers/staging/rtl8188eu/core/rtw_cmd.c:52:5: warning:
  symbol '_rtw_enqueue_cmd' was not declared. Should it be static?
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:1225:5: warning:
  symbol 'wifirate2_ratetbl_inx' was not declared. Should it be static?
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c:25:4: warning:
  symbol 'ODM_GetRightChnlPlaceforIQK' was not declared. Should it be static?
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:3109:5: warning:
  symbol 'rtw_ioctl' was not declared. Should it be static?

Signed-off-by: Jeff Oczek <jeffoczek@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-26 13:07:35 -07:00
navin patidar
01e1162946 staging: rtl8188eu: Rename _rtw_init_mlme_priv() to rtw_init_mlme_priv()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:29:47 -07:00
navin patidar
3596d6d6d8 staging: rtl8188eu: Rename _rtw_free_mlme_priv() to rtw_free_mlme_priv()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:29:47 -07:00
navin patidar
246cf9ec61 staging: rtl8188eu: Remove unused function _rtw_enqueue_network()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:29:46 -07:00
navin patidar
4b5a1c16ba staging: rtl8188eu: Remove unused function _rtw_dequeue_network()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:29:24 -07:00
navin patidar
fe80537a5c staging: rtl8188eu: Make _rtw_free_network() static
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:59 -07:00
navin patidar
8eca2e5f78 staging: rtl8188eu: Rename _rtw_find_network() to rtw_find_network()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:59 -07:00
navin patidar
07e49db016 staging: rtl8188eu: Rename _rtw_free_network_queue() to rtw_free_network_queue()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:59 -07:00
navin patidar
ebe98c4fc1 staging: rtl8188eu: Remove unused function rtw_get_timestampe_from_ie()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
5f3f2a2962 staging: rtl8188eu: Remove unused function _rtw_IOL_append_WW_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
2b83940a2e staging: rtl8188eu: Remove unused function rtw_set_802_11_remove_wep()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
e68029d4df staging: rtl8188eu: Remove unused function rtw_set_802_11_remove_key()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
e2313dce40 staging: rtl8188eu: Remove unused function rtw_set_802_11_add_key()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
56da23db87 staging: rtl8188eu: Remove unused function rtw_validate_ssid()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
0306b4f5e7 staging: rtl8188eu: Remove unused function rtw_set_scan_mode()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
fbb6705860 staging: rtl8188eu: Remove function rtw_set_channel_plan()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
48c72e880f staging: rtl8188eu: Remove unused function rtw_use_tkipkey_handler()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-13 12:28:23 -07:00
navin patidar
ace050139c staging: rtl8188eu: Use msecs_to_jiffies() instead of rtw_ms_to_systime()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar
73d474a99b staging: rtl8188eu: rtw_efuse.c: Remove unused functions
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar
f06a68f7df staging: rtl8188eu: Remove unused functions rtw_efuse_map_[read, write]()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar
6e226b4e8e staging: rtl8188eu: rtw_efuse.c : Remove unused functions
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar
f447dc2d5f staging: rtl8188eu: Remove function efuse_GetMaxSize()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar
3b23bc43cd staging: rtl8188eu: Remove unused function efuse_GetCurrentSize()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar
4dfeb7beb3 staging: rtl8188eu: Remove dummy function rtw_free_cmd_priv()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar
faf427665d staging: rtl8188eu: Remove cmd_seq from struct cmd_priv
Value stored in cmd_seq isn't used by driver.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar
563c8ad924 staging: rtl8188eu: Remove command _Set_H2C_MSG and its handler
_Set_H2C_MSG command is never issued by driver and its handler is a
dummy function.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar
949d4a0d31 staging: rtl8188eu: Remove command _LedBlink and its handler
_LedBlink command is never issued by driver and its handler is a
dummy function.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar
7fd600f619 staging: rtl8188eu: Remove command _SetChannelSwitch and its handler
_SetChannelSwitch command is never issued by driver and its handler is a
dummy function.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar
98724384f5 staging: rtl8188eu: Remove command _TDLS and its handler
_TDLS command is never issued by driver and its handler is a
dummy function.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar
1aef69ecac staging: rtl8188eu: Remove function rtw_setdatarate_cmd()
rtw_setdatarate_cmd() enqueue _SetDataRate command but there is not
handler mapped in wlancmds[] to handle this command.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:35 -07:00
navin patidar
88263a066a staging: rtl8188eu: Remove function rtw_getbbrfreg_cmdrsp_callback()
rtw_getbbrfreg_cmdrsp_callback() is a callback for _Read_BBREG and _Read_RFREG
commands but these commands are never issued by driver.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:35 -07:00
navin patidar
caeadfb021 staging: rtl8188eu: Remove members cmd_[allocated,]_buf from struct cmd_priv
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:35 -07:00
navin patidar
ce7780eda0 staging: rtl8188eu: Remove unused members rsp_[allocated, ]_buf from struct cmd_priv
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:35 -07:00
navin patidar
4b55f02b4a staging: rtl8188eu: Remove unused member cmd_done_cnt from struct cmd_priv
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:35 -07:00
navin patidar
8edacacfc2 staging: rtl8188eu: Remove unused member cmd_issued_cnt from struct cmd_priv
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
e6f33afca7 staging: rtl8188eu: Remove unused member rsp_cnt from struct cmd_priv
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
4680f1589d staging: rtl8188eu: Rename _rtw_dequeue_cmd() to rtw_dequeue_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
11431bdb57 staging: rtl8188eu: Rename _rtw_free_cmd_priv() to rtw_free_cmd_priv()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
b6d423025a staging: rtl8188eu: Rename _rtw_init_cmd_priv() to rtw_init_cmd_priv()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
4690d2da85 staging: rtl8188eu: Remove wrapper function power_saving_wk_hdl()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
a117c12475 staging: rtl8188eu: Remove header file cmd_osdep.h
cmd_osdep.h is not required.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
acc10c67a3 staging: rtl8188eu: rtw_cmd.h: Remove struct Tx_Beacon_param
struct Tx_Beacon_param has only one member.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
3c98d810de staging: rtl8188eu: rtw_cmd.h: Remove struct [join, create]bss_parm
These two structures have only one member.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
4ef0fa7500 staging: rtl8188eu: Remove unused function rtw_cmd_clr_isr()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:14:34 -07:00
navin patidar
a4112c77d0 staging: rtl8188eu: Remove unused function rtw_createbss_cmd_ex()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
968675d880 staging: rtl8188eu: Remove unused function rtw_setstandby_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
1469534c0d staging: rtl8188eu: Remove unused function rtw_setassocsta_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
444881028c staging: rtl8188eu: Remove dummy function rtw_tdls_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
6c7e40ea16 staging: rtl8188eu: Remove unused function rtw_set_csa_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
81ee756746 staging: rtl8188eu: Remove unused function rtw_set_ch_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
faf3c4bf2f staging: rtl8188eu: Remove unused function rtw_setrttbl_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:56 -07:00
navin patidar
844c130808 staging: rtl8188eu: Remove unused function rtw_[set, get]rfreg_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
0bf14722c0 staging: rtl8188eu: Remove unused function rtw_getbbreg_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
298c7d35e8 staging: rtl8188eu: Remove unused function rtw_setbbreg_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
c87166299f staging: rtl8188eu: Remove unused function rtw_setphy_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
2f3c7d5362 staging: rtl8188eu: Remove unused function rtw_setbasicrate_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
0b96f324c0 staging: rtl8188eu: Remove unused function rtw_c2h_wk_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
7b71cf4320 staging: rtl8188eu: Remove unused function rtw_getrttbl_cmd()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:09:55 -07:00
navin patidar
b9f64e0c55 staging: rtl8188eu: Remove function c2h_evt_hdl()
c2h_evt_hdl() calls a dummy function rtw_hal_c2h_handler() to handle events,
so no use of keeping it.

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
20334b5e72 staging: rtl8188eu: Remove struct evt_priv and its uses
c2h_wk (work_struct) is naver scheduled to handle events,
so no use of keeping event data.
And also function rtw_hal_c2h_handler() responsible for handling c2h events,
is a dummy function.

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
2454e79ac2 staging: rtl8188eu: Remove P2P support
We've already removed non-standard ioctl handlers used by driver
to support P2P 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
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
0aba3f417f staging: rtl8188eu: Remove usb_osintf.h header file.
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
6609ed9a33 staging: rtl8188eu: Remove files rtw_mp_ioctl.[c,h]
files are not required after removal of private ioctl handlers.

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
Andy Shevchenko
57373690db staging: rtl8188eu: re-use hex_to_bin() instead of custom code
hex_to_bin could be used to convert hexdecimal digit to its binary
representation.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:07:44 -07:00
Andy Shevchenko
529a929912 staging: rtl8188eu: substitute custom hex2bin()
Instead of using custom code to convert hexdecinal strings to their binary
represantation let's use kernel's library function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:07:43 -07:00
Andy Shevchenko
79374daf98 staging: rtl8188eu: re-use mac_pton() helper
The helper mac_pton() validates and converts MAC address from string format to
a number. Originally code uses simple code to do that. With mac_pton() the
driver now validates input as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:07:43 -07:00
Dan Carpenter
11306d1f20 staging: rtl8188eu: use GFP_ATOMIC under spinlock
We're holding a spinlock here so we can't do sleeping allocations.
The call tree is:
  rtw_sta_flush() <-- takes spin_lock_bh(&pstapriv->asoc_list_lock);
  --> ap_free_sta()
      --> rtw_clearstakey_cmd()

Originally these calls were rtw_zmalloc() and then we switched them to
kzalloc() in fadbe0cd52 ('staging: rtl8188eu:Remove rtw_zmalloc(),
wrapper for kzalloc()') and that made the bugs show up for my static
checker.  The original code was buggy as well but my static checker
couldn't parse it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 12:19:36 -07:00
navin patidar
5aa8b9aeb8 staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:15 -04:00
navin patidar
7062775b2c staging: rtl8188eu: Remove function flush_signals_thread()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:15 -04:00
navin patidar
6e5ca0daa2 staging: rtl8188eu: Remove function thread_enter()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:15 -04:00
navin patidar
42c6cdb304 staging: rtl8188eu: Use round_up() instead of RND4()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:15 -04:00
navin patidar
eab5d5438a staging: rtl8188eu: Use round_up() instead of _RND4()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:15 -04:00
navin patidar
83a9b6694d staging: rtl8188eu: Use cpu_to_le16() insted of RTW_PUT_LE16()
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
4b49a5b39a staging: rtl8188eu: Use get_unaligned_le16() instead of RTW_GET_LE16()
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
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
506a42a686 staging: rtl8188eu: Use cpu_to_be16() instead of RTW_PUT_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
02b1c00d50 staging: rtl8188eu: Use cpu_to_be32() instead of RTW_PUT_BE32()
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
c495fc9eba staging: rtl8188eu: Replace _cancel_timer_ex() with del_timer_sync()
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
dee7c7f8f0 staging: rtl8188eu: Replace _cancel_workitem_sync() with cancel_work_sync()
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
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
fadbe0cd52 staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()
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
b49f224d0d staging: rtl8188eu: Remove rtw_mfree2d(), wrapper for kfree()
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
56ed3914b0 staging: rtl8188eu: Remove dummy rtl8188eu_free_xmit_priv() and its wrapper
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
ee5f8a431e staging: rtl8188eu: Move all efuse related code to rtw_efuse.c
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:34 -07:00
navin patidar
756850c6dc staging: rtl8188eu: rtw_efuse.c: Remove unnecessary comments
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:34 -07:00
navin patidar
1bc7bab5bb staging: rtl8188eu: rtw_efuse.c: Remove unused local variables
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:34 -07:00
navin patidar
e9ecc553d1 staging: rtl8188eu: Remove bool bPseudoTest parameter from efuse functions
In most of the functions bPseudoTest is not used and in remaining ones
it's always false.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
b0d255c7be staging: rtl8188eu: EFUSE_ShadowMapUpdate():Remove unused parameter bool test
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
0d1c84d6cb staging: rtl8188eu: Efuse_ReadAllMap(): Remove unused parameter bool test
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
c4f6cf0e77 staging: rtl8188eu: Efuse_GetCurrentSize(): Remove parameter bool test
test is always false.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
142547b3fc staging: rtl8188eu: efuse_ReadEFuse(): Remove parameter bool bPseudoTest
bPseudoTest is always false.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
20f3b6c87c staging: rtl8188eu: efuse_OneByteWrite(): Remove unused parameter bool test
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
7881055601 staging: rtl8188eu: efuse_OneByteRead():Remove unused parameter bool test
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
6ebd7cefc3 staging: rtl8188eu: Remove unused function EFUSE_Read1Byte()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
bd46e7f0c5 staging: rtl8188eu: Remove unused function ReadEFuseByte()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
800072c67e staging: rtl8188eu: Remove function rtw_BT_efuse_map_read()
rtl8188eu is not a wifi/bluetooth combo device, so remove bluetooth
related code.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
2accfc761d staging: rtl8188eu: Remove unused function Efuse_PgPacketWrite_BT()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:33 -07:00
navin patidar
052deb5d1f staging: rtl8188eu: Remove function rtw_BT_efuse_map_write()
rtl8188eu is not a wifi/bluetooth combo device, so remove bluetooth
related code.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
1898cb9a00 staging: rtl8188eu: Remove function Efuse_Read1ByteFromFakeContent()
Efuse_Read1ByteFromFakeContent() is never called because pseudo
is always false in Efuse_CalculateWordCnts() and efuse_OneByteRead().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
98e0ef38d4 staging: rtl8188eu: Remove function Efuse_Write1ByteToFakeContent()
Efuse_Write1ByteToFakeContent() is used only in efuse_OneByteWrite(),
when pseudo is true, but pseudo is always false.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
a602fd073f staging: rtl8188eu: Rename hal_EfusePgPacketWrite_8188e()
Rename hal_EfusePgPacketWrite_8188e() to Efuse_PgPacketWrite()
and remove original Efuse_PgPacketWrite() function,
so that driver can call hal_EfusePgPacketWrite_8188e() directly
without going through Efuse_PgPacketWrite().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
5896c378e2 staging: rtl8188eu: Rename hal_EfusePgPacketRead_8188e() to Efuse_PgPacketRead()
Rename hal_EfusePgPacketRead_8188e() to Efuse_PgPacketRead()
and remove original EFUSE_GetEfuseDefinition() function,
so that driver can call hal_EfusePgPacketRead_8188e() directly
without going through Efuse_PgPacketRead().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
93282a668a staging: rtl8188eu: Rename function ReadEFuseByIC() to efuse_ReadEFuse()
Rename ReadEFuseByIC() to efuse_ReadEFuse() and remove original
efuse_ReadEFuse() function, so that driver can call ReadEFuseByIC()
directly without going through efuse_ReadEFuse().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
7b61ace1ff staging: rtl8188eu: Rename function Hal_EfuseWordEnableDataWrite()
Rename Hal_EfuseWordEnableDataWrite() to Efuse_WordEnableDataWrite()
and remove original EFUSE_GetEfuseDefinition() function,
so that driver can call Hal_EfuseWordEnableDataWrite() directly
without going through Efuse_WordEnableDataWrite().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
f98440f48b staging: rtl8188eu: Rename rtl8188e_EfusePowerSwitch() to Efuse_PowerSwitch()
Rename rtl8188e_EfusePowerSwitch() to Efuse_PowerSwitch()
and remove original Efuse_PowerSwitch() function,
so that driver can call rtl8188e_EfusePowerSwitch() directly
without going through Efuse_PowerSwitch().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
585688c957 staging: rtl8188eu: Rename hal_EfuseGetCurrentSize_8188e()
Rename hal_EfuseGetCurrentSize_8188e() to Efuse_GetCurrentSize()
and remove original Efuse_GetCurrentSize() function,
so that driver can call hal_EfuseGetCurrentSize_8188e() directly
without going through Efuse_GetCurrentSize().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
9dec254a80 staging: rtl8188eu: Rename rtl8188e_EFUSE_GetEfuseDefinition()
Rename rtl8188e_EFUSE_GetEfuseDefinition() to EFUSE_GetEfuseDefinition()
and remove original EFUSE_GetEfuseDefinition() function,
so that driver can call rtl8188e_EFUSE_GetEfuseDefinition() directly
without going through EFUSE_GetEfuseDefinition().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
fcb24cda3e staging: rtl8188eu: rtw_efuse.c: Remove unnecessary function declaration
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:52:32 -07:00
navin patidar
186e425707 staging: rtl8188eu: Rename Hal_EFUSEGetEfuseDefinition88E()
Rename Hal_EFUSEGetEfuseDefinition88E() to rtl8188e_EFUSE_GetEfuseDefinition()
and remove original rtl8188e_EFUSE_GetEfuseDefinition(), so that driver can call
Hal_EFUSEGetEfuseDefinition88E() directly without going through
rtl8188e_EFUSE_GetEfuseDefinition().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:49:29 -07:00
navin patidar
1df2d1cfc7 staging: rtl8188eu: Remove rtl8188e_EfuseGetCurrentSize()
rtl8188e_EfuseGetCurrentSize() checks bool bPseudoTest and then calls suitable
function to get efuse size, hal_EfuseGetCurrentSize_8188e() also does same thing.
So use hal_EfuseGetCurrentSize_8188e() and drop rtl8188e_EfuseGetCurrentSize().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-20 09:49:29 -07:00
navin patidar
2b3cffc931 staging: rtl8188eu: Remove file rtw_br_ext.h
driver doesn't need rtw_br_ext.h any more.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:18 -07:00
navin patidar
a7f5f2777f staging: rtl8188eu: core: Remove file rtw_br_ext.c
functions defined in rtw_br_ext.c are not being used by driver anymore.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:18 -07:00
navin patidar
7bf08a848d staging: rtl8188eu: Remove function nat25_db_expire()
We've removed the code which was responsible for building NAT table,
so no use of keeping nat_db_expire().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:17 -07:00
navin patidar
5605da1754 staging: rtl8188eu: Remove pppoe_connection_in_progress from struct adapter
Value stored in pppoe_connection_in_progress isn't being
used by driver.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:17 -07:00
navin patidar
dc69f11cf1 staging: rtl8188eu: Remove function nat25_db_cleanup()
We've removed the code which was responsible for building NAT table,
so no use of keeping nat_db_cleanup().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:17 -07:00
navin patidar
2ace82d692 staging: rtl8188eu: Remove unused functons defined in rtw_br_ext.c
This patch removes some functions defined in rtw_br_ext.c, which have become
obsolete after removal of rtw_br_client_tx().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:17 -07:00
navin patidar
dcea74721f staging: rtl8188eu: Remove function rtw_br_client_tx()
rtw_br_client_tx() pass tx packet to functions responsible for
building NAT table.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:37:17 -07:00
navin patidar
0a95a7f448 staging: rtl8188eu: Remove empty files rtw_io.[c,h]
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:02 -07:00
navin patidar
e73fd15ea8 staging: rtl8188eu: Move usb_[read, write]() declarations to usb_ops_linux.h
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:02 -07:00