else if (fec->xcv_type == RMII)
rcntrl |= FEC_RCNTRL_RMII;
+ if (fec->promisc)
+ rcntrl |= 0x8;
+
writel(rcntrl, &fec->eth->r_cntrl);
}
return fec_get_hwaddr(priv->dev_id, pdata->enetaddr);
}
+static int fecmxc_set_promisc(struct udevice *dev, bool enable)
+{
+ struct fec_priv *priv = dev_get_priv(dev);
+
+ priv->promisc = enable;
+
+ return 0;
+}
+
static int fecmxc_free_pkt(struct udevice *dev, uchar *packet, int length)
{
if (packet)
.stop = fecmxc_halt,
.write_hwaddr = fecmxc_set_hwaddr,
.read_rom_hwaddr = fecmxc_read_rom_hwaddr,
+ .set_promisc = fecmxc_set_promisc,
};
static int device_get_phy_addr(struct fec_priv *priv, struct udevice *dev)