diff options
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/Peripherals/FM/MAC/fman_memac.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/Peripherals/FM/MAC/fman_memac.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/Peripherals/FM/MAC/fman_memac.c b/drivers/net/ethernet/freescale/fman/Peripherals/FM/MAC/fman_memac.c index ad0955d..145fb03 100644 --- a/drivers/net/ethernet/freescale/fman/Peripherals/FM/MAC/fman_memac.c +++ b/drivers/net/ethernet/freescale/fman/Peripherals/FM/MAC/fman_memac.c @@ -230,6 +230,18 @@ void fman_memac_set_exception(struct memac_regs *regs, uint32_t val, bool enable iowrite32be(tmp, ®s->imask); } +void fman_memac_reset_filter_table(struct memac_regs *regs) +{ + uint32_t i; + for (i = 0; i < 64; i++) + iowrite32be(i & ~HASH_CTRL_MCAST_EN, ®s->hashtable_ctrl); +} + +void fman_memac_set_hash_table_entry(struct memac_regs *regs, uint32_t crc) +{ + iowrite32be(crc | HASH_CTRL_MCAST_EN, ®s->hashtable_ctrl); +} + void fman_memac_set_hash_table(struct memac_regs *regs, uint32_t val) { iowrite32be(val, ®s->hashtable_ctrl); |