1
0
Fork 0
Commit Graph

1117 Commits (c261189862c6f65117eb3b1748622a08ef49c262)

Author SHA1 Message Date
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
Anish Bhatt 6dd19f19a5 staging/rtl8188eu : Remove duplicated BIT() definitions
The BIT() macro is already defined in bitops.h, remove duplicate
definitions. Users of BIT() macro are expecting unsigned int/u32, so
add typecasts where this creates a build warning.

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:48 -07:00
Shraddha Barke b92ae1fd84 Staging: rtl8188eu: os_dep: osdep_service.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:02 -07:00
Shraddha Barke a08cd2b7d0 Staging: rtl8188eu: os_dep: mlme_linux.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:02 -07:00
Shraddha Barke fc749a9a3d Staging: rtl8188eu: os_dep: recv_linux.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:01 -07:00
Shraddha Barke b210e0dc60 Staging: rtl8188eu: hal: rtl8188eu_xmit.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:01 -07:00
Shraddha Barke cfd23644a8 Staging: rtl8188eu: hal: Hal8188ERateAdaptive.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:01 -07:00
Shraddha Barke 5228fb63a1 Staging: rtl8188eu: hal: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:01 -07:00
Shraddha Barke e3789b0c54 Staging: rtl8188eu: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:00 -07:00
Shraddha Barke a544f0edb2 Staging: rtl8188eu: core: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:00 -07:00
Anish Bhatt 913336ae09 staging/rtl8188eu : Remove unused macro definitions.
WLAN_ETHHDR_LEN/WLAN_ETHADDR_LEN/WLAN_ADDR_LEN
 are unused, duplicate or unnecessary, remove.

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:56 -07:00
Alexander Kuleshov fec85e0afa staging/rtl8188eu: Use %pM format specifier to print mac address
printk() supports %pM format specifier for printing 6-byte MAC/FDDI
addresses in hex notation small buffers, let's use it intead of %x:%x...

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:30 -07:00
Sudip Mukherjee f1126b1d0d staging: rtl8188eu: fix possible NULL dereference
dm_odm was being checked for NULL after dereferencing it. Lets check for
NULL first before derefenrencing it.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 19:20:39 -07:00
Joe Perches ebea63f663 staging: rtl8188eu: Remove unnecessary externs
Using 'extern' is not necessary for function prototypes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-14 18:51:56 -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 ea31f616b6 staging: rtl8188eu: remove unused define
_RECV_OSDEP_C_ was only defined here but never checked anywhere.

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

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

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

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:17:58 -07:00
Mayank Bareja 4e0fa71c93 Staging: rtl8188eu/core: fixed code indentation warning as reported by checkpatch.pl
fixed code indentation warning as detected with checkpatch.pl.
Replaced spaces with tabs.

Signed-off-by: Mayank Bareja <mbareja@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-03 17:54:04 -07:00
Mayank Bareja cfa48d936a Staging: rtl8188eu/hal: Fixed code indentation warning detected with checkpatch.pl
fixed code indentation warning as reported by checkpatch.pl.
Replaced Spaces with Tabs.

Signed-off-by: Mayank Bareja <mbareja@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:41 -07:00
Shraddha Barke f523c7d7a6 Staging : rtl8188eu : os_dep : Compression of lines for immediate return
This patch compresses two lines into a single line if immediate return is
found. Also remove variable ret as it is no longer needed.
Semantic patch used for this is as follows:

@@
type T;
identifier i,f;
constant C;
@@
- T i;
  ...when != i
     when strict
