From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
To: linville@tuxdriver.com, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, janusz.dziedzic@tieto.com,
smihir@qti.qualcomm.com, tushnimb@qca.qualcomm.com,
"Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Subject: [PATCH] crda: consolidate passive-scan and no-ibss flags
Date: Mon, 21 Oct 2013 19:42:15 +0200 [thread overview]
Message-ID: <1382377335-26425-1-git-send-email-mcgrof@do-not-panic.com> (raw)
We consolidate these two flags into one flag to indicate
initiating radiation is not allowed.
For parsing we'll treat the no-ibss flag moving forward
as also passive-scan as well, newer kernels will always
treat these equally, older kernels will use the still
use them separately even though in practice they are
used together interchangably.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
regdb.h | 6 ++++--
reglib.c | 9 +++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/regdb.h b/regdb.h
index 4508621..20f29e9 100644
--- a/regdb.h
+++ b/regdb.h
@@ -79,10 +79,12 @@ enum reg_rule_flags {
* links */
RRF_PTMP_ONLY = 1<<6, /* this is only for Point To Multi
* Point links */
- RRF_PASSIVE_SCAN = 1<<7, /* passive scan is required */
- RRF_NO_IBSS = 1<<8, /* IBSS is not allowed */
+ RRF_NO_IR = 1<<7, /* do not initiate radiation */
+ __RRF_NO_IBSS = 1<<8, /* old no-IBSS rule, maps to no-ir */
};
+#define RRF_NO_IR_ALL (RRF_NO_IR | __RRF_NO_IBSS)
+
/**
* enum regdb_dfs_regions - regulatory DFS regions
*
diff --git a/reglib.c b/reglib.c
index 64584f4..fa6efe0 100644
--- a/reglib.c
+++ b/reglib.c
@@ -313,6 +313,9 @@ static void reg_rule2rd(uint8_t *db, size_t dblen,
rd_power_rule->max_eirp = ntohl(power->max_eirp);
rd_reg_rule->flags = ntohl(rule->flags);
+
+ if (rd_reg_rule->flags & RRF_NO_IR_ALL)
+ rd_reg_rule->flags |= RRF_NO_IR_ALL;
}
/* Converts a file regdomain to ieee80211_regdomain, easier to manage */
@@ -694,10 +697,8 @@ static void print_reg_rule(const struct ieee80211_reg_rule *rule)
printf(", PTP-ONLY");
if (rule->flags & RRF_PTMP_ONLY)
printf(", PTMP-ONLY");
- if (rule->flags & RRF_PASSIVE_SCAN)
- printf(", PASSIVE-SCAN");
- if (rule->flags & RRF_NO_IBSS)
- printf(", NO-IBSS");
+ if (rule->flags & RRF_NO_IR_ALL)
+ printf(", NO-IR");
printf("\n");
}
--
1.8.4.rc3
reply other threads:[~2013-10-21 17:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382377335-26425-1-git-send-email-mcgrof@do-not-panic.com \
--to=mcgrof@do-not-panic.com \
--cc=janusz.dziedzic@tieto.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=smihir@qti.qualcomm.com \
--cc=tushnimb@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).