Commit Graph

213 Commits

Author SHA1 Message Date
John Tapsell 251d380034 Staging: rt2870: Add USB ID for Buffalo Airstation WLI-UC-GN
BugLink: http://bugs.launchpad.net/bugs/441990

This was tested to successfully enable the hardware.

Signed-off-by: John Tapsell <johnflux@gmail.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
CC: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29 11:48:29 -08:00
Larry Finger 705059a670 staging: rt2870: Add new USB ID for Belkin F6D4050 v1
Add new USB ID for FT2870 for Belkin F6D4050 v1

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported- and Tested-by: James Long <crogonint@yahoo.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 14:05:23 -08:00
Julia Lawall 61241d97db drivers/staging: delete double assignment
Delete successive assignments to the same location.  In three of the cases,
the two assignments are identical.  In the case of the file
rt2860/common/cmm_aes.c, the assigned variable i is never used, so both
assignments are dropped.

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

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 14:05:22 -08:00
Greg Kroah-Hartman e4c5bf8e3d Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28 09:44:56 -07:00
Andy Shevchenko 97eea3afa2 staging: rt2860: remove custom min() and max()
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-12 09:03:29 -07:00
Tracey Dent ad52860253 Staging: rt2860: Makefile: replace the use of <module>-objs with <module>-y
Changed <module>-objs to <module>-y in Makefile.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08 07:23:46 -07:00
Tracey Dent 72aba90f17 Staging: rt2860: Makefile: cleaned up Makefile cflag lines
Changed to use the proper ccflags-y option

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-05 11:56:40 -07:00
Andy Shevchenko 1c919d90e1 staging: rt2860: '&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:55 -07:00
Andy Shevchenko aa4d282cba staging: rt2860: change plain format of mac address to %pM in *printf()
There are many locations where MAC or BSSID is printed. The plain format
is used in such places. *printf() in kernel recognizes
%pM, %pMF and %pm format parameters to print out 6-byte array as MAC
address. This patch changes plain format to custom %pM which is widely
used in kernel.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-16 12:26:10 -07:00
Thomas Gleixner 0f0800f17a staging: Bulk convert the semaphore mess
init_MUTEX(_LOCKED) and DECLARE_MUTEX are going away. Bulk convert
staging users.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-07 19:31:32 -07:00
Greg Kroah-Hartman 30cb3e5fb5 Staging: rt2860: Fix brace coding style issue
This fixes a single brace issue in the rt_linux.c file.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 20:55:55 -07:00
Uwe Kleine-König 9b0131cb24 staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:23:26 -07:00
Ben Hutchings 9e693e4375 Staging: rt2870sta: Add more device IDs from vendor drivers
Taken from DPO_RT3070_LinuxSTA_V2.3.0.4_20100604.tar.bz2 and
2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2, with duplicates removed.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-03 17:37:15 -07:00
Neil Munro b0ea846105 Staging: RT2860: Fixed all warnings and errors in the iface directory
I have cleaned both files inside the iface directory (fileo rtmp_pci.h
and rtmp_usb.h). I am not sure about some of the changes I have made
however my adjustments have solved all errors.  There were also a few
issues on my machine with ap.h on my machine, however I have since
cleaned that too.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 15:05:13 -07:00
Neil Munro 4819a3667e Staging: RT2860: Fixed the spacing error in oid.h
Fixed the single spacing error in oid.h.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:54:30 -07:00
Neil Munro a2b4e5f447 Staging: RT2860: Fixed both coding style errors in eeprom.h
Fixed two coding style errors in the form of pointer style issues in eeprom.h.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:53:20 -07:00
Jacob Smith ace9115712 staging: rt2860: rtmp: Fixed coding style issue in rtmp.h
This patch fixes a whitespace issue detected by checkpatch.pl

