Commit Graph

67 Commits

Author SHA1 Message Date
Frank Leipold
b81c087f6d uwb: allow WLP to be used with IPv6.
Ethernet multicast addresses are supported by mapping them to
broadcast WLP frames. These are frequently used in IPv6 traffic.

Signed-off-by: Frank Leipold <frank.leipold@eads.net>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2009-06-01 12:03:15 +01:00
Roel Kluin
94d72176f6 uwb: event_size should be signed
event_size should be ssize_t to notice when hwarc_get_event_size() returns
-ENOSPC.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2009-06-01 11:59:15 +01:00
Yang Hongyang
284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Yang Hongyang
6a35528a83 dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:10 -07:00
Matt LaPlante
692105b8ac trivial: fix typos/grammar errors in Kconfig texts
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:22:01 +02:00
David Vrabel
8f5140a6a0 uwb: lock rc->rsvs_lock with spin_lock_bh()
rc->rsvs_lock may be taken in a timer so lock it with spin_lock_bh().

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2009-01-23 12:57:20 +00:00
David Vrabel
dff243f7cb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream 2009-01-22 19:12:32 +00:00
David S. Miller
7f46b1343f Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 2009-01-08 11:05:59 -08:00
Stephen Hemminger
c4a80d7e67 uwb: convert devices to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-07 18:09:07 -08:00
Huang Weiyi
04c470adb0 uwb: remove unused #include <version.h>'s
Remove unused #include <version.h>'s in file(s) below,
  drivers/uwb/allocator.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2009-01-07 10:44:42 +00:00
David Vrabel
2226b1c219 uwb: safely remove all reservations
When removing all reservations during shutdown, terminate them first and
then wait for any pending timeout work to complete.  This prevents the
timeout work from running after the reservation has been freed.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2009-01-06 17:55:32 +00:00
Nick Andrew
8eb09d8d24 trivial: Fix misspelling of "firmware" in usb.c
Fix misspelling of "firmware" in usb.c

It's spelled "firmware".

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-01-06 11:28:09 +01:00
David Vrabel
b21a207141 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
Conflicts:

	drivers/uwb/wlp/eda.c
2009-01-02 13:17:13 +00:00
Stefano Panella
3af373021f uwb: remove beacon cache entry after calling uwb_notify()
Removing the beacon cache entry from a uwb_dev can cause an oops if the
bce is released before the call to uwb_notify().

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-23 12:31:09 +00:00
David Vrabel
a01777ecf2 uwb: remove unused include/linux/uwb/debug.h
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22 18:30:29 +00:00
David Vrabel
e43ace8912 uwb: use print_hex_dump()
Use print_hex_dump() instead of the home-grown dump_bytes().

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22 18:27:17 +00:00
David Vrabel
bce83697c5 uwb: use dev_dbg() for debug messages
Instead of the home-grown d_fnstart(), d_fnend() and d_printf() macros,
use dev_dbg() or remove the message entirely.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-22 18:22:50 +00:00
David Vrabel
02f11ee181 uwb: fix memory leak in uwb_rc_notif()
Don't leak memory in uwb_rc_notif() if certain non-standard events are
received.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-12 13:28:48 +00:00
David Vrabel
671e470ed0 uwb: fix oops when terminating an already terminated reservation
Calling uwb_rsv_terminate() on a reservation already in UWB_RSV_STATE_NONE
should do nothing.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-12 13:23:24 +00:00
Stefano Panella
5b37717a23 uwb: improved MAS allocator and reservation conflict handling
Greatly enhance the MAS allocator:
  - Handle row and column reservations.
  - Permit all the available MAS to be allocated.
  - Follows the WiMedia rules on MAS selection.

Take appropriate action when reservation conflicts are detected.
  - Correctly identify which reservation wins the conflict.
  - Protect alien BP reservations.
  - If an owned reservation loses, resize/move it.
  - Follow the backoff procedure before requesting additional MAS.

