Fix dev_info
Change-Id: If0239f3821c5ff984a35c43cb528f09eafcbf3e5
diff --git a/mbtk/libmbtk_lib/common/mbtk_utils.c b/mbtk/libmbtk_lib/common/mbtk_utils.c
index afade99..1694c42 100755
--- a/mbtk/libmbtk_lib/common/mbtk_utils.c
+++ b/mbtk/libmbtk_lib/common/mbtk_utils.c
@@ -614,3 +614,46 @@
}
}
+int mbtk_band_2_list(uint32 band, int index, int band_list[])
+{
+ int i = 0;
+ int count = 0;
+ while(i < 32)
+ {
+ if(band & (1 << i))
+ {
+ // printf("Band : %d\n", i + 1 + index * 32);
+ band_list[count++] = i + 1 + index * 32;
+ }
+ i++;
+ }
+ return count;
+}
+
+uint32 mbtk_list_2_band(int band_list[])
+{
+ int i = 0;
+ uint32 band = 0;
+ while(band_list[i])
+ {
+ if(band_list[i] > 96)
+ {
+ band |= (uint32)(1 << (band_list[i] - 97));
+ }
+ else if(band_list[i] > 64)
+ {
+ band |= (uint32)(1 << (band_list[i] - 65));
+ }
+ else if(band_list[i] > 32)
+ {
+ band |= (uint32)(1 << (band_list[i] - 33));
+ }
+ else
+ {
+ band |= (uint32)(1 << (band_list[i] - 1));
+ }
+ i++;
+ }
+ return band;
+}
+