summaryrefslogtreecommitdiff
path: root/include/iwinfo
diff options
context:
space:
mode:
authorAndre Heider <a.heider@gmail.com>2022-11-22 09:39:12 +0100
committerJo-Philipp Wich <jo@mein.io>2022-12-16 00:09:07 +0100
commit9e14e643c5e8bac2b8aeb4efb76cff3f86bf80ca (patch)
tree452666095ccda112383100de389dd503e319ffae /include/iwinfo
parente084781afc99075c4154614b49d99d3308d8c8ee (diff)
downloadiwinfo-9e14e643c5e8bac2b8aeb4efb76cff3f86bf80ca.tar.gz
utils: add iwinfo_band2ghz() and iwinfo_ghz2band() helpers
To classify bands, to be used as ubus values. Signed-off-by: Andre Heider <a.heider@gmail.com>
Diffstat (limited to 'include/iwinfo')
-rw-r--r--include/iwinfo/utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/iwinfo/utils.h b/include/iwinfo/utils.h
index a7645de..7b8ceea 100644
--- a/include/iwinfo/utils.h
+++ b/include/iwinfo/utils.h
@@ -46,6 +46,9 @@ static inline int iwinfo_mbm2dbm(int gain)
const char * const iwinfo_band_name(int mask);
const char * const iwinfo_htmode_name(int mask);
+uint32_t iwinfo_band2ghz(uint8_t band);
+uint8_t iwinfo_ghz2band(uint32_t ghz);
+
size_t iwinfo_format_hwmodes(int modes, char *buf, size_t len);
int iwinfo_htmode_is_ht(int htmode);
int iwinfo_htmode_is_vht(int htmode);