[qca-nss-drv] Modify subsystem dataplane registration APIs
Modify subsystem dataplane registration APIs to add features
argument which is used to determine the skb types supported by the interface.
Change-Id: Id9a30ada42d83d62043f976a7a2f9803c465106d
Signed-off-by: Sundarajan Srinivasan <sundaraj@codeaurora.org>
diff --git a/nss_tun6rd.c b/nss_tun6rd.c
index a147017..784a922 100644
--- a/nss_tun6rd.c
+++ b/nss_tun6rd.c
@@ -66,7 +66,7 @@
* callback
*/
cb = (nss_tun6rd_msg_callback_t)ncm->cb;
- ctx = nss_ctx->nss_top->if_ctx[ncm->interface];
+ ctx = nss_ctx->nss_top->subsys_dp_register[ncm->interface].ndev;
/*
* call 6rd tunnel callback
@@ -153,12 +153,15 @@
* nss_register_tun6rd_if()
*/
struct nss_ctx_instance *nss_register_tun6rd_if(uint32_t if_num, nss_tun6rd_callback_t tun6rd_callback,
- nss_tun6rd_msg_callback_t event_callback, struct net_device *netdev)
+ nss_tun6rd_msg_callback_t event_callback, struct net_device *netdev, uint32_t features)
{
nss_assert((if_num >= NSS_DYNAMIC_IF_START) && (if_num < NSS_SPECIAL_IF_START));
- nss_top_main.if_ctx[if_num] = netdev;
- nss_top_main.if_rx_callback[if_num] = tun6rd_callback;
+ nss_top_main.subsys_dp_register[if_num].ndev = netdev;
+ nss_top_main.subsys_dp_register[if_num].cb = tun6rd_callback;
+ nss_top_main.subsys_dp_register[if_num].app_data = NULL;
+ nss_top_main.subsys_dp_register[if_num].features = features;
+
nss_top_main.tun6rd_msg_callback = event_callback;
nss_core_register_handler(if_num, nss_tun6rd_handler, NULL);
@@ -181,8 +184,11 @@
{
nss_assert(nss_is_dynamic_interface(ncm->interface));
- nss_top_main.if_rx_callback[if_num] = NULL;
- nss_top_main.if_ctx[if_num] = NULL;
+ nss_top_main.subsys_dp_register[if_num].ndev = NULL;
+ nss_top_main.subsys_dp_register[if_num].cb = NULL;
+ nss_top_main.subsys_dp_register[if_num].app_data = NULL;
+ nss_top_main.subsys_dp_register[if_num].features = 0;
+
nss_top_main.tun6rd_msg_callback = NULL;
nss_core_unregister_handler(if_num);