Bug 23815 - Can't get the bandwidth information from the eepro100 driver
Summary: Can't get the bandwidth information from the eepro100 driver
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Brock Organ
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2001-01-11 20:36 UTC by Gene Chang
Modified: 2008-08-01 16:22 UTC (History)
1 user (show)

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

Attachments (Terms of Use)

Description Gene Chang 2001-01-11 20:36:17 UTC
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 15:38:53 UTC
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.