1
0
Fork 0
Commit Graph

40 Commits (redonkable)

Author SHA1 Message Date
Hariprasad Kelam da0721cc26 staging: rtl8192e: rtllib_module: Remove redundant memset
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:15 +02:00
Greg Kroah-Hartman 18056f34c3 staging: rtl8192e: add proper SPDX identifiers on files that did not have them.
There were a few files for the rtl8192e driver that did not have SPDX
identifiers on them, so fix that up.  At the same time, remove the "free
form" text that specified the license of the file, as that is impossible
for any tool to properly parse.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:10:17 +02:00
Hildo Guillardi Júnior dc88057f36 Staging: rtl8192e: Fix spaces around "+"
Fix checkpatch error:
CHECK: spaces preferred around that '+' (ctx:VxV)
99: FILE: drivers/staging/rtl8192e/rtllib_module.c:99:
+	memset(ieee, 0, sizeof(struct rtllib_device)+sizeof_priv);

Signed-off-by: Hildo Guillardi Júnior <hildogjr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 11:08:02 +02:00
Derek Robson a959dec115 Staging: rtl8192e - fixed style of block comments
Fixed style of block comment across whole driver
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:28:47 +01:00
Sandhya Bankar 6869a11bff Staging: rtl8192e: Use !x instead of x == NULL
Use !x instead of x == NULL. This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-18 12:37:43 +02:00
Christian Colic bc6abf32be staging: rtl8192e: remove unnecessary multiple blank lines
remove multiple blank lines to fix some checkpatch checks

Signed-off-by: Christian Colic <colic.christian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 20:01:45 -08:00
Shraddha Barke 749f3c0500 Staging: rtl8192e: Use kcalloc instead of kzalloc to allocate array
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 20:54:14 -07:00
Mateusz Kulikowski ae6d07a5d1 staging: rtl8192e: Fix FSF_MAILING_ADDRESS warnings
Remove FSF address from licenses at the beginning of files.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:26:06 +02:00
Gnanachandran Dhanapal 2e59e40d5d Staging: rtl8192e: Timer setup using macro rather assignment
This patch shall replaces user defined timer setup function with
standard timer setup macro. Also removes init_timer, because timer can
be initialized in setup_timer macro as well.

Signed-off-by: Gnanachandran Dhanapal <gdhanapa@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:38:23 -07:00
Mateusz Kulikowski 48eb2b7ea6 staging: rtl8192e: Remove unused rtllib_device members
Delete several members of rtllib_device including
their initializers if needed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:37:21 -07:00
Mateusz Kulikowski db65e4aaf5 staging: rtl8192e: Remove remains of RTLLIB_*_DEBUG() (including proc entry)
Remove rest of rtllib "debug" system - it is no longer used -
proper netdev_* functions are used in most cases.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:33:21 +09:00
Mateusz Kulikowski def16d2ee9 staging: rtl8192e: Remove RTLLIB_DEBUG_INFO()
Use pr_debug() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:01 +09:00
Mateusz Kulikowski f0dddb1d02 staging: rtl8192e: Remove RTLLIB_ERROR() and RTLLIB_WARNING()
Use pr_* where needed (rtllib init code).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-01 06:32:00 +09:00
Quentin Lambert b6b0012c2d staging: rtl8192e: Remove unnecessary OOM message
This patch reduces the kernel size by removing error messages that duplicate
the normal OOM message.

A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr)

@@
identifier f,print,l;
expression e;
constant char[] c;
@@

e = \(kzalloc\|kmalloc\|devm_kzalloc\|devm_kmalloc\)(...);
if (e == NULL) {
  <+...
-  print(...,c,...);
  ... when any
(
  goto l;
|
  return ...;
)
  ...+> }

Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:59:53 -08:00
Joe Perches d08c028c75 staging: rtl8192x: Remove use of seq_printf return value
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:59:53 -08:00
Kolbeinn Karlsson 98ab6ff914 Staging: rtl8192e: Fixed unnecessary line continuation.
Fixed a coding style issue.

Signed-off-by: Kolbeinn Karlsson <kolbeinnkarls@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:25:43 +08: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
Himangi Saraogi 49d74d7091 Staging: rtl8192e: adjust error handling
This patch removes a test in error handling code by adding a return
path.

The Coccinelle semantic match that found the problem is:

// <smpl>
@@
expression E,E1,E2;
@@

E = alloc_etherdev(...)
... when != E = E1
if (...) { ... free_netdev(E); ... return ...; }
... when != E = E2
(
  if (...)
   {
   ... when != free_netdev(E);
   return dev; }
|
* if (...)
   {
   ... when != free_netdev(E);
   return ...; }
|
register_netdev(E)
)

// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 19:59:06 -04:00
Rashika Kheria cf8ab8cf99 Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_module.c
This patch fixes the following sparse warning in rtllib_module.c-

drivers/staging/rtl8192e/rtllib_module.c:240:12: warning: symbol 'rtllib_init' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_module.c:260:13: warning: symbol 'rtllib_exit' was not declared. Should it be static?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:58:25 -08:00
Li Zefan 1c9962b434 Staging: rtl8192e: add missing single_release()
The debug file is opened with single_open(), but there's no
single_release().

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-31 17:33:36 -07:00
Al Viro c037773cc7 rtl8192e: switch to proc_create()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09 14:13:06 -04:00
Al Viro e3e7b40c19 rtl8192e: don't use create_proc_entry() for directories
proc_mkdir() is there for purpose...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-09 14:13:06 -04: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 d37e0208df rtl8192e: Split the driver up
This patch splits the current r8192e_pci driver up into six different
drivers: rtllib, rtllib_crypt, rtllib_crypt_ccmp, rtllib_crypt_tkip,
rtllib_crypt_wep, and r8192e_pci.

Now that they are proper modules, the init and exit functions do not
need to be called directly. Also, the rtllib_*_null functions are not
needed since they will be loaded on demand.

Signed-off-by: Sean MacLennan <seanm@seanm.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-30 19:48:56 +09: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
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 db8971b618 staging: rtl8192e: Cleanup checkpatch -f errors - Part XIII
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 rtl_dm.c will need refactoring. In addition,
some of the variables will 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 8567829a6c staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XII
This patch removes all the errors and most of the warnings generated by
checkpatch -f.

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

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-24 01:23: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 8cc638e95b staging: rtl8192e: Remove ifdefs for CONFIG_RTLLIB_DEBUG
This symbol is unconditionally defined in a header file, thus tests for it can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 21:23:39 -05:00
Larry Finger 1bd7bcfc63 staging: rtl8192e: Remove dead code associated with CONFIG_CFG_80211
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2011-08-23 21:16:24 -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 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