qcacmn: Add API to get FCC constraint info
Add API to get FCC constraint info from regulatory pdev private object. Change-Id: I038f7e35c15d36213d898f349b6c521b2a2360f2 CRs-Fixed: 2431414
This commit is contained in:

committed by
nshrivas

parent
e761764291
commit
6dd26922bd
@@ -36,9 +36,7 @@
|
||||
#include "reg_build_chan_list.h"
|
||||
#include <qdf_platform.h>
|
||||
|
||||
#define CHAN_12_CENT_FREQ 2467
|
||||
#define MAX_PWR_FCC_CHAN_12 8
|
||||
#define CHAN_13_CENT_FREQ 2472
|
||||
#define MAX_PWR_FCC_CHAN_13 2
|
||||
#define CHAN_144_CENT_FREQ 5720
|
||||
|
||||
|
@@ -26,6 +26,9 @@
|
||||
#ifndef __REG_BUILD_CHAN_LIST_H__
|
||||
#define __REG_BUILD_CHAN_LIST_H__
|
||||
|
||||
#define CHAN_12_CENT_FREQ 2467
|
||||
#define CHAN_13_CENT_FREQ 2472
|
||||
|
||||
/**
|
||||
* reg_reset_reg_rules() - provides the reg domain rules info
|
||||
* @reg_rules: reg rules pointer
|
||||
|
@@ -529,6 +529,8 @@ void set_disable_channel_state(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_REG_CLIENT
|
||||
|
||||
QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
|
||||
bool fcc_constraint)
|
||||
{
|
||||
@@ -570,6 +572,27 @@ QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
|
||||
return status;
|
||||
}
|
||||
|
||||
bool reg_get_fcc_constraint(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
|
||||
pdev_priv_obj = reg_get_pdev_obj(pdev);
|
||||
if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
||||
reg_err("pdev reg component is NULL");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (freq != CHAN_12_CENT_FREQ && freq != CHAN_13_CENT_FREQ)
|
||||
return false;
|
||||
|
||||
if (!pdev_priv_obj->set_fcc_channel)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_REG_CLIENT */
|
||||
|
||||
/**
|
||||
* reg_change_pdev_for_config() - Update user configuration in pdev private obj.
|
||||
* @psoc: Pointer to global psoc structure.
|
||||
|
@@ -116,6 +116,16 @@ QDF_STATUS reg_cache_channel_state(struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
|
||||
bool fcc_constraint);
|
||||
|
||||
/**
|
||||
* reg_get_fcc_constraint() - Check FCC constraint on given frequency
|
||||
* @pdev: physical dev to get
|
||||
* @freq: frequency to be checked
|
||||
*
|
||||
* Return: If FCC constraint is applied on given frequency return true
|
||||
* else return false.
|
||||
*/
|
||||
bool reg_get_fcc_constraint(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
|
||||
/**
|
||||
* reg_read_current_country() - Get the current regulatory country
|
||||
* @psoc: The physical SoC to get current country from
|
||||
@@ -392,6 +402,20 @@ bool reg_ignore_default_country(struct wlan_regulatory_psoc_priv_obj *soc_reg,
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline
|
||||
QDF_STATUS reg_set_fcc_constraint(struct wlan_objmgr_pdev *pdev,
|
||||
bool fcc_constraint)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
bool reg_get_fcc_constraint(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WLAN_FEATURE_DSRC) && defined(CONFIG_REG_CLIENT)
|
||||
|
@@ -177,6 +177,16 @@ QDF_STATUS wlan_reg_get_channel_list_with_power(struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS wlan_reg_read_default_country(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *country);
|
||||
|
||||
/**
|
||||
* wlan_reg_get_fcc_constraint() - Check FCC constraint on given frequency
|
||||
* @pdev: physical dev to get
|
||||
* @freq: frequency to be checked
|
||||
*
|
||||
* Return: If FCC constraint is on applied given frequency return true
|
||||
* else return false.
|
||||
*/
|
||||
bool wlan_reg_get_fcc_constraint(struct wlan_objmgr_pdev *pdev, uint32_t freq);
|
||||
|
||||
#ifdef CONFIG_REG_CLIENT
|
||||
/**
|
||||
* wlan_reg_read_current_country() - Read the current country for the regdomain
|
||||
|
@@ -556,6 +556,11 @@ bool wlan_reg_is_etsi13_srd_chan_allowed_master_mode(struct wlan_objmgr_pdev
|
||||
return reg_is_etsi13_srd_chan_allowed_master_mode(pdev);
|
||||
}
|
||||
|
||||
bool wlan_reg_get_fcc_constraint(struct wlan_objmgr_pdev *pdev, uint32_t freq)
|
||||
{
|
||||
return reg_get_fcc_constraint(pdev, freq);
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_reg_get_chip_mode(struct wlan_objmgr_pdev *pdev,
|
||||
uint32_t *chip_mode)
|
||||
{
|
||||
|
Reference in New Issue
Block a user