summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-05-26 13:17:57 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2020-08-03 21:42:42 +0100
commit6539a57ca6a5a770f3b2cc709cb7227d0c175ea3 (patch)
treee500f9067340841c70c180e9624cbd31a8e820c2 /include/linux
parent099d69f8736268e4b1fd8178fbb656583ba923e6 (diff)
net: phy: split devices_in_package
We have two competing requirements for the devices_in_package field. We want to use it as a bit array indicating which MMDs are present, but we also want to know if the Clause 22 registers are present. Since "devices in package" is a term used in the 802.3 specification, keep this as the as-specified values read from the PHY, and introduce a new member "mmds_present" to indicate which MMDs are actually present in the PHY, derived from the "devices in package" value. Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/phy.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 7fc4ce613084..7b2f1beacf34 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -392,11 +392,13 @@ enum phy_state {
/**
* struct phy_c45_device_ids - 802.3-c45 Device Identifiers
- * @devices_in_package: Bit vector of devices present.
+ * @devices_in_package: IEEE 802.3 devices in package register value.
+ * @mmds_present: bit vector of MMDs present.
* @device_ids: The device identifer for each present device.
*/
struct phy_c45_device_ids {
u32 devices_in_package;
+ u32 mmds_present;
u32 device_ids[8];
};