1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2011-2018, 2020-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name /** 21*5113495bSYour Name * DOC: This file contains centralized definitions of converged configuration. 22*5113495bSYour Name */ 23*5113495bSYour Name 24*5113495bSYour Name #ifndef __CFG_MLME_TWT_H 25*5113495bSYour Name #define __CFG_MLME_TWT_H 26*5113495bSYour Name #if defined(WLAN_SUPPORT_TWT) && !defined(WLAN_TWT_CONV_SUPPORTED) 27*5113495bSYour Name /* 28*5113495bSYour Name * <ini> 29*5113495bSYour Name * twt_requestor - twt requestor. 30*5113495bSYour Name * @Min: 0 31*5113495bSYour Name * @Max: 1 32*5113495bSYour Name * @Default: 1 33*5113495bSYour Name * 34*5113495bSYour Name * This cfg is used to store twt requestor config. 35*5113495bSYour Name * 36*5113495bSYour Name * Related: NA 37*5113495bSYour Name * 38*5113495bSYour Name * Supported Feature: 11AX 39*5113495bSYour Name * 40*5113495bSYour Name * Usage: Internal 41*5113495bSYour Name * 42*5113495bSYour Name * </ini> 43*5113495bSYour Name */ 44*5113495bSYour Name #define CFG_TWT_REQUESTOR CFG_INI_BOOL( \ 45*5113495bSYour Name "twt_requestor", \ 46*5113495bSYour Name 1, \ 47*5113495bSYour Name "TWT requestor") 48*5113495bSYour Name /* 49*5113495bSYour Name * <ini> 50*5113495bSYour Name * twt_responder - twt responder. 51*5113495bSYour Name * @Min: 0 52*5113495bSYour Name * @Max: 1 53*5113495bSYour Name * @Default: 0 54*5113495bSYour Name * 55*5113495bSYour Name * This cfg is used to store twt responder config. 56*5113495bSYour Name * 57*5113495bSYour Name * Related: NA 58*5113495bSYour Name * 59*5113495bSYour Name * Supported Feature: 11AX 60*5113495bSYour Name * 61*5113495bSYour Name * Usage: Internal 62*5113495bSYour Name * 63*5113495bSYour Name * </ini> 64*5113495bSYour Name */ 65*5113495bSYour Name #define CFG_TWT_RESPONDER CFG_INI_BOOL( \ 66*5113495bSYour Name "twt_responder", \ 67*5113495bSYour Name false, \ 68*5113495bSYour Name "TWT responder") 69*5113495bSYour Name 70*5113495bSYour Name /* 71*5113495bSYour Name * <ini> 72*5113495bSYour Name * enable_twt - Enable Target Wake Time support. 73*5113495bSYour Name * @Min: 0 74*5113495bSYour Name * @Max: 1 75*5113495bSYour Name * @Default: 1 76*5113495bSYour Name * 77*5113495bSYour Name * This ini is used to enable or disable TWT support. 78*5113495bSYour Name * 79*5113495bSYour Name * Related: NA 80*5113495bSYour Name * 81*5113495bSYour Name * Supported Feature: 11AX 82*5113495bSYour Name * 83*5113495bSYour Name * Usage: External 84*5113495bSYour Name * 85*5113495bSYour Name * </ini> 86*5113495bSYour Name */ 87*5113495bSYour Name #define CFG_ENABLE_TWT CFG_INI_BOOL( \ 88*5113495bSYour Name "enable_twt", \ 89*5113495bSYour Name 1, \ 90*5113495bSYour Name "TWT support") 91*5113495bSYour Name 92*5113495bSYour Name /* 93*5113495bSYour Name * <ini> 94*5113495bSYour Name * twt_congestion_timeout - Target wake time congestion timeout. 95*5113495bSYour Name * @Min: 0 96*5113495bSYour Name * @Max: 10000 97*5113495bSYour Name * @Default: 100 98*5113495bSYour Name * 99*5113495bSYour Name * STA uses this timer to continuously monitor channel congestion levels to 100*5113495bSYour Name * decide whether to start or stop TWT. This ini is used to configure the 101*5113495bSYour Name * target wake time congestion timeout value in the units of milliseconds. 102*5113495bSYour Name * A value of Zero indicates that this is a host triggered TWT and all the 103*5113495bSYour Name * necessary configuration for TWT will be directed from the host. 104*5113495bSYour Name * 105*5113495bSYour Name * Related: NA 106*5113495bSYour Name * 107*5113495bSYour Name * Supported Feature: 11AX 108*5113495bSYour Name * 109*5113495bSYour Name * Usage: External 110*5113495bSYour Name * 111*5113495bSYour Name * </ini> 112*5113495bSYour Name */ 113*5113495bSYour Name #define CFG_TWT_CONGESTION_TIMEOUT CFG_INI_UINT( \ 114*5113495bSYour Name "twt_congestion_timeout", \ 115*5113495bSYour Name 0, \ 116*5113495bSYour Name 10000, \ 117*5113495bSYour Name 100, \ 118*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 119*5113495bSYour Name "twt congestion timeout") 120*5113495bSYour Name /* 121*5113495bSYour Name * <ini> 122*5113495bSYour Name * twt_bcast_req_resp_config - To enable broadcast twt requestor and responder. 123*5113495bSYour Name * @Min: 0 Disable the extended twt capability 124*5113495bSYour Name * @Max: 3 125*5113495bSYour Name * @Default: 1 126*5113495bSYour Name * 127*5113495bSYour Name * This cfg is used to configure the broadcast TWT requestor and responder. 128*5113495bSYour Name * Bitmap for enabling the broadcast twt requestor and responder. 129*5113495bSYour Name * BIT 0: Enable/Disable broadcast twt requestor. 130*5113495bSYour Name * BIT 1: Enable/Disable broadcast twt responder. 131*5113495bSYour Name * BIT 2-31: Reserved 132*5113495bSYour Name * 133*5113495bSYour Name * Related: CFG_ENABLE_TWT 134*5113495bSYour Name * Related: CFG_TWT_RESPONDER 135*5113495bSYour Name * Related: CFG_TWT_REQUESTOR 136*5113495bSYour Name * 137*5113495bSYour Name * Supported Feature: 11AX 138*5113495bSYour Name * 139*5113495bSYour Name * Usage: External 140*5113495bSYour Name * 141*5113495bSYour Name * </ini> 142*5113495bSYour Name */ 143*5113495bSYour Name /* defines to extract the requestor/responder capabilities from cfg */ 144*5113495bSYour Name #define TWT_BCAST_REQ_INDEX 0 145*5113495bSYour Name #define TWT_BCAST_REQ_BITS 1 146*5113495bSYour Name #define TWT_BCAST_RES_INDEX 1 147*5113495bSYour Name #define TWT_BCAST_RES_BITS 1 148*5113495bSYour Name 149*5113495bSYour Name #define CFG_BCAST_TWT_REQ_RESP CFG_INI_UINT( \ 150*5113495bSYour Name "twt_bcast_req_resp_config", \ 151*5113495bSYour Name 0, \ 152*5113495bSYour Name 3, \ 153*5113495bSYour Name 1, \ 154*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 155*5113495bSYour Name "BROADCAST TWT CAPABILITY") 156*5113495bSYour Name 157*5113495bSYour Name #define CFG_TWT_GET_BCAST_REQ(_bcast_conf) \ 158*5113495bSYour Name QDF_GET_BITS(_bcast_conf, \ 159*5113495bSYour Name TWT_BCAST_REQ_INDEX, \ 160*5113495bSYour Name TWT_BCAST_REQ_BITS) 161*5113495bSYour Name 162*5113495bSYour Name #define CFG_TWT_GET_BCAST_RES(_bcast_conf) \ 163*5113495bSYour Name QDF_GET_BITS(_bcast_conf, \ 164*5113495bSYour Name TWT_BCAST_RES_INDEX, \ 165*5113495bSYour Name TWT_BCAST_RES_BITS) 166*5113495bSYour Name 167*5113495bSYour Name /* 168*5113495bSYour Name * <ini> 169*5113495bSYour Name * enable_twt_24ghz - Enable Target wake time when STA is connected on 2.4Ghz 170*5113495bSYour Name * band. 171*5113495bSYour Name * @Min: 0 172*5113495bSYour Name * @Max: 1 173*5113495bSYour Name * @Default: 1 174*5113495bSYour Name * 175*5113495bSYour Name * This ini is used to enable/disable the host TWT when STA is connected to AP 176*5113495bSYour Name * in 2.4Ghz band. 177*5113495bSYour Name * 178*5113495bSYour Name * Related: NA 179*5113495bSYour Name * 180*5113495bSYour Name * Supported Feature: 11AX 181*5113495bSYour Name * 182*5113495bSYour Name * Usage: External 183*5113495bSYour Name * 184*5113495bSYour Name * </ini> 185*5113495bSYour Name */ 186*5113495bSYour Name #define CFG_ENABLE_TWT_24GHZ CFG_INI_BOOL( \ 187*5113495bSYour Name "enable_twt_24ghz", \ 188*5113495bSYour Name true, \ 189*5113495bSYour Name "enable twt in 2.4Ghz band") 190*5113495bSYour Name 191*5113495bSYour Name #define CFG_TWT_ALL \ 192*5113495bSYour Name CFG(CFG_ENABLE_TWT) \ 193*5113495bSYour Name CFG(CFG_TWT_REQUESTOR) \ 194*5113495bSYour Name CFG(CFG_TWT_RESPONDER) \ 195*5113495bSYour Name CFG(CFG_TWT_CONGESTION_TIMEOUT) \ 196*5113495bSYour Name CFG(CFG_BCAST_TWT_REQ_RESP) \ 197*5113495bSYour Name CFG(CFG_ENABLE_TWT_24GHZ) 198*5113495bSYour Name #endif 199*5113495bSYour Name #endif /* __CFG_MLME_TWT_H */ 200