]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
wl12xx: AP mode - add AP specific event
authorArik Nemtsov <arik@wizery.com>
Mon, 25 Oct 2010 09:17:44 +0000 (11:17 +0200)
committerLuciano Coelho <coelho@ti.com>
Mon, 24 Jan 2011 20:11:47 +0000 (22:11 +0200)
Add STA-remove completion event. Unmask it during boot if operating in
AP-mode.
Ignore unrelated events in AP-mode.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/boot.c
drivers/net/wireless/wl12xx/event.c
drivers/net/wireless/wl12xx/event.h

index 4df04f84d7f106a71fd87741d2e857f48bf01cc0..b504367f281f15384aa5684047ca8b7b190604d2 100644 (file)
@@ -431,6 +431,9 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
                PSPOLL_DELIVERY_FAILURE_EVENT_ID |
                SOFT_GEMINI_SENSE_EVENT_ID;
 
+       if (wl->bss_type == BSS_TYPE_AP_BSS)
+               wl->event_mask |= STA_REMOVE_COMPLETE_EVENT_ID;
+
        ret = wl1271_event_unmask(wl);
        if (ret < 0) {
                wl1271_error("EVENT mask setting failed");
index f9146f5242fb93dce4e4e0b8398f834043fa1744..3376a5de09d7ed8c13312cdf3448e2034531bcc9 100644 (file)
@@ -186,6 +186,7 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
        int ret;
        u32 vector;
        bool beacon_loss = false;
+       bool is_ap = (wl->bss_type == BSS_TYPE_AP_BSS);
 
        wl1271_event_mbox_dump(mbox);
 
@@ -218,21 +219,21 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
         * BSS_LOSE_EVENT, beacon loss has to be reported to the stack.
         *
         */
-       if (vector & BSS_LOSE_EVENT_ID) {
+       if ((vector & BSS_LOSE_EVENT_ID) && !is_ap) {
                wl1271_info("Beacon loss detected.");
 
                /* indicate to the stack, that beacons have been lost */
                beacon_loss = true;
        }
 
-       if (vector & PS_REPORT_EVENT_ID) {
+       if ((vector & PS_REPORT_EVENT_ID) && !is_ap) {
                wl1271_debug(DEBUG_EVENT, "PS_REPORT_EVENT");
                ret = wl1271_event_ps_report(wl, mbox, &beacon_loss);
                if (ret < 0)
                        return ret;
        }
 
-       if (vector & PSPOLL_DELIVERY_FAILURE_EVENT_ID)
+       if ((vector & PSPOLL_DELIVERY_FAILURE_EVENT_ID) && !is_ap)
                wl1271_event_pspoll_delivery_fail(wl);
 
        if (vector & RSSI_SNR_TRIGGER_0_EVENT_ID) {
index 6cce0143adb581ca2d0f6b2577d70fd494e64f48..fd955f31cec417268e0539ab64ba9911465f96ce 100644 (file)
@@ -59,6 +59,7 @@ enum {
        BSS_LOSE_EVENT_ID                        = BIT(18),
        REGAINED_BSS_EVENT_ID                    = BIT(19),
        ROAMING_TRIGGER_MAX_TX_RETRY_EVENT_ID    = BIT(20),
+       STA_REMOVE_COMPLETE_EVENT_ID             = BIT(21), /* AP */
        SOFT_GEMINI_SENSE_EVENT_ID               = BIT(22),
        SOFT_GEMINI_PREDICTION_EVENT_ID          = BIT(23),
        SOFT_GEMINI_AVALANCHE_EVENT_ID           = BIT(24),