diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/uwb/spec.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/uwb/spec.h b/include/linux/uwb/spec.h index 198c15f8e251..a30436ea53aa 100644 --- a/include/linux/uwb/spec.h +++ b/include/linux/uwb/spec.h | |||
@@ -200,6 +200,12 @@ enum uwb_drp_reason { | |||
200 | UWB_DRP_REASON_MODIFIED, | 200 | UWB_DRP_REASON_MODIFIED, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | /** Relinquish Request Reason Codes ([ECMA-368] table 113) */ | ||
204 | enum uwb_relinquish_req_reason { | ||
205 | UWB_RELINQUISH_REQ_REASON_NON_SPECIFIC = 0, | ||
206 | UWB_RELINQUISH_REQ_REASON_OVER_ALLOCATION, | ||
207 | }; | ||
208 | |||
203 | /** | 209 | /** |
204 | * DRP Notification Reason Codes (WHCI 0.95 [3.1.4.9]) | 210 | * DRP Notification Reason Codes (WHCI 0.95 [3.1.4.9]) |
205 | */ | 211 | */ |
@@ -252,6 +258,7 @@ enum uwb_ie { | |||
252 | UWB_APP_SPEC_PROBE_IE = 15, | 258 | UWB_APP_SPEC_PROBE_IE = 15, |
253 | UWB_IDENTIFICATION_IE = 19, | 259 | UWB_IDENTIFICATION_IE = 19, |
254 | UWB_MASTER_KEY_ID_IE = 20, | 260 | UWB_MASTER_KEY_ID_IE = 20, |
261 | UWB_RELINQUISH_REQUEST_IE = 21, | ||
255 | UWB_IE_WLP = 250, /* WiMedia Logical Link Control Protocol WLP 0.99 */ | 262 | UWB_IE_WLP = 250, /* WiMedia Logical Link Control Protocol WLP 0.99 */ |
256 | UWB_APP_SPEC_IE = 255, | 263 | UWB_APP_SPEC_IE = 255, |
257 | }; | 264 | }; |
@@ -365,6 +372,27 @@ struct uwb_ie_drp_avail { | |||
365 | DECLARE_BITMAP(bmp, UWB_NUM_MAS); | 372 | DECLARE_BITMAP(bmp, UWB_NUM_MAS); |
366 | } __attribute__((packed)); | 373 | } __attribute__((packed)); |
367 | 374 | ||
375 | /* Relinqish Request IE ([ECMA-368] section 16.8.19). */ | ||
376 | struct uwb_relinquish_request_ie { | ||
377 | struct uwb_ie_hdr hdr; | ||
378 | __le16 relinquish_req_control; | ||
379 | struct uwb_dev_addr dev_addr; | ||
380 | struct uwb_drp_alloc allocs[]; | ||
381 | } __attribute__((packed)); | ||
382 | |||
383 | static inline int uwb_ie_relinquish_req_reason_code(struct uwb_relinquish_request_ie *ie) | ||
384 | { | ||
385 | return (le16_to_cpu(ie->relinquish_req_control) >> 0) & 0xf; | ||
386 | } | ||
387 | |||
388 | static inline void uwb_ie_relinquish_req_set_reason_code(struct uwb_relinquish_request_ie *ie, | ||
389 | int reason_code) | ||
390 | { | ||
391 | u16 ctrl = le16_to_cpu(ie->relinquish_req_control); | ||
392 | ctrl = (ctrl & ~(0xf << 0)) | (reason_code << 0); | ||
393 | ie->relinquish_req_control = cpu_to_le16(ctrl); | ||
394 | } | ||
395 | |||
368 | /** | 396 | /** |
369 | * The Vendor ID is set to an OUI that indicates the vendor of the device. | 397 | * The Vendor ID is set to an OUI that indicates the vendor of the device. |
370 | * ECMA-368 [16.8.10] | 398 | * ECMA-368 [16.8.10] |