]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: brcm80211: remove unused module from softmac driver
authorArend van Spriel <arend@broadcom.com>
Fri, 25 Feb 2011 15:39:12 +0000 (16:39 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 1 Mar 2011 02:15:04 +0000 (18:15 -0800)
The softmac driver contained an event queue mechanism which
was properly initialized and queried but no event are ever
posted to it. Therefor the module has been removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 files changed:
drivers/staging/brcm80211/brcmsmac/Makefile
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
drivers/staging/brcm80211/brcmsmac/wlc_antsel.c
drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
drivers/staging/brcm80211/brcmsmac/wlc_channel.c
drivers/staging/brcm80211/brcmsmac/wlc_event.c [deleted file]
drivers/staging/brcm80211/brcmsmac/wlc_event.h [deleted file]
drivers/staging/brcm80211/brcmsmac/wlc_mac80211.c
drivers/staging/brcm80211/brcmsmac/wlc_mac80211.h
drivers/staging/brcm80211/brcmsmac/wlc_phy_shim.c
drivers/staging/brcm80211/brcmsmac/wlc_stf.c

index 5da39be0f769162572a14f4c8f72b3d0da62faac..315f1ae9de0f8cd5ae5986ce7ae36370944d819d 100644 (file)
@@ -36,7 +36,6 @@ BRCMSMAC_OFILES := \
        wlc_antsel.o \
        wlc_bmac.o \
        wlc_channel.o \
-       wlc_event.o \
        wlc_mac80211.o \
        wlc_phy_shim.o \
        wlc_rate.o \
index 98ceaed1700de7ad5732af750bc8982a60bad041..ac9edae3a22dee8570ab6379f7a051f8fa909eff 100644 (file)
@@ -1590,35 +1590,6 @@ static void BCMFASTPATH wl_dpc(unsigned long data)
        WL_UNLOCK(wl);
 }
 
-static void wl_link_up(struct wl_info *wl, char *ifname)
-{
-       WL_NONE("wl%d: link up (%s)\n", wl->pub->unit, ifname);
-}
-
-static void wl_link_down(struct wl_info *wl, char *ifname)
-{
-       WL_NONE("wl%d: link down (%s)\n", wl->pub->unit, ifname);
-}
-
-/*
- * precondition: perimeter lock has been acquired
- */
-void wl_event(struct wl_info *wl, char *ifname, wlc_event_t *e)
-{
-
-       switch (e->event.event_type) {
-       case WLC_E_LINK:
-       case WLC_E_NDIS_LINK:
-               if (e->event.flags & WLC_EVENT_MSG_LINK)
-                       wl_link_up(wl, ifname);
-               else
-                       wl_link_down(wl, ifname);
-               break;
-       case WLC_E_RADIO:
-               break;
-       }
-}
-
 /*
  * is called by the kernel from software irq context
  */
index 2db96c1e170141c0558290ecc9d110718b5844fb..064a3ffe5d8f59e17ff336ee1df45bacc88eeeb6 100644 (file)
@@ -27,7 +27,6 @@
 #include <wlc_key.h>
 #include <sbhndpio.h>
 #include <sbhnddma.h>
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_alloc.h>
 #include <wl_dbg.h>
index 4f9d4dec768ca65458453da30853d3d8313249ef..699890ba190fed69cfa9f76f3e39912f70563895 100644 (file)
@@ -27,7 +27,6 @@
 #include <wlc_rate.h>
 #include <wlc_pub.h>
 #include <wlc_key.h>
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_phy_hal.h>
 #include <wlc_antsel.h>
index 402ddf8f33715b9a3a3b62c5a50bc473f20eb413..da19a082ee4661c070c46c83b77a6d70c1dce9e3 100644 (file)
@@ -35,7 +35,6 @@
 #include <wlc_key.h>
 #include <wlc_pub.h>
 #include <wl_dbg.h>
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_bmac.h>
 #include <wlc_phy_hal.h>
index 12bfb06b3013d74976e858ee6c80c6a1005c56c5..b40ca62b68949a8252aec1045103db89cff3dddd 100644 (file)
@@ -48,7 +48,6 @@
  * At some point we may be able to skip the include of wlc.h and instead just
  * define a stub wlc_info and band struct to allow rpc calls to get the rpc handle.
  */
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_bmac.h>
 #include <wlc_phy_shim.h>
