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 /include/linux/uwb | |
| 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 'include/linux/uwb')
| -rw-r--r-- | include/linux/uwb/debug-cmd.h | 2 | ||||
| -rw-r--r-- | include/linux/uwb/spec.h | 25 |
2 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/uwb/debug-cmd.h b/include/linux/uwb/debug-cmd.h index 07efbe17db53..8da004e25628 100644 --- a/include/linux/uwb/debug-cmd.h +++ b/include/linux/uwb/debug-cmd.h | |||
| @@ -43,7 +43,7 @@ struct uwb_dbg_cmd_rsv_establish { | |||
| 43 | __u8 type; | 43 | __u8 type; |
| 44 | __u16 max_mas; | 44 | __u16 max_mas; |
| 45 | __u16 min_mas; | 45 | __u16 min_mas; |
| 46 | __u8 sparsity; | 46 | __u8 max_interval; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | struct uwb_dbg_cmd_rsv_terminate { | 49 | struct uwb_dbg_cmd_rsv_terminate { |
diff --git a/include/linux/uwb/spec.h b/include/linux/uwb/spec.h index a30436ea53aa..b52e44f1bd33 100644 --- a/include/linux/uwb/spec.h +++ b/include/linux/uwb/spec.h | |||
| @@ -59,6 +59,11 @@ enum { UWB_NUM_ZONES = 16 }; | |||
| 59 | #define UWB_MAS_PER_ZONE (UWB_NUM_MAS / UWB_NUM_ZONES) | 59 | #define UWB_MAS_PER_ZONE (UWB_NUM_MAS / UWB_NUM_ZONES) |
| 60 | 60 | ||
| 61 | /* | 61 | /* |
| 62 | * Number of MAS required before a row can be considered available. | ||
| 63 | */ | ||
| 64 | #define UWB_USABLE_MAS_PER_ROW (UWB_NUM_ZONES - 1) | ||
| 65 | |||
| 66 | /* | ||
| 62 | * Number of streams per DRP reservation between a pair of devices. | 67 | * Number of streams per DRP reservation between a pair of devices. |
| 63 | * | 68 | * |
| 64 | * [ECMA-368] section 16.8.6. | 69 | * [ECMA-368] section 16.8.6. |
| @@ -94,6 +99,26 @@ enum { UWB_BEACON_SLOT_LENGTH_US = 85 }; | |||
| 94 | enum { UWB_MAX_LOST_BEACONS = 3 }; | 99 | enum { UWB_MAX_LOST_BEACONS = 3 }; |
| 95 | 100 | ||
| 96 | /* | 101 | /* |
| 102 | * mDRPBackOffWinMin | ||
| 103 | * | ||
| 104 | * The minimum number of superframes to wait before trying to reserve | ||
| 105 | * extra MAS. | ||
| 106 | * | ||
| 107 | * [ECMA-368] section 17.16 | ||
| 108 | */ | ||
| 109 | enum { UWB_DRP_BACKOFF_WIN_MIN = 2 }; | ||
| 110 | |||
| 111 | /* | ||
| 112 | * mDRPBackOffWinMax | ||
| 113 | * | ||
| 114 | * The maximum number of superframes to wait before trying to reserve | ||
| 115 | * extra MAS. | ||
| 116 | * | ||
| 117 | * [ECMA-368] section 17.16 | ||
| 118 | */ | ||
| 119 | enum { UWB_DRP_BACKOFF_WIN_MAX = 16 }; | ||
| 120 | |||
| 121 | /* | ||
| 97 | * Length of a superframe in microseconds. | 122 | * Length of a superframe in microseconds. |
| 98 | */ | 123 | */ |
| 99 | #define UWB_SUPERFRAME_LENGTH_US (UWB_MAS_LENGTH_US * UWB_NUM_MAS) | 124 | #define UWB_SUPERFRAME_LENGTH_US (UWB_MAS_LENGTH_US * UWB_NUM_MAS) |
