diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2020-09-10 23:27:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-12 03:34:39 +0300 |
commit | b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1 (patch) | |
tree | 6750bc1de3518bda20085ce019fb47451ed9618a /drivers/net/ethernet/ti/cpsw_ethtool.c | |
parent | c4f3341700c51948cbfb2a37e7ff6d9b43eb1ce2 (diff) | |
download | linux-b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1.tar.xz |
net: ethernet: ti: ale: add cpsw_ale_get_num_entries api
Add cpsw_ale_get_num_entries() API to return number of ALE table entries
and update existing drivers to use it.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_ethtool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index fa54efe3be63..4d02c5135611 100644 --- a/drivers/net/ethernet/ti/cpsw_ethtool.c +++ b/drivers/net/ethernet/ti/cpsw_ethtool.c @@ -339,7 +339,8 @@ int cpsw_get_regs_len(struct net_device *ndev) { struct cpsw_common *cpsw = ndev_to_cpsw(ndev); - return cpsw->data.ale_entries * ALE_ENTRY_WORDS * sizeof(u32); + return cpsw_ale_get_num_entries(cpsw->ale) * + ALE_ENTRY_WORDS * sizeof(u32); } void cpsw_get_regs(struct net_device *ndev, struct ethtool_regs *regs, void *p) |