From 6fdfe54084a5f164afb3df638c5647417c2aa6e5 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Tue, 19 Feb 2019 23:37:58 +0530 Subject: [PATCH] qcacmn: Avoid reset of reg rules in soc private object In the current implementation, reg rules stored in mas_chan_params of soc for each phy id are reset in regulatory_pdev_obj_created_notification() and in regulatory_psoc_close(). In WLAN restart sequence, regulatory_psoc_close() is invoked and processing of WMI_REG_CHAN_LIST_CC_EVENTID is ignored, if the country code matches with existing country code in soc reg private object. Since reg_rules in mas_chan_params of soc are reset there are no reg_rules for pdev resulting in no indication (regulatory_set_wiphy_regd()) to cfg80211. To fix this, avoid reset of psoc reg rules. Change-Id: I14973217319ffa84b979f0c92cb5405708a96d2f CRs-Fixed: 2402007 --- umac/regulatory/core/src/reg_priv_objs.c | 2 -- .../regulatory/dispatcher/src/wlan_reg_services_api.c | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/umac/regulatory/core/src/reg_priv_objs.c b/umac/regulatory/core/src/reg_priv_objs.c index 07cf6a79bf3e..3509f91fc38d 100644 --- a/umac/regulatory/core/src/reg_priv_objs.c +++ b/umac/regulatory/core/src/reg_priv_objs.c @@ -240,8 +240,6 @@ QDF_STATUS wlan_regulatory_pdev_obj_created_notification( 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_reset_reg_rules(psoc_reg_rules); - status = wlan_objmgr_pdev_component_obj_attach( pdev, WLAN_UMAC_COMP_REGULATORY, pdev_priv_obj, QDF_STATUS_SUCCESS); diff --git a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c index 7176ec1c55f2..2fc2c6ecc3a6 100644 --- a/umac/regulatory/dispatcher/src/wlan_reg_services_api.c +++ b/umac/regulatory/dispatcher/src/wlan_reg_services_api.c @@ -394,8 +394,6 @@ QDF_STATUS regulatory_psoc_open(struct wlan_objmgr_psoc *psoc) QDF_STATUS regulatory_psoc_close(struct wlan_objmgr_psoc *psoc) { struct wlan_lmac_if_reg_tx_ops *tx_ops; - struct wlan_regulatory_psoc_priv_obj *soc_reg; - uint8_t i; tx_ops = reg_get_psoc_tx_ops(psoc); if (tx_ops->unregister_11d_new_cc_handler) @@ -405,15 +403,6 @@ QDF_STATUS regulatory_psoc_close(struct wlan_objmgr_psoc *psoc) if (tx_ops->unregister_ch_avoid_event_handler) tx_ops->unregister_ch_avoid_event_handler(psoc, NULL); - soc_reg = reg_get_psoc_obj(psoc); - - if (!soc_reg) { - reg_err("reg psoc private obj is NULL"); - return QDF_STATUS_E_FAULT; - } - for (i = 0; i < PSOC_MAX_PHY_REG_CAP; i++) - reg_reset_reg_rules(&soc_reg->mas_chan_params[i].reg_rules); - return QDF_STATUS_SUCCESS; }