Signed-off-by: Jacob Smith <tarinaky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:13:15 -07:00
Greg Kroah-Hartman e9563355ac Staging: Merge staging-next into Linus's tree
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>
2010-08-05 14:18:03 -07:00
Larry Finger 5d92fe3387 staging: rt2870: Add USB ID for Belkin F6D4050 v2
Device missing from current tables.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Rod Huffaker <rod.huffaker@gmail.com>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-26 15:38:49 -07:00
Neil Munro e7d122b55d Staging: RT2860: Cleaned all bar one in chlist.h
I have cleaned all errors and all bar one warning in chlist.h. The
remaining warning is a line over 80 characters warning.  Breaking it
doesnt look all that easy.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 14:33:00 -07:00
Kulikov Vasiliy ef7d8ba135 Staging: rt2860: usb_main_dev: remove casts from void*
Remove unnesessary casts from void*.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:54:01 -07:00
Kulikov Vasiliy 5401843d19 Staging: rt2860: rt_linux: remove casts from void*
Remove unnesessary casts from void*.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:49:36 -07:00
Kulikov Vasiliy 11ed93566f Staging: rt2860: rtmp_timer: remove casts from void*
Remove unnesessary casts from void*.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:49:36 -07:00
Niadh 8e72c64115 Staging: RT2860: Fixed everything in ap.h.
Fixed the single two warnings in ap.h which left this file with nothing left to clean.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:24:27 -07:00
Ozan Çağlayan 9674e57a4f Staging: rt2870: add device id for Zyxel NWD-270N
Add device id for Zyxel NWD-270N USB dongle.

Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-30 08:18:15 -07:00
Uwe Kleine-König 37523e84cb staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:58:01 -07:00
Niadh f751ffab11 Staging: RT2860 Fixed all errors in mlme.h and all but one in rtmp.h.
I have fixed all errors in mlme.h and fixed all bar one in rtmp.h.
I think I can fix rtmp.h too by moving a brace up two lines, I just dont know if it will work.
If someone can confirm it will work I will change it.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:43:05 -07:00
Dan Carpenter 2d98bb22c3 Staging: rc2860: return -EFAULT on copy_to_user errors
copy_to_user() returns the number of bytes remaining but we want to
return a negative error code.  This is in the ioctl handler and the
error code gets passed to userspace.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:58 -07:00
Andy Shevchenko 1356de06ce staging: rt2860: use new hex_to_bin() method
Instead of using own implementation involve hex_to_bin() function.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-25 08:07:05 -07:00
Greg Kroah-Hartman c8d1a12692 Merge staging-next tree into Linus's latest version
Conflicts:
	drivers/staging/arlan/arlan-main.c
	drivers/staging/comedi/drivers/cb_das16_cs.c
	drivers/staging/cx25821/cx25821-alsa.c
	drivers/staging/dt3155/dt3155_drv.c
	drivers/staging/hv/hv.c
	drivers/staging/netwave/netwave_cs.c
	drivers/staging/wavelan/wavelan.c
	drivers/staging/wavelan/wavelan_cs.c
	drivers/staging/wlags49_h2/wl_cs.c

This required a bit of hand merging due to the conflicts
that happened in the later .34-rc releases, as well as
some staging driver changing coming in through other trees
(v4l and pcmcia).

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-21 12:48:55 -07:00
Greg Kroah-Hartman c220cc3e37 USB: staging: fix up usb_buffer_alloc calls in the staging tree
This renames the functions usb_buffer_alloc and usb_buffer_free to the correct
ones for the drivers in the staging tree.

Cc: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-20 13:21:38 -07:00
Anand Gadiyar 935e99fb07 staging: trivial: fix typo "seperate"
s/seperate/separate

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Jiri Kosina <trivial@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-14 13:16:10 -07:00
Julia Lawall 324148788b Staging: Drop memory allocation cast
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>
2010-05-11 16:06:48 -07:00
Nobuhiro KUSUNO de37cd49b5 Staging: rt2870: add device ID of MelCo.,Inc. WLI-UC-G301N
My wireless LAN module 'MelCo.,Inc. WLI-UC-G301N' works fine,
if the following line is added into 2870_main_dev.c.

