[qca-nss-drv]: Support for 4 LAG group
Change-Id: I6e13d4e5fd2362eaf65d8d1e8b789a0404b6234e
Signed-off-by: Suman Ghosh <sumang@codeaurora.org>
diff --git a/nss_lag.c b/nss_lag.c
index add20e8..63960b4 100644
--- a/nss_lag.c
+++ b/nss_lag.c
@@ -75,7 +75,8 @@
{
uint32_t features = 0;
- nss_assert((if_num == NSS_LAG0_INTERFACE_NUM) || (if_num == NSS_LAG1_INTERFACE_NUM));
+ nss_assert((if_num == NSS_LAG0_INTERFACE_NUM) || (if_num == NSS_LAG1_INTERFACE_NUM) ||
+ (if_num == NSS_LAG2_INTERFACE_NUM) || (if_num == NSS_LAG3_INTERFACE_NUM));
nss_top_main.subsys_dp_register[if_num].ndev = netdev;
nss_top_main.subsys_dp_register[if_num].cb = lag_cb;
@@ -97,7 +98,8 @@
*/
void nss_unregister_lag_if(uint32_t if_num)
{
- nss_assert((if_num == NSS_LAG0_INTERFACE_NUM) || (if_num == NSS_LAG1_INTERFACE_NUM));
+ nss_assert((if_num == NSS_LAG0_INTERFACE_NUM) || (if_num == NSS_LAG1_INTERFACE_NUM) ||
+ (if_num == NSS_LAG2_INTERFACE_NUM) || (if_num == NSS_LAG3_INTERFACE_NUM));
nss_top_main.subsys_dp_register[if_num].cb = NULL;
nss_top_main.subsys_dp_register[if_num].ndev = NULL;
@@ -121,7 +123,9 @@
nss_lag_event_callback_t cb;
BUG_ON(ncm->interface != NSS_LAG0_INTERFACE_NUM
- && ncm->interface != NSS_LAG1_INTERFACE_NUM);
+ && ncm->interface != NSS_LAG1_INTERFACE_NUM
+ && ncm->interface != NSS_LAG2_INTERFACE_NUM
+ && ncm->interface != NSS_LAG3_INTERFACE_NUM);
if (ncm->type >= NSS_TX_METADATA_LAG_MAX) {
nss_warning("%p: received invalid message %d for LAG interface", nss_ctx, ncm->type);
@@ -170,6 +174,8 @@
{
nss_core_register_handler(NSS_LAG0_INTERFACE_NUM, nss_lag_handler, NULL);
nss_core_register_handler(NSS_LAG1_INTERFACE_NUM, nss_lag_handler, NULL);
+ nss_core_register_handler(NSS_LAG2_INTERFACE_NUM, nss_lag_handler, NULL);
+ nss_core_register_handler(NSS_LAG3_INTERFACE_NUM, nss_lag_handler, NULL);
}
/**