Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Inaky Perez-Gonzalez
22d203ecef uwb: add the UWB stack (MLME)
Most of the MAC Layer Management Entity (MLME) support: address, beacon, IE
and scan management.

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