1*5113495bSYour Name /* 2*5113495bSYour Name * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. 3*5113495bSYour Name * Copyright (c) 2022-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_FE_WLM_H 25*5113495bSYour Name #define __CFG_MLME_FE_WLM_H 26*5113495bSYour Name 27*5113495bSYour Name /* 28*5113495bSYour Name * Flag definition of 32-bit host latency flags 29*5113495bSYour Name * 30*5113495bSYour Name * |31 18| 17 | 16 |15 8|7 1| 0 | 31*5113495bSYour Name * +------+------+--------+-----------+------+-----------+ 32*5113495bSYour Name * | RSVD | HBB | PM-QOS | RSVD | RSVD | RX Thread | 33*5113495bSYour Name * +------+------+--------+-----------+------+-----------+ 34*5113495bSYour Name * | common | TX Path | RX Path | 35*5113495bSYour Name * 36*5113495bSYour Name * bit 0-7: Rx path related optimization 37*5113495bSYour Name * bit 0: disable rx_thread for vdev 38*5113495bSYour Name * bit 1-7: Reserved 39*5113495bSYour Name * bit 8-15: Tx path related optimization 40*5113495bSYour Name * bit 8-15: Reserved 41*5113495bSYour Name * bit 16-31: common changes 42*5113495bSYour Name * bit 16: Request for pm_qos vote 43*5113495bSYour Name * bit 17: Request for high ddr bus bandwidth 44*5113495bSYour Name */ 45*5113495bSYour Name 46*5113495bSYour Name #define WLM_HOST_RX_THREAD_FLAG (1 << 0) 47*5113495bSYour Name #define WLM_HOST_PM_QOS_FLAG (1 << 16) 48*5113495bSYour Name #define WLM_HOST_HBB_FLAG (1 << 17) 49*5113495bSYour Name 50*5113495bSYour Name #define CFG_MAX_LATENCY_FLAGS "0xFFFFFFFFFFFFFFFF" 51*5113495bSYour Name 52*5113495bSYour Name /* 53*5113495bSYour Name * <ini> 54*5113495bSYour Name * wlm_latency_enable - WLM latency Enable 55*5113495bSYour Name * 56*5113495bSYour Name * @min: 0 57*5113495bSYour Name * @max: 1 58*5113495bSYour Name * @default: 1 59*5113495bSYour Name * 60*5113495bSYour Name * 0 - disable 61*5113495bSYour Name * 1 - enable 62*5113495bSYour Name * 63*5113495bSYour Name * </ini> 64*5113495bSYour Name */ 65*5113495bSYour Name #define CFG_LATENCY_ENABLE CFG_INI_BOOL("wlm_latency_enable", \ 66*5113495bSYour Name 1, \ 67*5113495bSYour Name "WLM latency Enable") 68*5113495bSYour Name 69*5113495bSYour Name /* 70*5113495bSYour Name * <ini> 71*5113495bSYour Name * wlm_latency_reset_on_disconnect - WLM latency level reset on disconnect 72*5113495bSYour Name * 73*5113495bSYour Name * @min: 0 74*5113495bSYour Name * @max: 1 75*5113495bSYour Name * @default: 0 76*5113495bSYour Name * 77*5113495bSYour Name * 0 - disable 78*5113495bSYour Name * 1 - enable 79*5113495bSYour Name * 80*5113495bSYour Name * </ini> 81*5113495bSYour Name */ 82*5113495bSYour Name #define CFG_LATENCY_RESET CFG_INI_BOOL("wlm_latency_reset_on_disconnect", \ 83*5113495bSYour Name 0, \ 84*5113495bSYour Name "WLM latency reset on disconnect") 85*5113495bSYour Name 86*5113495bSYour Name /* 87*5113495bSYour Name * <ini> 88*5113495bSYour Name * wlm_latency_level - WLM latency level 89*5113495bSYour Name * Define 4 latency level to gain latency 90*5113495bSYour Name * 91*5113495bSYour Name * @min: 0 92*5113495bSYour Name * @max: 3 93*5113495bSYour Name * @default: 0 94*5113495bSYour Name * 95*5113495bSYour Name * 0 - normal 96*5113495bSYour Name * 1 - xr 97*5113495bSYour Name * 2 - low 98*5113495bSYour Name * 3 - ultralow 99*5113495bSYour Name * 100*5113495bSYour Name * </ini> 101*5113495bSYour Name */ 102*5113495bSYour Name #define CFG_LATENCY_LEVEL CFG_INI_UINT("wlm_latency_level", \ 103*5113495bSYour Name 0, \ 104*5113495bSYour Name 3, \ 105*5113495bSYour Name 0, \ 106*5113495bSYour Name CFG_VALUE_OR_DEFAULT, \ 107*5113495bSYour Name "WLM latency level") 108*5113495bSYour Name 109*5113495bSYour Name #ifdef MULTI_CLIENT_LL_SUPPORT 110*5113495bSYour Name /* 111*5113495bSYour Name * <ini> 112*5113495bSYour Name * wlm_multi_client_ll - Ini to configure multi client latency feature 113*5113495bSYour Name * 114*5113495bSYour Name * @min: 0 115*5113495bSYour Name * @max: 1 116*5113495bSYour Name * @default: 0 117*5113495bSYour Name * 118*5113495bSYour Name * 0 - disable 119*5113495bSYour Name * 1 - enable 120*5113495bSYour Name * 121*5113495bSYour Name * </ini> 122*5113495bSYour Name */ 123*5113495bSYour Name #define CFG_WLM_MULTI_CLIENT_LL_SUPPORT CFG_INI_BOOL("wlm_multi_client_ll", \ 124*5113495bSYour Name 0, \ 125*5113495bSYour Name "wlm multi client ll feature") 126*5113495bSYour Name 127*5113495bSYour Name #define WLM_MULTI_CLIENT_LL_CFG CFG(CFG_WLM_MULTI_CLIENT_LL_SUPPORT) 128*5113495bSYour Name #else 129*5113495bSYour Name #define WLM_MULTI_CLIENT_LL_CFG 130*5113495bSYour Name #endif 131*5113495bSYour Name 132*5113495bSYour Name /* 133*5113495bSYour Name * <ini> 134*5113495bSYour Name * wlm_latency_flags_normal - WLM flags setting for normal level 135*5113495bSYour Name * 136*5113495bSYour Name * @min: 0x0 137*5113495bSYour Name * @max: 0xffffffffffffffff 138*5113495bSYour Name * @default: 0x0 139*5113495bSYour Name * 140*5113495bSYour Name * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 | 141*5113495bSYour Name * +------+------+------+------+------+------+------+-----+-----+ 142*5113495bSYour Name * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP | 143*5113495bSYour Name * +------+-------------+-------------+-------------------------+ 144*5113495bSYour Name * | WAL | PS | Roam | Scan | 145*5113495bSYour Name * 146*5113495bSYour Name * bit 0: Avoid scan request from HLOS if setting 147*5113495bSYour Name * bit 1: Skip DFS channel SCAN if setting 148*5113495bSYour Name * bit 2-3: Define policy of dwell time/duration for each foreign channel 149*5113495bSYour Name * (b2 b3) 150*5113495bSYour Name * (0 0 ): Default scan dwell time 151*5113495bSYour Name * (0 1 ): Reserve 152*5113495bSYour Name * (1 0 ): Shrink off channel dwell time 153*5113495bSYour Name * (1 1 ): Reserve 154*5113495bSYour Name * bit 4-5: Reserve for scan 155*5113495bSYour Name * bit 6-7: Define roaming policy 156*5113495bSYour Name * (b6 b7) 157*5113495bSYour Name * (0 0 ): Default roaming behavior, allow roaming in all scenarios 158*5113495bSYour Name * (0 1 ): Disallow all roaming 159*5113495bSYour Name * (1 0 ): Allow roaming when final bmissed 160*5113495bSYour Name * (1 1 ): Reserve 161*5113495bSYour Name * bit 8-9: Reserve for roaming 162*5113495bSYour Name * bit 10: Disable css power collapse if setting 163*5113495bSYour Name * bit 11: Disable sys sleep if setting 164*5113495bSYour Name * bit 12-31: Reserve for future usage 165*5113495bSYour Name * 166*5113495bSYour Name * |63 50| 49 | 48 |47 40|39 33| 32 | 167*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 168*5113495bSYour Name * | RSVD | HBB | PM-QOS | RSVD | RSVD | RX Thread | 169*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 170*5113495bSYour Name * | common | TX Path | RX Path | 171*5113495bSYour Name * 172*5113495bSYour Name * bit 39-32: Rx path related optimization 173*5113495bSYour Name * bit 32: disable rx_thread for vdev 174*5113495bSYour Name * bit 33-39: Reserved 175*5113495bSYour Name * bit 40-47: Tx path related optimization 176*5113495bSYour Name * bit 40-47: Reserved 177*5113495bSYour Name * bit 48-63: common changes 178*5113495bSYour Name * bit 48: Request for pm_qos vote 179*5113495bSYour Name * bit 49: Request for high ddr bus bandwidth 180*5113495bSYour Name * 181*5113495bSYour Name * </ini> 182*5113495bSYour Name */ 183*5113495bSYour Name #define CFG_DEFAULT_NORMAL_FLAGS "0x0" 184*5113495bSYour Name #define CFG_LATENCY_FLAGS_NORMAL \ 185*5113495bSYour Name CFG_INI_STRING("wlm_latency_flags_normal",\ 186*5113495bSYour Name 0, \ 187*5113495bSYour Name sizeof(CFG_MAX_LATENCY_FLAGS) - 1,\ 188*5113495bSYour Name CFG_DEFAULT_NORMAL_FLAGS, \ 189*5113495bSYour Name "WLM flags for normal level") 190*5113495bSYour Name 191*5113495bSYour Name 192*5113495bSYour Name /* 193*5113495bSYour Name * <ini> 194*5113495bSYour Name * wlm_latency_flags_xr - WLM flags setting for XR level 195*5113495bSYour Name * 196*5113495bSYour Name * @min: 0x0 197*5113495bSYour Name * @max: 0xffffffffffffffff 198*5113495bSYour Name * @default: 0x3000100000083 199*5113495bSYour Name * 200*5113495bSYour Name * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 | 201*5113495bSYour Name * +------+------+------+------+------+------+------+-----+-----+ 202*5113495bSYour Name * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP | 203*5113495bSYour Name * +------+-------------+-------------+-------------------------+ 204*5113495bSYour Name * | WAL | PS | Roam | Scan | 205*5113495bSYour Name * 206*5113495bSYour Name * bit 0: Avoid scan request from HLOS if setting 207*5113495bSYour Name * bit 1: Skip DFS channel SCAN if setting 208*5113495bSYour Name * bit 2-3: Define policy of dwell time/duration for each foreign channel 209*5113495bSYour Name * (b2 b3) 210*5113495bSYour Name * (0 0 ): Default scan dwell time 211*5113495bSYour Name * (0 1 ): Reserve 212*5113495bSYour Name * (1 0 ): Shrink off channel dwell time 213*5113495bSYour Name * (1 1 ): Reserve 214*5113495bSYour Name * bit 4-5: Reserve for scan 215*5113495bSYour Name * bit 6-7: Define roaming policy 216*5113495bSYour Name * (b6 b7) 217*5113495bSYour Name * (0 0 ): Default roaming behavior, allow roaming in all scenarios 218*5113495bSYour Name * (0 1 ): Disallow all roaming 219*5113495bSYour Name * (1 0 ): Allow roaming when final bmissed 220*5113495bSYour Name * (1 1 ): Reserve 221*5113495bSYour Name * bit 8-9: Reserve for roaming 222*5113495bSYour Name * bit 10: Disable css power collapse if setting 223*5113495bSYour Name * bit 11: Disable sys sleep if setting 224*5113495bSYour Name * bit 12-31: Reserve for future usage 225*5113495bSYour Name * 226*5113495bSYour Name * |63 50| 49 | 48 |47 40|39 33| 32 | 227*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 228*5113495bSYour Name * | RSVD | HBB | PM-QOS | RSVD | RSVD | RX Thread | 229*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 230*5113495bSYour Name * | common | TX Path | RX Path | 231*5113495bSYour Name * 232*5113495bSYour Name * bit 39-32: Rx path related optimization 233*5113495bSYour Name * bit 32: disable rx_thread for vdev 234*5113495bSYour Name * bit 33-39: Reserved 235*5113495bSYour Name * bit 40-47: Tx path related optimization 236*5113495bSYour Name * bit 40-47: Reserved 237*5113495bSYour Name * bit 48-63: common changes 238*5113495bSYour Name * bit 48: Request for pm_qos vote 239*5113495bSYour Name * bit 49: Request for high ddr bus bandwidth 240*5113495bSYour Name * 241*5113495bSYour Name * </ini> 242*5113495bSYour Name */ 243*5113495bSYour Name #define CFG_DEFAULT_XR_FLAGS "0x3000100000083" 244*5113495bSYour Name #define CFG_LATENCY_FLAGS_XR \ 245*5113495bSYour Name CFG_INI_STRING("wlm_latency_flags_xr",\ 246*5113495bSYour Name 0, \ 247*5113495bSYour Name sizeof(CFG_MAX_LATENCY_FLAGS) - 1,\ 248*5113495bSYour Name CFG_DEFAULT_XR_FLAGS, \ 249*5113495bSYour Name "WLM flags for XR level") 250*5113495bSYour Name 251*5113495bSYour Name 252*5113495bSYour Name /* 253*5113495bSYour Name * <ini> 254*5113495bSYour Name * wlm_latency_flags_low - WLM flags setting for low level 255*5113495bSYour Name * 256*5113495bSYour Name * @min: 0x0 257*5113495bSYour Name * @max: 0xffffffffffffffff 258*5113495bSYour Name * @default: 0xa 259*5113495bSYour Name * 260*5113495bSYour Name * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 | 261*5113495bSYour Name * +------+------+------+------+------+------+------+-----+-----+ 262*5113495bSYour Name * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP | 263*5113495bSYour Name * +------+-------------+-------------+-------------------------+ 264*5113495bSYour Name * | WAL | PS | Roam | Scan | 265*5113495bSYour Name * 266*5113495bSYour Name * bit 0: Avoid scan request from HLOS if setting 267*5113495bSYour Name * bit 1: Skip DFS channel SCAN if setting 268*5113495bSYour Name * bit 2-3: Define policy of dwell time/duration for each foreign channel 269*5113495bSYour Name * (b2 b3) 270*5113495bSYour Name * (0 0 ): Default scan dwell time 271*5113495bSYour Name * (0 1 ): Reserve 272*5113495bSYour Name * (1 0 ): Shrink off channel dwell time 273*5113495bSYour Name * (1 1 ): Reserve 274*5113495bSYour Name * bit 4-5: Reserve for scan 275*5113495bSYour Name * bit 6-7: Define roaming policy 276*5113495bSYour Name * (b6 b7) 277*5113495bSYour Name * (0 0 ): Default roaming behavior, allow roaming in all scenarios 278*5113495bSYour Name * (0 1 ): Disallow all roaming 279*5113495bSYour Name * (1 0 ): Allow roaming when final bmissed 280*5113495bSYour Name * (1 1 ): Reserve 281*5113495bSYour Name * bit 8-9: Reserve for roaming 282*5113495bSYour Name * bit 10: Disable css power collapse if setting 283*5113495bSYour Name * bit 11: Disable sys sleep if setting 284*5113495bSYour Name * bit 12-31: Reserve for future usage 285*5113495bSYour Name * 286*5113495bSYour Name * |63 50| 49 | 48 |47 40|39 33| 32 | 287*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 288*5113495bSYour Name * | RSVD | HBB | PM-QOS | RSVD | RSVD | RX Thread | 289*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 290*5113495bSYour Name * | common | TX Path | RX Path | 291*5113495bSYour Name * 292*5113495bSYour Name * bit 39-32: Rx path related optimization 293*5113495bSYour Name * bit 32: disable rx_thread for vdev 294*5113495bSYour Name * bit 33-39: Reserved 295*5113495bSYour Name * bit 40-47: Tx path related optimization 296*5113495bSYour Name * bit 40-47: Reserved 297*5113495bSYour Name * bit 48-63: common changes 298*5113495bSYour Name * bit 48: Request for pm_qos vote 299*5113495bSYour Name * bit 49: Request for high ddr bus bandwidth 300*5113495bSYour Name * 301*5113495bSYour Name * </ini> 302*5113495bSYour Name */ 303*5113495bSYour Name #define CFG_DEFAULT_LOW_FLAGS "0xa" 304*5113495bSYour Name #define CFG_LATENCY_FLAGS_LOW \ 305*5113495bSYour Name CFG_INI_STRING("wlm_latency_flags_low",\ 306*5113495bSYour Name 0, \ 307*5113495bSYour Name sizeof(CFG_MAX_LATENCY_FLAGS) - 1,\ 308*5113495bSYour Name CFG_DEFAULT_LOW_FLAGS, \ 309*5113495bSYour Name "WLM flags for low level") 310*5113495bSYour Name 311*5113495bSYour Name /* 312*5113495bSYour Name * <ini> 313*5113495bSYour Name * wlm_latency_flags_ultralow - WLM flags setting for ultralow level 314*5113495bSYour Name * 315*5113495bSYour Name * @min: 0x0 316*5113495bSYour Name * @max: 0xffffffffffffffff 317*5113495bSYour Name * @default: 0xc83 318*5113495bSYour Name * 319*5113495bSYour Name * |31 25| 24 |23 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 | 320*5113495bSYour Name * +------+------+------+------+------+------+------+------+------+-----+-----+ 321*5113495bSYour Name * | RSVD | MLMR | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP | 322*5113495bSYour Name * +------+------+------+-------------+-------------+-------------------------+ 323*5113495bSYour Name * | WAL | PS | WAL | PS | Roam | Scan | 324*5113495bSYour Name * 325*5113495bSYour Name * bit 0: Avoid scan request from HLOS if setting 326*5113495bSYour Name * bit 1: Skip DFS channel SCAN if setting 327*5113495bSYour Name * bit 2-3: Define policy of dwell time/duration for each foreign channel 328*5113495bSYour Name * (b2 b3) 329*5113495bSYour Name * (0 0 ): Default scan dwell time 330*5113495bSYour Name * (0 1 ): Reserve 331*5113495bSYour Name * (1 0 ): Shrink off channel dwell time 332*5113495bSYour Name * (1 1 ): Reserve 333*5113495bSYour Name * bit 4-5: Reserve for scan 334*5113495bSYour Name * bit 6-7: Define roaming policy 335*5113495bSYour Name * (b6 b7) 336*5113495bSYour Name * (0 0 ): Default roaming behavior, allow roaming in all scenarios 337*5113495bSYour Name * (0 1 ): Disallow all roaming 338*5113495bSYour Name * (1 0 ): Allow roaming when final bmissed 339*5113495bSYour Name * (1 1 ): Reserve 340*5113495bSYour Name * bit 8-9: Reserve for roaming 341*5113495bSYour Name * bit 10: Disable css power collapse if setting 342*5113495bSYour Name * bit 11: Disable sys sleep if setting 343*5113495bSYour Name * bit 12-23: Reserve for future usage 344*5113495bSYour Name * bit 24: Disable MLMR mode 345*5113495bSYour Name * bit 25-31: Reserved for future use 346*5113495bSYour Name * 347*5113495bSYour Name * |63 50| 49 | 48 |47 40|39 33| 32 | 348*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 349*5113495bSYour Name * | RSVD | HBB | PM-QOS | RSVD | RSVD | RX Thread | 350*5113495bSYour Name * +------+------+--------+------------+-------+-----------+ 351*5113495bSYour Name * | common | TX Path | RX Path | 352*5113495bSYour Name * 353*5113495bSYour Name * bit 39-32: Rx path related optimization 354*5113495bSYour Name * bit 32: disable rx_thread for vdev 355*5113495bSYour Name * bit 33-39: Reserved 356*5113495bSYour Name * bit 40-47: Tx path related optimization 357*5113495bSYour Name * bit 40-47: Reserved 358*5113495bSYour Name * bit 48-63: common changes 359*5113495bSYour Name * bit 48: Request for pm_qos vote 360*5113495bSYour Name * bit 49: Request for high ddr bus bandwidth 361*5113495bSYour Name * 362*5113495bSYour Name * </ini> 363*5113495bSYour Name */ 364*5113495bSYour Name #define CFG_DEFAULT_ULTLOW_FLAGS "0xc83" 365*5113495bSYour Name #define CFG_LATENCY_FLAGS_ULTLOW \ 366*5113495bSYour Name CFG_INI_STRING("wlm_latency_flags_ultralow",\ 367*5113495bSYour Name 0, \ 368*5113495bSYour Name sizeof(CFG_MAX_LATENCY_FLAGS) - 1,\ 369*5113495bSYour Name CFG_DEFAULT_ULTLOW_FLAGS, \ 370*5113495bSYour Name "WLM flags for ultralow level") 371*5113495bSYour Name 372*5113495bSYour Name #define CFG_FE_WLM_ALL \ 373*5113495bSYour Name CFG(CFG_LATENCY_ENABLE) \ 374*5113495bSYour Name CFG(CFG_LATENCY_RESET) \ 375*5113495bSYour Name CFG(CFG_LATENCY_LEVEL) \ 376*5113495bSYour Name WLM_MULTI_CLIENT_LL_CFG \ 377*5113495bSYour Name CFG(CFG_LATENCY_FLAGS_NORMAL) \ 378*5113495bSYour Name CFG(CFG_LATENCY_FLAGS_XR) \ 379*5113495bSYour Name CFG(CFG_LATENCY_FLAGS_LOW) \ 380*5113495bSYour Name CFG(CFG_LATENCY_FLAGS_ULTLOW) 381*5113495bSYour Name 382*5113495bSYour Name #endif /* __CFG_MLME_FE_WLM_H */ 383