Signed-off-by: Nobhiro KUSUNO <n-kusuno@fc4.so-net.ne.jp>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:19 -07:00
Joe Perches 6aed5295ae Staging: rt2860: Hoist assign from if
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:44 -07:00
Neil Munro fdb2fd14c7 Staging: rt2860: rtmp.h: Fixed all bar one error.
All simple errors have been removed, including +80 line character limits
and various pointer syntax isues.

Signed-off-by: Neil Munro <neilmunro@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Trey Evans a3327f0798 Staging: rt2860: fix usb_main_dev.c style errors
Correct several style errors related to pointers in usb_main_dev.c.

Signed-off-by: Trey Evans <lewis.r.evans@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Gorskin Ilya 5d9ffae082 Staging: rt2860: fix coding style issue in mac_pci.h, mac_usb.h, rtmp_mac.h, rtmp_phy.h
This is a patch to the mac_pci.h, mac_usb.h, rtmp_mac.h, rtmp_phy.h files
that fixes up errors found by the checkpatch.pl tool

Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Gorskin Ilya 1995dbabd4 Staging: rt2860: fix coding style issue in rt3070.c, rt3090.c, rt30xx.c
This is a patch to the rt3070.c, rt3090.c, rt30xx.c files that fixes up
errors found by the checkpatch.pl tool

Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Gorskin Ilya 3d401c96e0 Staging: rt2860: fix coding style issue in rt_usb.c
This is a patch to the rt_usb.c file that fixes up errors found by the
checkpatch.pl tool

Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Gorskin Ilya 015ffcbeb3 Staging: rt2860: fix coding style issue in rt_pci_rbus.c
This is a patch to the rt_pci_rbus.c file that fixes up errors found by
the checkpatch.pl tool

Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Gorskin Ilya 52acccb144 Staging: rt2860: fix coding style issue in rt_main_dev.c
This is a patch to the rt_main_dev.c file that fixes up errors found by
the checkpatch.pl tool

Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Gorskin Ilya cc9b5222f2 Staging: rt2860: fix coding style issue in rt_linux.c
Signed-off-by: Gorskin Ilya <revent82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Ben Hutchings 9fd453c981 Staging: rt28xx: Make PCI_{MAP,UNMAP}_SINGLE type-safe
To avoid recurrence of bugs such as <http://bugs.debian.org/575726>,
change the type of the first parameter to linux_pci_{map,unmap}_single()
from void * to struct rt_rtmp_adapter *.  Also do not define the macros
PCI_{MAP,UNMAP}_SINGLE() when building the rt2870sta driver; they are
not used and if they were that would be a bug.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:42 -07:00
Dan Carpenter 64ff4044a8 Staging: rt2860: clean up & => &&
a4_exists is an integer used as a boolean type so the original code
works.  But all the other conditions use && and this makes it
consistent.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:35 -07:00
Julia Lawall 8f18604e6f Staging: drop redundant memset
The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:34 -07:00
Henrik Hautakoski 347fd7dbdb Staging: rt2860: fixed coding-style issues in pci_main_dev.c
fixed a bunch of coding-style issues generated from checkpatch.pl

Signed-off-by: Henrik Hautakoski <henrik.hautakoski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:34 -07:00
Dan Carpenter 4dbb8e57c1 staging: rt2860: off by one errors
The code is trying to say that if the offset is higher than the max it
should be set to the max, but there is an off by one bug and it sets it
one passed the end of the array.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:33 -07:00
Chris Largret 12840c63b0 Staging: rt2860: add Belkin F5D8055 Wireless-N USB Dongle device id
Add Belkin F5D8055 Wireless-N USB support to the rt2870
staging driver.

Signed-off-by: Chris Largret <largret@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-04-30 09:30:11 -07:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking 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>
2010-03-30 22:02:32 +09:00