aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u/r8192U_core.c
Commit message (Collapse)AuthorAgeFilesLines
* more driver stuff from 3.2.72Wolfgang Wiedmeyer2015-10-231-9/+3
|
* Fix common misspellingsLucas De Marchi2011-03-311-3/+3
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* staging: rtl8192u: Remove NULL check before kfreeIlia Mirkin2011-03-141-27/+12
| | | | | | | | | | | | | | | | | 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>
* Staging: rtl8192u: check return code kmalloc.David Chosrova2010-12-011-0/+2
| | | | | | | | | This patch checks the return code of kmalloc when trying to allocate memory for priv->rx_urb in rtl8192_usb_initendpoints(), return -ENOMEM when failed. Signed-off-by: David Chosrova <david.chosrova@libertysurf.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8192u: remove dead code to disable dot11dDavid Chosrova2010-12-011-21/+0
| | | | | | | | | | | | | | | | | | | This patch removes all the ENABLE_DOT11D ifdefs. It is always defined for driver. DOT11D has to do with regulatory domains. What prompted this patch was a warning message in Sparse. drivers/staging/rtl8192u/r8192U_core.c:247:1: warning: "eqMacAddr" redefined in file included from drivers/staging/rtl8192u/:81:81: drivers/staging/rtl8192u/dot11d.h:35:1: warning: this is the location of the previous definition Now there are no ifdefs around dot11d.h it made no sense to have this second definition, so I removed that macro as well. ( Thanks Dan ;-) ). Acked-by. Dan Carpenter <error27@gmail.com> Signed-off-by: David Chosrova <dada2372@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/staging: Remove unnecessary semicolonsJoe Perches2010-11-161-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: trivial: fix typos concerning "controller"Uwe Kleine-König2010-11-091-1/+1
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: rtl8192u: improve error pathVasiliy Kulikov2010-09-051-5/+18
| | | | | | | Functions alloc_ieee80211 and register_netdev may fail. Check for it. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging/trivial: fix typos concerning "initiali[zs]e"Uwe Kleine-König2010-09-041-1/+1
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Merge staging-next into Linus's treeGreg Kroah-Hartman2010-08-051-45/+28
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/staging/Kconfig drivers/staging/batman-adv/bat_sysfs.c drivers/staging/batman-adv/device.c drivers/staging/batman-adv/hard-interface.c drivers/staging/cx25821/cx25821-audups11.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * staging: rtl8192u: fix checkpatch.pl issues to line 514Mike Gilks2010-06-181-45/+28
| | | | | | | | | | | | | | | | Fixed most problems pointed out by checkpatch.pl in file r8192U_core.c up to line 500 Signed-off-by: Mike Gilks <mike.kernel@gilksonline.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Staging: rtl8192u_usb: Add LG device ID 043e:7a01Ben Hutchings2010-06-301-0/+2
|/ | | | | | | | | Add another device ID as listed in the vendor driver version 0003.0825.2009. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Use kcalloc or kzallocJulia Lawall2010-05-141-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use kcalloc or kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y,flags; statement S; type T; @@ x = - kmalloc + kcalloc ( - y * sizeof(T), + y, sizeof(T), flags); if (x == NULL) S -memset(x, 0, y * sizeof(T)); @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
* Staging: Drop memory allocation castJulia Lawall2010-05-111-4/+6
| | | | | | | | | | | | | | | | | | | | Drop cast on the result of kmalloc and similar functions. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; @@ - (T *) (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...)) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* staging: make USB device id constantNémeth Márton2010-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* staging: Fix misspelling of "should" and "shouldn't" in comments.Adam Buchbinder2010-03-031-1/+1
| | | | | | | | Some comments misspell "should" or "shouldn't"; this fixes them. No code changes. Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8187x: Use %pM for mac address outputJoe Perches2010-03-031-2/+2
| | | | | | | | | | | | | Uncompiled. Doesn't currently build anyway. Converted MAC_FMT to %pM Converted some %02x%02x%02x%02x%02x%02x to %pm Converted MAC_ARG to direct use Removed MAC_FMT and MAC_ARG macros Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8192u: remove dead codeMauro Carvalho Chehab2009-12-111-1083/+0
| | | | | | | | | | Remove #ifse against older kernel versions; Remove codes marked with #if 0; Remove #if 1 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8192u: remove bad whitespacesMauro Carvalho Chehab2009-12-111-355/+355
| | | | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: rtl8192u: make it compileMauro Carvalho Chehab2009-12-111-38/+72
| | | | | | | | | | | Add it to staging Kbuild and fixes some API differences that prevents compilation. It seems that the ieee80211 stack is very close to rtl8192su one. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Added Realtek rtl8192u driver to stagingJerry Chuang2009-12-111-0/+7134
Add Realtek linux driver for rtl8192u as provided by Realtek rtl8192u_linux_2.6.0006.1031.2008.tar.gz, send to me C/C staging ML. This version won't compile against upstream, doesn't follow Linux CodingStyle and has their own ieee80211 stack. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>