Bug 23815 - Can't get the bandwidth information from the eepro100 driver
Can't get the bandwidth information from the eepro100 driver
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Doug Ledford
Brock Organ
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2001-01-11 15:36 EST by Gene Chang
Modified: 2008-08-01 12:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-30 11:38:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Gene Chang 2001-01-11 15:36:17 EST
There is no way for an application to get the Ethernet bandwidth 
information from eepro100(version 1.18). I have a work around by adding 
the following code to the driver(after line 1932):

case SIOCDEVPRIVATE+3:		/* return the bandwidth */
    short data = mdio_read(ioaddr, phy, 0);
    if (data & 0x1000) /* Auto-negotiate? */ {
	data = mdio_read(ioaddr, phy, 16);
	rq->ifr_bandwidth = (data & 0x0002) ? 100000000 : 10000000;
    } else {
	rq->ifr_bandwidth = (data & 0x2000) ? 100000000 : 10000000;
return 0;
And use the following code in the application to get the bandwidth:
    fd = socket(AF_INET, SOCK_DGRAM, 0);
    strcpy(req.ifr_name, "eth0");
    if (ioctl(fd, SIOCDEVPRIVATE+3, &req) != -1) 
        bandWidth = req.ifr_bandwidth;

It would be nice to have a special ioctl to get these information.
Comment 1 Bugzilla owner 2004-09-30 11:38:53 EDT
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem

The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases, 
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/

Note You need to log in before you can comment on or make changes to this bug.