qcacmn: use driver database for reg no-offload

For reg no-offload case, it needs to call the
reg_program_chan_list() function directory to apply
the right channel info.

Change-Id: Ieb7acf9f96973a6e56146e2763f455ef92838c4a
CRs-Fixed: 2174286
This commit is contained in:
Paul Zhang
2018-01-17 17:58:17 +08:00
committed by snandini
parent 8136b58f56
commit 36b80ed9bf
2 changed files with 15 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017 The Linux Foundation. All rights reserved. * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* *
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
@@ -77,7 +77,7 @@ QDF_STATUS reg_regrules_assign(uint8_t dmn_id_2g,
r_r_5g->max_bw = reg_rules_5g[rule_index].max_bw; r_r_5g->max_bw = reg_rules_5g[rule_index].max_bw;
r_r_5g->reg_power = reg_rules_5g[rule_index].reg_power; r_r_5g->reg_power = reg_rules_5g[rule_index].reg_power;
r_r_5g->flags = reg_rules_5g[rule_index].flags; r_r_5g->flags = reg_rules_5g[rule_index].flags;
r_r_2g->ant_gain = ant_gain_5g; r_r_5g->ant_gain = ant_gain_5g;
r_r_5g++; r_r_5g++;
} }

View File

@@ -1383,6 +1383,7 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
struct wlan_lmac_if_reg_tx_ops *tx_ops; struct wlan_lmac_if_reg_tx_ops *tx_ops;
struct set_country country_code; struct set_country country_code;
struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_psoc *psoc;
struct cc_regdmn_s rd;
if (!country) { if (!country) {
reg_err("country code is NULL"); reg_err("country code is NULL");
@@ -1411,13 +1412,19 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
psoc_reg->new_user_ctry_pending = true; psoc_reg->new_user_ctry_pending = true;
tx_ops = reg_get_psoc_tx_ops(psoc); if (psoc_reg->offload_enabled) {
tx_ops = reg_get_psoc_tx_ops(psoc);
if (tx_ops->set_country_code) { if (tx_ops->set_country_code) {
tx_ops->set_country_code(psoc, &country_code); tx_ops->set_country_code(psoc, &country_code);
} else {
reg_err("country set fw handler not present");
psoc_reg->new_user_ctry_pending = false;
return QDF_STATUS_E_FAULT;
}
} else { } else {
reg_err("country set fw handler not present"); qdf_mem_copy(rd.cc.alpha, country, REG_ALPHA2_LEN + 1);
return QDF_STATUS_E_FAULT; rd.flags = ALPHA_IS_SET;
reg_program_chan_list(pdev, &rd);
} }
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;