qcacld-3.0: Rename pMac in misc SAP files

Per the Linux coding style "mixed-case names are frowned upon" and
"so-called Hungarian notation [...] is brain damaged." One identifier
used extensively throughout the driver that violates both of these
tenants is "pMac." In order to be compliant with the Linux coding
style there is a campaign to rename all instances of this identifier.

For this change rename all instances of "pMac" to "mac" in:
sap_ch_select.c
sap_fsm.c
sap_module.c

Change-Id: Iaf300b458fb89550d2e3a90f98ed6aabecd98024
CRs-Fixed: 2355451
Este commit está contenido en:
Jeff Johnson
2018-11-22 14:21:08 -08:00
cometido por nshrivas
padre 86a9a35478
commit b9794442c6
Se han modificado 3 ficheros con 95 adiciones y 95 borrados

Ver fichero

@@ -574,7 +574,7 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
tSapSpectChInfo *pSpectCh = NULL;
uint8_t *pChans = NULL;
uint16_t channelnum = 0;
tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
bool chSafe = true;
#ifdef FEATURE_WLAN_CH_AVOID
uint16_t i;
@@ -582,13 +582,13 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
bool include_dfs_ch = true;
uint8_t chan_num;
bool sta_sap_scc_on_dfs_chan =
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(pMac->psoc);
policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(mac->psoc);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "In %s",
__func__);
pSpectInfoParams->numSpectChans =
pMac->scan.base_channels.numChannels;
mac->scan.base_channels.numChannels;
/* Allocate memory for weight computation of 2.4GHz */
pSpectCh = qdf_mem_malloc((pSpectInfoParams->numSpectChans) *
@@ -599,13 +599,13 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
/* Initialize the pointers in the DfsParams to the allocated memory */
pSpectInfoParams->pSpectCh = pSpectCh;
pChans = pMac->scan.base_channels.channelList;
pChans = mac->scan.base_channels.channelList;
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
if (sap_ctx->dfs_ch_disable == true)
include_dfs_ch = false;
#endif
if (!pMac->mlme_cfg->dfs_cfg.dfs_master_capable ||
if (!mac->mlme_cfg->dfs_cfg.dfs_master_capable ||
ACS_DFS_MODE_DISABLE == sap_ctx->dfs_mode)
include_dfs_ch = false;
@@ -635,7 +635,7 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
}
if (!include_dfs_ch || sta_sap_scc_on_dfs_chan) {
if (wlan_reg_is_dfs_ch(pMac->pdev, *pChans)) {
if (wlan_reg_is_dfs_ch(mac->pdev, *pChans)) {
chSafe = false;
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_HIGH,
@@ -667,11 +667,11 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
}
/* Skip DSRC channels */
if (wlan_reg_is_dsrc_chan(pMac->pdev, *pChans))
if (wlan_reg_is_dsrc_chan(mac->pdev, *pChans))
continue;
if (!pMac->sap.enable_etsi13_srd_chan_support &&
wlan_reg_is_etsi13_srd_chan(pMac->pdev, *pChans))
if (!mac->sap.enable_etsi13_srd_chan_support &&
wlan_reg_is_etsi13_srd_chan(mac->pdev, *pChans))
continue;
if (true == chSafe) {
@@ -1521,7 +1521,7 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
uint16_t vhtSupport;
uint32_t ieLen = 0;
tSirProbeRespBeacon *pBeaconStruct;
tpAniSirGlobal pMac = MAC_CONTEXT(mac_handle);
tpAniSirGlobal mac = MAC_CONTEXT(mac_handle);
tSapSpectChInfo *spectch_start = pSpectInfoParams->pSpectCh;
tSapSpectChInfo *spectch_end = pSpectInfoParams->pSpectCh +
pSpectInfoParams->numSpectChans;
@@ -1556,7 +1556,7 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
if ((sir_parse_beacon_ie
(pMac, pBeaconStruct, (uint8_t *)
(mac, pBeaconStruct, (uint8_t *)
(pScanResult->BssDescriptor.ieFields),
ieLen)) == QDF_STATUS_SUCCESS)
sap_upd_chan_spec_params(
@@ -1699,7 +1699,7 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
SAPDFS_NORMALISE_1000 *
(sapweight_rssi_count(sap_ctx, rssi,
pSpectCh->bssCount) + sap_weight_channel_status(
sap_ctx, sap_get_channel_status(pMac,
sap_ctx, sap_get_channel_status(mac,
pSpectCh->chNum)));
else {
pSpectCh->weight = SAP_ACS_WEIGHT_MAX;
@@ -1725,7 +1725,7 @@ debug_info:
/* ------ Debug Info ------ */
pSpectCh++;
}
sap_clear_channel_status(pMac);
sap_clear_channel_status(mac);
qdf_mem_free(pBeaconStruct);
}

Ver fichero

@@ -552,19 +552,19 @@ void sap_dfs_set_current_channel(void *ctx)
bool sap_dfs_is_w53_invalid(mac_handle_t mac_handle, uint8_t channel_id)
{
tpAniSirGlobal pMac;
tpAniSirGlobal mac;
pMac = PMAC_STRUCT(mac_handle);
if (NULL == pMac) {
mac = PMAC_STRUCT(mac_handle);
if (NULL == mac) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("invalid pMac"));
FL("invalid mac"));
return false;
}
/*
* Check for JAPAN W53 Channel operation capability
*/
if (true == pMac->sap.SapDfsInfo.is_dfs_w53_disabled &&
if (true == mac->sap.SapDfsInfo.is_dfs_w53_disabled &&
true == IS_CHAN_JAPAN_W53(channel_id)) {
return true;
}
@@ -575,16 +575,16 @@ bool sap_dfs_is_w53_invalid(mac_handle_t mac_handle, uint8_t channel_id)
bool sap_dfs_is_channel_in_preferred_location(mac_handle_t mac_handle,
uint8_t channel_id)
{
tpAniSirGlobal pMac;
tpAniSirGlobal mac;
pMac = PMAC_STRUCT(mac_handle);
if (NULL == pMac) {
mac = PMAC_STRUCT(mac_handle);
if (NULL == mac) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
FL("invalid pMac"));
FL("invalid mac"));
return true;
}
if ((SAP_CHAN_PREFERRED_INDOOR ==
pMac->sap.SapDfsInfo.sap_operating_chan_preferred_location) &&
mac->sap.SapDfsInfo.sap_operating_chan_preferred_location) &&
(true == IS_CHAN_JAPAN_OUTDOOR(channel_id))) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_LOW,
FL
@@ -592,7 +592,7 @@ bool sap_dfs_is_channel_in_preferred_location(mac_handle_t mac_handle,
channel_id);
return false;
} else if ((SAP_CHAN_PREFERRED_OUTDOOR ==
pMac->sap.SapDfsInfo.sap_operating_chan_preferred_location)
mac->sap.SapDfsInfo.sap_operating_chan_preferred_location)
&& (true == IS_CHAN_JAPAN_INDOOR(channel_id))) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_LOW,
FL
@@ -1840,15 +1840,15 @@ static struct sap_context *sap_find_cac_wait_session(mac_handle_t handle)
void sap_cac_reset_notify(mac_handle_t mac_handle)
{
uint8_t intf = 0;
tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
struct sap_context *sap_context =
pMac->sap.sapCtxList[intf].sap_context;
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
mac->sap.sapCtxList[intf].sap_context;
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
&& pMac->sap.sapCtxList[intf].sap_context != NULL) {
(QDF_P2P_GO_MODE == mac->sap.sapCtxList[intf].sapPersona))
&& mac->sap.sapCtxList[intf].sap_context != NULL) {
sap_context->isCacStartNotified = false;
sap_context->isCacEndNotified = false;
}
@@ -1867,22 +1867,22 @@ void sap_cac_reset_notify(mac_handle_t mac_handle)
static QDF_STATUS sap_cac_start_notify(mac_handle_t mac_handle)
{
uint8_t intf = 0;
tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
struct sap_context *sap_context =
pMac->sap.sapCtxList[intf].sap_context;
mac->sap.sapCtxList[intf].sap_context;
struct csr_roam_profile *profile;
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
&& pMac->sap.sapCtxList[intf].sap_context != NULL &&
(QDF_P2P_GO_MODE == mac->sap.sapCtxList[intf].sapPersona))
&& mac->sap.sapCtxList[intf].sap_context != NULL &&
(false == sap_context->isCacStartNotified)) {
/* Don't start CAC for non-dfs channel, its violation */
profile = &sap_context->csr_roamProfile;
if (!wlan_reg_is_dfs_ch(pMac->pdev,
if (!wlan_reg_is_dfs_ch(mac->pdev,
profile->operationChannel))
continue;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
@@ -1962,7 +1962,7 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
struct csr_roam_info *roamInfo)
{
uint8_t intf;
tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
/*
@@ -1973,19 +1973,19 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
*/
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
struct sap_context *sap_context =
pMac->sap.sapCtxList[intf].sap_context;
mac->sap.sapCtxList[intf].sap_context;
struct csr_roam_profile *profile;
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
&& pMac->sap.sapCtxList[intf].sap_context != NULL &&
(QDF_P2P_GO_MODE == mac->sap.sapCtxList[intf].sapPersona))
&& mac->sap.sapCtxList[intf].sap_context != NULL &&
(false == sap_context->isCacEndNotified) &&
sap_is_dfs_cac_wait_state(sap_context)) {
sap_context = pMac->sap.sapCtxList[intf].sap_context;
sap_context = mac->sap.sapCtxList[intf].sap_context;
/* Don't check CAC for non-dfs channel */
profile = &sap_context->csr_roamProfile;
if (!wlan_reg_is_dfs_ch(pMac->pdev,
if (!wlan_reg_is_dfs_ch(mac->pdev,
profile->operationChannel))
continue;
@@ -1996,7 +1996,7 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
*/
if (sap_context->is_pre_cac_on) {
qdf_status = wlansap_update_pre_cac_end(
sap_context, pMac, intf);
sap_context, mac, intf);
if (QDF_IS_STATUS_ERROR(qdf_status))
return qdf_status;
/* pre CAC is not allowed with any concurrency.
@@ -2017,7 +2017,7 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
return qdf_status;
}
sap_context->isCacEndNotified = true;
pMac->sap.SapDfsInfo.sap_radar_found_status = false;
mac->sap.SapDfsInfo.sap_radar_found_status = false;
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_MED,
"sapdfs: Start beacon request on sapctx[%pK]",
sap_context);
@@ -2057,7 +2057,7 @@ static QDF_STATUS sap_cac_end_notify(mac_handle_t mac_handle,
* AP2 is already beaconing on this channel. This case will be handled
* by checking against eSAP_DFS_SKIP_CAC while starting the timer.
*/
pMac->sap.SapDfsInfo.cac_state = eSAP_DFS_SKIP_CAC;
mac->sap.SapDfsInfo.cac_state = eSAP_DFS_SKIP_CAC;
return qdf_status;
}
@@ -3502,14 +3502,14 @@ void sap_dfs_cac_timer_callback(void *data)
struct sap_context *sapContext;
tWLAN_SAPEvent sapEvent;
mac_handle_t mac_handle = data;
tpAniSirGlobal pMac;
tpAniSirGlobal mac;
if (NULL == mac_handle) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"In %s invalid mac_handle", __func__);
return;
}
pMac = PMAC_STRUCT(mac_handle);
mac = PMAC_STRUCT(mac_handle);
sapContext = sap_find_cac_wait_session(mac_handle);
if (NULL == sapContext) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -3522,11 +3522,11 @@ void sap_dfs_cac_timer_callback(void *data)
* if following flag is set, then timer is in initialized state,
* destroy timer here.
*/
if (pMac->sap.SapDfsInfo.is_dfs_cac_timer_running == true) {
if (mac->sap.SapDfsInfo.is_dfs_cac_timer_running == true) {
if (!sapContext->dfs_cac_offload)
qdf_mc_timer_destroy(
&pMac->sap.SapDfsInfo.sap_dfs_cac_timer);
pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = false;
&mac->sap.SapDfsInfo.sap_dfs_cac_timer);
mac->sap.SapDfsInfo.is_dfs_cac_timer_running = false;
}
/*
@@ -3695,15 +3695,15 @@ QDF_STATUS sap_init_dfs_channel_nol_list(struct sap_context *sap_ctx)
*/
uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle)
{
tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
uint8_t intf = 0;
uint8_t intf_count = 0;
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
&& pMac->sap.sapCtxList[intf].sap_context != NULL) {
(QDF_P2P_GO_MODE == mac->sap.sapCtxList[intf].sapPersona))
&& mac->sap.sapCtxList[intf].sap_context != NULL) {
intf_count++;
}
}
@@ -3725,17 +3725,17 @@ uint8_t sap_get_total_number_sap_intf(mac_handle_t mac_handle)
bool is_concurrent_sap_ready_for_channel_change(mac_handle_t mac_handle,
struct sap_context *sapContext)
{
tpAniSirGlobal pMac = PMAC_STRUCT(mac_handle);
tpAniSirGlobal mac = PMAC_STRUCT(mac_handle);
struct sap_context *sap_context;
uint8_t intf = 0;
for (intf = 0; intf < SAP_MAX_NUM_SESSION; intf++) {
if (((QDF_SAP_MODE == pMac->sap.sapCtxList[intf].sapPersona)
if (((QDF_SAP_MODE == mac->sap.sapCtxList[intf].sapPersona)
||
(QDF_P2P_GO_MODE == pMac->sap.sapCtxList[intf].sapPersona))
&& pMac->sap.sapCtxList[intf].sap_context != NULL) {
(QDF_P2P_GO_MODE == mac->sap.sapCtxList[intf].sapPersona))
&& mac->sap.sapCtxList[intf].sap_context != NULL) {
sap_context =
pMac->sap.sapCtxList[intf].sap_context;
mac->sap.sapCtxList[intf].sap_context;
if (sap_context == sapContext) {
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_ERROR,

Ver fichero

@@ -1788,7 +1788,7 @@ QDF_STATUS wlansap_start_beacon_req(struct sap_context *sap_ctx)
QDF_STATUS wlansap_dfs_send_csa_ie_request(struct sap_context *sap_ctx)
{
struct mac_context *pMac;
struct mac_context *mac;
if (NULL == sap_ctx) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -1796,63 +1796,63 @@ QDF_STATUS wlansap_dfs_send_csa_ie_request(struct sap_context *sap_ctx)
return QDF_STATUS_E_FAULT;
}
pMac = sap_get_mac_context();
if (!pMac) {
mac = sap_get_mac_context();
if (!mac) {
QDF_TRACE_ERROR(QDF_MODULE_ID_SAP, "Invalid MAC context");
return QDF_STATUS_E_FAULT;
}
pMac->sap.SapDfsInfo.new_ch_params.ch_width =
pMac->sap.SapDfsInfo.new_chanWidth;
wlan_reg_set_channel_params(pMac->pdev,
pMac->sap.SapDfsInfo.target_channel,
0, &pMac->sap.SapDfsInfo.new_ch_params);
mac->sap.SapDfsInfo.new_ch_params.ch_width =
mac->sap.SapDfsInfo.new_chanWidth;
wlan_reg_set_channel_params(mac->pdev,
mac->sap.SapDfsInfo.target_channel,
0, &mac->sap.SapDfsInfo.new_ch_params);
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO,
"%s: chan:%d req:%d width:%d off:%d",
__func__, pMac->sap.SapDfsInfo.target_channel,
pMac->sap.SapDfsInfo.csaIERequired,
pMac->sap.SapDfsInfo.new_ch_params.ch_width,
pMac->sap.SapDfsInfo.new_ch_params.sec_ch_offset);
__func__, mac->sap.SapDfsInfo.target_channel,
mac->sap.SapDfsInfo.csaIERequired,
mac->sap.SapDfsInfo.new_ch_params.ch_width,
mac->sap.SapDfsInfo.new_ch_params.sec_ch_offset);
return sme_roam_csa_ie_request(MAC_HANDLE(pMac),
return sme_roam_csa_ie_request(MAC_HANDLE(mac),
sap_ctx->bssid,
pMac->sap.SapDfsInfo.target_channel,
pMac->sap.SapDfsInfo.csaIERequired,
&pMac->sap.SapDfsInfo.new_ch_params);
mac->sap.SapDfsInfo.target_channel,
mac->sap.SapDfsInfo.csaIERequired,
&mac->sap.SapDfsInfo.new_ch_params);
}
QDF_STATUS wlansap_get_dfs_ignore_cac(mac_handle_t mac_handle,
uint8_t *ignore_cac)
{
tpAniSirGlobal pMac = NULL;
tpAniSirGlobal mac = NULL;
if (NULL != mac_handle) {
pMac = PMAC_STRUCT(mac_handle);
mac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
*ignore_cac = pMac->sap.SapDfsInfo.ignore_cac;
*ignore_cac = mac->sap.SapDfsInfo.ignore_cac;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlansap_set_dfs_ignore_cac(mac_handle_t mac_handle,
uint8_t ignore_cac)
{
tpAniSirGlobal pMac = NULL;
tpAniSirGlobal mac = NULL;
if (NULL != mac_handle) {
pMac = PMAC_STRUCT(mac_handle);
mac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
pMac->sap.SapDfsInfo.ignore_cac = (ignore_cac >= true) ?
mac->sap.SapDfsInfo.ignore_cac = (ignore_cac >= true) ?
true : false;
return QDF_STATUS_SUCCESS;
}
@@ -1861,30 +1861,30 @@ QDF_STATUS
wlansap_set_dfs_restrict_japan_w53(mac_handle_t mac_handle,
uint8_t disable_dfs_w53)
{
tpAniSirGlobal pMac = NULL;
tpAniSirGlobal mac = NULL;
QDF_STATUS status;
enum dfs_reg dfs_region;
if (NULL != mac_handle) {
pMac = PMAC_STRUCT(mac_handle);
mac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
wlan_reg_get_dfs_region(pMac->pdev, &dfs_region);
wlan_reg_get_dfs_region(mac->pdev, &dfs_region);
/*
* Set the JAPAN W53 restriction only if the current
* regulatory domain is JAPAN.
*/
if (DFS_MKK_REGION == dfs_region) {
pMac->sap.SapDfsInfo.is_dfs_w53_disabled = disable_dfs_w53;
mac->sap.SapDfsInfo.is_dfs_w53_disabled = disable_dfs_w53;
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_LOW,
FL("sapdfs: SET DFS JAPAN W53 DISABLED = %d"),
pMac->sap.SapDfsInfo.is_dfs_w53_disabled);
mac->sap.SapDfsInfo.is_dfs_w53_disabled);
status = QDF_STATUS_SUCCESS;
} else {
@@ -1957,19 +1957,19 @@ wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle,
uint8_t
dfs_Preferred_Channels_location)
{
tpAniSirGlobal pMac = NULL;
tpAniSirGlobal mac = NULL;
QDF_STATUS status;
enum dfs_reg dfs_region;
if (NULL != mac_handle) {
pMac = PMAC_STRUCT(mac_handle);
mac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
wlan_reg_get_dfs_region(pMac->pdev, &dfs_region);
wlan_reg_get_dfs_region(mac->pdev, &dfs_region);
/*
* The Indoor/Outdoor only random channel selection
@@ -1977,13 +1977,13 @@ wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle,
* JAPAN regulatory domain.
*/
if (DFS_MKK_REGION == dfs_region) {
pMac->sap.SapDfsInfo.sap_operating_chan_preferred_location =
mac->sap.SapDfsInfo.sap_operating_chan_preferred_location =
dfs_Preferred_Channels_location;
QDF_TRACE(QDF_MODULE_ID_SAP,
QDF_TRACE_LEVEL_INFO_LOW,
FL
("sapdfs:Set Preferred Operating Channel location=%d"),
pMac->sap.SapDfsInfo.
mac->sap.SapDfsInfo.
sap_operating_chan_preferred_location);
status = QDF_STATUS_SUCCESS;
@@ -2001,20 +2001,20 @@ wlansap_set_dfs_preferred_channel_location(mac_handle_t mac_handle,
QDF_STATUS wlansap_set_dfs_target_chnl(mac_handle_t mac_handle,
uint8_t target_channel)
{
tpAniSirGlobal pMac = NULL;
tpAniSirGlobal mac = NULL;
if (NULL != mac_handle) {
pMac = PMAC_STRUCT(mac_handle);
mac = PMAC_STRUCT(mac_handle);
} else {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid mac_handle pointer", __func__);
return QDF_STATUS_E_FAULT;
}
if (target_channel > 0) {
pMac->sap.SapDfsInfo.user_provided_target_channel =
mac->sap.SapDfsInfo.user_provided_target_channel =
target_channel;
} else {
pMac->sap.SapDfsInfo.user_provided_target_channel = 0;
mac->sap.SapDfsInfo.user_provided_target_channel = 0;
}
return QDF_STATUS_SUCCESS;