qcacmn: Move fill_umac_legacy_chanlist out of reg_propagate_mas_chan_list_to_pdev

In the change-id Ied56965c2e8d700a2fc14a5a2b79beed95ac7818,
the call of reg_propagate_mas_chan_list_to_pdev in pdev_obj_creation,
leads to a fatal assert.

Within reg_propagate_mas_chan_list_to_pdev,
ol_ath_fill_umac_legacy_chanlist is called, and internally
within ol_ath_fill_umac_legacy_chanlist, the cookie for the event
ic->ic_wait_for_init_cc_response is set, before the
ic->ic_wait_for_init_cc_response is created in the function
wlan_pdev_update_feature_ptr. This leads to a crash.

To fix this issue, separate fill_umac_legacy_chanlist from the function
reg_propagate_mas_chan_list_to_pdev and call fill_umac_legacy_chanlist
only when WMI_REG_CHAN_LIST_CC_EVENTID or
WMI_REG_CHAN_LIST_CC_EXT_EVENTID is received.

Change-Id: I5fcf85eed32d3ab2cd4fd88ad117fcf22c5875b2
CRs-Fixed: 3427982
Esse commit está contido em:
Hariharan Basuthkar
2023-03-22 14:22:08 +05:30
commit de Madan Koyyalamudi
commit 457c4a4d08

Ver arquivo

@@ -3272,15 +3272,10 @@ void reg_propagate_mas_chan_list_to_pdev(struct wlan_objmgr_psoc *psoc,
reg_modify_chan_list_for_outdoor(pdev_priv_obj);
reg_compute_pdev_current_chan_list(pdev_priv_obj);
if (reg_tx_ops->fill_umac_legacy_chanlist) {
reg_tx_ops->fill_umac_legacy_chanlist(
pdev, pdev_priv_obj->cur_chan_list);
} else {
if (*dir == NORTHBOUND)
reg_send_scheduler_msg_nb(psoc, pdev);
else
reg_send_scheduler_msg_sb(psoc, pdev);
}
if (*dir == NORTHBOUND)
reg_send_scheduler_msg_nb(psoc, pdev);
else
reg_send_scheduler_msg_sb(psoc, pdev);
}
/**
@@ -3601,6 +3596,30 @@ static inline QDF_STATUS reg_set_psoc_fcc_rules(
}
#endif
static QDF_STATUS
reg_propagate_mas_chan_list_and_fill_legacy_list(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_pdev *pdev,
enum direction dir,
wlan_objmgr_ref_dbgid dbg_id)
{
struct wlan_lmac_if_reg_tx_ops *reg_tx_ops;
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
reg_tx_ops = reg_get_psoc_tx_ops(psoc);
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 QDF_STATUS_E_FAILURE;
}
reg_propagate_mas_chan_list_to_pdev(psoc, pdev, &dir);
if (reg_tx_ops->fill_umac_legacy_chanlist)
reg_tx_ops->fill_umac_legacy_chanlist(pdev,
pdev_priv_obj->cur_chan_list);
return QDF_STATUS_SUCCESS;
}
#ifdef CONFIG_BAND_6GHZ
static void reg_init_2g_5g_master_chan(struct regulatory_channel *dst_list,
struct wlan_regulatory_psoc_priv_obj *soc_reg)
@@ -4271,8 +4290,12 @@ QDF_STATUS reg_process_master_chan_list_ext(
pdev = wlan_objmgr_get_pdev_by_id(psoc, pdev_id, dbg_id);
if (pdev) {
reg_propagate_mas_chan_list_to_pdev(psoc, pdev, &dir);
status = reg_propagate_mas_chan_list_and_fill_legacy_list(psoc,
pdev,
dir,
dbg_id);
wlan_objmgr_pdev_release_ref(pdev, dbg_id);
return status;
}
return QDF_STATUS_SUCCESS;
@@ -5456,8 +5479,12 @@ QDF_STATUS reg_process_master_chan_list(
pdev = wlan_objmgr_get_pdev_by_id(psoc, pdev_id, dbg_id);
if (pdev) {
reg_propagate_mas_chan_list_to_pdev(psoc, pdev, &dir);
status = reg_propagate_mas_chan_list_and_fill_legacy_list(psoc,
pdev,
dir,
dbg_id);
wlan_objmgr_pdev_release_ref(pdev, dbg_id);
return status;
}
return QDF_STATUS_SUCCESS;