1
0
Fork 0
Commit Graph

79 Commits (09e0b2ff32538a032936631ad9c110c42fab7f26)

Author SHA1 Message Date
Mateusz Kulikowski 14b40d9288 staging: rtl8192e: Comment cleanup (style/format)
- Multiline comments use "network subsystem comment style"
- Merge short multiline comments
- Remove empty comments
- Remove function name comment at the end of small (<1 screen) functions
- Reformat 802.11 data frame format to use spaces and network format

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:31 +02:00
Mateusz Kulikowski e725fb6f81 staging: rtl8192e: Fix indentation in rtllib_rx_auth_resp()
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:30 +02:00
Mateusz Kulikowski f7567e2070 staging: rtl8192e: Decrease nesting of rtllib_rx_auth_resp()
Return from rtllib_rx_auth_resp() if auth_parse() fails.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:30 +02:00
Mateusz Kulikowski e8f05b0b01 staging: rtl8192e: Divide rtllib_rx_auth()
Move authentication response processing to rtllib_rx_auth_resp() function.
No logic is affected.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:30 +02:00
Mateusz Kulikowski e2ac043118 staging: rtl8192e: Fix LINE_CONTINUATIONS warning
Fix 'Avoid unnecessary line continuations' checkpatch.pl warning

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:30 +02:00
Mateusz Kulikowski 0f0688b3ce staging: rtl8192e: Fix RETURN_VOID warnings
Fix 'void function return statements are not generally useful'
checkpatch.pl warnings

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:29 +02:00
Mateusz Kulikowski 285b7c00e0 staging: rtl8192e: Fix UNNECESSARY_ELSE warning
Fix checkpatch warnings 'else is not generally useful after a break or return'

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 15:29:29 +02:00
Mateusz Kulikowski d69d20549b staging: rtl8192e: fix coding style warnings (printk -> netdev_*)
Use netdev_*, dev_* or pr_* instead of printk where possible.
KERN_DEBUG messages are left intact as pr_dbg has different behaviour.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:59 +01:00
Mateusz Kulikowski dc986e3ed3 staging: rtl8192e: fix coding style issues (spaces before semicolon)
Fix checkpatch.pl warning 'space prohibited before semicolon'.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Mateusz Kulikowski 0822339b52 staging: rtl8192e: fix coding style issues (merge broken strings)
Fix checkpatch.pl warnings:
- 'WARNING: quoted string split across lines'
- 'WARNING: break quoted strings at a space character'

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:13:58 +01:00
Supriya Karanth 26049b11cb staging: rtl8192e: 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:00:20 +01:00
Vaishali Thakkar 8b9733c1ad Staging: rtl8192e: Eliminate use of MSECS macro
Use msecs_to_jiffies instead of driver specific macro
MSECS. This is done using Coccinelle and semantic
patch used for this is as follows:

@@expression t;@@

- MSECS(t)
+ msecs_to_jiffies(t)

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 15:59:15 +01:00
Navya Sri Nizamkari d272f9ddce staging: rtl8192e: Use kzalloc instead of kmalloc.
This patch uses kzalloc instead of kmalloc 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
Aya Mahfouz cdbaf3f672 staging: rtl8192e: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)
eth_zero_addr() is a wrapper function for memset if 0 is going to
be assigned to a mac address. The replacement was done by 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 09:54:34 -08:00
Devendra Naga 876e20d333 staging: rtl8192e: add missing tasklet_kill on remove path
The powersave tasklet is created in rtllib_softmac_init and
it is not removed while unloading the module.

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 14:03:06 -08:00
Behan Webster 16fc54ee26 staging, rtl8192e, LLVMLinux: Make static local in inline function const
rtllib_association_req is a (large) inline function which defines 2 constant
static arrays which aren't labelled as const. As a result clang complains with:

non-constant static local variable in inline function may be different in
different files
[-Wstatic-local-in-inline]
  static u8       AironetIeOui[] = {0x00, 0x01, 0x66};
  ^
