diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-05-30 14:29:35 -0700 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-05-30 18:54:52 -0700 |
commit | 06e0a216cda05f4a4daebb797f78f6795f8c8f0f (patch) | |
tree | 285d57873bc338132896e8c4ed90f36c8a2399de | |
parent | ba2cbc35596856c8e7a431d93813f8bae1c9c208 (diff) | |
download | crda-06e0a216cda05f4a4daebb797f78f6795f8c8f0f.tar.gz |
crda: make print-regdom use internal flags
Do not rely on nl80211.h for general regulatory db parsing.
Its best to use our own OS agnostic definitions.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
-rw-r--r-- | print-regdom.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/print-regdom.c b/print-regdom.c index ab122db..68c7b4e 100644 --- a/print-regdom.c +++ b/print-regdom.c @@ -3,20 +3,19 @@ #include <string.h> #include <arpa/inet.h> -#include "nl80211.h" - #include "reglib.h" +#include "regdb.h" -static const char *dfs_domain_name(enum nl80211_dfs_regions region) +static const char *dfs_domain_name(enum regdb_dfs_regions region) { switch (region) { - case NL80211_DFS_UNSET: + case REGDB_DFS_UNSET: return "DFS-UNSET"; - case NL80211_DFS_FCC: + case REGDB_DFS_FCC: return "DFS-FCC"; - case NL80211_DFS_ETSI: + case REGDB_DFS_ETSI: return "DFS-ETSI"; - case NL80211_DFS_JP: + case REGDB_DFS_JP: return "DFS-JP"; default: return "DFS-invalid"; @@ -48,23 +47,23 @@ static void print_reg_rule(const struct ieee80211_reg_rule *rule) else printf("N/A)"); - if (rule->flags & NL80211_RRF_NO_OFDM) + if (rule->flags & RRF_NO_OFDM) printf(", NO-OFDM"); - if (rule->flags & NL80211_RRF_NO_CCK) + if (rule->flags & RRF_NO_CCK) printf(", NO-CCK"); - if (rule->flags & NL80211_RRF_NO_INDOOR) + if (rule->flags & RRF_NO_INDOOR) printf(", NO-INDOOR"); - if (rule->flags & NL80211_RRF_NO_OUTDOOR) + if (rule->flags & RRF_NO_OUTDOOR) printf(", NO-OUTDOOR"); - if (rule->flags & NL80211_RRF_DFS) + if (rule->flags & RRF_DFS) printf(", DFS"); - if (rule->flags & NL80211_RRF_PTP_ONLY) + if (rule->flags & RRF_PTP_ONLY) printf(", PTP-ONLY"); - if (rule->flags & NL80211_RRF_PTMP_ONLY) + if (rule->flags & RRF_PTMP_ONLY) printf(", PTMP-ONLY"); - if (rule->flags & NL80211_RRF_PASSIVE_SCAN) + if (rule->flags & RRF_PASSIVE_SCAN) printf(", PASSIVE-SCAN"); - if (rule->flags & NL80211_RRF_NO_IBSS) + if (rule->flags & RRF_NO_IBSS) printf(", NO-IBSS"); printf("\n"); |