summaryrefslogtreecommitdiff
path: root/package/broadcom-wl/src/kmod/bcmutils.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-11-17 03:54:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-11-17 03:54:33 +0000
commit6995dcc3312b5f16b726fa88757b67604e26ef36 (patch)
tree0b254ee8dc36605bd0d116859270c50d8e31bb4b /package/broadcom-wl/src/kmod/bcmutils.c
parent9f41f4cfb36a2cbcae41068dea9c98083516dd9b (diff)
downloadmtk-20170518-6995dcc3312b5f16b726fa88757b67604e26ef36.zip
mtk-20170518-6995dcc3312b5f16b726fa88757b67604e26ef36.tar.gz
mtk-20170518-6995dcc3312b5f16b726fa88757b67604e26ef36.tar.bz2
upgrade to broadcom wl driver version 4.80.53.0 (from wrt350n release)
SVN-Revision: 5546
Diffstat (limited to 'package/broadcom-wl/src/kmod/bcmutils.c')
-rw-r--r--package/broadcom-wl/src/kmod/bcmutils.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/broadcom-wl/src/kmod/bcmutils.c b/package/broadcom-wl/src/kmod/bcmutils.c
index c264ea5..7592f23 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;
+}
+