(
  return -C;
|
- i =
+ return
     f(...);
- return i;
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:41 -07:00
Jakub Sitnicki 2658972062 staging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_* constants
linux/ieee80211.h already defines constants for spatial multiplexing
power save modes.  Remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:41 -07:00
Jakub Sitnicki b5efb33e5c staging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants
linux/ieee80211.h already defines constants for authentication
algorithms.  Remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:40 -07:00
Jakub Sitnicki 63d6c969b7 staging: rtl8188eu: wrap a long if condition and remove extra parenthesis
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:40 -07:00
Jakub Sitnicki 35cf0b5596 staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
linux/ieee80211.h already defines constants for information element IDs.
Resolve discrepancies in naming and remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:40 -07:00
Dave Perez be3d2e0fe1 Staging: rtl8188eu: fixed newlines after declarations
This is a patch to the rtw_debug.c file that fixes styling errors relating to
new lines after variable declarations.

Signed-off-by: Dave Perez <dave@daveperez.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-31 16:05:40 -07:00
Jakub Sitnicki 3abf4f984a staging: rtl8188eu: kill unused hal_data_8188e::fw_ractrl flag
Flag is never set. Remove it and the code that is dead because of it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:38:21 -07:00
Buţiu Alexandru Octavian b4ba3b572b drivers: staging: rtl8188eu Refactored rtw_free_assoc_resources
Refactored rtw_free_assoc_resources to avoid sparse warnings about
different contexts for basic lock

Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-24 13:37:46 -07:00
Sudip Mukherjee 0a32bd33ed staging: rtl8188eu: remove multiple blank line
Multiple blank lines should be avoided.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:59:55 -07:00
Sudip Mukherjee e0732f84b4 staging: rtl8188eu: dont mix success and error path
Success and error path was mixed. Separate them by directly returning 0
from the success path. In the process remove the variable which became
unused.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:59:55 -07:00
Sudip Mukherjee 705a313698 staging: rtl8188eu: check for kzalloc failure
Check for kzalloc failure and directly return from the error patch thus
simplifying the success path.

Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:59:54 -07:00
Sudip Mukherjee 586b06328c staging: rtl8188eu: remove label
Directly return NULL instead of using another label and goto.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:59:54 -07:00
Sudip Mukherjee 8da24c9332 staging: rtl8188eu: remove unused define
_HCI_INTF_C_ was only defined here but not being used anywhere.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-22 20:59:54 -07:00
Sudip Mukherjee 7d708e52c2 staging: rtl8188eu: remove unneeded ret
The variable ret was always 0. So remove the variable and always
return 0 from the function.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:18:09 -07:00
Sudip Mukherjee 9aa39bc4d3 staging: rtl8188eu: stop using DBG_88E
Stop using DBG_88E which is a custom macro for printing debugging
messages. Instead start using pr_debug and in the process define
pr_fmt.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:18:09 -07:00
Sudip Mukherjee ce80632273 staging: rtl8188eu: remove unneeded variable
The default value of status was _FAIL, it was only changed if kzalloc
succeeds and the check for status is immediately following kzalloc. We
can have the failure code in the else part as the failure code will be
executed only if kzalloc fails.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:18:09 -07:00
Sudip Mukherjee 47ccb34ac7 staging: rtl8188eu: remove goto label
By checking for the success of kzalloc we were able to remove the goto
label thus making the code more readable.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:18:09 -07:00
Sudip Mukherjee 2773941984 staging: rtl8188eu: remove redundant NULL check
The check for pstat and pdvobjpriv is not required here as we have
already checked for them before.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:17:08 -07:00
Sudip Mukherjee 48028c61e4 staging: rtl8188eu: remove unused function
The inline function rtw_set_ips_deny() was only defined but was never
used.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-16 10:17:08 -07:00
Luca Ceresoli 9431fda3ff staging: rtl8188eu: remove unused rtw_hal_write_rfreg
rtw_hal_write_rfreg() is never referenced, so remove it.

It used to be the only place where the write_rfreg callback was
called, so get rid of the function pointer as well.

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>
2015-07-16 10:15:15 -07:00
Luca Ceresoli f83113d3e6 staging: rtl8188eu: remove unused rtw_hal_set_def_var
rtw_hal_set_def_var() is never referenced, so remove it.

It used to be the only place where the SetHalDefVarHandler callback was
called, so get rid of the function pointer as well.

Also remove the callback itself, SetHalDefVar8188EUsb(), which was not
called anywhere else.

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>
2015-07-16 10:15:14 -07:00
Luca Ceresoli 42748bc905 staging: rtl8188eu: remove unused {en,dis}able_interrupt
rtw_hal_enable_interrupt() and rtw_hal_disable_interrupt() are never
referenced, so remove them.

They used to be the only place where the enable_interrupt() and
disable_interrupt() callbacks were called, and the function pointer
is never set, so get rid of the function pointer as well.

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>
2015-07-16 10:15:14 -07:00
Jakub Sitnicki 4221844a62 staging: rtl8188eu: fold rtl8188e_read_chip_version() into rtl8188e_SetHalODMVar()
Both rtl8188e_read_chip_version() and ReadChipVersion8188E() are used
only in one place.  Make ReadChipVersion8188E() a void function and
eliminate its wrapper - rtl8188e_read_chip_version().

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki a51d13037b staging: rtl8188eu: remove ROMVer from struct HAL_VERSION
ROM version on RTL8188EU is always 0.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki 3c71dd6c56 staging: rtl8188eu: remove RFtype from struct HAL_VERSION
RFtype in struct HAL_VERSION duplicates rf_type in struct
hal_data_8188e, and does not change.  Remove it and the macros that test
it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki e827aeedd0 staging: rtl8188eu: remove ICtype from struct HAL_VERSION
IC type on RTL8188EU is always 8188E.  Remove it and all the macros that
check it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki 3738408cc8 staging: rtl8188eu: remove RegulatorMode from struct hal_data_8188e
This field is not used anywhere.  Also, kill the rt_regulator_mode enum
which exists just for this field.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:08:31 -07:00
Sreenath Madasu 249472588c staging: rtl8188eu: core: Fixed 80 character length warning
When the checkpatch.pl script was run, it showed lines with length
more than 80 characters in rtw_ap.c file. Fixed line number 382 by
breaking it up into two lines within 80 characters.

Signed-off-by: Sreenath Madasu <Sreenath.Madasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:08:31 -07:00
Sunil Shahu e1d0bcedfb staging: rtl8188eu: core: rtw_mlme: remove space before ','
Fix coding style error by removing spaces before ',' as suggested by
checkpatch.pl script.

Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:07:43 -07:00
Prasanna Karthik 9e7e78d829 staging:rtl8188eu: Code cleanup fix reported by coccinelle
bool check modified

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:07:42 -07:00
Jakub Sitnicki 027d3efd93 staging: rtl8188eu: don't duplicate ieee80211 WLAN_CAPABILITY_* constants
linux/ieee80211.h already defines constants for capability bits.
Include it where needed, resolve discrepancies in naming, and remove the
duplicated definitions.

Also, make use of WLAN_CAPABILITY_IS_STA_BSS() macro to check if neither
ESS nor IBSS capability bits are set.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:07:42 -07:00
Jimmy Devine c99efd4fec staging: rtl8188eu: remove space before open square bracket '['
Fixes checkpatch error regarding the space before open square bracket '['

Signed-off-by: Jimmy Devine <fxmulder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18 21:13:48 -07:00
Jakub Sitnicki 08c4019747 staging: rtl8188eu: kill unused INCLUDE_MULTI_FUNC_* macros
Also, remove rt_multi_func enum used exclusively by the killed macros.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:56:37 -07:00
Hari Prasath Gujulan Elango 84b2f7985c staging: rtl8188eu: fix typo in comments section
This patch fixes a typo in the comment section.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:56:37 -07:00
Luca Ceresoli f996bd10a0 staging: rtl8188eu: don't define OnAuth() in non-AP mode
If CONFIG_88EU_AP_MODE is undefined, OnAuth() is never referenced.

Fixes warning:
  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2725:21: warning: ‘OnAuth’ defined but not used [-Wunused-function]

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Fixes: 68345dd7bc ("staging: rtl8188eu: rtw_mlme_ext.c: unexport message callbacks")
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-14 09:45:55 -07:00
Luca Ceresoli 2b49e0fce2 staging: rtl8188eu: don't define issue_asocrsp() in non-AP mode
If CONFIG_88EU_AP_MODE is undefined, issue_asocrsp() is never referenced.

Fixes warning:
  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:891:13: warning: ‘issue_asocrsp’ defined but not used [-Wunused-function]

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Fixes: 782eddd748 ("staging: rtl8188eu: unexport internal functions")
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-14 09:45:55 -07:00
Sudip Mukherjee 4e18248a66 staging: rtl8188eu: remove function which does nothing
The function rtw_mfree_all_stainfo() is just holding the lock,
traversing the list, and then unlocking. It is not doing anything else.
So removed the function and modified the places from where it was called.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:23:11 -07:00
Sudip Mukherjee 9393d34e49 staging: rtl8188eu: remove unused variables
These variables were being set but not used afterwards.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:23:11 -07:00
Sudip Mukherjee 71d62adb67 staging: rtl8188eu: remove unused enum and CONFIG
The CONFIGs, the enum and the function declaration was not being
used anywhere.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:23:11 -07:00
Luca Ceresoli ebd21582bd staging: rtl8188eu: fix wrong debug print
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:06 -07:00
Luca Ceresoli a26c9eedcd staging: rtl8188eu: issue_probersp(): remove unused variable and dead code
is_valid_p2p_probereq is initialized to false and never modified. Code
depending on it is dead code. Remove all of it.

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:06 -07:00
Luca Ceresoli 935142236d staging: rtl8188eu: issue_probersp(): remove unused parameter
The is_valid_p2p_probereq is never referenced in the function body.

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 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
Hari Prasath Gujulan Elango 3b83fb7589 staging: rtl8188eu: remove unwanted assignment
remove an unwanted assignment to a variable which is overwritten in the
very next line.The first value assigned is not used.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:39 -07:00
Jakub Sitnicki 5df5910b13 staging: rtl8188eu: Kill dead calls to kill_pid()
There is no interface to register PIDs of processes the driver should
send a signal to.  Remove it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:25:51 +09: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
Luca Ceresoli 7fc0406f48 staging: rtl8188eu: return an error code, not a boolean
"If the name of a function is an action or an imperative command,
the function should return an error-code integer." (Documentation/CodingStyle)

Several action-like functions in this driver return a boolean: _SUCCESS = 1 on
success, _FAIL = 0 on error, defined in
drivers/staging/rtl8188eu/include/osdep_service.h.

Change rtw_start_drv_threads() to return a proper 0-or-error value.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 12:01:37 +09:00
Luca Ceresoli 8b9ffb43ac staging: rtl8188eu: declare internal symbols as static
Also remove them from .h files.

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>
2015-05-31 12:01:37 +09:00
Luca Ceresoli cfaf917e6b staging: rtl8188eu: remove useless return value
The loadparam() function cannot fail, it's called only once and its return
value is ignored there.

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>
2015-05-31 12:01:37 +09:00
Luca Ceresoli ede000f375 staging: rtl8188eu: add missing blank lines after declarations
Fixes checkpatch warnings:
  WARNING: Missing a blank line 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>
2015-05-31 12:01:37 +09:00
Luca Ceresoli 79ef68c83b staging: rtl8188eu: cosmetic: remove useless spaces
Even though these are not reported by checkpatch, they are coding style issues.

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>
2015-05-31 12:01:36 +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
Sai.Jiang ae33b51453 Staging: rtl8188eu: fix coding style
Remove two warnings of missing-blank-line-after-declaration.

Signed-off-by: Sai.Jiang <sai.d.jiang@foxmail.com>
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
Luca Ceresoli 4b248ab2dd staging: rtl8188eu: remove commented code
This code is commented since the initial commit. Probably it is a remnant of
old code.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:11 +02:00
Luca Ceresoli 2f13617a35 staging: rtl8188eu: remove useless comment
"step 2" does mean much as there is no "step 1" stated anywhere...

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:10 +02:00
Luca Ceresoli 471450531c staging: rtl8188eu: fix lines over 80 characters
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:10 +02:00
Luca Ceresoli 6c4743f7d6 staging: rtl8188eu: simplify nested ifs
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:10 +02:00
Luca Ceresoli 2ff4e79f0e staging: rtl8188eu: document enum where it is declared
The comment "/* open system */" is repeated verbatim in several places where
dot11AuthAlgrthm_Open is referenced, but not where it is declared.

Move it to be only at its declaration.

This also fixes some "line over 80 characters" checkpatch warnings.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Luca Ceresoli 22a1279b84 staging: rtl8188eu: fix comments over 80 characters
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Luca Ceresoli 3446ef56f8 staging: rtl8188eu: remove duplicated comments
There are identical comments near the static variable declaration, around
lines 118~120.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:09 +02:00
Carlos E. Garcia 69e98df782 Staging: fixed multiple spelling errors.
Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:58 +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
Vatika Harlalka fe36bad239 Staging: rtl8188eu: Add new variable to make code compact
Introducing this variable leads to overall more code
compactness and increases readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 10:34:14 +01:00
Vatika Harlalka 175bbae0c7 Staging: rtl8188eu: Refactor repititive code to loop to increase compactness
Refactor repetitive code to loop so as to increase
compactness and introduce newlines for readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 10:34:14 +01:00
Vatika Harlalka bf95251571 Staging: rtl8188eu: Reduce line size to increase readability
Reduce line size to increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 10:34:14 +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
Vatika Harlalka 680355f3d4 Staging: rtl8188eu: Remove unused macros
These macros are 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
Vatika Harlalka 5ce019df9b Staging: rtl8188eu: Remove unused extern declarations.
These externs are defined but not used anywhere 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
Vaishali Thakkar 0f362d9df4 Staging: rtl8188eu: Remove timer handler macros
After the commit 28af7ea81e ("Staging: rtl8188eu:
Eliminate use of _init_timer"), macros
(RTW_TIMER_HDL_ARGS, RTW_TIMER_HDL_NAME,
RTW_DECLARE_TIMER_HDL) are no longer needed. So,
remove them.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 11:16:36 +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
Supriya Karanth e1cc3112b2 staging: rtl8188eu: remove break after return
Remove "break" statement after a "return" statement as
it does not get executed.

Found by checkpatch.pl - break is not useful after a goto
or return

Signed-off-by: Supriya Karanth <iskaranth@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:08:01 +01:00
Supriya Karanth 37e0807879 staging: rtl8188eu: remove intialization of static ints
static ints are initialized to 0 by the compiler.
Explicit initialization is not necessary.

Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL

changes made using coccinelle script:
@@
type T;
identifier var;
@@
static T var
- =0
;

Signed-off-by: Supriya Karanth <iskaranth@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
Mike Krinkin 789fd7adf5 staging: rtl8188eu: use %pM specifier instead of passing direct values
The patch converts code to use %pM specifier instead of pushing
each byte via stack.

Signed-off-by: Mike Krinkin <krinkin.m.u@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
Navya Sri Nizamkari 7f39902654 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
Yannick Guerrini 8895f04b7a staging: rtl8188eu: Fix trivial typos in comments
Change 'disabed' and 'disabel' to 'disabled'
Change 'inviation' to 'invitation'
Change 'negoitation' to 'negotiation'

Signed-off-by: Yannick Guerrini <yguerrini@tomshardware.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:35:53 -08: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 8e5d943341 staging: rtl8188eu: replace memset(x,0,ETH_ALEN)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The aforementioned function replaces
memset. In addition, linux/etherdevice.h was included as a header
since it is the file that define the inline function eth_zero_addr().
The changes were carried out using the following coccinelle script:

@header@
@@

#include <linux/etherdevice.h>

@eth_zero_addr@
expression e;
@@

-memset(e,0,ETH_ALEN);
+eth_zero_addr(e);

@eth_broadcast_addr@
identifier e;
@@

-memset(e,\(0xff\|0xFF\|255\),ETH_ALEN);
+eth_broadcast_addr(e);

@linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @
@@

+ #include <linux/etherdevice.h>
+

@special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @
@@

+
+ #include <linux/etherdevice.h>
+

@custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @
@@

+
+ #include <linux/etherdevice.h>

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@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
Navya Sri Nizamkari ea18c05882 staging: rtl8188eu: Remove memset.
The memory area set by the call to memset is immediately
overwritten by the subsequent call to memcpy. Hence, remove that
redundant memset.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:22:53 -08:00
Navya Sri Nizamkari 131c359e8e staging: rtl8188eu: Add blank line after declarations
This patch removes the following checkpatch.pl warning:

WARNING: Missing a blank line after declarations

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:22:52 -08:00
Navya Sri Nizamkari 25034ff83c staging: rtl8188eu: Compress two statements into one.
This patch removes the use of a variable used only for
returning a value. The following coccinelle script was
used to discover it:

@@
expression ret;
identifier f;
@@

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

It also fixes the checkpatch.pl warning about line being over
80 characters, in the lines where changes were made.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:22:52 -08:00
Vatika Harlalka 3fe9065801 Staging: rtl8188eu: Remove unused variable
Remove unused variable assignment for is2t and assign
sim_bitmap at declaration to make the code more compact.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:22:05 -08:00
Aya Mahfouz 5f70306ba0 staging: rtl8188eu: os_dep: remove unused variable
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.

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

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:20:00 -08:00
Vatika Harlalka 179e7dcde4 Staging: rtl8188eu: Move variable assignment
Variable path_on is assigned explicitly in the if branch and so
its assignment outside can be moved to the else branch.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:20:00 -08:00
Vatika Harlalka dacd2eced5 Staging: rtl8188eu: Remove braces from single statement block
Remove braces from single statement if condition
to follow kernel coding convention.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 15:17:01 -08:00
Vatika Harlalka 0395e554f8 Staging: rtl8188eu: Remove unnecessary code
Code removed as variables assigned are not used anywhere.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 15:25:08 -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
Aya Mahfouz 74ff87997f 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
Aya Mahfouz c6112e4839 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
Aya Mahfouz 945f018561 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
Vatika Harlalka e790d442b0 Staging: rtl8188eu: Replace if-else block with switch-case
Replace if-else block with switch-case to make it more compact
and increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Vatika Harlalka 294a7fcc85 Staging: rtl8188eu: Refactor conditional code to increase readability
Remove the nested conditionals. The if and else-if have the same
code so they are combined to make the code more compact.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Vatika Harlalka 4ceb7f7233 Staging: rtl8188eu: Combine two loops to increase readability
The first loop assigns values to ofdm_index array and the
second checks for boundary conditions. They are combined and
a comment is added to increase clarity.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Vatika Harlalka 1d6871f8dc Staging: rtl8188eu: Remove unnecessary if condition
Remove this branch as is2t is defined false and is not
modified. The variable value32 is then unused.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:56:58 -08:00
Katie Dunne 0ed83e995e Staging: rtl8188eu: Remove unused macros
Removes macro definitions that are unused elsewhere

Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:55:17 -08:00
Vatika Harlalka 065be69f26 Staging: rtl8188eu: Remove unnecessary variable
Remove unnecessary variable and replace its uses with previously
defined variable.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:54:12 -08:00
Vatika Harlalka 4c3fa64038 Staging: rtl8188eu: Refactored code to increase readility
Refactored the conditional code to make it more compact.
Replaced the ternary operators with abs() macro to increase readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:48 -08:00
Vatika Harlalka d5dd06ea01 Staging: rtl8188eu: Replace ternary operator with existing macro
Replace ternary operator with existing abs() macro to increase
code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:48 -08:00
Vatika Harlalka 8e2c69b62d Staging: rtl8188eu: Remove redundant if condition
Remove redundant if condition as !result is always false.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:47 -08:00
Melike Yurtoglu 1068fb676a Staging: rtl8188eu: Add blank line after declarations
WARNING: "Missing a blank line after declarations"
That was found by running checkpatch

Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:53:47 -08:00
Vatika Harlalka 93ab486d3f Staging: rtl8188eu: Changed array and loop construct
This function only required the array from the 14th element
onwards. Therefore, the array size is reduced and the loop
counter is modified so as to start from 0.
Also, the assignment of variable place is redundant as it is
initialized again in the loop.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -08:00
Vatika Harlalka efb8d49794 Staging: rtl8188eu: Replace unneeded switch-case block
Replace switch-case block with single if statement to
increase code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -08:00
Vatika Harlalka 9734d632bb Staging: rtl8188eu: Remove unnecessary variable
Remove unneccessary variable and replace its uses with another
variable which is previously defined.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -08:00
Vatika Harlalka 3da741ff94 Staging: rtl8188eu: Fix line over 80 characters
Added a variable to reduce line size and enhance code readability.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:45:32 -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
Vaishali Thakkar 78f5d8f9f9 Staging: rtl8188eu: Remove unused struct ndis_802_11_key
This patch removes struct ndis_802_11_key as it is defined
in a header file but never used.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 12:34:16 -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
Nicholas Mc Guire e914024d46 staging: rtl8188eu: odm: conditional setting with no effect
The if and the else branch code are identical - so the condition has no
effect on the effective code - this patch removes the condition and the
duplicated code. Due to this being a fall-through-if here - the first
if condition has no effect either - so it also can be removed.
struct mlme_priv is thus also no longer needed here.

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
Nicholas Mc Guire 3d272700d7 staging: rtl8188eu: odm: condition with no effect
The if and the else branch code are identical - so the condition has no
effect on the effective code - this patch removes the condition and the
duplicated code.

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
Nicholas Mc Guire 37257276a4 staging: rtl8188eu: use msecs_to_jiffies for conversions
This is only an API consolidation to make things more readable.
Instances of  var * HZ / 1000  are replaced by  msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:25:42 +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
Rickard Strandqvist 17ad975c5a staging: rtl8188eu: os_dep: usb_ops_linux.c: Remove unused function
Remove the function usb_writeN() 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:06:03 -08:00
Rickard Strandqvist f225d04e4e staging: rtl8188eu: hal: rtl8188e_hal_init.c: Remove unused function
Remove the function GetEEPROMSize8188E() 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:04:16 -08:00
Rickard Strandqvist 55b3bba0b8 staging: rtl8188eu: hal: rtl8188e_cmd.c: Remove unused function
Remove the function rtl8188e_set_rssi_cmd() 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:04:16 -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
Rickard Strandqvist 99eff12f8a staging: rtl8188eu: hal: hal_intf.c: Cleaning up functions that are not used anywhere
Removes some functions that are not used anywhere.
rtw_hal_interrupt_handler() rtw_hal_sreset_get_wifi_status()

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>
2014-12-02 16:29:26 -08:00
Jes Sorensen 6179ed592b staging: rtl8188eu: usb_dvobj_init(): A NULL pointer check for usb_host_endpoints makes no sense
struct usb_host_interface points to an array of
struct usb_host_endpoints - it makes no sense to do a NULL pointer
check for each pointer.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:29:26 -08:00
Anjana Sasindran 8b21696c51 staging:drivers:staging:rtl8188eu:hal:rtl8188e_hal_init.c: Added a blank line after declaration
This patch fix a checkpatch.pl warning

WARNING:Missing blank line after declaration

Signed-off-by: Anjana Sasindran <anjanasasindran123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:29:26 -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
Larry Finger 6d4556fc03 staging: r8188eu: Add new device ID for DLink GO-USB-N150
The DLink GO-USB-N150 with revision B1 uses this driver.

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-11-27 08:55:01 -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
Krzysztof Konopko 31d4cf1294 rtl8188eu: Simplify rtw_endofpktfile() in xmit_linux.c
scripts/checkpatch.pl reports a coding style problem in xmit_linux.c

  WARNING:BRACES: braces {} are not necessary for single statement blocks
  #61852: FILE: rtl8188eu/os_dep/xmit_linux.c:70:

This patch removes unnecessary braces and simplifies the function to a
single return statement.

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
Dan Carpenter 85e1c554f4 staging: r8188eu: cleanups in rtw_android_set_block()
1) We can tighten up the code a little by returning directly and it
   makes the code more future proof and easier to read.
2) "free" is a better name than "exit".
3) sizeof(priv_cmd) is shorter and more clear than sizeof(struct
   android_wifi_priv_cmd).

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:22:50 -08:00
Dan Carpenter d0915b2255 staging: r8188eu: get a string from the user correctly
The original code had two bugs:
1) It didn't check if the string was zero length so it could oops when
   it tried to dereference the ZERO_SIZE_PTR.
