wl1251: use ELP wakeup interrupt instead of polling
[pandora-wifi.git] / drivers / net / wireless / wl12xx / wl1251_main.c
index 8b3e78e..fcc6829 100644 (file)
@@ -323,6 +323,25 @@ out:
        mutex_unlock(&wl->mutex);
 }
 
+/* Atomic irq handler */
+void wl1251_irq(struct wl1251 *wl)
+{
+       unsigned long flags;
+
+       wl1251_debug(DEBUG_IRQ, "IRQ");
+
+       /* complete the ELP completion */
+       spin_lock_irqsave(&wl->wl_lock, flags);
+       if (wl->elp_compl) {
+               complete(wl->elp_compl);
+               wl->elp_compl = NULL;
+       }
+       spin_unlock_irqrestore(&wl->wl_lock, flags);
+
+       ieee80211_queue_work(wl->hw, &wl->irq_work);
+}
+EXPORT_SYMBOL_GPL(wl1251_irq);
+
 static void wl1251_convert_filters(struct wl1251 *wl,
                                  unsigned int mac80211_filters)
 {