When reservations are terminated, move the remaining reservations (if
necessary) so they keep following the MAS allocation rules.

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-12-12 13:00:06 +00:00
David Vrabel
dcc7461eef wusb: add debug files for ASL, PZL and DI to the whci-hcd driver
Add asl, pzl and di debugfs files to uwb/uwbN/wusbhc for WHCI host
controller.  These dump the current ASL, PZL and DI buffer.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-26 13:36:59 +00:00
David Vrabel
e4b49580f7 uwb: fix oops in debug PAL's reservation callback
Initialize pal_priv for reservations created by the debug PAL.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-26 12:47:05 +00:00
David Vrabel
5a4e1a795d uwb: clean up whci_wait_for() timeout error message
All callers of whci_wait_for() should get consistant error message if a
timeout occurs.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-25 14:34:47 +00:00
David Vrabel
0996e63824 uwb: remove unused beacon group join/leave events
The UWB_NOTIF_BG_JOIN/UWB_NOTIF_BG_LEAVE events have been
superceeded by the channel_changed callback in struct uwb_pal.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-19 14:47:16 +00:00
David Vrabel
e8e1594c81 wlp: start/stop radio on network interface up/down
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-19 14:47:04 +00:00
David Vrabel
6fae35f9ce uwb: add basic radio manager
The UWB radio manager coordinates the use of the radio between the
PALs that may be using it.  PALs request use of the radio with
uwb_radio_start() and the radio manager will start beaconing if its
not already doing so.  When the last PAL has called uwb_radio_stop()
beaconing will be stopped.

In the future, the radio manager will have a more sophisticated channel
selection algorithm, probably following the Channel Selection Policy
from the WiMedia Alliance when it is finalized.  For now, channel 9
(BG1, TFC1) is selected.

The user may override the channel selected by the radio manager and may
force the radio to stop beaconing.

The WUSB Host Controller PAL makes use of this and there are two new
debug PAL commands that can be used for testing.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-19 14:46:33 +00:00
David Vrabel
e17be2b2a9 uwb: add pal parameter to new reservation callback
The pal parameter allows PALs to retrieve their PAL-specific data
structure.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-17 15:24:14 +00:00
David Vrabel
58be81ed30 uwb: fix races between events and neh timers
Always use del_timer_sync() before freeing nehs.  Destroy all nehs after
stopping the radio controller and before cleaning up the reservation
manager.  Handle the timer running after an event has removed the neh.

This fixes various oopses that may occur if a radio controller is removed
while a neh timer is still active.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-07 18:19:19 +00:00
David Vrabel
307ba6dd73 uwb: don't unbind the radio controller driver when resetting
Use pre_reset and post_reset methods to avoid unbinding the radio
controller driver after a uwb_rc_reset_all() call.  This avoids a
deadlock in uwb_rc_rm() when waiting for the uwb event thread to stop.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-07 17:37:33 +00:00
Stefano Panella
fec1a5932f uwb: per-radio controller event thread and beacon cache
Use an event thread per-radio controller so processing events from one
radio controller doesn't delay another.

A radio controller shouldn't have information on devices seen by a
different radio controller (they may be on different channels) so make the
beacon cache per-radio controller.

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-04 15:55:26 +00:00
Stefano Panella
6d5a681dfb uwb: add commands to add/remove IEs to the debug interface
Add the commands UWB_DBG_CMD_IE_ADD and UWB_DBG_CMD_IE_RM to the debug
interface and make them call uwb_rc_ie_add() and uwb_rc_ie_rm().

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-04 15:54:30 +00:00
Stefano Panella
c5995bd281 uwb: infrastructure for handling Relinquish Request IEs
The structures and event handler needed to handle Relinish Request IEs
received from neighbors.  Nothing is done with these IEs yet.

Signed-off-by: Stefano Panella <stefano.panella@csr.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-11-04 15:53:29 +00:00
Kay Sievers
ae9eba0e27 uwb: struct device - replace bus_id with dev_name(), dev_set_name()
Cc: David Vrabel <david.vrabel@csr.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-31 15:07:06 +00:00
Huang Weiyi
7bc9149422 uwb: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/uwb/drp-ie.c
  drivers/uwb/hwa-rc.c
  drivers/uwb/i1480/dfu/usb.c
  drivers/uwb/i1480/i1480u-wlp/lc.c
  drivers/uwb/i1480/i1480u-wlp/sysfs.c
  drivers/uwb/rsv.c
  drivers/uwb/whc-rc.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-31 15:00:18 +00:00
Harvey Harrison
a20fd0a783 uwb: use the %pM formatting specifier in eda.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28 23:02:37 -07:00
David Vrabel
1cde7f68ce uwb: order IEs by element ID
ECMA-368 requires that IEs in a beacon must be sorted by element ID.  Most
hardware uses the ordering in the Set IE URC command so get the ordering
right on the host.

