diff --git a/umac/regulatory/core/src/reg_offload_11d_scan.c b/umac/regulatory/core/src/reg_offload_11d_scan.c index 5a8b0a87424b..5f25a97c6369 100644 --- a/umac/regulatory/core/src/reg_offload_11d_scan.c +++ b/umac/regulatory/core/src/reg_offload_11d_scan.c @@ -367,6 +367,7 @@ QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, struct wlan_lmac_if_reg_tx_ops *tx_ops; struct set_country country_code; uint8_t pdev_id; + uint8_t ctr; psoc_priv_obj = reg_get_psoc_obj(psoc); if (!psoc_priv_obj) { @@ -375,8 +376,14 @@ QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_FAILURE; } - pdev_id = psoc_priv_obj->def_pdev_id; - psoc_priv_obj->new_11d_ctry_pending[pdev_id] = true; + /* + * Need firmware to send channel list event + * for all phys. Therefore set pdev_id to 0xFF + */ + pdev_id = 0xFF; + for (ctr = 0; ctr < psoc_priv_obj->num_phy; ctr++) + psoc_priv_obj->new_11d_ctry_pending[ctr] = true; + qdf_mem_copy(country_code.country, country, REG_ALPHA2_LEN + 1); country_code.pdev_id = pdev_id; @@ -386,7 +393,9 @@ QDF_STATUS reg_save_new_11d_country(struct wlan_objmgr_psoc *psoc, tx_ops->set_country_code(psoc, &country_code); } else { reg_err("country set handler is not present"); - psoc_priv_obj->new_11d_ctry_pending[pdev_id] = false; + for (ctr = 0; ctr < psoc_priv_obj->num_phy; ctr++) + psoc_priv_obj->new_11d_ctry_pending[ctr] = + false; return QDF_STATUS_E_FAULT; } } diff --git a/umac/regulatory/core/src/reg_priv_objs.c b/umac/regulatory/core/src/reg_priv_objs.c index cd5ff6ce1af7..026f04990171 100644 --- a/umac/regulatory/core/src/reg_priv_objs.c +++ b/umac/regulatory/core/src/reg_priv_objs.c @@ -93,7 +93,6 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification( soc_reg_obj->restart_beaconing = CH_AVOID_RULE_RESTART; soc_reg_obj->enable_srd_chan_in_master_mode = true; soc_reg_obj->enable_11d_in_world_mode = false; - soc_reg_obj->def_pdev_id = -1; for (i = 0; i < MAX_STA_VDEV_CNT; i++) soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID; @@ -185,13 +184,6 @@ QDF_STATUS wlan_regulatory_pdev_obj_created_notification( return QDF_STATUS_E_FAULT; } - if (psoc_priv_obj->def_pdev_id == -1) { - reg_debug("marking pdev with id %d", pdev_id); - psoc_priv_obj->def_pdev_id = pdev_id; - } else { - reg_debug("not marking this pdev"); - } - pdev_priv_obj->pdev_ptr = pdev; pdev_priv_obj->dfs_enabled = psoc_priv_obj->dfs_enabled; pdev_priv_obj->set_fcc_channel = false; @@ -288,13 +280,6 @@ QDF_STATUS wlan_regulatory_pdev_obj_destroyed_notification( pdev_priv_obj->pdev_ptr = NULL; - if (psoc_priv_obj->def_pdev_id == pdev_id) { - reg_debug("deleting marked pdev"); - psoc_priv_obj->def_pdev_id = -1; - } else { - reg_debug("deleting unmarked pdev"); - } - status = wlan_objmgr_pdev_component_obj_detach( pdev, WLAN_UMAC_COMP_REGULATORY, pdev_priv_obj); diff --git a/umac/regulatory/core/src/reg_priv_objs.h b/umac/regulatory/core/src/reg_priv_objs.h index 031a8b6b2d6c..35eec2f3abd3 100644 --- a/umac/regulatory/core/src/reg_priv_objs.h +++ b/umac/regulatory/core/src/reg_priv_objs.h @@ -86,7 +86,6 @@ struct chan_change_cbk_entry { * country update is pending for pdev (phy_id). * @world_country_pending: In this array, element[phy_id] is true if any world * country update is pending for pdev (phy_id). - * @def_pdev_id: Default pdev id, used in case of MCL */ struct wlan_regulatory_psoc_priv_obj { struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP]; @@ -132,7 +131,6 @@ struct wlan_regulatory_psoc_priv_obj { bool force_ssc_disable_indoor_channel; bool enable_srd_chan_in_master_mode; bool enable_11d_in_world_mode; - int8_t def_pdev_id; qdf_spinlock_t cbk_list_lock; };