index 06b31a0364f41ea62e1598a9e5c7172308579b71..ea23728a77275d9c40eb1d83b7d65229b4c9d601 100644 (file)
@@ -28,7 +28,6 @@
 #include <wlioctl.h>
 #include <wlc_pub.h>
 #include <wlc_key.h>
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_bmac.h>
 #include <wlc_stf.h>
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_event.c b/drivers/staging/brcm80211/brcmsmac/wlc_event.c
deleted file mode 100644 (file)
index 7926c41..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2010 Broadcom Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#include <linux/kernel.h>
-#include <bcmdefs.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <osl.h>
-#include <bcmutils.h>
-#include <siutils.h>
-#include <sbhndpio.h>
-#include <sbhnddma.h>
-#include <wlioctl.h>
-#include <wlc_cfg.h>
-#include <wlc_pub.h>
-#include <wlc_key.h>
-#include <wl_export.h>
-#include <wlc_event.h>
-
-#include <d11.h>
-#include <wlc_rate.h>
-#include <wlc_mac80211.h>
-#include <wl_dbg.h>
-
-/* Local prototypes */
-static void wlc_timer_cb(void *arg);
-
-/* Private data structures */
-struct wlc_eventq {
-       wlc_event_t *head;
-       wlc_event_t *tail;
-       struct wlc_info *wlc;
-       void *wl;
-       struct wlc_pub *pub;
-       bool tpending;
-       bool workpending;
-       struct wl_timer *timer;
-       wlc_eventq_cb_t cb;
-       u8 event_inds_mask[broken_roundup(WLC_E_LAST, NBBY) / NBBY];
-};
-
-/*
- * Export functions
- */
-wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub, struct wlc_info *wlc,
-                               void *wl,
-                               wlc_eventq_cb_t cb)
-{
-       wlc_eventq_t *eq;
-
-       eq = kzalloc(sizeof(wlc_eventq_t), GFP_ATOMIC);
-       if (eq == NULL)
-               return NULL;
-
-       eq->cb = cb;
-       eq->wlc = wlc;
-       eq->wl = wl;
-       eq->pub = pub;
-
-       eq->timer = wl_init_timer(eq->wl, wlc_timer_cb, eq, "eventq");
-       if (!eq->timer) {
-               WL_ERROR("wl%d: wlc_eventq_attach: timer failed\n",
-                        pub->unit);
-               kfree(eq);
-               return NULL;
-       }
-
-       return eq;
-}
-
-int wlc_eventq_detach(wlc_eventq_t *eq)
-{
-       /* Clean up pending events */
-       wlc_eventq_down(eq);
-
-       if (eq->timer) {
-               if (eq->tpending) {
-                       wl_del_timer(eq->wl, eq->timer);
-                       eq->tpending = false;
-               }
-               wl_free_timer(eq->wl, eq->timer);
-               eq->timer = NULL;
-       }
-
-       ASSERT(wlc_eventq_avail(eq) == false);
-       kfree(eq);
-       return 0;
-}
-
-int wlc_eventq_down(wlc_eventq_t *eq)
-{
-       int callbacks = 0;
-       if (eq->tpending && !eq->workpending) {
-               if (!wl_del_timer(eq->wl, eq->timer))
-                       callbacks++;
-
-               ASSERT(wlc_eventq_avail(eq) == true);
-               ASSERT(eq->workpending == false);
-               eq->workpending = true;
-               if (eq->cb)
-                       eq->cb(eq->wlc);
-
-               ASSERT(eq->workpending == true);
-               eq->workpending = false;
-               eq->tpending = false;
-       } else {
-               ASSERT(eq->workpending || wlc_eventq_avail(eq) == false);
-       }
-       return callbacks;
-}
-
-wlc_event_t *wlc_event_alloc(wlc_eventq_t *eq)
-{
-       wlc_event_t *e;
-
-       e = kzalloc(sizeof(wlc_event_t), GFP_ATOMIC);
-
-       if (e == NULL)
-               return NULL;
-
-       return e;
-}
-
-void wlc_event_free(wlc_eventq_t *eq, wlc_event_t *e)
-{
-       ASSERT(e->data == NULL);
-       ASSERT(e->next == NULL);
-       kfree(e);
-}
-
-void wlc_eventq_enq(wlc_eventq_t *eq, wlc_event_t *e)
-{
-       ASSERT(e->next == NULL);
-       e->next = NULL;
-
-       if (eq->tail) {
-               eq->tail->next = e;
-               eq->tail = e;
-       } else
-               eq->head = eq->tail = e;
-
-       if (!eq->tpending) {
-               eq->tpending = true;
-               /* Use a zero-delay timer to trigger
-                * delayed processing of the event.
-                */
-               wl_add_timer(eq->wl, eq->timer, 0, 0);
-       }
-}
-
-wlc_event_t *wlc_eventq_deq(wlc_eventq_t *eq)
-{
-       wlc_event_t *e;
-
-       e = eq->head;
-       if (e) {
-               eq->head = e->next;
-               e->next = NULL;
-
-               if (eq->head == NULL)
-                       eq->tail = eq->head;
-       }
-       return e;
-}
-
-bool wlc_eventq_avail(wlc_eventq_t *eq)
-{
-       return (eq->head != NULL);
-}
-
-/*
- * Local Functions
- */
-static void wlc_timer_cb(void *arg)
-{
-       struct wlc_eventq *eq = (struct wlc_eventq *)arg;
-
-       ASSERT(eq->tpending == true);
-       ASSERT(wlc_eventq_avail(eq) == true);
-       ASSERT(eq->workpending == false);
-       eq->workpending = true;
-
-       if (eq->cb)
-               eq->cb(eq->wlc);
-
-       ASSERT(wlc_eventq_avail(eq) == false);
-       ASSERT(eq->tpending == true);
-       eq->workpending = false;
-       eq->tpending = false;
-}
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_event.h b/drivers/staging/brcm80211/brcmsmac/wlc_event.h
deleted file mode 100644 (file)
index 8151ba5..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2010 Broadcom Corporation
- *
- * Permission to use, copy, modify, and/or distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
- * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-#ifndef _WLC_EVENT_H_
-#define _WLC_EVENT_H_
-
-typedef struct wlc_eventq wlc_eventq_t;
-
-typedef void (*wlc_eventq_cb_t) (void *arg);
-
-extern wlc_eventq_t *wlc_eventq_attach(struct wlc_pub *pub,
-                                      struct wlc_info *wlc,
-                                      void *wl, wlc_eventq_cb_t cb);
-extern int wlc_eventq_detach(wlc_eventq_t *eq);
-extern int wlc_eventq_down(wlc_eventq_t *eq);
-extern void wlc_event_free(wlc_eventq_t *eq, wlc_event_t *e);
-extern bool wlc_eventq_avail(wlc_eventq_t *eq);
-extern wlc_event_t *wlc_eventq_deq(wlc_eventq_t *eq);
-extern void wlc_eventq_enq(wlc_eventq_t *eq, wlc_event_t *e);
-extern wlc_event_t *wlc_event_alloc(wlc_eventq_t *eq);
-
-extern int wlc_eventq_register_ind(wlc_eventq_t *eq, void *bitvect);
-extern int wlc_eventq_query_ind(wlc_eventq_t *eq, void *bitvect);
-extern int wlc_eventq_test_ind(wlc_eventq_t *eq, int et);
-extern int wlc_eventq_set_ind(wlc_eventq_t *eq, uint et, bool on);
-extern void wlc_eventq_flush(wlc_eventq_t *eq);
-extern void wlc_assign_event_msg(struct wlc_info *wlc, wl_event_msg_t *msg,
-                                const wlc_event_t *e, u8 *data,
-                                u32 len);
-
-#ifdef MSGTRACE
-extern void wlc_event_sendup_trace(struct wlc_info *wlc, hndrte_dev_t *bus,
-                                  u8 *hdr, u16 hdrlen, u8 *buf,
-                                  u16 buflen);
-#endif
-
-#endif                         /* _WLC_EVENT_H_ */
index fc3c6ab81d2eb76bf58d3b2e2c3f0eb11ea69fea..26d40aa818a9b6a7745e0b126b4039399765a4ff 100644 (file)
@@ -37,7 +37,6 @@
 #include <wlc_key.h>
 #include <wlc_bsscfg.h>
 #include <wlc_channel.h>
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_bmac.h>
 #include <wlc_scb.h>
