qcacmn: Fix compilation errors for primary umac migration API

Fix compilation errors for primary umac migration API

Change-Id: I3edad34b54581b662725379ec7267fe3ffd5b22b
CRs-Fixed: 3444960
This commit is contained in:
Neha Bisht
2023-03-25 13:12:57 +05:30
committed by Madan Koyyalamudi
parent 0562ed7a5e
commit 3c4357c783
2 changed files with 65 additions and 38 deletions

View File

@@ -2948,6 +2948,61 @@ dp_primary_link_migration(struct dp_soc *soc, void *cb_ctxt,
qdf_mem_free(pr_peer_info); qdf_mem_free(pr_peer_info);
} }
#ifdef WLAN_SUPPORT_PPEDS
static QDF_STATUS dp_get_ppe_info_for_vap(struct cdp_soc_t *cdp_soc,
struct dp_soc *mld_soc,
struct dp_peer *pr_peer,
uint16_t *src_info)
{
struct dp_soc_be *be_soc_mld = NULL;
struct cdp_ds_vp_params vp_params = {0};
struct dp_ppe_vp_profile *ppe_vp_profile;
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
/*
* Extract the VP profile from the VAP
*/
if (!cdp_soc->ol_ops->get_ppeds_profile_info_for_vap) {
dp_err("%pK: Register get ppeds profile info first", cdp_soc);
return QDF_STATUS_E_NULL_VALUE;
}
/*
* Check if PPE DS routing is enabled on the associated vap.
*/
qdf_status = cdp_soc->ol_ops->get_ppeds_profile_info_for_vap(
mld_soc->ctrl_psoc,
pr_peer->vdev->vdev_id,
&vp_params);
if (QDF_IS_STATUS_ERROR(qdf_status)) {
dp_err("Could not find ppeds profile info");
return QDF_STATUS_E_NULL_VALUE;
}
/* Check if PPE DS routing is enabled on
* the associated vap.
*/
if (vp_params.ppe_vp_type != PPE_VP_USER_TYPE_DS)
return qdf_status;
be_soc_mld = dp_get_be_soc_from_dp_soc(mld_soc);
ppe_vp_profile = &be_soc_mld->ppe_vp_profile[
vp_params.ppe_vp_profile_idx];
*src_info = ppe_vp_profile->vp_num;
return qdf_status;
}
#else
static QDF_STATUS dp_get_ppe_info_for_vap(struct cdp_soc_t *cdp_soc,
struct dp_soc *mld_soc,
struct dp_peer *pr_peer,
uint16_t *src_info)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
QDF_STATUS dp_htt_reo_migration(struct dp_soc *soc, uint16_t peer_id, QDF_STATUS dp_htt_reo_migration(struct dp_soc *soc, uint16_t peer_id,
uint16_t ml_peer_id, uint16_t vdev_id, uint16_t ml_peer_id, uint16_t vdev_id,
uint8_t pdev_id, uint8_t chip_id) uint8_t pdev_id, uint8_t chip_id)
@@ -2965,12 +3020,8 @@ QDF_STATUS dp_htt_reo_migration(struct dp_soc *soc, uint16_t peer_id,
struct dp_peer *current_pr_peer = NULL; struct dp_peer *current_pr_peer = NULL;
struct dp_peer_info *peer_info; struct dp_peer_info *peer_info;
struct dp_vdev_be *be_vdev; struct dp_vdev_be *be_vdev;
struct cdp_ds_vp_params vp_params = {0};
struct cdp_soc_t *cdp_soc; struct cdp_soc_t *cdp_soc;
struct dp_soc_be *be_soc_mld = NULL; uint16_t src_info = 0;
struct dp_ppe_vp_profile *ppe_vp_profile;
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
uint16_t src_info;
QDF_STATUS status; QDF_STATUS status;
if (!dp_mlo) { if (!dp_mlo) {
@@ -3014,36 +3065,12 @@ QDF_STATUS dp_htt_reo_migration(struct dp_soc *soc, uint16_t peer_id,
mld_soc = mld_peer->vdev->pdev->soc; mld_soc = mld_peer->vdev->pdev->soc;
cdp_soc = &mld_soc->cdp_soc; cdp_soc = &mld_soc->cdp_soc;
/* status = dp_get_ppe_info_for_vap(cdp_soc, mld_soc, pr_peer, &src_info);
* Extract the VP profile from the VAP if (status == QDF_STATUS_E_NULL_VALUE) {
*/ dp_htt_err("Invalid ppe info for the vdev");
if (!cdp_soc->ol_ops->get_ppeds_profile_info_for_vap) { return QDF_STATUS_E_FAILURE;
dp_err("%pK: Register get ppeds profile info first\n", cdp_soc);
return QDF_STATUS_E_NULL_VALUE;
} }
/*
* Check if PPE DS routing is enabled on the associated vap.
*/
qdf_status = cdp_soc->ol_ops->get_ppeds_profile_info_for_vap(
mld_soc->ctrl_psoc,
pr_peer->vdev->vdev_id,
&vp_params);
if (qdf_status == QDF_STATUS_E_NULL_VALUE) {
dp_err("%pK: Could not find ppeds profile info \n", be_vdev);
return QDF_STATUS_E_NULL_VALUE;
}
/* Check if PPE DS routing is enabled on
* the associated vap.
*/
if (vp_params.ppe_vp_type != PPE_VP_USER_TYPE_DS)
return qdf_status;
be_soc_mld = dp_get_be_soc_from_dp_soc(mld_soc);
ppe_vp_profile = &be_soc_mld->ppe_vp_profile[
vp_params.ppe_vp_profile_idx];
src_info = ppe_vp_profile->vp_num;
current_pr_soc = current_pr_peer->vdev->pdev->soc; current_pr_soc = current_pr_peer->vdev->pdev->soc;
/* Making existing primary peer as non primary */ /* Making existing primary peer as non primary */
current_pr_peer->primary_link = 0; current_pr_peer->primary_link = 0;

View File

@@ -2421,7 +2421,7 @@ dp_h2t_ptqm_migration_msg_send(struct dp_soc *dp_soc, uint16_t vdev_id,
msg = qdf_nbuf_alloc( msg = qdf_nbuf_alloc(
soc->osdev, soc->osdev,
HTT_MSG_BUF_SIZE(HTT_H2T_REO_MIGRATION_RESP_MSG_SZ), HTT_MSG_BUF_SIZE(sizeof(htt_h2t_primary_link_peer_migrate_resp_t)),
HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING, 4, TRUE); HTC_HEADER_LEN + HTC_HDR_ALIGNMENT_PADDING, 4, TRUE);
if (!msg) if (!msg)
@@ -2433,7 +2433,7 @@ dp_h2t_ptqm_migration_msg_send(struct dp_soc *dp_soc, uint16_t vdev_id,
* separately during the below call to qdf_nbuf_push_head. * separately during the below call to qdf_nbuf_push_head.
* The contribution from the HTC header is added separately inside HTC. * The contribution from the HTC header is added separately inside HTC.
*/ */
if (qdf_nbuf_put_tail(msg, HTT_H2T_REO_MIGRATION_RESP_MSG_SZ) if (qdf_nbuf_put_tail(msg, sizeof(htt_h2t_primary_link_peer_migrate_resp_t))
== NULL) { == NULL) {
dp_htt_err("Failed to expand head for" dp_htt_err("Failed to expand head for"
"HTT_H2T_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_RESP"); "HTT_H2T_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_RESP");
@@ -2442,7 +2442,7 @@ dp_h2t_ptqm_migration_msg_send(struct dp_soc *dp_soc, uint16_t vdev_id,
} }
msg_word = (uint32_t *)qdf_nbuf_data(msg); msg_word = (uint32_t *)qdf_nbuf_data(msg);
memset(msg_word, 0, HTT_H2T_REO_MIGRATION_RESP_MSG_SZ); memset(msg_word, 0, sizeof(htt_h2t_primary_link_peer_migrate_resp_t));
qdf_nbuf_push_head(msg, HTC_HDR_ALIGNMENT_PADDING); qdf_nbuf_push_head(msg, HTC_HDR_ALIGNMENT_PADDING);
htt_logger_bufp = (uint8_t *)msg_word; htt_logger_bufp = (uint8_t *)msg_word;
@@ -2464,8 +2464,8 @@ dp_h2t_ptqm_migration_msg_send(struct dp_soc *dp_soc, uint16_t vdev_id,
/* word 1 */ /* word 1 */
msg_word++; msg_word++;
*msg_word = 0; *msg_word = 0;
HTT_H2T_PRIMARY_LINK_PEER_MIGRATE_SRCINFO_SET(*msg_word, HTT_H2T_PRIMARY_LINK_PEER_MIGRATE_SRC_INFO_SET(*msg_word,
src_info); src_info);
HTT_H2T_PRIMARY_LINK_PEER_MIGRATE_STATUS_SET(*msg_word, HTT_H2T_PRIMARY_LINK_PEER_MIGRATE_STATUS_SET(*msg_word,
status); status);