Staging: at76_usb: fix !CONFIG_WIRELESS_EXT build
authorAlexander Beregalov <a.beregalov@gmail.com>
Fri, 3 Jul 2009 12:25:50 +0000 (16:25 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:36 +0000 (12:01 -0700)
Fix this build error when CONFIG_WIRELESS_EXT is not set
at76_usb.c:5322: error: 'struct net_device' has no member named 'wireless_data'
at76_usb.c:5325: error: 'struct net_device' has no member named 'wireless_handlers'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/at76_usb/at76_usb.c

index c165c50c011944d7139831702594ca982f46db34..97aef78d42f0806934093c6dba8e329ce988c107 100644 (file)
@@ -5319,10 +5319,12 @@ static int at76_init_new_device(struct at76_priv *priv,
 
        /* Add pointers to enable iwspy support. */
        priv->wireless_data.spy_data = &priv->spy_data;
+#ifdef CONFIG_WIRELESS_EXT
        netdev->wireless_data = &priv->wireless_data;
+       netdev->wireless_handlers = &at76_handler_def;
+#endif
 
        netdev->watchdog_timeo = 2 * HZ;
-       netdev->wireless_handlers = &at76_handler_def;
        dev_alloc_name(netdev, "wlan%d");
 
        ret = register_netdev(priv->netdev);