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-11 17:34:39 -0700 |
commit | b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1 (patch) | |
tree | 6750bc1de3518bda20085ce019fb47451ed9618a /drivers/net/ethernet/ti/cpsw_ale.c | |
parent | c4f3341700c51948cbfb2a37e7ff6d9b43eb1ce2 (diff) | |
download | linux-b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1.tar.gz linux-b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1.tar.bz2 linux-b574bf0c6a8da461dcbe1c266ddd7e5ee10584a1.zip |
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_ale.c')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_ale.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c index 9ad872bfae3a..a94aef3f54a5 100644 --- a/drivers/net/ethernet/ti/cpsw_ale.c +++ b/drivers/net/ethernet/ti/cpsw_ale.c @@ -1079,3 +1079,8 @@ void cpsw_ale_dump(struct cpsw_ale *ale, u32 *data) data += ALE_ENTRY_WORDS; } } + +u32 cpsw_ale_get_num_entries(struct cpsw_ale *ale) +{ + return ale ? ale->params.ale_entries : 0; +} |