Also refactor the IE management code:
  - use uwb_ie_next() instead of uwb_ie_for_each().
  - remove unnecessary functions.
  - API is now only uwb_rc_ie_add() and uwb_rc_ie_rm().

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28 12:09:17 +00:00
David Vrabel
cae1c11414 uwb: reference count reservations
Reference counting the struct uwb_rsv's is safer and easier to get right than
the transferring ownership of the structures from the PAL to reservation
manager.

This fixes an oops in the debug PAL after a reservation timed out.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28 12:07:23 +00:00
David Vrabel
6a4b587079 uwb: target reservations shouldn't get streams
The reservation owner should decide the stream index to use based on
what reservations it's created.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-28 11:57:02 +00:00
Frank Leipold
c15895ef30 uwb: wrong sizeof argument in mac address compare
In the __uwb_beca_find_bymac function the sizeof returns
the length of a pointer and not the data it is referring
to. Hence only the first 4 bytes were compared, not the
entire 6 bytes MAC address. Now the sizeof takes struct
uwb_mac_addr as argument.

Signed-off-by: Frank Leipold <frank.leipold@eads.net>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-20 14:37:53 +01:00
David Vrabel
8092d7c978 uwb: don't use printk_ratelimit() so often
Avoid using printk_ratelimit() in many places because:
  - many were error messages reporting broken hardware (it's useful to
    get all of these).
  - the message itself wasn't useful so the message has been removed.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-16 13:56:53 +01:00
David Vrabel
92c4d9bd16 uwb: use kcalloc where appropriate
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-15 14:50:10 +01:00
David Vrabel
45c16cd928 uwb: use time_after() when purging stale beacons
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-10-15 14:41:56 +01:00
David Vrabel
6a7c3e464e uwb: depend on EXPERIMENTAL
The UWB stack has some sysfs APIs that will change thus it's best
marked as EXPERIMENTAL until these APIs are finalized.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:36 +01:00
David Vrabel
b60066c141 uwb: add symlinks in sysfs between radio controllers and PALs
Add a facility for PALs to have symlinks to their radio controller
(and vice-versa) and make WUSB host controllers use this.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:35 +01:00
David Vrabel
b63795fa3a uwb: dont tranmit identification IEs
The current identification IE doesn't include any useful information
(the vendor ID is from the EUI-48) and it causes problems with certain
hardware/firmware so don't transmit one.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:34 +01:00
Anderson Lizardo
b5784f10d5 uwb: i1480/GUWA100U: fix firmware download issues
IOGear firmware versions >= 1.4.12224 fail to be downloaded because of a
spurious (and harmless) RCEB received after the download notification. This
patch handles this RCEB and keeps compatibility with future versions that might
not emit this RCEB.

i1480_rceb_check() is reused to check for the RCEB. It is also refactored with
improved comments and reused in another place in mac.c where the checking was
being duplicated.

This patch was tested on both i1480 and GUWA100U HWAs, with all firmware
versions currently available.

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
2008-09-17 16:54:34 +01:00
Anderson Lizardo
8c7e8cb855 uwb: i1480: remove MAC/PHY information checking function
Some hardware/firmware combinations (most notably an IOGear HWA using the i1480
firmware) kill the host controller after issuing a GET_MAC_PHY_INFO command.
Removing this check seems harmless otherwise.

The patch fixes the issue where the HC is killed, showing the message:

ehci_hcd 0000:00:1d.7: HC died; cleaning up

After this error, USB comes back only after reloading the ehci_hcd module.

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:34 +01:00
Anderson Lizardo
fa21183326 uwb: add Intel i1480 HWA to the UWB RC quirk table
The Intel i1480 HWA uses WHCI commands/events even though reporting itself as
WUSB compliant. This patch fixes this by marking it with the
WUSB_QUIRK_WHCI_CMD_EVT flag, which disables WUSB command/event filtering.

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:33 +01:00
Anderson Lizardo
e477a4982f uwb: disable command/event filtering for D-Link DUB-1210
The D-Link DUB-1210 HWA uses commands and events from the WHCI specification,
although reporting itself as WUSB compliant. Therefore, we disable WUSB
command/event filtering for it.

USB_DEVICE_AND_INTERFACE_INFO is used for matching only the RC interface.

Signed-off-by: Anderson Lizardo <anderson.lizardo@indt.org.br>
Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:33 +01:00
David Vrabel
9d53b1bebe uwb: initialize the debug sub-system
Call uwb_dbg_init() so the debugfs files are accessible.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
2008-09-17 16:54:33 +01:00