]> git.baikalelectronics.ru Git - kernel.git/commit
network: add the missing phy_device speed information to phy_mii_ioctl
authorShan Lu <shanlu@cs.uiuc.edu>
Tue, 6 Mar 2007 10:42:03 +0000 (02:42 -0800)
committerJeff Garzik <jeff@garzik.org>
Sat, 28 Apr 2007 15:00:57 +0000 (11:00 -0400)
commite88d8005ec965fd083d7d8d2e35c099699ce9984
tree1ae2ab2e5f558bf3a8844a1b28d6ecbc3796b35e
parentecc482bc08f3576b1c19206972a6f9a75295118a
network: add the missing phy_device speed information to phy_mii_ioctl

Function `phy_mii_ioctl' returns physical device's information based on
user requests.  When requested to return the basic mode control register
information (BMCR), the original implementation only returns the physical
device's duplex information and forgets to return speed information, which
should not be because BMCR register is used to hold both duplex and speed
information.

The patch checks the BMCR value against speed-related flags and fills the
return structure's speed field accordingly.

Signed-off-by: Shan <shanlu@cs.uiuc.edu>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/phy/phy.c