diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 13:31:04 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 13:31:04 -0500 |
| commit | 80618fa83a34a26199fa99cfd06476a81ddf57df (patch) | |
| tree | 30a486902351f57c8f072dee268d2abeb3ddfe7e /include/linux/uwb/spec.h | |
| parent | 92cde4d5396c3b6cbf3192286b687f97a889dffe (diff) | |
| parent | b21a207141d83a06abc5f492b80204602e02ca44 (diff) | |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: (31 commits)
uwb: remove beacon cache entry after calling uwb_notify()
uwb: remove unused include/linux/uwb/debug.h
uwb: use print_hex_dump()
uwb: use dev_dbg() for debug messages
uwb: fix memory leak in uwb_rc_notif()
wusb: fix oops when terminating a non-existant reservation
uwb: fix oops when terminating an already terminated reservation
uwb: improved MAS allocator and reservation conflict handling
wusb: add debug files for ASL, PZL and DI to the whci-hcd driver
uwb: fix oops in debug PAL's reservation callback
uwb: clean up whci_wait_for() timeout error message
wusb: whci-hcd shouldn't do ASL/PZL updates while channel is inactive
uwb: remove unused beacon group join/leave events
wlp: start/stop radio on network interface up/down
uwb: add basic radio manager
uwb: add pal parameter to new reservation callback
uwb: fix races between events and neh timers
uwb: don't unbind the radio controller driver when resetting
uwb: per-radio controller event thread and beacon cache
uwb: add commands to add/remove IEs to the debug interface
...
Diffstat (limited to 'include/linux/uwb/spec.h')
| -rw-r--r-- | include/linux/uwb/spec.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/include/linux/uwb/spec.h b/include/linux/uwb/spec.h index 198c15f8e251..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) |
| @@ -200,6 +225,12 @@ enum uwb_drp_reason { | |||
| 200 | UWB_DRP_REASON_MODIFIED, | 225 | UWB_DRP_REASON_MODIFIED, |
| 201 | }; | 226 | }; |
| 202 | 227 | ||
| 228 | /** Relinquish Request Reason Codes ([ECMA-368] table 113) */ | ||
| 229 | enum uwb_relinquish_req_reason { | ||
| 230 | UWB_RELINQUISH_REQ_REASON_NON_SPECIFIC = 0, | ||
| 231 | UWB_RELINQUISH_REQ_REASON_OVER_ALLOCATION, | ||
| 232 | }; | ||
| 233 | |||
| 203 | /** | 234 | /** |
| 204 | * DRP Notification Reason Codes (WHCI 0.95 [3.1.4.9]) | 235 | * DRP Notification Reason Codes (WHCI 0.95 [3.1.4.9]) |
| 205 | */ | 236 | */ |
| @@ -252,6 +283,7 @@ enum uwb_ie { | |||
| 252 | UWB_APP_SPEC_PROBE_IE = 15, | 283 | UWB_APP_SPEC_PROBE_IE = 15, |
| 253 | UWB_IDENTIFICATION_IE = 19, | 284 | UWB_IDENTIFICATION_IE = 19, |
| 254 | UWB_MASTER_KEY_ID_IE = 20, | 285 | UWB_MASTER_KEY_ID_IE = 20, |
| 286 | UWB_RELINQUISH_REQUEST_IE = 21, | ||
| 255 | UWB_IE_WLP = 250, /* WiMedia Logical Link Control Protocol WLP 0.99 */ | 287 | UWB_IE_WLP = 250, /* WiMedia Logical Link Control Protocol WLP 0.99 */ |
| 256 | UWB_APP_SPEC_IE = 255, | 288 | UWB_APP_SPEC_IE = 255, |
| 257 | }; | 289 | }; |
| @@ -365,6 +397,27 @@ struct uwb_ie_drp_avail { | |||
| 365 | DECLARE_BITMAP(bmp, UWB_NUM_MAS); | 397 | DECLARE_BITMAP(bmp, UWB_NUM_MAS); |
| 366 | } __attribute__((packed)); | 398 | } __attribute__((packed)); |
| 367 | 399 | ||
| 400 | /* Relinqish Request IE ([ECMA-368] section 16.8.19). */ | ||
| 401 | struct uwb_relinquish_request_ie { | ||
| 402 | struct uwb_ie_hdr hdr; | ||
| 403 | __le16 relinquish_req_control; | ||
| 404 | struct uwb_dev_addr dev_addr; | ||
| 405 | struct uwb_drp_alloc allocs[]; | ||
| 406 | } __attribute__((packed)); | ||
| 407 | |||
| 408 | static inline int uwb_ie_relinquish_req_reason_code(struct uwb_relinquish_request_ie *ie) | ||
| 409 | { | ||
| 410 | return (le16_to_cpu(ie->relinquish_req_control) >> 0) & 0xf; | ||
| 411 | } | ||
| 412 | |||
| 413 | static inline void uwb_ie_relinquish_req_set_reason_code(struct uwb_relinquish_request_ie *ie, | ||
| 414 | int reason_code) | ||
| 415 | { | ||
| 416 | u16 ctrl = le16_to_cpu(ie->relinquish_req_control); | ||
| 417 | ctrl = (ctrl & ~(0xf << 0)) | (reason_code << 0); | ||
| 418 | ie->relinquish_req_control = cpu_to_le16(ctrl); | ||
| 419 | } | ||
| 420 | |||
| 368 | /** | 421 | /** |
| 369 | * The Vendor ID is set to an OUI that indicates the vendor of the device. | 422 | * The Vendor ID is set to an OUI that indicates the vendor of the device. |
| 370 | * ECMA-368 [16.8.10] | 423 | * ECMA-368 [16.8.10] |
