Commit b09c5c6d authored by Dan Williams's avatar Dan Williams
Browse files

2005-03-28 Dan Williams <dcbw@redhat.com>

	* src/NetworkManagerDevice.c
		- (mdio_read): Fix two bugs that caused all devices to fail
			the MII carrier detection support checks


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@514 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
parent 2c976390
2005-03-28 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c
- (mdio_read): Fix two bugs that caused all devices to fail
the MII carrier detection support checks
2005-03-26 Dan Williams <dcbw@redhat.com> 2005-03-26 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c * src/NetworkManagerDevice.c
......
...@@ -3895,13 +3895,13 @@ static int mdio_read (int sk, struct ifreq *ifr, int location) ...@@ -3895,13 +3895,13 @@ static int mdio_read (int sk, struct ifreq *ifr, int location)
{ {
struct mii_ioctl_data *mii; struct mii_ioctl_data *mii;
g_return_val_if_fail (sk < 0, -1); g_return_val_if_fail (sk >= 0, -1);
g_return_val_if_fail (ifr != NULL, -1); g_return_val_if_fail (ifr != NULL, -1);
mii = (struct mii_ioctl_data *) &(ifr->ifr_data); mii = (struct mii_ioctl_data *) &(ifr->ifr_data);
mii->reg_num = location; mii->reg_num = location;
if (ioctl (sk, SIOCGMIIREG, &ifr) < 0) if (ioctl (sk, SIOCGMIIREG, ifr) < 0)
return -1; return -1;
return (mii->val_out); return (mii->val_out);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment