|
@@ -1383,6 +1383,7 @@ QDF_STATUS reg_set_country(struct wlan_objmgr_pdev *pdev,
|
|
|
struct wlan_lmac_if_reg_tx_ops *tx_ops;
|
|
|
struct set_country country_code;
|
|
|
struct wlan_objmgr_psoc *psoc;
|
|
|
+ struct cc_regdmn_s rd;
|
|
|
|
|
|
if (!country) {
|
|
|
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;
|
|
|
|
|
|
- tx_ops = reg_get_psoc_tx_ops(psoc);
|
|
|
-
|
|
|
- if (tx_ops->set_country_code) {
|
|
|
- tx_ops->set_country_code(psoc, &country_code);
|
|
|
+ if (psoc_reg->offload_enabled) {
|
|
|
+ tx_ops = reg_get_psoc_tx_ops(psoc);
|
|
|
+ if (tx_ops->set_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 {
|
|
|
- reg_err("country set fw handler not present");
|
|
|
- return QDF_STATUS_E_FAULT;
|
|
|
+ qdf_mem_copy(rd.cc.alpha, country, REG_ALPHA2_LEN + 1);
|
|
|
+ rd.flags = ALPHA_IS_SET;
|
|
|
+ reg_program_chan_list(pdev, &rd);
|
|
|
}
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|