cfg_sap_protection.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*
  2. * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /**
  19. * DOC: This file contains centralized definitions of sap erp protection related
  20. * converged configurations.
  21. */
  22. #ifndef __CFG_MLME_SAP_PROTECTION_H
  23. #define __CFG_MLME_SAP_PROTECTION_H
  24. #define CFG_PROTECTION_ENABLED CFG_UINT( \
  25. "protection_enabled", \
  26. 0, \
  27. 65535, \
  28. 65535, \
  29. CFG_VALUE_OR_DEFAULT, \
  30. "sap protection enabled")
  31. #define CFG_FORCE_POLICY_PROTECTION CFG_UINT( \
  32. "protection_force_policy", \
  33. 0, \
  34. 5, \
  35. 5, \
  36. CFG_VALUE_OR_DEFAULT, \
  37. "force policy protection")
  38. /*
  39. * <ini>
  40. * gignore_peer_ht_opmode
  41. *
  42. * @min 0
  43. * @max 1
  44. * @default 1
  45. *
  46. * Enabling gignore_peer_ht_opmode will enable 11g
  47. * protection only when there is a 11g AP in vicinity.
  48. *
  49. * Related: None
  50. *
  51. * Supported Feature: SAP Protection
  52. * </ini>
  53. */
  54. #define CFG_IGNORE_PEER_HT_MODE CFG_INI_BOOL( \
  55. "gignore_peer_ht_opmode", \
  56. 0, \
  57. "ignore the peer ht mode")
  58. /*
  59. * <ini>
  60. * gApProtection - Set AP protection parameter
  61. * @Min: 0x0
  62. * @Max: 0xFFFF
  63. * @Default: 0xBFFF
  64. *
  65. * This ini is used to set AP protection parameter
  66. * Bit map for CFG_AP_PROTECTION_MODE_DEFAULT
  67. * LOWER byte for associated stations
  68. * UPPER byte for overlapping stations
  69. * each byte will have the following info
  70. * bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8
  71. * OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A
  72. * bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
  73. * OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A
  74. *
  75. * Related: None.
  76. *
  77. * Supported Feature: SAP
  78. *
  79. * Usage: Internal/External
  80. *
  81. * </ini>
  82. */
  83. #define CFG_AP_PROTECTION_MODE CFG_INI_UINT( \
  84. "gApProtection", \
  85. 0x0, \
  86. 0xFFFF, \
  87. 0xBFFF, \
  88. CFG_VALUE_OR_DEFAULT, \
  89. "AP protection mode bitmap")
  90. /*
  91. * <ini>
  92. * gEnableApOBSSProt - Enable/Disable AP OBSS protection
  93. * @Min: 0
  94. * @Max: 1
  95. * @Default: 0
  96. *
  97. * This ini is used to enable/disable AP OBSS protection
  98. *
  99. * Related: None.
  100. *
  101. * Supported Feature: SAP
  102. *
  103. * Usage: Internal/External
  104. *
  105. * </ini>
  106. */
  107. #define CFG_AP_OBSS_PROTECTION_ENABLE CFG_INI_BOOL( \
  108. "gEnableApOBSSProt", \
  109. 0, \
  110. "Enable/Disable AP OBSS protection")
  111. #define CFG_SAP_PROTECTION_ALL \
  112. CFG(CFG_PROTECTION_ENABLED) \
  113. CFG(CFG_FORCE_POLICY_PROTECTION) \
  114. CFG(CFG_IGNORE_PEER_HT_MODE) \
  115. CFG(CFG_AP_PROTECTION_MODE) \
  116. CFG(CFG_AP_OBSS_PROTECTION_ENABLE)
  117. #endif /* __CFG_MLME_SAP_PROTECTION_H */