ravb: Add stats_len to struct ravb_hw_info
authorBiju Das <biju.das.jz@bp.renesas.com>
Wed, 18 Aug 2021 19:07:56 +0000 (20:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Aug 2021 11:05:15 +0000 (12:05 +0100)
commit25154301fc2bcc1d949a42218e4dfb870f0f1794
tree55416fa5dfb6023b3b4e8bfea0d13b0bedcec2ea
parentcb01c672c2a7aded88915e475463fe1128dc76d7
ravb: Add stats_len to struct ravb_hw_info

R-Car provides 30 device stats, whereas RZ/G2L provides only 15. In
addition, RZ/G2L has stats "rx_queue_0_csum_offload_errors" instead of
"rx_queue_0_missed_errors".

Replace RAVB_STATS_LEN macro with a structure variable stats_len to
struct ravb_hw_info, to support subsequent SoCs without any code changes
to the ravb_get_sset_count function.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/ravb.h
drivers/net/ethernet/renesas/ravb_main.c