Bug 23815 - Can't get the bandwidth information from the eepro100 driver
Summary: Can't get the bandwidth information from the eepro100 driver
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 6.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Doug Ledford
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2004-09-30 15:38:53 UTC
Embargoed:


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
persists.

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.