projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix zd1211rw typo and call (#1241)
[openwrt.git]
/
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
c264ea5
..
7592f23
100644
(file)
--- 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;
}
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;
+}
+
This page took
0.026763 seconds
and
4
git commands to generate.