diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-11-17 03:54:33 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-11-17 03:54:33 +0000 |
commit | 6995dcc3312b5f16b726fa88757b67604e26ef36 (patch) | |
tree | 0b254ee8dc36605bd0d116859270c50d8e31bb4b /package/broadcom-wl/src/kmod/bcmutils.c | |
parent | 9f41f4cfb36a2cbcae41068dea9c98083516dd9b (diff) | |
download | mtk-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.c | 16 |
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; +} + |