summaryrefslogtreecommitdiff
path: root/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-02-10 12:03:46 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 12:48:57 -0800
commite4cf544edb1c6a6287a8ed8d924259825364d40d (patch)
tree7e747a10cd5cb843811b95a538a61aa9ec9b6ffe /drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
parent8746e2baaedd45b51ceb0adbcaf2ce52bbb83598 (diff)
staging: brcm80211: enable driver counter functionality
The 802.11 core in the chipsets provides counters that are now used to provide counter values to mac80211 through get_stats callback. Counters related to ampdu and wmm (aka. wme) are not yet incorporated. Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/brcmsmac/wlc_alloc.c')
-rw-r--r--drivers/staging/brcm80211/brcmsmac/wlc_alloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
index 7a9fdbb5dae..2db96c1e170 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
@@ -70,13 +70,13 @@ static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
{
struct wlc_pub *pub;
- pub = (struct wlc_pub *) wlc_calloc(osh, unit, sizeof(struct wlc_pub));
+ pub = wlc_calloc(osh, unit, sizeof(struct wlc_pub));
if (pub == NULL) {
*err = 1001;
goto fail;
}
- pub->tunables = (wlc_tunables_t *)wlc_calloc(osh, unit,
+ pub->tunables = wlc_calloc(osh, unit,
sizeof(wlc_tunables_t));
if (pub->tunables == NULL) {
*err = 1028;
@@ -86,6 +86,10 @@ static struct wlc_pub *wlc_pub_malloc(struct osl_info *osh, uint unit,
/* need to init the tunables now */
wlc_tunables_init(pub->tunables, devid);
+ pub->_cnt = wlc_calloc(osh, unit, sizeof(struct wl_cnt));
+ if (pub->_cnt == NULL)
+ goto fail;
+
pub->multicast = (u8 *)wlc_calloc(osh, unit,
(ETH_ALEN * MAXMULTILIST));
if (pub->multicast == NULL) {
@@ -105,13 +109,9 @@ static void wlc_pub_mfree(struct osl_info *osh, struct wlc_pub *pub)
if (pub == NULL)
return;
- if (pub->multicast)
- kfree(pub->multicast);
- if (pub->tunables) {
- kfree(pub->tunables);
- pub->tunables = NULL;
- }
-
+ kfree(pub->multicast);
+ kfree(pub->_cnt);
+ kfree(pub->tunables);
kfree(pub);
}