2) It didn't enforce that the string was NUL terminated.

It was also messy as pants.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:22:50 -08:00
Vaishali Thakkar 2b365fa9d9 Staging: rtl8188eu: Use put_unaligned_le32
This patch introduces the use of function put_unaligned_le32.

This is done using Coccinelle and semantic patch used is as follows:

@@ identifier tmp; expression ptr; expression y,e; type T; @@

- tmp = cpu_to_le32(y);

  <+... when != tmp
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le32(y,ptr);
  ...+>
? tmp = e

@@ type T; identifier tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:10:38 -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 037a449ac7 staging: rtl8188eu: os_dep: 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:49 -07:00
Tapasweni Pathak 08a3d85a01 staging: rtl8188eu: hal: 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:49 -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 3fd511d986 staging: rtl8188eu: os_dep: Used min_t instead of min
This patch fixes this checkpatch.pl warning:
WARNING: min() should probably be min_t(int, req->essid_len,
IW_ESSID_MAX_SIZE)

by using this coccinelle script:

@r@
identifier i;
expression e1, e2;
type t1, t2;
@@

t1 i =
- min((t2)e1, e2);
+ min_t(t2, e1, e2);

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 12:20:16 -07:00
Gulsah Kose 04947c5be5 staging: rtl8188eu: os_dep: Removed unnecessary return.
This patch fixes
WARNING:  void function return statements are not generally useful
checkpatch.pl warning in usb_intf.c by using this coccinelle script

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

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 12:20:15 -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
Paul McQuade 422caed999 staging: rtl8188eu: hal: space required
ERROR: space required before the open brace '{'

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:48:32 +08: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
Tapasweni Pathak 157b8e59fa staging: rtl8188eu: os_dep: Remove null check before kfree
This patch is generated by the following semantic patch

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

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +08:00
Jiayi Ye 1d06bb4e9d staging: remove unneeded parentheses around the right hand side of an assignment
In assignments such as value = (FLASH_CMD_STATUS_REG_READ << 24);, parentheses
are not needed. The Coccinelle semantic patch was used to find cases.

@r@
identifier x;
expression e1, e2;
@@

- x = (e1 << e2);
+ x = e1 << e2;

Signed-off-by: Jiayi Ye <yejiayily@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-27 10:33:06 +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
Tapasweni Pathak 705515cdcd staging: rtl8188eu: os_dep: Replaced kzalloc and memcpy with kmemdup
Replaced calls to kzalloc followed by memcpy with a single call to
kmemdup.

Patch found using coccicheck.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 12:20:44 +08:00
Tapasweni Pathak b312fb06b5 staging: rtl8188eu: os_dep: Remove useless cast on kzalloc
Casting rhe return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language, as mentioned in
Documentation/CodingStyle, Chap 14.

Removed the cast on kzalloc return value.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 12:20:44 +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
Mahati Chamarthy 0b7d9bc2a4 Staging: rtl8188eu: include: Remove unused macros
This patch removes macros that are never used.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@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
Mahati Chamarthy c9e27530b2 Staging: rtl8188eu: include: Remove unnecessary macro
This patch removes a macro which is not used anywhere except in the header
file. The existing usage in the header file is replaced with the actual value.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:12 +08:00