aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/mii.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2018-04-19 12:38:55 +0100
committerMichael Brown <mcb30@ipxe.org>2018-04-19 12:43:06 +0100
commit6804a8c89b8c31c3ef4e7e8ab03b82ebee41dd45 (patch)
treeceb234f68817ac16268c97b55771c0e0d16c9e7c /src/drivers/net/mii.c
parent285e3e5287358c2f904ad74fabac9fefcdb46150 (diff)
downloadipxe-6804a8c89b8c31c3ef4e7e8ab03b82ebee41dd45.tar.gz
[mii] Separate concepts of MII interface and MII device
We currently have no generic concept of a PHY address, since all existing implementations simply hardcode the PHY address within the MII access methods. A bit-bashing MII interface will need to be provided with an explicit PHY address in order to generate the correct waveform. Allow for this by separating out the concept of a MII device (i.e. a specific PHY address attached to a particular MII interface). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/mii.c')
-rw-r--r--src/drivers/net/mii.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/drivers/net/mii.c b/src/drivers/net/mii.c
index 9b297029a..f6db30740 100644
--- a/src/drivers/net/mii.c
+++ b/src/drivers/net/mii.c
@@ -37,10 +37,10 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
/**
* Restart autonegotiation
*
- * @v mii MII interface
+ * @v mii MII device
* @ret rc Return status code
*/
-int mii_restart ( struct mii_interface *mii ) {
+int mii_restart ( struct mii_device *mii ) {
int bmcr;
int rc;
@@ -66,12 +66,12 @@ int mii_restart ( struct mii_interface *mii ) {
}
/**
- * Reset MII interface
+ * Reset MII device
*
- * @v mii MII interface
+ * @v mii MII device
* @ret rc Return status code
*/
-int mii_reset ( struct mii_interface *mii ) {
+int mii_reset ( struct mii_device *mii ) {
unsigned int i;
int bmcr;
int rc;
@@ -119,11 +119,11 @@ int mii_reset ( struct mii_interface *mii ) {
/**
* Update link status via MII
*
- * @v mii MII interface
+ * @v mii MII device
* @v netdev Network device
* @ret rc Return status code
*/
-int mii_check_link ( struct mii_interface *mii, struct net_device *netdev ) {
+int mii_check_link ( struct mii_device *mii, struct net_device *netdev ) {
int bmsr;
int link;
int rc;