The solution is making them "static const".

However doing so requires dropping const when being used with struct
octet_string. However the value is used in a const fashion thereafter, so no
harm done.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:33:05 -07:00
Behan Webster d82f0029e0 staging, rtl8192e, LLVMLinux: Remove unused prototype
MgntQuery_MgntFrameTxRate is only used within rtllib_softmac.c, so it really
should be static instead of extern.

Since it is currently extern a warning is generated because a different
function of the same name is defined staticlly in ieee80211_softmac.c

Removing the incorrect extern declaration and defining the rtllib_softmac
version of this routine static fixes the warning.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:33:05 -07:00
Behan Webster 6d91857d48 staging, rtl8192e, LLVMLinux: Change extern inline to static inline
With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the opposite thing from older versions of gcc
(emits code for an externally linkable version of the inline function).

"static inline" does the intended behavior in all cases instead.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:33:05 -07:00
Mahati Chamarthy 92db2a276c Staging: rtl8192e: Fix else is not useful warning style
This fixes the following checkpatch.pl warnings:
WARNING: else is not generally useful after a break or return

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 13:51:45 -07:00
Matthew Casey 3a6b70c3f3 staging: rtl8192e: fixed coding style issues
Fixed missing blank line after declarations issues

Signed-off-by: Matthew Casey <mdcasey@chabloom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:54:03 -07:00
Peter Senna Tschudin 4764ca981b drivers/staging: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.

Verified by compilation only.

The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
    when strict
return
- ret
+ C
;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-26 10:32:15 -07:00
Masanari Iida 430fb25090 staging: rtl8192e: Fix typo in rtl8192e
Fix spelling typo in comments within rtl8192e.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Reviewed-by: James Cameron <quozl@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-25 16:02:00 -07:00
Matthias Schoepe a0711c4da3 Staging rtl8192e: Fixing checkpatch errors
We fixed checkpatch errors of the following type:
	ERROR: "foo * bar" should be "foo *bar"

The error was fixed in the following files of the rtl8192e staging driver:
	rtllib_softmac.c
	rtllib_rx.c
	rtllib_crypt.c
	rtllib.h

There are no functional changes in this patch.

Signed-off-by: Matthias Schoepe <matthias.schoepe@studium.uni-erlangen.de>
Signed-off-by: Andreas Frembs <andreas.frembs@studium.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-09 10:29:37 -08:00
Rashika Kheria c5654c0bf9 Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_softmac.c
This patch fixes the following Sparse warnings in rtllib_softmac.c-

drivers/staging/rtl8192e/rtllib_softmac.c:3636:12: warning: symbol 'rtllib_MgntDisconnectIBSS' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_softmac.c:3661:13: warning: symbol 'rtllib_MlmeDisassociateRequest' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_softmac.c:3687:13: warning: symbol 'rtllib_MgntDisconnectAP' was not declared. Should it be static?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:01:35 -08:00
Rashika Kheria 1830a6d840 Staging: rtl8192e: Fix incorrect type in assignment in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c-

drivers/staging/rtl8192e/rtllib_softmac.c:298:12: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:298:12:    expected unsigned short [unsigned] [usertype] fc
drivers/staging/rtl8192e/rtllib_softmac.c:298:12:    got restricted __le16 [usertype] frame_ctl

drivers/staging/rtl8192e/rtllib_softmac.c:810:32: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:810:32:    expected restricted __le16 [usertype] frame_ctl
drivers/staging/rtl8192e/rtllib_softmac.c:810:32:    got int

drivers/staging/rtl8192e/rtllib_softmac.c:814:34: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:814:34:    expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192e/rtllib_softmac.c:814:34:    got int

drivers/staging/rtl8192e/rtllib_softmac.c:821:33: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:821:33:    expected restricted __le16 [usertype] algorithm
drivers/staging/rtl8192e/rtllib_softmac.c:821:33:    got int

