1 /* 2 * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. 3 * 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_build_chan_list.h 22 * This file provides prototypes of the regulatory component to build master 23 * and current channel list. 24 */ 25 26 #ifndef __REG_BUILD_CHAN_LIST_H__ 27 #define __REG_BUILD_CHAN_LIST_H__ 28 29 #define CHAN_12_CENT_FREQ 2467 30 #define CHAN_13_CENT_FREQ 2472 31 32 /** 33 * reg_reset_reg_rules() - provides the reg domain rules info 34 * @reg_rules: reg rules pointer 35 * 36 * Return: None 37 */ 38 void reg_reset_reg_rules(struct reg_rule_info *reg_rules); 39 40 /** 41 * reg_init_pdev_mas_chan_list() - Initialize pdev master channel list 42 * @pdev_priv_obj: Pointer to regdb pdev private object. 43 * @mas_chan_params: Master channel params. 44 */ 45 void reg_init_pdev_mas_chan_list( 46 struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj, 47 struct mas_chan_params *mas_chan_params); 48 49 /** 50 * reg_save_reg_rules_to_pdev() - Save psoc reg-rules to pdev. 51 * @pdev_priv_obj: Pointer to regdb pdev private object. 52 */ 53 void reg_save_reg_rules_to_pdev( 54 struct reg_rule_info *psoc_reg_rules, 55 struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj); 56 57 /** 58 * reg_compute_pdev_current_chan_list() - Compute pdev current channel list. 59 * @pdev_priv_obj: Pointer to regdb pdev private object. 60 */ 61 void reg_compute_pdev_current_chan_list( 62 struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj); 63 64 /** 65 * reg_propagate_mas_chan_list_to_pdev() - Propagate master channel list to pdev 66 * @psoc: Pointer to psoc object. 67 * @object: Void pointer to pdev object. 68 * @arg: Pointer to direction. 69 */ 70 void reg_propagate_mas_chan_list_to_pdev(struct wlan_objmgr_psoc *psoc, 71 void *object, void *arg); 72 73 /** 74 * reg_process_master_chan_list() - Compute master channel list based on the 75 * regulatory rules. 76 * @reg_info: Pointer to regulatory info 77 * 78 * Return: QDF_STATUS 79 */ 80 QDF_STATUS reg_process_master_chan_list(struct cur_regulatory_info *reg_info); 81 82 QDF_STATUS reg_get_current_chan_list(struct wlan_objmgr_pdev *pdev, 83 struct regulatory_channel *chan_list); 84 85 /** 86 * reg_update_nol_history_ch() - Set nol-history flag for the channels in the 87 * list. 88 * 89 * @pdev: Pdev ptr. 90 * @ch_list: Input channel list. 91 * @num_ch: Number of channels. 92 * @nol_history_ch: NOL-History flag. 93 * 94 * Return: void 95 */ 96 void reg_update_nol_history_ch(struct wlan_objmgr_pdev *pdev, 97 uint8_t *chan_list, 98 uint8_t num_chan, 99 bool nol_history_chan); 100 101 #endif 102