wireless: implement basic ethtool support for cfg80211 devices
[linux-2.6.git] / net / wireless / core.c
index eb0bb24b99c39c3b12a29c380ff8cd8c1e875e8e..07252967be9ced2ee5b7dd6a5c003463b8b758df 100644 (file)
@@ -21,6 +21,7 @@
 #include "sysfs.h"
 #include "debugfs.h"
 #include "wext-compat.h"
+#include "ethtool.h"
 
 /* name for sysfs, %d is appended */
 #define PHY_NAME "phy"
@@ -690,6 +691,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
                                wdev->wext.ps = false;
                        }
 #endif
+               if (!dev->ethtool_ops)
+                       dev->ethtool_ops = &cfg80211_ethtool_ops;
                break;
        case NETDEV_GOING_DOWN:
                switch (wdev->iftype) {