Commit Graph

12 Commits

Author SHA1 Message Date
Javier M. Mellid 2657c30e23 staging: rtl8712: fixed coding style issues
Fixed some style and format issues with code.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-20 14:13:31 -07:00
Alexander Beregalov 4008386593 Staging: rtl8712: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-20 13:45:59 -07:00
Ilia Mirkin b7977fa250 staging: rtl8712: Remove NULL check before kfree
This patch was 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: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:57:35 -07:00
Xiaochen Wang 4495c15f29 staging: rtl8712: check _malloc return value
Description: The original check is wrong.

Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-07 13:46:38 -08:00
Xiaochen Wang cd92274093 staging: rtl8712: check copy_from_user return value
Description:return -EFAULT if copy_to_user() fails

Signed-off-by: Xiaochen Wang <wangxiaochen0@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-07 13:46:38 -08:00
Dan Carpenter d936435f20 Staging: rtl8712: fix math errors in snprintf()
The original code had calls to snprintf(p, 7, "wpa_ie=") but that string
is 8 characters (because snprintf() puts a NUL terminator on the end).
So instead of an '=' the what gets written to buf is a NUL terminator
followed by the rest of the string.

And actually the %02x formats are three chars as well when you include
the terminator.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:51:27 -08:00
Larry Finger e3dc896b21 staging: r8712u: Fix sparse message
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:22:19 -08:00
Andy Shevchenko a5ed57a3ec staging: rtl8712: '&pointer[0]' to 'pointer' fix
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 16:10:56 -07:00
Andy Shevchenko 0ce53f3d15 staging: rtl8712: use '%pM' format to print MAC address
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:11 -07:00
Andy Shevchenko 91facdbe50 staging: rtl8712: throw away custom hex_to_bin()
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 01:59:53 -07:00
Larry Finger 1407a9e105 staging: r8712u: Fix rate setting when HT is not enabled
When operating in normal bg mode, the maximum rate was fixed at 48 Mb/s.

Signed-off-by: Albert Wang <albert_wang@realtek.com.tw>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
2010-08-30 07:51:09 -05:00
Larry Finger 2865d42c78 staging: r8712u: Add the new driver to the mainline kernel
This code is for a completely new version of the Realtek 8192 USB devices
such as the D-Link DWA-130. The Realtek code, which was originally for
Linux, Windows XP and Windows CE, has been stripped of all code not needed
for Linux. In addition, only one additional configuration variable, which
enables AP mode, remains.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Tested-by: Frederic Leroy <fredo@starox.org>
2010-08-20 10:15:30 -05:00