Bug 23815
| Summary: | Can't get the bandwidth information from the eepro100 driver | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Gene Chang <gene.chang> |
| Component: | kernel | Assignee: | Doug Ledford <dledford> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Brock Organ <borgan> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2 | CC: | dr |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2004-09-30 15:38:53 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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/ |
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.