upgrade to broadcom wl driver version 4.80.53.0 (from wrt350n release)
[openwrt/openwrt.git] / package / broadcom-wl / src / kmod / bcmutils.c
index c264ea500b77f2ee58d308291b8920b6a2a74afc..7592f230ade72acc73f68211c47b2cf95fa354c5 100644 (file)
@@ -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;
+}
+