X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev-provider.h;h=23de420f43559ef55c86df4c81187f9e428b77f5;hb=db16e36ed14cf7c50646e356a2b2401e23fcea70;hp=6887e7f95d98a20b6e857d7c399d102642b62e99;hpb=007948177581f3b3dad188221593d0e4bdca6ba0;p=openvswitch diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 6887e7f9..23de420f 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -263,13 +263,17 @@ struct netdev_class { */ int (*get_carrier)(const struct netdev *netdev, bool *carrier); - /* Sets 'miimon' to true if 'netdev' is up according to its MII. If - * 'netdev' does not support MII, may fall back to another method or return - * EOPNOTSUPP. + /* Forces ->get_carrier() to poll 'netdev''s MII registers for link status + * instead of checking 'netdev''s carrier. 'netdev''s MII registers will + * be polled once ever 'interval' milliseconds. If 'netdev' does not + * support MII, another method may be used as a fallback. If 'interval' is + * less than or equal to zero, reverts ->get_carrier() to its normal + * behavior. * - * This function may be set to null if it would always return EOPNOTSUPP. + * Most network devices won't support this feature and will set this + * function pointer to NULL, which is equivalent to returning EOPNOTSUPP. */ - int (*get_miimon)(const struct netdev *netdev, bool *miimon); + int (*set_miimon_interval)(struct netdev *netdev, long long int interval); /* Retrieves current device stats for 'netdev' into 'stats'. *