qcacmn: Handle RX exception from IPA on WDS-EXT netdev

When WDS_EXT feature is enable, Host needs to redirect
the data packets to WDS extended netdevice.

Change is added the support for forwarding the RX packets
when received from IPA as an exception by deriving the
correct netdevice interface.

Change-Id: I083a1acc72023f3ebe6ea36ec05a5706f89c16bc
CRs-Fixed: 3597357
This commit is contained in:
Gaurav Saini
2023-09-11 14:34:54 +05:30
committed by Rahul Choudhary
parent f58bde59f4
commit b64de0cf4a
11 changed files with 200 additions and 3 deletions

View File

@@ -12272,6 +12272,7 @@ static struct cdp_cmn_ops dp_ops_cmn = {
#ifdef QCA_SUPPORT_WDS_EXTENDED
.set_wds_ext_peer_rx = dp_wds_ext_set_peer_rx,
.get_wds_ext_peer_osif_handle = dp_wds_ext_get_peer_osif_handle,
.set_wds_ext_peer_bit = dp_wds_ext_set_peer_bit,
#endif /* QCA_SUPPORT_WDS_EXTENDED */
#if defined(FEATURE_RUNTIME_PM) || defined(DP_POWER_SAVE)
@@ -13142,6 +13143,9 @@ static struct cdp_ipa_ops dp_ops_ipa = {
.ipa_rx_buf_smmu_pool_mapping = dp_ipa_rx_buf_pool_smmu_mapping,
.ipa_set_smmu_mapped = dp_ipa_set_smmu_mapped,
.ipa_get_smmu_mapped = dp_ipa_get_smmu_mapped,
#ifdef QCA_SUPPORT_WDS_EXTENDED
.ipa_rx_wdsext_iface = dp_ipa_rx_wdsext_iface,
#endif
#ifdef QCA_ENHANCED_STATS_SUPPORT
.ipa_update_peer_rx_stats = dp_ipa_update_peer_rx_stats,
#endif
@@ -14046,6 +14050,29 @@ QDF_STATUS dp_wds_ext_get_peer_osif_handle(
return QDF_STATUS_SUCCESS;
}
QDF_STATUS dp_wds_ext_set_peer_bit(ol_txrx_soc_handle soc, uint8_t *mac)
{
struct dp_txrx_peer *txrx_peer = NULL;
struct dp_peer *peer = dp_peer_find_hash_find((struct dp_soc *)soc,
mac, 0, DP_VDEV_ALL,
DP_MOD_ID_IPA);
if (!peer) {
dp_cdp_debug("%pK: Peer is NULL!\n", (struct dp_soc *)soc);
return QDF_STATUS_E_INVAL;
}
txrx_peer = dp_get_txrx_peer(peer);
if (!txrx_peer) {
dp_peer_unref_delete(peer, DP_MOD_ID_IPA);
return QDF_STATUS_E_INVAL;
}
qdf_atomic_test_and_set_bit(WDS_EXT_PEER_INIT_BIT,
&txrx_peer->wds_ext.init);
dp_peer_unref_delete(peer, DP_MOD_ID_IPA);
return QDF_STATUS_SUCCESS;
}
#endif /* QCA_SUPPORT_WDS_EXTENDED */
/**