1 /* 2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: reg_priv_objs.h 22 * This file contains regulatory component private data structures. 23 */ 24 25 #ifndef __REG_PRIV_OBJS_H 26 #define __REG_PRIV_OBJS_H 27 28 #include <wlan_scan_public_structs.h> 29 #ifdef CONFIG_AFC_SUPPORT 30 #include "reg_services_common.h" 31 #endif 32 #include <wlan_objmgr_psoc_obj.h> 33 34 #define reg_alert(params...) \ 35 QDF_TRACE_FATAL(QDF_MODULE_ID_REGULATORY, params) 36 #define reg_err(params...) \ 37 QDF_TRACE_ERROR(QDF_MODULE_ID_REGULATORY, params) 38 #define reg_err_rl(params...) \ 39 QDF_TRACE_ERROR_RL(QDF_MODULE_ID_REGULATORY, params) 40 #define reg_warn(params...) \ 41 QDF_TRACE_WARN(QDF_MODULE_ID_REGULATORY, params) 42 #define reg_notice(params...) \ 43 QDF_TRACE_INFO(QDF_MODULE_ID_REGULATORY, params) 44 #define reg_info(params...) \ 45 QDF_TRACE_INFO(QDF_MODULE_ID_REGULATORY, params) 46 #define reg_debug(params...) \ 47 QDF_TRACE_DEBUG(QDF_MODULE_ID_REGULATORY, params) 48 #define reg_debug_rl(params...) \ 49 QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_REGULATORY, params) 50 51 #define reg_nofl_alert(params...) \ 52 QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_REGULATORY, params) 53 #define reg_nofl_err(params...) \ 54 QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_REGULATORY, params) 55 #define reg_nofl_warn(params...) \ 56 QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_REGULATORY, params) 57 #define reg_nofl_info(params...) \ 58 QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_REGULATORY, params) 59 #define reg_nofl_debug(params...) \ 60 QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_REGULATORY, params) 61 62 /** 63 * typedef reg_chan_change_callback() - Regulatory channel change callback 64 * @psoc: Pointer to psoc 65 * @pdev: Pointer to pdev 66 * @chan_list: Pointer to regulatory channel list 67 * @avoid_freq_ind: Pointer to avoid frequencies 68 * @arg: list of arguments 69 */ 70 typedef void (*reg_chan_change_callback)( 71 struct wlan_objmgr_psoc *psoc, 72 struct wlan_objmgr_pdev *pdev, 73 struct regulatory_channel *chan_list, 74 struct avoid_freq_ind_data *avoid_freq_ind, 75 void *arg); 76 77 /** 78 * struct chan_change_cbk_entry - Channel change callback entry 79 * @cbk: Callback 80 * @arg: Arguments 81 */ 82 struct chan_change_cbk_entry { 83 reg_chan_change_callback cbk; 84 void *arg; 85 }; 86 87 /** 88 * typedef reg_ctry_change_callback() - Regulatory country change callback 89 * @mac_ctx: Pointer to mac context 90 * @vdev_id: vdev ID 91 */ 92 typedef void (*reg_ctry_change_callback)( 93 uint8_t vdev_id); 94 95 /** 96 * struct ctry_change_cbk_entry - Country change callback entry 97 * @cbk: Callback 98 */ 99 struct ctry_change_cbk_entry { 100 reg_ctry_change_callback cbk; 101 }; 102 103 #ifdef CONFIG_REG_CLIENT 104 #define MAX_INDOOR_LIST_SIZE 3 105 106 /** 107 * struct indoor_concurrency_list - Active indoor station list 108 * @vdev_id: vdev ID 109 * @freq: frequency of the interface 110 * @chan_range: Range of channels based on bandwidth 111 */ 112 struct indoor_concurrency_list { 113 uint8_t vdev_id; 114 uint32_t freq; 115 const struct bonded_channel_freq *chan_range; 116 }; 117 #endif 118 /** 119 * struct wlan_regulatory_psoc_priv_obj - wlan regulatory psoc private object 120 * @mas_chan_params: master channel parameters list 121 * @chan_list_recvd: whether channel list has been received 122 * @offload_enabled: 123 * @six_ghz_supported: whether 6ghz is supported 124 * @five_dot_nine_ghz_supported: whether 5.9ghz is supported 125 * (service bit WMI_SERVICE_5_DOT_9GHZ_SUPPORT) 126 * @num_phy: 127 * @cur_country: 128 * @def_country: 129 * @def_country_code: 130 * @def_region_domain: 131 * @cc_src: 132 * @psoc_ptr: 133 * @new_user_ctry_pending: In this array, element[phy_id] is true if any user 134 * country update is pending for pdev (phy_id), used in case of MCL. 135 * @new_init_ctry_pending: In this array, element[phy_id] is true if any user 136 * country update is pending for pdev (phy_id), used in case of WIN. 137 * @new_11d_ctry_pending: In this array, element[phy_id] is true if any 11d 138 * country update is pending for pdev (phy_id). 139 * @world_country_pending: In this array, element[phy_id] is true if any world 140 * country update is pending for pdev (phy_id). 141 * @dfs_enabled: 142 * @band_capability: bitmap of bands enabled, using enum reg_wifi_band as the 143 * bit position value 144 * @indoor_chan_enabled: 145 * @ignore_fw_reg_offload_ind: Ignore FW reg offload indication 146 * @enable_11d_supp_original: 147 * @enable_11d_supp: 148 * @is_11d_offloaded: 149 * @vdev_id_for_11d_scan: 150 * @master_vdev_cnt: 151 * @vdev_cnt_11d: 152 * @scan_11d_interval: 153 * @is_host_11d_inited: 154 * @scan_req_id: 155 * @scan_id: 156 * @timer: 157 * @vdev_ids_11d: 158 * @user_ctry_priority: 159 * @user_ctry_set: 160 * @cbk_list: 161 * @num_chan_change_cbks: 162 * @cc_cbk: 163 * @ch_avoid_ind: 164 * @unsafe_chan_list: 165 * @avoid_freq_list: 166 * @restart_beaconing: 167 * @reg_cap: 168 * @force_ssc_disable_indoor_channel: 169 * @enable_srd_chan_in_master_mode: 170 * @enable_11d_in_world_mode: 171 * @enable_5dot9_ghz_chan_in_master_mode: 5.9 GHz channel support in 172 * master mode (ini fcc_5dot9_ghz_chan_in_master_mode) 173 * @cbk_list_lock: 174 * @retain_nol_across_regdmn_update: Retain the NOL list across the regdomain 175 * changes. 176 * @domain_code_6g_ap: domain code for 6G AP 177 * @domain_code_6g_client: domain code for 6G client 178 * @is_ext_tpc_supported: Whether FW supports new WMI command for TPC 179 * @is_lower_6g_edge_ch_supported: whether lower 6ghz edge channel 5935MHz is 180 * supported 181 * @is_upper_6g_edge_ch_disabled: whether upper 6ghz edge channel 7115MHz is 182 * disabled 183 * @ch_avoid_ext_ind: whether need to update extended channel frequency list 184 * @avoid_freq_ext_list: the extended avoid channel frequency list 185 * @coex_unsafe_chan_nb_user_prefer: Honor coex unsafe chan cmd from firmware or 186 * userspace 187 * @coex_unsafe_chan_reg_disable: To disable reg channels for received coex 188 * unsafe channels list 189 * @reg_afc_dev_type: AFC device deployment type from BDF 190 * @reg_is_eirp_support_preferred: Whether target prefers EIRP format for 191 * WMI Set TPC command 192 * @enable_6ghz_sp_pwrmode_supp: Whether enable target Standard Power mode 193 * support 194 * @afc_disable_timer_check: Whether disable target AFC timer check 195 * @afc_disable_request_id_check: Whether disable target AFC request id check 196 * @is_afc_reg_noaction: Whether no action to AFC power event 197 * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support 198 * @p2p_indoor_ch_support: Allow P2P GO in indoor channels 199 * @fcc_rules_ptr: Value of fcc channel frequency and tx_power list received 200 * from firmware 201 * @set_fcc_channel: Flag to set fcc channels 202 */ 203 struct wlan_regulatory_psoc_priv_obj { 204 struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP]; 205 bool chan_list_recvd[PSOC_MAX_PHY_REG_CAP]; 206 bool offload_enabled; 207 bool six_ghz_supported; 208 bool five_dot_nine_ghz_supported; 209 uint8_t num_phy; 210 char cur_country[REG_ALPHA2_LEN + 1]; 211 char def_country[REG_ALPHA2_LEN + 1]; 212 uint16_t def_country_code; 213 uint16_t def_region_domain; 214 enum country_src cc_src; 215 struct wlan_objmgr_psoc *psoc_ptr; 216 bool new_user_ctry_pending[PSOC_MAX_PHY_REG_CAP]; 217 bool new_init_ctry_pending[PSOC_MAX_PHY_REG_CAP]; 218 bool new_11d_ctry_pending[PSOC_MAX_PHY_REG_CAP]; 219 bool world_country_pending[PSOC_MAX_PHY_REG_CAP]; 220 bool dfs_enabled; 221 uint32_t band_capability; 222 bool indoor_chan_enabled; 223 bool ignore_fw_reg_offload_ind; 224 bool enable_11d_supp_original; 225 bool enable_11d_supp; 226 bool is_11d_offloaded; 227 uint8_t vdev_id_for_11d_scan; 228 uint8_t master_vdev_cnt; 229 uint8_t vdev_cnt_11d; 230 uint32_t scan_11d_interval; 231 #ifdef HOST_11D_SCAN 232 bool is_host_11d_inited; 233 wlan_scan_requester scan_req_id; 234 uint32_t scan_id; 235 qdf_mc_timer_t timer; 236 #endif 237 uint8_t vdev_ids_11d[MAX_STA_VDEV_CNT]; 238 bool user_ctry_priority; 239 bool user_ctry_set; 240 struct chan_change_cbk_entry cbk_list[REG_MAX_CHAN_CHANGE_CBKS]; 241 uint8_t num_chan_change_cbks; 242 struct ctry_change_cbk_entry cc_cbk; 243 uint8_t ch_avoid_ind; 244 struct unsafe_ch_list unsafe_chan_list; 245 struct ch_avoid_ind_type avoid_freq_list; 246 enum restart_beaconing_on_ch_avoid_rule restart_beaconing; 247 struct wlan_psoc_host_hal_reg_capabilities_ext 248 reg_cap[PSOC_MAX_PHY_REG_CAP]; 249 bool force_ssc_disable_indoor_channel; 250 uint8_t enable_srd_chan_in_master_mode; 251 bool enable_11d_in_world_mode; 252 bool enable_5dot9_ghz_chan_in_master_mode; 253 qdf_spinlock_t cbk_list_lock; 254 bool retain_nol_across_regdmn_update; 255 #ifdef CONFIG_BAND_6GHZ 256 uint8_t domain_code_6g_ap[REG_CURRENT_MAX_AP_TYPE]; 257 uint8_t domain_code_6g_client[REG_CURRENT_MAX_AP_TYPE][REG_MAX_CLIENT_TYPE]; 258 #endif 259 bool is_ext_tpc_supported; 260 #if defined(CONFIG_BAND_6GHZ) 261 bool is_lower_6g_edge_ch_supported; 262 bool is_upper_6g_edge_ch_disabled; 263 #endif 264 #ifdef FEATURE_WLAN_CH_AVOID_EXT 265 bool ch_avoid_ext_ind; 266 struct ch_avoid_ind_type avoid_freq_ext_list; 267 bool coex_unsafe_chan_nb_user_prefer; 268 bool coex_unsafe_chan_reg_disable; 269 #endif 270 #ifdef CONFIG_AFC_SUPPORT 271 enum reg_afc_dev_deploy_type reg_afc_dev_type; 272 bool reg_is_eirp_support_preferred; 273 bool enable_6ghz_sp_pwrmode_supp; 274 bool afc_disable_timer_check; 275 bool afc_disable_request_id_check; 276 bool is_afc_reg_noaction; 277 #endif 278 bool sta_sap_scc_on_indoor_channel; 279 bool p2p_indoor_ch_support; 280 #ifdef CONFIG_REG_CLIENT 281 struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES]; 282 #endif 283 bool set_fcc_channel; 284 }; 285 286 /** 287 * struct wlan_regulatory_pdev_priv_obj - wlan regulatory pdev private object 288 * @cur_chan_list: current channel list, includes 6G channels 289 * @secondary_cur_chan_list: secondary current channel list, for concurrency 290 * situations 291 * @mas_chan_list: master channel list from the firmware. 292 * @is_6g_channel_list_populated: indicates the channel lists are populated 293 * @mas_chan_list_6g_ap: master channel list for 6G AP, includes all power types 294 * @mas_chan_list_6g_client: master channel list for 6G client, includes 295 * all power types 296 * @super_chan_list: 6G super channel list that includes the information of 297 * all 6G power modes for every 6G channel 298 * @cache_disable_chan_list: 299 * @num_cache_channels: 300 * @disable_cached_channels: 301 * @default_country: 302 * @def_region_domain: 303 * @def_country_code: 304 * @current_country: 305 * @reg_dmn_pair: 306 * @reg_6g_superid: 6Ghz super domain id 307 * @ctry_code: 308 * @unii_5g_bitmap: 309 * @dfs_region: 310 * @phybitmap: 311 * @pdev_ptr: 312 * @range_2g_low: 313 * @range_2g_high: 314 * @range_5g_low: 315 * @range_5g_high: 316 * @dfs_enabled: 317 * @set_fcc_channel: 318 * @band_capability: bitmap of bands enabled, using enum reg_wifi_band as the 319 * bit position value 320 * @indoor_chan_enabled: 321 * @en_chan_144: 322 * @wireless_modes: 323 * @freq_avoid_list: 324 * @force_ssc_disable_indoor_channel: 325 * @sap_state: 326 * @reg_rules: 327 * @reg_rules_lock: 328 * @chan_list_recvd: 329 * @pdev_opened: whether pdev has been opened by application 330 * @reg_cur_6g_ap_pwr_type: 6G AP type ie VLP/SP/LPI. 331 * @reg_cur_6g_client_mobility_type: 6G client type ie Default/Subordinate. 332 * @reg_target_client_type: 6 GHz client type received from target. The Client 333 * type can be Default/Subordinate. 334 * @reg_rnr_tpe_usable: Indicates whether RNR IE is applicable for current reg 335 * domain. 336 * @reg_unspecified_ap_usable: Indicates if the AP type mentioned is not part of 337 * 802.11 standard. 338 * @reg_6g_thresh_priority_freq: All frequencies greater or equal will be given 339 * priority during channel selection by upper layer 340 * @max_phymode: The maximum phymode supported by the device and regulatory. 341 * @max_chwidth: The maximum bandwidth corresponding to the maximum phymode. 342 * @avoid_chan_ext_list: the extended avoid frequency list. 343 * @afc_cb_lock: The spinlock to synchronize afc callbacks 344 * @afc_cb_obj: The object containing the callback function and opaque argument 345 * @afc_pow_evt_cb_obj: The object containing the callback function and opaque 346 * argument for the AFC power event 347 * @afc_request_id: The last AFC request id received from FW/halphy 348 * @is_6g_afc_power_event_received: indicates if the AFC power event is 349 * received 350 * @is_6g_afc_expiry_event_received: indicates if the AFC exipiry event is 351 * received 352 * @afc_chan_list: Intersection of AFC master and Standard power channel list 353 * @mas_chan_list_6g_afc: AFC master channel list constructed from the AFC 354 * server response. 355 * @power_info: pointer to AFC power information received from the AFC event 356 * sent by the target 357 * @is_reg_noaction_on_afc_pwr_evt: indicates whether regulatory needs to 358 * take action when AFC Power event is received 359 * @reg_afc_dev_deployment_type: AFC device deployment type from BDF 360 * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support 361 * @p2p_indoor_ch_support: Allow P2P GO in indoor channels 362 * @fcc_rules_ptr : Value of fcc channel frequency and tx_power list received 363 * from firmware 364 * @indoor_list: List of current indoor station interfaces 365 */ 366 struct wlan_regulatory_pdev_priv_obj { 367 struct regulatory_channel cur_chan_list[NUM_CHANNELS]; 368 #ifdef CONFIG_REG_CLIENT 369 struct regulatory_channel secondary_cur_chan_list[NUM_CHANNELS]; 370 #endif 371 struct regulatory_channel mas_chan_list[NUM_CHANNELS]; 372 #ifdef CONFIG_BAND_6GHZ 373 bool is_6g_channel_list_populated; 374 struct regulatory_channel mas_chan_list_6g_ap[REG_CURRENT_MAX_AP_TYPE][NUM_6GHZ_CHANNELS]; 375 struct regulatory_channel mas_chan_list_6g_client[REG_CURRENT_MAX_AP_TYPE][REG_MAX_CLIENT_TYPE][NUM_6GHZ_CHANNELS]; 376 struct super_chan_info super_chan_list[NUM_6GHZ_CHANNELS]; 377 #endif 378 #ifdef DISABLE_CHANNEL_LIST 379 struct regulatory_channel cache_disable_chan_list[NUM_CHANNELS]; 380 uint32_t num_cache_channels; 381 bool disable_cached_channels; 382 #endif 383 char default_country[REG_ALPHA2_LEN + 1]; 384 uint16_t def_region_domain; 385 uint16_t def_country_code; 386 char current_country[REG_ALPHA2_LEN + 1]; 387 uint16_t reg_dmn_pair; 388 uint16_t reg_6g_superid; 389 uint16_t ctry_code; 390 #ifdef DISABLE_UNII_SHARED_BANDS 391 uint8_t unii_5g_bitmap; 392 #endif 393 enum dfs_reg dfs_region; 394 uint32_t phybitmap; 395 struct wlan_objmgr_pdev *pdev_ptr; 396 qdf_freq_t range_2g_low; 397 qdf_freq_t range_2g_high; 398 qdf_freq_t range_5g_low; 399 qdf_freq_t range_5g_high; 400 bool dfs_enabled; 401 bool set_fcc_channel; 402 uint32_t band_capability; 403 bool indoor_chan_enabled; 404 bool en_chan_144; 405 uint64_t wireless_modes; 406 struct ch_avoid_ind_type freq_avoid_list; 407 bool force_ssc_disable_indoor_channel; 408 bool sap_state; 409 struct reg_rule_info reg_rules; 410 qdf_spinlock_t reg_rules_lock; 411 bool chan_list_recvd; 412 bool pdev_opened; 413 #if defined(CONFIG_BAND_6GHZ) 414 enum reg_6g_ap_type reg_cur_6g_ap_pwr_type; 415 enum reg_6g_client_type reg_cur_6g_client_mobility_type; 416 enum reg_6g_client_type reg_target_client_type; 417 bool reg_rnr_tpe_usable; 418 bool reg_unspecified_ap_usable; 419 qdf_freq_t reg_6g_thresh_priority_freq; 420 #endif 421 #ifdef CONFIG_HOST_FIND_CHAN 422 enum reg_phymode max_phymode; 423 enum phy_ch_width max_chwidth; 424 #endif 425 #ifdef FEATURE_WLAN_CH_AVOID_EXT 426 avoid_ch_ext_list avoid_chan_ext_list; 427 #endif 428 #ifdef CONFIG_AFC_SUPPORT 429 qdf_spinlock_t afc_cb_lock; 430 struct afc_cb_handler afc_cb_obj; 431 struct afc_pow_evt_cb_handler afc_pow_evt_cb_obj; 432 uint64_t afc_request_id; 433 bool is_6g_afc_power_event_received; 434 bool is_6g_afc_expiry_event_received; 435 struct regulatory_channel afc_chan_list[NUM_6GHZ_CHANNELS]; 436 struct regulatory_channel mas_chan_list_6g_afc[NUM_6GHZ_CHANNELS]; 437 struct reg_fw_afc_power_event *power_info; 438 bool is_reg_noaction_on_afc_pwr_evt; 439 enum reg_afc_dev_deploy_type reg_afc_dev_deployment_type; 440 #endif 441 bool sta_sap_scc_on_indoor_channel; 442 bool p2p_indoor_ch_support; 443 #ifdef CONFIG_REG_CLIENT 444 struct cur_fcc_rule fcc_rules_ptr[MAX_NUM_FCC_RULES]; 445 struct indoor_concurrency_list indoor_list[MAX_INDOOR_LIST_SIZE]; 446 #endif 447 }; 448 449 /** 450 * reg_get_psoc_obj() - Provides the reg component object pointer 451 * @psoc: pointer to psoc object. 452 * 453 * Return: reg component object pointer 454 */ 455 struct wlan_regulatory_psoc_priv_obj *reg_get_psoc_obj( 456 struct wlan_objmgr_psoc *psoc); 457 458 /** 459 * reg_get_pdev_obj() - Provides the reg component object pointer 460 * @pdev: pointer to pdev object. 461 * 462 * Return: reg component object pointer 463 */ 464 struct wlan_regulatory_pdev_priv_obj *reg_get_pdev_obj( 465 struct wlan_objmgr_pdev *pdev); 466 467 /** 468 * wlan_regulatory_psoc_obj_created_notification() - PSOC obj create callback 469 * @psoc: PSOC object 470 * @arg_list: Variable argument list 471 * 472 * This callback is registered with object manager during initialization to 473 * get notified when the object is created. 474 * 475 * Return: Success or Failure 476 */ 477 QDF_STATUS wlan_regulatory_psoc_obj_created_notification( 478 struct wlan_objmgr_psoc *psoc, void *arg_list); 479 480 /** 481 * wlan_regulatory_psoc_obj_destroyed_notification() - PSOC obj delete callback 482 * @psoc: PSOC object 483 * @arg_list: Variable argument list 484 * 485 * This callback is registered with object manager during initialization to 486 * get notified when the object is deleted. 487 * 488 * Return: Success or Failure 489 */ 490 QDF_STATUS wlan_regulatory_psoc_obj_destroyed_notification( 491 struct wlan_objmgr_psoc *psoc, void *arg_list); 492 493 /** 494 * wlan_regulatory_pdev_obj_created_notification() - PDEV obj create callback 495 * @pdev: pdev object 496 * @arg_list: Variable argument list 497 * 498 * This callback is registered with object manager during initialization to 499 * get notified when the pdev object is created. 500 * 501 * Return: Success or Failure 502 */ 503 QDF_STATUS wlan_regulatory_pdev_obj_created_notification( 504 struct wlan_objmgr_pdev *pdev, void *arg_list); 505 506 /** 507 * wlan_regulatory_pdev_obj_destroyed_notification() - PDEV obj destroy callback 508 * @pdev: pdev object 509 * @arg_list: Variable argument list 510 * 511 * This callback is registered with object manager during initialization to 512 * get notified when the pdev object is destroyed. 513 * 514 * Return: Success or Failure 515 */ 516 QDF_STATUS wlan_regulatory_pdev_obj_destroyed_notification( 517 struct wlan_objmgr_pdev *pdev, void *arg_list); 518 519 #ifdef CONFIG_AFC_SUPPORT 520 /** 521 * reg_free_afc_pwr_info() - Free the AFC power information object 522 * @pdev_priv_obj: Pointer to pdev_priv_obj 523 * 524 * Return: void 525 */ 526 void 527 reg_free_afc_pwr_info(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj); 528 #else 529 static inline void 530 reg_free_afc_pwr_info(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj) 531 { 532 } 533 #endif 534 #endif 535