1
0
Fork 0
Commit Graph

42 Commits (78b311435195ea54c36973394dae7ff14712b1c7)

Author SHA1 Message Date
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
Jesper Juhl 6f03053b68 rtl8192e: Don't copy huge struct by value (and make it const).
rtllib_is_shortslot() takes one argument - a struct that's more than a
kilobyte large. It should take a pointer instead of copying such a
huge struct - and the argument might as well be declared 'const' now
that we are at it, since it is not modified. This patch makes these
changes.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 17:19:23 -08:00
Larry Finger d7613e535e staging: rtl8192e: Fix various problems noted by smatch
Smatch reports the following problems:

  CHECK   drivers/staging/rtl8192e/rtllib_softmac.c
drivers/staging/rtl8192e/rtllib_softmac.c +3143 rtllib_softmac_free(4) info: redundant null check on ieee->pDot11dInfo calling kfree()

  CHECK   drivers/staging/rtl8192e/rtllib_module.c
drivers/staging/rtl8192e/rtllib_module.c +198 free_rtllib(6) info: redundant null check on ieee->pHTInfo calling kfree()

  CHECK   drivers/staging/rtl8192e/rtl819x_TSProc.c
drivers/staging/rtl8192e/rtl819x_TSProc.c +280 SearchAdmitTRStream(52) error: potential null derefence 'pRet'.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:36:00 -07:00
Larry Finger ec0dc6beea staging: rtl8192e: Fix sparse (non-endian) messages - Part I
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:36:34 -07:00
Larry Finger ac50ddaaee staging: rtl8192e: Remove MAC_FMT and MAC_ARG for %pM
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:36:34 -07:00
Larry Finger 9d92ece80d staging: rtl8192e: Cleanup checkpatch -f errors - Part XIV
With this patch, all of the checkpatch errors are fixed; however, only
some of the lines that are too long were fixed. To complete the fixing
of these warnings, the file rtllib_softmac.c will need refactoring. In addition,
some of the variables may need renaming. Those changes can be deferred.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 10:05:14 -07:00
Larry Finger 0dd565069b staging: rtl8192e: Modify time handling
In several places, the driver keeps times (in jiffies) in two 32-bit
quantities. In the rtl8192_hw_to_sleep(), there is an error in the
calculation of the difference between two 64-bit quantities. Rather
than fix that error, I have converted to a single 64-bit number. That
makes the code be much cleaner and clearer.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 10:05:09 -07:00
Larry Finger 3b83db43cc staging: rtl8192e: Convert typedef cb_desc to struct cb_desc
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:42:49 -05:00
Larry Finger ca9900116f staging: rtl8192e: Convert typedef RT_POWER_SAVE_CONTROL to struct rt_pwr_save_ctrl
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:21:36 -05:00
Larry Finger 8310b6c05c staging: rtl8192e: Convert typedef OCTET_STRING to struct octet_string
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:17:14 -05:00
Larry Finger 7796d93eae staging: rtl8192e: Convert typedef RT_HIGH_THROUGHPUT to struct rt_hi_throughput
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 23:15:26 -05:00
Larry Finger ce403a6ac4 staging: rtl8192e: Remove dead code associated with CUSTOMER_ID_INTEL_CMPC and CONFIG_CRDA
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 21:14:32 -05:00
Larry Finger d32ddcba9d staging: rtl8192e: Remove dead code associated with FOR_ANDROID_X86 and FOR_MOBLIN
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 21:07:19 -05:00
Larry Finger 07f432338a staging: rtl8192e: Remove dead code associated with ADHOC_11N
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:56:14 -05:00
Larry Finger f1c2256769 staging: rtl8192e: Remove dead code associated with WIFI_TEST
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:55:56 -05:00
Larry Finger 6e2c538f8f staging: rtl8192e: Remove dead code associated with RTK_DMP_PLATFORM
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:55:15 -05:00
Larry Finger 0252596966 staging: rtl8192e: Remove dead code associated with SUPPORT_USPD
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:51:18 -05:00
Larry Finger bf474281e9 staging: rtl8192e: Remove dead code associated with USB_TX_DRIVER_AGGREGATION_ENABLE
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:38:40 -05:00
Larry Finger 2b259bd38f staging: rtl8192e: Remove ifdefs that depend on ENABLE_DOT11D
This configuration parameter is selected in the Makefile, thus the
conditional code can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:33:14 -05:00
Larry Finger e755463c21 staging: rtl8192e: Remove dead code from removal of ENABLE_TKIP11N
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:25:38 -05:00
Larry Finger 0e3b183059 staging: rtl8192e: Remove dead code associated with PF_SYNCTHREAD
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:25:15 -05:00
Larry Finger 4ebba6d6e3 staging: rtl8192e: Remove dead code associated with COMPATIBLE_WITH_RALINK_MESH
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:24:57 -05:00
Larry Finger a97dc3afc0 staging: rtl8192e: Remove dead code associated with USB_USE_ALIGNMENT
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:23:59 -05:00
Larry Finger d064307a1a staging: rtl8192e: Remove dead code involved with TO_DO
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:23:39 -05:00
Larry Finger 15e7650e88 staging: rtl8192e: Remove dead code involved with TO_DO_LIST
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:23:17 -05:00
Larry Finger 1e71e6d0cf staging: rtl8192e: Remove dead code associated with RTL8192SE
The vendor code will generate several different drivers. As the RTL8192SE
is covered by a mac80211 driver in mainline, eliminate that code heere.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:11:59 -05:00
Larry Finger 175159c537 staging: rtl8192e: Remove code dependent on RTL8190P
The vendor code can conditionally generate drivers for a number of
devices. Remove any code that depends on RTL8190P being set.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 20:11:04 -05:00
Mike McCormack 4f6807e8d2 rtl8192e: Remove occurences of #if 1
Signed-off-by: Mike McCormack <mikem@ring3k.org>
2011-08-23 20:03:54 -05:00
Mike McCormack cb76215448 rtl8192e: Remove extra ifdefs
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Mike McCormack <mikem@ring3k.org>
2011-08-23 20:02:27 -05:00
Larry Finger 94a799425e From: wlanfae <wlanfae@realtek.com>
[PATCH 1/8] rtl8192e: Import new version of driver from realtek

Signed-off-by: wlanfae <wlanfae@realtek.com>
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
2011-08-23 19:00:42 -05:00