drivers/staging/rtl8192e/rtllib_softmac.c:955:24: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:955:24:    expected unsigned short [unsigned] [usertype] val16
drivers/staging/rtl8192e/rtllib_softmac.c:955:24:    got restricted __le16 [usertype] <noident>

drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:1263:33:    expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192e/rtllib_softmac.c:1263:33:    got int

drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:1282:30:    expected restricted __le16 [usertype] listen_interval
drivers/staging/rtl8192e/rtllib_softmac.c:1282:30:    got unsigned short [unsigned] [usertype] listen_interval

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:01:35 -08:00
Rashika Kheria 7fe30a7d4a Staging: rtl8192e: Fix Sparse Warning of invalid assignment '|=' in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c-

drivers/staging/rtl8192e/rtllib_softmac.c:812:40: warning: invalid assignment: |=
drivers/staging/rtl8192e/rtllib_softmac.c:812:40:    left side has  type restricted __le16
drivers/staging/rtl8192e/rtllib_softmac.c:812:40:    right side has type int

drivers/staging/rtl8192e/rtllib_softmac.c:924:17: warning: invalid assignment: |=
drivers/staging/rtl8192e/rtllib_softmac.c:924:17:    left side has type restricted __le16
drivers/staging/rtl8192e/rtllib_softmac.c:924:17:    right side has type int
drivers/staging/rtl8192e/rtllib_softmac.c:924:17: error: cast from unknown type

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:01:35 -08:00
Rashika Kheria f7df1918b5 Staging: rtl8192e: Fix Sparse warning of restricted __le16 degrades to integer in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c-
drivers/staging/rtl8192e/rtllib_softmac.c:230:19: warning: restricted __le16 degrades to integer

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 12:01:35 -08:00
Valentina Manea 014e4c27c6 staging: rtl8192e: use true and false for bool variables
This patch fixes coccinelle errors for bool variables
initialized with 1 or 0 instead of true and false.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-30 09:08:45 -07:00
Teodora Baluta 216249819f staging: rtl8192e: use memdup_user to simplify code
Use memdup_user rather than duplicating its implementation. This patch
fixes the following coccinelle warnings:

drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2598:8-15: WARNING opportunity for memdup_user
drivers/staging/rtl8192e/rtllib_softmac.c:3594:9-16: WARNING opportunity for memdup_user

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-28 14:47:07 -07:00
Valentina Manea 4bb01423ab staging: rtl8192e: do not use comparisons on bool tests
This patch fixes coccinelle errors regarding comparisons
used in bool tests.

Signed-off-by: Valentina Manea <valentina.manea.m@gmail.com>
Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-28 14:28:35 -07:00
Andrea Merello 559a4c318c staging: Update e-mail address for Andrea Merello
A lot of files contain reference to my old e-mail address.
Now I'm going not to read mail from it anymore, so update it
with my current address everywhere.

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-27 22:03:53 -07:00
Hema Prathaban 6dea0da1ff staging: rtl8192e: Use kmemdup for duplicating memory
Instead of allocating memory (kmalloc) and copying (memcpy)
from source, memory can be duplicated using kmemdup

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 14:23:41 -04:00
Hema Prathaban ae053253a7 staging: rtl8192e: Fix potential null dereference
check memory is allocated in '*challenge' before using it.

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-15 14:23:40 -04:00
Adam Buchbinder f2635894e8 staging: Fix misspellings of "whether".
"Whether" is spelled "wether" in several places. This fixes those that
are in the staging tree.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21 08:56:40 -07:00
Wei Yongjun 71cd7913cb staging: rtl8192e: using random_ether_addr() to generate random MAC
Using random_ether_addr() to generate a random Ethernet
address (MAC) that is not multicast and has the local
assigned bit set. Not need to duplicating its implementation.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:11:28 -07:00
Devendra Naga b4797fef98 staging: rtl8192e: remove casting of returned pointer from kmalloc
as per Documentation/CodingStyle we dont need to cast the return of
kmalloc

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:09:02 -07:00
Wei Yongjun 0c43e56c30 staging: rtl8192e: use is_broadcast_ether_addr() instead of memcmp()
Using is_broadcast_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is broadcast
address.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:03:40 -07:00
Masanari Iida db2c8da02a staging: rtl8192e: Fix typo in staging/rtl8192e
Correct spelling typo in staging/rtl8192e.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 19:32:13 -07:00
Justin P. Mattock cd01712397 staging: rtl8192e: Fix typos.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
ACKed-by: Larry Finger <Larry.finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-24 11:28:24 -07:00
Larry Finger ea9f10f2fd staging: r8192e_pci: Change memcpy to memcmp
Routine rtllib_MlmeDisassociateRequest() has a comparison of memcpy()
with NULL, which makes no sense. Analysis of the code suggests that
memcmp() was intended.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20 15:12:12 -07:00
Jesper Juhl 337503431a Staging, rtl8192e, softmac: remove redundant memset and fix mem leak
In drivers/staging/rtl8192e/rtllib_softmac.c::rtllib_rx_assoc_resp()
we allocate memory for 'network' with kzalloc() and then proceed to
zero the already zeroed mem we got from kzalloc() with
memset(). That's redundant, so remove the memset()

