return ret;
}
-#define WL1251_IRQ_LOOP_COUNT 10
-static void wl1251_irq_work(struct work_struct *work)
+#define WL1251_IRQ_LOOP_COUNT 100
+irqreturn_t wl1251_irq(int irq, void *cookie)
{
u32 intr, ctr = WL1251_IRQ_LOOP_COUNT;
- struct wl1251 *wl =
- container_of(work, struct wl1251, irq_work);
+ struct wl1251 *wl = cookie;
int ret;
mutex_lock(&wl->mutex);
out:
mutex_unlock(&wl->mutex);
+ return IRQ_HANDLED;
+}
+EXPORT_SYMBOL_GPL(wl1251_irq);
+
+static void wl1251_irq_work(struct work_struct *work)
+{
+ struct wl1251 *wl =
+ container_of(work, struct wl1251, irq_work);
+
+ wl1251_irq(0, wl);
}
static int wl1251_join(struct wl1251 *wl, u8 bss_type, u8 channel,
sdio_release_host(func);
}
-/* Interrupts when using dedicated WLAN_IRQ pin */
-static irqreturn_t wl1251_line_irq(int irq, void *cookie)
-{
- struct wl1251 *wl = cookie;
-
- ieee80211_queue_work(wl->hw, &wl->irq_work);
-
- return IRQ_HANDLED;
-}
-
static void wl1251_enable_line_irq(struct wl1251 *wl)
{
return enable_irq(wl->irq);
if (wl->irq) {
irq_set_status_flags(wl->irq, IRQ_NOAUTOEN);
- ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl);
+
+ ret = request_threaded_irq(wl->irq, NULL, wl1251_irq,
+ IRQF_ONESHOT, "wl1251", wl);
if (ret < 0) {
wl1251_error("request_irq() failed: %d", ret);
goto disable;
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/bitops.h>
+#include <linux/interrupt.h>
#include <net/mac80211.h>
#define DRIVER_NAME "wl1251"
int wl1251_init_ieee80211(struct wl1251 *wl);
void wl1251_enable_interrupts(struct wl1251 *wl);
void wl1251_disable_interrupts(struct wl1251 *wl);
+irqreturn_t wl1251_irq(int irq, void *cookie);
#define DEFAULT_HW_GEN_MODULATION_TYPE CCK_LONG /* Long Preamble */
#define DEFAULT_HW_GEN_TX_RATE RATE_2MBPS