Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[pandora-kernel.git] / drivers / net / wireless / at76c50x-usb.c
index 46ac9e2..0c02f1c 100644 (file)
  *
  * Some iw_handler code was taken from airo.c, (C) 1999 Benjamin Reed
  *
- * TODO for the mac80211 port:
- * o adhoc support
- * o RTS/CTS support
- * o Power Save Mode support
- * o support for short/long preambles
- * o export variables through debugfs/sysfs
- * o remove hex2str
- * o remove mac2str
+ * TODO list is at the wiki:
+ *
+ * http://wireless.kernel.org/en/users/Drivers/at76c50x-usb#TODO
+ *
  */
 
 #include <linux/init.h>
@@ -1497,6 +1493,9 @@ static void at76_work_set_promisc(struct work_struct *work)
                                              work_set_promisc);
        int ret = 0;
 
+       if (priv->device_unplugged)
+               return;
+
        mutex_lock(&priv->mtx);
 
        priv->mib_buf.type = MIB_LOCAL;
@@ -2269,7 +2268,7 @@ static int at76_init_new_device(struct at76_priv *priv,
 
        printk(KERN_INFO "%s: USB %s, MAC %s, firmware %d.%d.%d-%d\n",
               wiphy_name(priv->hw->wiphy),
-              interface->dev.bus_id, mac2str(priv->mac_addr),
+              dev_name(&interface->dev), mac2str(priv->mac_addr),
               priv->fw_version.major, priv->fw_version.minor,
               priv->fw_version.patch, priv->fw_version.build);
        printk(KERN_INFO "%s: regulatory domain 0x%02x: %s\n",
@@ -2290,6 +2289,7 @@ static void at76_delete_device(struct at76_priv *priv)
        tasklet_kill(&priv->rx_tasklet);
 
        if (priv->mac80211_registered) {
+               cancel_delayed_work(&priv->dwork_hw_scan);
                flush_workqueue(priv->hw->workqueue);
                ieee80211_unregister_hw(priv->hw);
        }
@@ -2307,6 +2307,8 @@ static void at76_delete_device(struct at76_priv *priv)
 
        kfree(priv->bulk_out_buffer);
 
+       del_timer_sync(&ledtrig_tx_timer);
+
        if (priv->rx_skb)
                kfree_skb(priv->rx_skb);