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/drp.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/drp.c')
-rw-r--r-- | drivers/uwb/drp.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index c0b1e5e2bd08..fe328146adb7 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
@@ -37,14 +37,13 @@ | |||
37 | * | 37 | * |
38 | * A DRP Availability IE is appended. | 38 | * A DRP Availability IE is appended. |
39 | * | 39 | * |
40 | * rc->uwb_dev.mutex is held | 40 | * rc->rsvs_mutex is held |
41 | * | 41 | * |
42 | * FIXME We currently ignore the returned value indicating the remaining space | 42 | * FIXME We currently ignore the returned value indicating the remaining space |
43 | * in beacon. This could be used to deny reservation requests earlier if | 43 | * in beacon. This could be used to deny reservation requests earlier if |
44 | * determined that they would cause the beacon space to be exceeded. | 44 | * determined that they would cause the beacon space to be exceeded. |
45 | */ | 45 | */ |
46 | static | 46 | int uwb_rc_send_all_drp_ie(struct uwb_rc *rc) |
47 | int uwb_rc_gen_send_drp_ie(struct uwb_rc *rc) | ||
48 | { | 47 | { |
49 | int result; | 48 | int result; |
50 | struct device *dev = &rc->uwb_dev.dev; | 49 | struct device *dev = &rc->uwb_dev.dev; |
@@ -102,25 +101,6 @@ error_cmd: | |||
102 | kfree(cmd); | 101 | kfree(cmd); |
103 | error: | 102 | error: |
104 | return result; | 103 | return result; |
105 | |||
106 | } | ||
107 | /** | ||
108 | * Send all DRP IEs associated with this host | ||
109 | * | ||
110 | * @returns: >= 0 number of bytes still available in the beacon | ||
111 | * < 0 errno code on error. | ||
112 | * | ||
113 | * As per the protocol we obtain the host controller device lock to access | ||
114 | * bandwidth structures. | ||
115 | */ | ||
116 | int uwb_rc_send_all_drp_ie(struct uwb_rc *rc) | ||
117 | { | ||
118 | int result; | ||
119 | |||
120 | mutex_lock(&rc->uwb_dev.mutex); | ||
121 | result = uwb_rc_gen_send_drp_ie(rc); | ||
122 | mutex_unlock(&rc->uwb_dev.mutex); | ||
123 | return result; | ||
124 | } | 104 | } |
125 | 105 | ||
126 | void uwb_drp_handle_timeout(struct uwb_rsv *rsv) | 106 | void uwb_drp_handle_timeout(struct uwb_rsv *rsv) |