1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2023 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_POWER_H 25*5113495bSYour Name #define __CFG_MLME_POWER_H 26*5113495bSYour Name 27*5113495bSYour Name /* 28*5113495bSYour Name * <cfg> 29*5113495bSYour Name * max_tx_power_24 - max tx power allowed for 2.4 ghz 30*5113495bSYour Name * @Min: 0 minimum length of tx power 31*5113495bSYour Name * @Max: default data length of tx power in string format 32*5113495bSYour Name * @Default: 1, 14, 20 33*5113495bSYour Name * 34*5113495bSYour Name * This ini contains the string in the form of first_channel number, 35*5113495bSYour Name * number of channels and max tx power triplets 36*5113495bSYour Name */ 37*5113495bSYour Name #define CFG_MAX_TX_POWER_2_4_DATA "1, 14, 20" 38*5113495bSYour Name #define CFG_MAX_TX_POWER_2_4 CFG_STRING( \ 39*5113495bSYour Name "max_tx_power_24", \ 40*5113495bSYour Name 0, \ 41*5113495bSYour Name sizeof(CFG_MAX_TX_POWER_2_4_DATA) - 1, \ 42*5113495bSYour Name CFG_MAX_TX_POWER_2_4_DATA, \ 43*5113495bSYour Name "max tx power 24") 44*5113495bSYour Name 45*5113495bSYour Name /* 46*5113495bSYour Name * <cfg> 47*5113495bSYour Name * max_tx_power_5 - max tx power allowed for 5 ghz 48*5113495bSYour Name * @Min: 0 minimum length of tx power 49*5113495bSYour Name * @Max: default data length of tx power in string format 50*5113495bSYour Name * @Default: 36, 126, 20 51*5113495bSYour Name * 52*5113495bSYour Name * This ini contains the string in the form of first_channel number, 53*5113495bSYour Name * number of channels and max tx power triplets 54*5113495bSYour Name */ 55*5113495bSYour Name #define CFG_MAX_TX_POWER_5_DATA "36, 126, 20" 56*5113495bSYour Name #define CFG_MAX_TX_POWER_5 CFG_STRING( \ 57*5113495bSYour Name "max_tx_power_5", \ 58*5113495bSYour Name 0, \ 59*5113495bSYour Name sizeof(CFG_MAX_TX_POWER_5_DATA) - 1, \ 60*5113495bSYour Name CFG_MAX_TX_POWER_5_DATA, \ 61*5113495bSYour Name "max tx power 5") 62*5113495bSYour Name 63*5113495bSYour Name /* 64*5113495bSYour Name * <ini> 65*5113495bSYour Name * gPowerUsage - power usage name 66*5113495bSYour Name * @Min: "Min" - minimum power usage 67*5113495bSYour Name * @Max: "Max" - maximum power usage 68*5113495bSYour Name * @Default: "Mod" 69*5113495bSYour Name * 70*5113495bSYour Name * Usage: Internal/External 71*5113495bSYour Name * 72*5113495bSYour Name * </ini> 73*5113495bSYour Name */ 74*5113495bSYour Name 75*5113495bSYour Name #define CFG_POWER_USAGE CFG_INI_STRING( \ 76*5113495bSYour Name "gPowerUsage", \ 77*5113495bSYour Name 0, \ 78*5113495bSYour Name 3, \ 79*5113495bSYour Name "Mod", \ 80*5113495bSYour Name "power usage") 81*5113495bSYour Name /* 82*5113495bSYour Name * <ini> 83*5113495bSYour Name * TxPower2g - Limit power in case of 2.4ghz 84*5113495bSYour Name * @Min: 0 85*5113495bSYour Name * @Max: 30 86*5113495bSYour Name * @Default: 30 87*5113495bSYour Name * 88*5113495bSYour Name * Usage: Internal/External 89*5113495bSYour Name * 90*5113495bSYour Name * </ini> 91*5113495bSYour Name */ 92*5113495bSYour Name 93*5113495bSYour Name #define CFG_SET_TXPOWER_LIMIT2G CFG_INI_UINT( \ 94*5113495bSYour Name "TxPower2g", \ 95*5113495bSYour Name 0, \ 96*5113495bSYour Name 30, \ 97*5113495bSYour Name 30, \ 98*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 99*5113495bSYour Name "power limit 2g") 100*5113495bSYour Name /* 101*5113495bSYour Name * <ini> 102*5113495bSYour Name * TxPower5g - Limit power in case of 5ghz 103*5113495bSYour Name * @Min: 0 104*5113495bSYour Name * @Max: 30 105*5113495bSYour Name * @Default: 30 106*5113495bSYour Name * 107*5113495bSYour Name * Usage: Internal/External 108*5113495bSYour Name * 109*5113495bSYour Name * </ini> 110*5113495bSYour Name */ 111*5113495bSYour Name 112*5113495bSYour Name #define CFG_SET_TXPOWER_LIMIT5G CFG_INI_UINT( \ 113*5113495bSYour Name "TxPower5g", \ 114*5113495bSYour Name 0, \ 115*5113495bSYour Name 30, \ 116*5113495bSYour Name 30, \ 117*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 118*5113495bSYour Name "power limit 5g") 119*5113495bSYour Name 120*5113495bSYour Name /* 121*5113495bSYour Name * <cfg> 122*5113495bSYour Name * current_tx_power_level - current tx power level 123*5113495bSYour Name * @Min: 0 124*5113495bSYour Name * @Max: 128 125*5113495bSYour Name * @Default: 27 126*5113495bSYour Name */ 127*5113495bSYour Name #define CFG_CURRENT_TX_POWER_LEVEL CFG_UINT( \ 128*5113495bSYour Name "current_tx_power_level", \ 129*5113495bSYour Name 0, \ 130*5113495bSYour Name 128, \ 131*5113495bSYour Name 27, \ 132*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 133*5113495bSYour Name "current tx power level") 134*5113495bSYour Name 135*5113495bSYour Name /* 136*5113495bSYour Name * <cfg> 137*5113495bSYour Name * local_power_constraint - local power constraint 138*5113495bSYour Name * @Min: 0 139*5113495bSYour Name * @Max: 255 140*5113495bSYour Name * @Default: 0 141*5113495bSYour Name */ 142*5113495bSYour Name #define CFG_LOCAL_POWER_CONSTRAINT CFG_UINT( \ 143*5113495bSYour Name "local_power_constraint", \ 144*5113495bSYour Name 0, \ 145*5113495bSYour Name 255, \ 146*5113495bSYour Name 0, \ 147*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 148*5113495bSYour Name "local power constraint") 149*5113495bSYour Name 150*5113495bSYour Name /* 151*5113495bSYour Name * <ini> 152*5113495bSYour Name * skip_tpe_consideration - Skip TPE IE value in tx power calculation for 153*5113495bSYour Name * 2G/5G bands 154*5113495bSYour Name * @Min: 0 155*5113495bSYour Name * @Max: 1 156*5113495bSYour Name * @Default: 1 157*5113495bSYour Name * 158*5113495bSYour Name * This ini is to determine if the TPE IE should be considered in the Tx power 159*5113495bSYour Name * calculation. If the ini is set, host will consider TPE IE in case of 6GHz 160*5113495bSYour Name * only (skip over in 2GHz or 5GHz case). If the ini is not set, honor the TPE 161*5113495bSYour Name * IE values in all bands. 162*5113495bSYour Name * 163*5113495bSYour Name * Related: None 164*5113495bSYour Name * 165*5113495bSYour Name * Supported Feature: Transmit power calculation (TPC) 166*5113495bSYour Name * 167*5113495bSYour Name * Usage: External 168*5113495bSYour Name * 169*5113495bSYour Name * </ini> 170*5113495bSYour Name */ 171*5113495bSYour Name #define CFG_SKIP_TPE_CONSIDERATION CFG_INI_BOOL("skip_tpe_consideration", \ 172*5113495bSYour Name true, \ 173*5113495bSYour Name "consider TPE IE in tx power") 174*5113495bSYour Name 175*5113495bSYour Name #define CFG_MLME_POWER_ALL \ 176*5113495bSYour Name CFG(CFG_MAX_TX_POWER_2_4) \ 177*5113495bSYour Name CFG(CFG_MAX_TX_POWER_5) \ 178*5113495bSYour Name CFG(CFG_POWER_USAGE) \ 179*5113495bSYour Name CFG(CFG_SET_TXPOWER_LIMIT2G) \ 180*5113495bSYour Name CFG(CFG_SET_TXPOWER_LIMIT5G) \ 181*5113495bSYour Name CFG(CFG_CURRENT_TX_POWER_LEVEL) \ 182*5113495bSYour Name CFG(CFG_LOCAL_POWER_CONSTRAINT) \ 183*5113495bSYour Name CFG(CFG_SKIP_TPE_CONSIDERATION) 184*5113495bSYour Name 185*5113495bSYour Name #endif /* __CFG_MLME_POWER_H */ 186