@@ -46,7 +45,6 @@
 #include <wlc_antsel.h>
 #include <wlc_stf.h>
 #include <wlc_ampdu.h>
-#include <wlc_event.h>
 #include <wl_export.h>
 #include "d11ucode_ext.h"
 #include <wlc_alloc.h>
@@ -304,7 +302,6 @@ static void wlc_ht_update_sgi_rx(struct wlc_info *wlc, int val);
 static void wlc_ht_update_ldpc(struct wlc_info *wlc, s8 val);
 static void wlc_war16165(struct wlc_info *wlc, bool tx);
 
-static void wlc_process_eventq(void *arg);
 static void wlc_wme_retries_write(struct wlc_info *wlc);
 static bool wlc_attach_stf_ant_init(struct wlc_info *wlc);
 static uint wlc_attach_module(struct wlc_info *wlc);
@@ -1699,15 +1696,6 @@ static uint wlc_attach_module(struct wlc_info *wlc)
                goto fail;
        }
 
-       /* Initialize event queue; needed before following calls */
-       wlc->eventq =
-           wlc_eventq_attach(wlc->pub, wlc, wlc->wl, wlc_process_eventq);
-       if (wlc->eventq == NULL) {
-               WL_ERROR("wl%d: wlc_attach: wlc_eventq_attachfailed\n", unit);
-               err = 57;
-               goto fail;
-       }
-
        if ((wlc_stf_attach(wlc) != 0)) {
                WL_ERROR("wl%d: wlc_attach: wlc_stf_attach failed\n", unit);
                err = 68;
@@ -2159,11 +2147,6 @@ uint wlc_detach(struct wlc_info *wlc)
        if (!wlc_radio_monitor_stop(wlc))
                callbacks++;
 
-       if (wlc->eventq) {
-               wlc_eventq_detach(wlc->eventq);
-               wlc->eventq = NULL;
-       }
-
        wlc_channel_mgr_detach(wlc->cmi);
 
        wlc_timers_deinit(wlc);
@@ -2740,12 +2723,6 @@ uint wlc_down(struct wlc_info *wlc)
                ASSERT(pktq_empty(&qi->q));
        }
 
