lkml.org 
[lkml]   [2007]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH]drivers/net/phy/: default return value in ioctl phy.c
Date
Hello Andy,

This patch (to 2.6.23.9) add a default return value EOPNOTSUPP to the ioctl
function. The problem with the always 0 return value is that the iwconfig
(wireless) tool found a valid device when an ethernet device uses the phy
abstraction layer.
I 've tetsted this with the macb driver.


Signed-off-by: Rini van Zetten <rini@arvoo.nl>

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index cb230f4..c07460d 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -405,6 +405,8 @@ int phy_mii_ioctl(struct phy_device *phydev,
&& phydev->drv->config_init)
phydev->drv->config_init(phydev);
break;
+ default:
+ return -EOPNOTSUPP;
}

return 0;


\
 
 \ /
  Last update: 2007-12-11 16:23    [W:0.038 / U:2.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site