net: ethernet: ti: ale: optimize ale entry mask bits configuartion
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 1 Dec 2017 00:21:17 +0000 (18:21 -0600)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Dec 2017 21:36:32 +0000 (16:36 -0500)
commitb5d31f29402791d9d4fadddb2f2d507fefd95939
treeda16a058b9449b8ea98202663e4b6c3d367dd500
parentd0aef029b53c70d6261ef9d4bd827c861d51a8ef
net: ethernet: ti: ale: optimize ale entry mask bits configuartion

The ale->params.ale_ports parameter can be used to deriver values for all
ale entry mask bits: port_mask_bits, port_mask_bits, port_num_bits.
Hence, calculate above values and drop all hardcoded values. For
port_num_bits calcualtion use order_base_2() API.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw_ale.c