+static void
+enetc_promiscuous_enable(struct rte_eth_dev *dev)
+{
+ struct enetc_eth_hw *hw =
+ ENETC_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct enetc_hw *enetc_hw = &hw->hw;
+ uint32_t psipmr = 0;
+
+ psipmr = enetc_port_rd(enetc_hw, ENETC_PSIPMR);
+
+ /* Setting to enable promiscuous mode*/
+ psipmr |= ENETC_PSIPMR_SET_UP(0) | ENETC_PSIPMR_SET_MP(0);
+
+ enetc_port_wr(enetc_hw, ENETC_PSIPMR, psipmr);
+}
+
+static void
+enetc_promiscuous_disable(struct rte_eth_dev *dev)
+{
+ struct enetc_eth_hw *hw =
+ ENETC_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct enetc_hw *enetc_hw = &hw->hw;
+ uint32_t psipmr = 0;
+
+ /* Setting to disable promiscuous mode for SI0*/
+ psipmr = enetc_port_rd(enetc_hw, ENETC_PSIPMR);
+ psipmr &= (~ENETC_PSIPMR_SET_UP(0));
+
+ if (dev->data->all_multicast == 0)
+ psipmr &= (~ENETC_PSIPMR_SET_MP(0));
+
+ enetc_port_wr(enetc_hw, ENETC_PSIPMR, psipmr);
+}
+
+static void
+enetc_allmulticast_enable(struct rte_eth_dev *dev)
+{
+ struct enetc_eth_hw *hw =
+ ENETC_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct enetc_hw *enetc_hw = &hw->hw;
+ uint32_t psipmr = 0;
+
+ psipmr = enetc_port_rd(enetc_hw, ENETC_PSIPMR);
+
+ /* Setting to enable allmulticast mode for SI0*/
+ psipmr |= ENETC_PSIPMR_SET_MP(0);
+
+ enetc_port_wr(enetc_hw, ENETC_PSIPMR, psipmr);
+}
+
+static void
+enetc_allmulticast_disable(struct rte_eth_dev *dev)
+{
+ struct enetc_eth_hw *hw =
+ ENETC_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ struct enetc_hw *enetc_hw = &hw->hw;
+ uint32_t psipmr = 0;
+
+ if (dev->data->promiscuous == 1)
+ return; /* must remain in all_multicast mode */
+
+ /* Setting to disable all multicast mode for SI0*/
+ psipmr = enetc_port_rd(enetc_hw, ENETC_PSIPMR) &
+ ~(ENETC_PSIPMR_SET_MP(0));
+
+ enetc_port_wr(enetc_hw, ENETC_PSIPMR, psipmr);
+}
+