1 /* 2 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 /** 19 * DOC: This file contains definitions for MLME TWT functionality. 20 */ 21 22 #ifndef _WLAN_MLME_TWT_PUBLIC_STRUCT_H_ 23 #define _WLAN_MLME_TWT_PUBLIC_STRUCT_H_ 24 25 #include <wlan_twt_public_structs.h> 26 27 #ifdef WLAN_SUPPORT_TWT 28 /** 29 * struct twt_session_info - TWT session related parameters 30 * @dialog_id: TWT session dialog id 31 * @state: TWT session state 32 * @setup_done: TWT session setup is complete 33 * @active_cmd: bitmap to indicate which command is 34 * in progress. Bits are provided by enum wlan_twt_commands. 35 */ 36 struct twt_session_info { 37 uint8_t dialog_id; 38 uint8_t state; 39 bool setup_done; 40 enum wlan_twt_commands active_cmd; 41 }; 42 43 /** 44 * struct twt_context - TWT context 45 * @peer_capability: TWT peer capability bitmap. Refer enum 46 * wlan_twt_capabilities for representation. 47 * @num_twt_sessions: Maximum supported TWT sessions. 48 * @session_info: TWT session related parameters for each session 49 */ 50 struct twt_context { 51 uint8_t peer_capability; 52 uint8_t num_twt_sessions; 53 struct twt_session_info session_info[WLAN_MAX_TWT_SESSIONS_PER_PEER]; 54 }; 55 56 #ifdef FEATURE_SET 57 /** 58 * struct wlan_twt_features - TWT features info 59 * @enable_twt: Enable TWT 60 * @enable_twt_requester: Enable TWT requester 61 * @enable_twt_broadcast: Enable TWT broadcast 62 * @enable_twt_flexible: Enable flexible TWT 63 */ 64 struct wlan_twt_features { 65 bool enable_twt; 66 bool enable_twt_requester; 67 bool enable_twt_broadcast; 68 bool enable_twt_flexible; 69 }; 70 #endif /* FEATURE_SET */ 71 #endif /* WLAN_SUPPORT_TWT */ 72 #endif /* _WLAN_MLME_TWT_PUBLIC_STRUCT_H_ */ 73