aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/cpsw_ale.h
diff options
context:
space:
mode:
authorMugunthan V N <mugunthanvnm@ti.com>2014-07-22 23:25:07 +0530
committerDavid S. Miller <davem@davemloft.net>2014-07-22 19:58:25 -0700
commit52c4f0ec662bbf02f1b0bcb311a48af2c8e5ee89 (patch)
tree64293c54add14d887ffcd6fa1313238f0085d2b5 /drivers/net/ethernet/ti/cpsw_ale.h
parentdp83640: Fix receive timestamp race condition (diff)
downloadlinux-dev-52c4f0ec662bbf02f1b0bcb311a48af2c8e5ee89.tar.xz
linux-dev-52c4f0ec662bbf02f1b0bcb311a48af2c8e5ee89.zip
drivers: net: cpsw: add support to dump ALE table via ethtool register dump
Add support to view addresses added by the driver and learnt by the hardware from ALE table via ethtool register dump interface. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/ti/cpsw_ale.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_ale.h b/drivers/net/ethernet/ti/cpsw_ale.h
index de409c33b250..31cf43cab42e 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.h
+++ b/drivers/net/ethernet/ti/cpsw_ale.h
@@ -80,6 +80,9 @@ enum cpsw_ale_port_state {
#define ALE_MCAST_FWD_LEARN 2
#define ALE_MCAST_FWD_2 3
+#define ALE_ENTRY_BITS 68
+#define ALE_ENTRY_WORDS DIV_ROUND_UP(ALE_ENTRY_BITS, 32)
+
struct cpsw_ale *cpsw_ale_create(struct cpsw_ale_params *params);
int cpsw_ale_destroy(struct cpsw_ale *ale);
@@ -104,5 +107,6 @@ int cpsw_ale_del_vlan(struct cpsw_ale *ale, u16 vid, int port);
int cpsw_ale_control_get(struct cpsw_ale *ale, int port, int control);
int cpsw_ale_control_set(struct cpsw_ale *ale, int port,
int control, int value);
+void cpsw_ale_dump(struct cpsw_ale *ale, u32 *data);
#endif