diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2019-05-28 20:38:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-30 07:48:53 +0300 |
commit | 43de61959b999279bafb031c0c9bdf0f6cd1c501 (patch) | |
tree | 88b490ab74f6cfddfd73572fdd4fd9748fa4085b /include | |
parent | 44cc27e43fa3b8977373915a8e7f515a9d263343 (diff) | |
download | linux-43de61959b999279bafb031c0c9bdf0f6cd1c501.tar.xz |
net: phylink: Add PHYLINK_DEV operation type
In the PHYLINK_DEV operation type, the PHYLINK infrastructure can work
without an attached net_device. For printing usecases, instead, a struct
device * should be passed to PHYLINK using the phylink_config structure.
Also, netif_carrier_* calls ar guarded by the presence of a valid
net_device. When using the PHYLINK_DEV operation type, we cannot check
link status using the netif_carrier_ok() API so instead, keep an
internal state of the MAC and call mac_link_{down,up} only when the link
changed.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phylink.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 67f35f07ac4b..0f6f65bb9d44 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -56,6 +56,7 @@ struct phylink_link_state { enum phylink_op_type { PHYLINK_NETDEV = 0, + PHYLINK_DEV, }; /** |