diff --git a/target_if/cfr/inc/target_if_cfr.h b/target_if/cfr/inc/target_if_cfr.h index 0f4ebddfef5b..237aaee8dfc5 100644 --- a/target_if/cfr/inc/target_if_cfr.h +++ b/target_if/cfr/inc/target_if_cfr.h @@ -131,6 +131,29 @@ int target_if_cfr_get_target_type(struct wlan_objmgr_psoc *psoc); void target_if_cfr_set_cfr_support(struct wlan_objmgr_psoc *psoc, uint8_t value); +/** + * target_if_cfr_set_capture_count_support() - Function to set capture count + * support. + * @psoc: pointer to psoc object + * @value: value to be set + * + * Return: success/failure + */ +QDF_STATUS +target_if_cfr_set_capture_count_support(struct wlan_objmgr_psoc *psoc, + uint8_t value); + +/** + * target_if_cfr_set_mo_marking_support() - Function to set MO marking support + * @psoc: pointer to psoc object + * @value: value to be set + * + * Return: success/failure + */ +QDF_STATUS +target_if_cfr_set_mo_marking_support(struct wlan_objmgr_psoc *psoc, + uint8_t value); + /** * target_if_cfr_info_send() - Function to send cfr info to upper layers * @pdev: pointer to pdev object diff --git a/target_if/cfr/src/target_if_cfr.c b/target_if/cfr/src/target_if_cfr.c index 17bd5d5b6fdb..09b7dedcc8d6 100644 --- a/target_if/cfr/src/target_if_cfr.c +++ b/target_if/cfr/src/target_if_cfr.c @@ -509,6 +509,44 @@ void target_if_cfr_set_cfr_support(struct wlan_objmgr_psoc *psoc, rx_ops->cfr_rx_ops.cfr_support_set(psoc, value); } +QDF_STATUS +target_if_cfr_set_capture_count_support(struct wlan_objmgr_psoc *psoc, + uint8_t value) +{ + struct wlan_lmac_if_rx_ops *rx_ops; + + rx_ops = wlan_psoc_get_lmac_if_rxops(psoc); + if (!rx_ops) { + cfr_err("rx_ops is NULL"); + return QDF_STATUS_E_INVAL; + } + + if (rx_ops->cfr_rx_ops.cfr_capture_count_support_set) + return rx_ops->cfr_rx_ops.cfr_capture_count_support_set( + psoc, value); + + return QDF_STATUS_E_INVAL; +} + +QDF_STATUS +target_if_cfr_set_mo_marking_support(struct wlan_objmgr_psoc *psoc, + uint8_t value) +{ + struct wlan_lmac_if_rx_ops *rx_ops; + + rx_ops = wlan_psoc_get_lmac_if_rxops(psoc); + if (!rx_ops) { + cfr_err("rx_ops is NULL"); + return QDF_STATUS_E_INVAL; + } + + if (rx_ops->cfr_rx_ops.cfr_mo_marking_support_set) + return rx_ops->cfr_rx_ops.cfr_mo_marking_support_set( + psoc, value); + + return QDF_STATUS_E_INVAL; +} + void target_if_cfr_info_send(struct wlan_objmgr_pdev *pdev, void *head, size_t hlen, void *data, size_t dlen, void *tail, size_t tlen) diff --git a/target_if/cfr/src/target_if_cfr_enh.c b/target_if/cfr/src/target_if_cfr_enh.c index adc3df8392e3..9cd0cd8b82fd 100644 --- a/target_if/cfr/src/target_if_cfr_enh.c +++ b/target_if/cfr/src/target_if_cfr_enh.c @@ -1642,6 +1642,7 @@ QDF_STATUS cfr_enh_init_pdev(struct wlan_objmgr_psoc *psoc, QDF_STATUS status = QDF_STATUS_SUCCESS; struct pdev_cfr *pcfr; uint32_t target_type; + struct psoc_cfr *cfr_sc; if (!pdev) { cfr_err("PDEV is NULL!"); @@ -1660,6 +1661,14 @@ QDF_STATUS cfr_enh_init_pdev(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_NULL_VALUE; } + cfr_sc = wlan_objmgr_psoc_get_comp_private_obj(psoc, + WLAN_UMAC_COMP_CFR); + + if (!cfr_sc) { + cfr_err("cfr_sc is NULL"); + return QDF_STATUS_E_NULL_VALUE; + } + target_type = target_if_cfr_get_target_type(psoc); #if DIRECT_BUF_RX_ENABLE @@ -1682,6 +1691,9 @@ QDF_STATUS cfr_enh_init_pdev(struct wlan_objmgr_psoc *psoc, pcfr->rcc_param.num_grp_tlvs = MAX_TA_RA_ENTRIES; pcfr->rcc_param.vdev_id = CFR_INVALID_VDEV_ID; pcfr->rcc_param.srng_id = DEFAULT_SRNGID_CFR; + pcfr->is_cap_interval_mode_sel_support = + cfr_sc->is_cap_interval_mode_sel_support; + pcfr->is_mo_marking_support = cfr_sc->is_mo_marking_support; target_if_cfr_default_ta_ra_config(&pcfr->rcc_param, true, MAX_RESET_CFG_ENTRY);