From 26b6b5bdd1ff0e3fa1f000aedccf9c0ea4f75233 Mon Sep 17 00:00:00 2001 From: nbd Date: Fri, 17 Nov 2006 03:54:33 +0000 Subject: upgrade to broadcom wl driver version 4.80.53.0 (from wrt350n release) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5546 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/broadcom-wl/Makefile | 4 ++-- package/broadcom-wl/src/kmod/bcmutils.c | 16 ++++++++++++++++ package/broadcom-wl/src/kmod/linux_osl.c | 7 ++++++- package/broadcom-wl/src/kmod/linux_osl.h | 12 ++++++------ 4 files changed, 30 insertions(+), 9 deletions(-) (limited to 'package/broadcom-wl') diff --git a/package/broadcom-wl/Makefile b/package/broadcom-wl/Makefile index 1b3964285..39bf944ae 100644 --- a/package/broadcom-wl/Makefile +++ b/package/broadcom-wl/Makefile @@ -10,13 +10,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=broadcom-wl -PKG_VERSION:=4.80.17.0 +PKG_VERSION:=4.80.53.0 PKG_RELEASE:=1 WLC_VERSION:=0.1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources -PKG_MD5SUM:=3183ddb60e3e882b41df1776c89b614c +PKG_MD5SUM:=62d6ca48678b8c48f90830466c1f1842 PKG_CAT:=bzcat PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/package/broadcom-wl/src/kmod/bcmutils.c b/package/broadcom-wl/src/kmod/bcmutils.c index c264ea500..7592f230a 100644 --- a/package/broadcom-wl/src/kmod/bcmutils.c +++ b/package/broadcom-wl/src/kmod/bcmutils.c @@ -855,3 +855,19 @@ bcm_bprintf(struct bcmstrbuf *b, const char *fmt, ...) return r; } + +uint +bcm_bitcount(uint8 *bitmap, uint length) +{ + uint bitcount = 0, i; + uint8 tmp; + for (i = 0; i < length; i++) { + tmp = bitmap[i]; + while (tmp) { + bitcount++; + tmp &= (tmp - 1); + } + } + return bitcount; +} + diff --git a/package/broadcom-wl/src/kmod/linux_osl.c b/package/broadcom-wl/src/kmod/linux_osl.c index d70296103..24fd77dae 100644 --- a/package/broadcom-wl/src/kmod/linux_osl.c +++ b/package/broadcom-wl/src/kmod/linux_osl.c @@ -159,13 +159,18 @@ osl_pktget(osl_t *osh, uint len, bool send) return ((void*) skb); } +typedef void (*pktfree_cb_fn_t)(void *ctx, void *pkt, uint16 status); /* Free the driver packet. Free the tag if present */ void -osl_pktfree(osl_t *osh, void *p) +osl_pktfree(osl_t *osh, void *p, bool send) { struct sk_buff *skb, *nskb; + pktfree_cb_fn_t tx_fn = osh->pub.tx_fn; skb = (struct sk_buff*) p; + + if (send && tx_fn) + tx_fn(osh->pub.tx_ctx, p, 0); /* perversion: we use skb->next to chain multi-skb packets */ while (skb) { diff --git a/package/broadcom-wl/src/kmod/linux_osl.h b/package/broadcom-wl/src/kmod/linux_osl.h index f6af6124c..d9c5533b8 100644 --- a/package/broadcom-wl/src/kmod/linux_osl.h +++ b/package/broadcom-wl/src/kmod/linux_osl.h @@ -92,7 +92,7 @@ osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) /* packet primitives */ #define PKTGET(osh, len, send) osl_pktget((osh), (len), (send)) -#define PKTFREE(osh, skb, send) osl_pktfree((osh), (skb)) +#define PKTFREE(osh, skb, send) osl_pktfree((osh), (skb), (send)) #define PKTDATA(osh, skb) (((struct sk_buff*)(skb))->data) #define PKTLEN(osh, skb) (((struct sk_buff*)(skb))->len) #define PKTHEADROOM(osh, skb) (PKTDATA(osh, skb)-(((struct sk_buff*)(skb))->head)) @@ -112,7 +112,7 @@ osl_dma_free_consistent(osl_t *osh, void *va, uint size, ulong pa) * Also, a packettag is zeroed out */ static INLINE void * -osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb) +osl_pkt_frmnative(osl_pubinfo_t*osh, struct sk_buff *skb) { struct sk_buff *nskb; @@ -126,7 +126,7 @@ osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb) return (void *)skb; } -#define PKTFRMNATIVE(osh, skb) osl_pkt_frmnative(((struct osl_pubinfo *)osh), \ +#define PKTFRMNATIVE(osh, skb) osl_pkt_frmnative(((osl_pubinfo_t*)osh), \ (struct sk_buff*)(skb)) /* Convert a driver packet to native(OS) packet @@ -135,7 +135,7 @@ osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb) * In our case, that means it should be 0 */ static INLINE struct sk_buff * -osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) +osl_pkt_tonative(osl_pubinfo_t*osh, void *pkt) { struct sk_buff *nskb; @@ -149,7 +149,7 @@ osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) return (struct sk_buff *)pkt; } -#define PKTTONATIVE(osh, pkt) osl_pkt_tonative((struct osl_pubinfo *)(osh), (pkt)) +#define PKTTONATIVE(osh, pkt) osl_pkt_tonative((osl_pubinfo_t*)(osh), (pkt)) #define PKTLINK(skb) (((struct sk_buff*)(skb))->prev) #define PKTSETLINK(skb, x) (((struct sk_buff*)(skb))->prev = (struct sk_buff*)(x)) @@ -158,7 +158,7 @@ osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt) #define PKTSHARED(skb) (((struct sk_buff*)(skb))->cloned) extern void *osl_pktget(osl_t *osh, uint len, bool send); -extern void osl_pktfree(osl_t *osh, void *skb); +extern void osl_pktfree(osl_t *osh, void *skb, bool send); extern void *osl_pktdup(osl_t *osh, void *skb); extern uint osl_pktalloced(osl_t *osh); -- cgit v1.2.3