diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-11-17 10:53:42 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-11-19 09:46:33 -0500 |
commit | 6fae35f9cea92793a98b2d9ab21235e5ae035581 (patch) | |
tree | 82142169ff2ccada8c6c98beb6da59cafe8d913d /drivers/uwb/lc-rc.c | |
parent | e17be2b2a95b43fe0d5878adf330701bb7a77115 (diff) |
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>
Diffstat (limited to 'drivers/uwb/lc-rc.c')
-rw-r--r-- | drivers/uwb/lc-rc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/uwb/lc-rc.c b/drivers/uwb/lc-rc.c index f00633d334dd..9cf21e6bb624 100644 --- a/drivers/uwb/lc-rc.c +++ b/drivers/uwb/lc-rc.c | |||
@@ -189,9 +189,9 @@ static int uwb_rc_setup(struct uwb_rc *rc) | |||
189 | int result; | 189 | int result; |
190 | struct device *dev = &rc->uwb_dev.dev; | 190 | struct device *dev = &rc->uwb_dev.dev; |
191 | 191 | ||
192 | result = uwb_rc_reset(rc); | 192 | result = uwb_radio_setup(rc); |
193 | if (result < 0) { | 193 | if (result < 0) { |
194 | dev_err(dev, "cannot reset UWB radio: %d\n", result); | 194 | dev_err(dev, "cannot setup UWB radio: %d\n", result); |
195 | goto error; | 195 | goto error; |
196 | } | 196 | } |
197 | result = uwb_rc_mac_addr_setup(rc); | 197 | result = uwb_rc_mac_addr_setup(rc); |
@@ -311,12 +311,7 @@ void uwb_rc_rm(struct uwb_rc *rc) | |||
311 | 311 | ||
312 | uwb_dbg_del_rc(rc); | 312 | uwb_dbg_del_rc(rc); |
313 | uwb_rsv_remove_all(rc); | 313 | uwb_rsv_remove_all(rc); |
314 | uwb_rc_ie_rm(rc, UWB_IDENTIFICATION_IE); | 314 | uwb_radio_shutdown(rc); |
315 | if (rc->beaconing >= 0) | ||
316 | uwb_rc_beacon(rc, -1, 0); | ||
317 | if (rc->scan_type != UWB_SCAN_DISABLED) | ||
318 | uwb_rc_scan(rc, rc->scanning, UWB_SCAN_DISABLED, 0); | ||
319 | uwb_rc_reset(rc); | ||
320 | 315 | ||
321 | rc->stop(rc); | 316 | rc->stop(rc); |
322 | 317 | ||