From 4cd49ad81481a1137bb73c6e2ef927447d1e9a37 Mon Sep 17 00:00:00 2001 From: Vignesh U Date: Tue, 5 Nov 2019 20:37:04 +0530 Subject: [PATCH] qcacmn: Intermittent regulatory update for Japan in Win&computing As a part of the intermittent regulatory update, implement the following changes, - The country Japan should map to MKK17_MKKC regulatory domain. - For regulatory domain MKK17_MKKC, channel 144 should be disabled by default. Change-Id: Ic920456fa885d9ed2b8d0419c6a261707eb10b4d CRs-Fixed: 2560339 --- .../regulatory/core/src/reg_build_chan_list.c | 32 +++++++++++++++++++ umac/regulatory/core/src/reg_db.c | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/umac/regulatory/core/src/reg_build_chan_list.c b/umac/regulatory/core/src/reg_build_chan_list.c index 8739fad8a4..1055339dbe 100644 --- a/umac/regulatory/core/src/reg_build_chan_list.c +++ b/umac/regulatory/core/src/reg_build_chan_list.c @@ -427,6 +427,37 @@ static void reg_find_high_limit_chan_enum( } } +#ifdef REG_DISABLE_JP_CH144 +/** + * reg_modify_chan_list_for_japan() - Disable channel 144 for MKK17_MKKC + * regdomain by default. + * @pdev: Pointer to pdev + * + * Return: None + */ +static void +reg_modify_chan_list_for_japan(struct wlan_objmgr_pdev *pdev) +{ +#define MKK17_MKKC 0xE1 + 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("reg pdev priv obj is NULL"); + return; + } + + if (pdev_priv_obj->reg_dmn_pair == MKK17_MKKC) + pdev_priv_obj->en_chan_144 = false; + +#undef MKK17_MKKC +} +#else +static inline void +reg_modify_chan_list_for_japan(struct wlan_objmgr_pdev *pdev) +{ +} +#endif /** * reg_modify_chan_list_for_freq_range() - Modify channel list for the given low * and high frequency range. @@ -687,6 +718,7 @@ void reg_propagate_mas_chan_list_to_pdev(struct wlan_objmgr_psoc *psoc, &psoc_priv_obj->mas_chan_params[pdev_id]); psoc_reg_rules = &psoc_priv_obj->mas_chan_params[pdev_id].reg_rules; reg_save_reg_rules_to_pdev(psoc_reg_rules, pdev_priv_obj); + reg_modify_chan_list_for_japan(pdev); reg_compute_pdev_current_chan_list(pdev_priv_obj); reg_tx_ops = reg_get_psoc_tx_ops(psoc); diff --git a/umac/regulatory/core/src/reg_db.c b/umac/regulatory/core/src/reg_db.c index be7cf479b9..558993f0bc 100644 --- a/umac/regulatory/core/src/reg_db.c +++ b/umac/regulatory/core/src/reg_db.c @@ -508,7 +508,7 @@ const struct country_code_to_reg_domain g_all_countries[] = { {CTRY_WALLIS_AND_FUTUNA, ETSI1_WORLD, "WF", 40, 160, 0}, {CTRY_YEMEN, NULL1_WORLD, "YE", 40, 0, 0}, {CTRY_ZIMBABWE, ETSI1_WORLD, "ZW", 40, 160, 0}, - {CTRY_JAPAN, MKK5_MKKC, "JP", 40, 160, 0}, + {CTRY_JAPAN, MKK17_MKKC, "JP", 40, 160, 0}, {CTRY_JAPAN15, MKK5_MKKC, "JP", 40, 160, 0}, }; #else