]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: drop port_sts from qca8k_priv
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 15 Apr 2022 23:30:13 +0000 (01:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Apr 2022 12:28:28 +0000 (13:28 +0100)
commit798800fbca45b4e97cb221150818ff065c300410
treef2b1a5288e1165e23c361494be756ce60e9a91d7
parente07aecb4ba247f3c5d0dd9f03a8de61421449b35
net: dsa: qca8k: drop port_sts from qca8k_priv

Port_sts is a thing of the past for this driver. It was something
present on the initial implementation of this driver and parts of the
original struct were dropped over time. Using an array of int to store if
a port is enabled or not to handle PM operation seems overkill. Switch
and use a simple u8 to store the port status where each bit correspond
to a port. (bit is set port is enabled, bit is not set, port is disabled)
Also add some comments to better describe why we need to track port
status.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h