We also fail to kfree() the memory we allocated for 'network' if we do not enter

  if (ieee->current_network.qos_data.supported == 1) {

and the variable then goes out of scope.

To fix that I simply moved the kfree() that was inside that 'if'
statement to instead be just after it. It then covers both the case
where we take the branch and when we don't.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 17:21:43 -08:00
Sean MacLennan 3b148be0df staging/rtl8192e: Register against lib80211
Convert rtllib from registering the crypt drivers against rtllib_crypt
and instead register the against lib80211. The crypto functions have
R- prepended (R-CCMP, R-TKIP, R-WEP) so they will not clash with the
lib80211 versions.

We cannot use the lib80211 crypt drivers since the rtl8192e has some
hardware support that is not handled by the lib80211 crypt drivers.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:48:59 -08:00
Sean MacLennan 0ddcf5fdfa staging/rtl8192e: Convert to lib80211_crypt_info
Convert rtllib to use lib80211_crypt_info.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:48:59 -08:00
Sean MacLennan 32c44cb5b9 staging/rtl8192e: Convert to lib80211_crypt_data and lib80211_crypt_ops
Convert rtllib_crypt_data to lib80211_crypt_data and
rtllib_crypt_ops to lib80211_crypt_ops.

This is almost a 1:1 replacement, only extra_prefix_len and
extra_postfix_len changed.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:48:59 -08:00
Sean MacLennan 184f1938b2 staging/rtl8192e: Add lib80211.h to rtllib.h
Add lib80211.h header file to rtllib.h and get it compiling.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-22 13:48:59 -08:00
Devendra Naga e0ec8a6708 staging: remove version.h includes in rtl8192e
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-13 16:22:18 -08:00
Sean MacLennan 3b28499c55 rtl8192e: Export symbols
The rtl8192e driver had a natural split between the more generic
rtllib code and the more specific rtl8192e code. This patch exports
all the symbols needed by the r8192 specific code from the rtllib
generic code.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:45:26 +09:00
Sean MacLennan ea74fedced rtl8192e: create generic rtllib_debug.h
Rename rtl_debug.h to rtllib_debug.h. Source files should include
rtllib.h if they are generic and rtl_core.h if they are r8192e
specific. Files should never include both.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:44:09 +09:00
Thomas Meyer d9317533c5 staging: rtl8192e: Use kmemdup rather than duplicating its implementation
Use kmemdup rather than duplicating its implementation

 The semantic patch that makes this change is available
 in scripts/coccinelle/api/memdup.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:21:16 -08:00
Thomas Meyer 929fa2a42e staging: rtl8192e: Use kzalloc rather than kmalloc v2
Use kzalloc rather than kmalloc followed by memset with 0

This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:21:16 -08:00