-       /* flush event queue.
-        * Should be the last thing done after all the events are generated
-        * Just delivers the events synchronously instead of waiting for a timer
-        */
-       callbacks += wlc_eventq_down(wlc->eventq);
-
        callbacks += wlc_bmac_down_finish(wlc->hw);
 
        /* wlc_bmac_down_finish has done wlc_coredisable(). so clk is off */
@@ -8024,23 +8001,6 @@ static void wlc_bss_default_init(struct wlc_info *wlc)
                bi->flags |= WLC_BSS_HT;
 }
 
-/* Deferred event processing */
-static void wlc_process_eventq(void *arg)
-{
-       struct wlc_info *wlc = (struct wlc_info *) arg;
-       wlc_event_t *etmp;
-
-       while ((etmp = wlc_eventq_deq(wlc->eventq))) {
-               /* Perform OS specific event processing */
-               wl_event(wlc->wl, etmp->event.ifname, etmp);
-               if (etmp->data) {
-                       kfree(etmp->data);
-                       etmp->data = NULL;
-               }
-               wlc_event_free(wlc->eventq, etmp);
-       }
-}
-
 void
 wlc_uint64_sub(u32 *a_high, u32 *a_low, u32 b_high, u32 b_low)
 {
index 4a9a8c884edaee133395d98882f59dfad9415405..72bfb8fa4d0eb54a83fec451abd9bedb1585da05 100644 (file)
@@ -642,9 +642,6 @@ struct wlc_info {
        /* tx queue */
        wlc_txq_info_t *tx_queues;      /* common TX Queue list */
 
-       /* event */
-       wlc_eventq_t *eventq;   /* event queue for deferred processing */
-
        /* security */
        wsec_key_t *wsec_keys[WSEC_MAX_KEYS];   /* dynamic key storage */
        wsec_key_t *wsec_def_keys[WLC_DEFAULT_KEYS];    /* default key storage */
index f8f2a5d811036ecb3057d1af7d51b368f9efcf8d..4eaec04c527c3241af6068295230bcb576d477e6 100644 (file)
@@ -46,7 +46,6 @@
 #include <wlc_channel.h>
 #include <bcmsrom.h>
 #include <wlc_key.h>
-#include <wlc_event.h>
 
 #include <wlc_mac80211.h>
 
index 5ac120e8d4fe22126d16593da7487107d3fc4368..d5b0f780ef20e1036b270834457c83a9c16c5023 100644 (file)
@@ -32,7 +32,6 @@
 #include <wlc_key.h>
 #include <wlc_channel.h>
 #include <wlc_bsscfg.h>
-#include <wlc_event.h>
 #include <wlc_mac80211.h>
 #include <wlc_scb.h>
 #include <wl_export.h>