diff options
author | Stefano Panella <stefano.panella@csr.com> | 2008-12-12 08:00:06 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-12 08:00:06 -0500 |
commit | 5b37717a23b8e40f6cf7ad85a26ddcf41c171e2c (patch) | |
tree | 3c611f907bc61c6e1900c4092e8f2f1e8eefd907 /drivers/uwb/drp-avail.c | |
parent | c35fa3ea1ae8198bd65c2c6e59d9ebd68c115a59 (diff) |
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>
Diffstat (limited to 'drivers/uwb/drp-avail.c')
-rw-r--r-- | drivers/uwb/drp-avail.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/uwb/drp-avail.c b/drivers/uwb/drp-avail.c index 3febd8552808..40a540a5a72e 100644 --- a/drivers/uwb/drp-avail.c +++ b/drivers/uwb/drp-avail.c | |||
@@ -58,7 +58,7 @@ void uwb_drp_avail_init(struct uwb_rc *rc) | |||
58 | * | 58 | * |
59 | * avail = global & local & pending | 59 | * avail = global & local & pending |
60 | */ | 60 | */ |
61 | static void uwb_drp_available(struct uwb_rc *rc, struct uwb_mas_bm *avail) | 61 | void uwb_drp_available(struct uwb_rc *rc, struct uwb_mas_bm *avail) |
62 | { | 62 | { |
63 | bitmap_and(avail->bm, rc->drp_avail.global, rc->drp_avail.local, UWB_NUM_MAS); | 63 | bitmap_and(avail->bm, rc->drp_avail.global, rc->drp_avail.local, UWB_NUM_MAS); |
64 | bitmap_and(avail->bm, avail->bm, rc->drp_avail.pending, UWB_NUM_MAS); | 64 | bitmap_and(avail->bm, avail->bm, rc->drp_avail.pending, UWB_NUM_MAS); |
@@ -105,6 +105,7 @@ void uwb_drp_avail_release(struct uwb_rc *rc, struct uwb_mas_bm *mas) | |||
105 | bitmap_or(rc->drp_avail.local, rc->drp_avail.local, mas->bm, UWB_NUM_MAS); | 105 | bitmap_or(rc->drp_avail.local, rc->drp_avail.local, mas->bm, UWB_NUM_MAS); |
106 | bitmap_or(rc->drp_avail.pending, rc->drp_avail.pending, mas->bm, UWB_NUM_MAS); | 106 | bitmap_or(rc->drp_avail.pending, rc->drp_avail.pending, mas->bm, UWB_NUM_MAS); |
107 | rc->drp_avail.ie_valid = false; | 107 | rc->drp_avail.ie_valid = false; |
108 | uwb_rsv_handle_drp_avail_change(rc); | ||
108 | } | 109 | } |
109 | 110 | ||
110 | /** | 111 | /** |
@@ -280,6 +281,7 @@ int uwbd_evt_handle_rc_drp_avail(struct uwb_event *evt) | |||
280 | mutex_lock(&rc->rsvs_mutex); | 281 | mutex_lock(&rc->rsvs_mutex); |
281 | bitmap_copy(rc->drp_avail.global, bmp, UWB_NUM_MAS); | 282 | bitmap_copy(rc->drp_avail.global, bmp, UWB_NUM_MAS); |
282 | rc->drp_avail.ie_valid = false; | 283 | rc->drp_avail.ie_valid = false; |
284 | uwb_rsv_handle_drp_avail_change(rc); | ||
283 | mutex_unlock(&rc->rsvs_mutex); | 285 | mutex_unlock(&rc->rsvs_mutex); |
284 | 286 | ||
285 | uwb_rsv_sched_update(rc); | 287 | uwb_rsv_sched_update(rc); |