summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas/sh_eth.h
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2012-02-15 21:55:03 +0400
committerDavid S. Miller <davem@davemloft.net>2012-02-17 02:08:09 +0400
commit6743fe6df43b4dc5950f605edfeee086d0a80f06 (patch)
tree38b3406e6d9f9b1b48ef87dee8c07c442e099b54 /drivers/net/ethernet/renesas/sh_eth.h
parent6ba88021c36516c26c11eff8c6d7d9a045faecd3 (diff)
downloadlinux-6743fe6df43b4dc5950f605edfeee086d0a80f06.tar.xz
net: sh_eth: add support for multicast filtering
Some controllers have TSU. It can filter multicast by hardware. This patch supports it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.h')
-rw-r--r--drivers/net/ethernet/renesas/sh_eth.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
index cb07add8638f..86b392e22c01 100644
--- a/drivers/net/ethernet/renesas/sh_eth.h
+++ b/drivers/net/ethernet/renesas/sh_eth.h
@@ -29,6 +29,8 @@
#define RX_RING_SIZE 64 /* Rx ring size */
#define ETHERSMALL 60
#define PKT_BUF_SZ 1538
+#define SH_ETH_TSU_TIMEOUT_MS 500
+#define SH_ETH_TSU_CAM_ENTRIES 32
enum {
/* E-DMAC registers */
@@ -778,6 +780,7 @@ struct sh_eth_private {
char post_rx; /* POST receive */
char post_fw; /* POST forward */
struct net_device_stats tsu_stats; /* TSU forward status */
+ int port; /* for TSU */
unsigned no_ether_link:1;
unsigned ether_link_active_low:1;
@@ -811,6 +814,12 @@ static inline unsigned long sh_eth_read(struct net_device *ndev,
return ioread32(mdp->addr + mdp->reg_offset[enum_index]);
}
+static inline void *sh_eth_tsu_get_offset(struct sh_eth_private *mdp,
+ int enum_index)
+{
+ return mdp->tsu_addr + mdp->reg_offset[enum_index];
+}
+
static inline void sh_eth_tsu_write(struct sh_eth_private *mdp,
unsigned long data, int enum_index)
{