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/src/kmod/bcmutils.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'package/broadcom-wl/src/kmod/bcmutils.c') 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; +} + -- cgit v1.2.3