From: Kishore Padmanabha <[email protected]>

Promiscuous mode set is only supported on Thor and Thor2 platforms,
not on Whitney. Skip the operation on unsupported platforms instead
of proceeding.

Fixes: c9a3c921d0c3 ("net/bnxt/tf_ulp: support unicast-only feature")
Cc: [email protected]

Signed-off-by: Kishore Padmanabha <[email protected]>
Signed-off-by: Manish Kurup <[email protected]>
---
 drivers/net/bnxt/tf_ulp/ulp_def_rules.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c 
b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
index 8ff3c24993..e37ba29488 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_def_rules.c
@@ -829,6 +829,10 @@ bnxt_ulp_promisc_mode_set(struct bnxt *bp, uint8_t enable)
            !bp->ulp_ctx)
                return rc;
 
+       /* This mode set is supported only on thor and thor2 */
+       if (!BNXT_CHIP_P5_P7(bp))
+               return rc;
+
        port_id = bp->eth_dev->data->port_id;
        info = &bp->ulp_ctx->cfg_data->df_rule_info[port_id];
 
-- 
2.31.1

Reply via email to