summaryrefslogtreecommitdiffstats
path: root/Documentation/networking/regulatory.txt
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-29 13:09:40 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-29 13:09:40 +0100
commit75329f1f0c0e2e2ad611734a2ef08309391a4d9f (patch)
tree67ca1a13f51fbf2f5af8557e6ff0bb722efab3e6 /Documentation/networking/regulatory.txt
parentb6b301aa9fba57b114c3a00f5f43abf672bd4ecd (diff)
parent3c92ec8ae91ecf59d88c798301833d7cf83f2179 (diff)
downloadkernel-crypto-75329f1f0c0e2e2ad611734a2ef08309391a4d9f.tar.gz
kernel-crypto-75329f1f0c0e2e2ad611734a2ef08309391a4d9f.tar.xz
kernel-crypto-75329f1f0c0e2e2ad611734a2ef08309391a4d9f.zip
Merge branch 'linus' into x86/cleanups
Diffstat (limited to 'Documentation/networking/regulatory.txt')
-rw-r--r--Documentation/networking/regulatory.txt22
1 files changed, 9 insertions, 13 deletions
diff --git a/Documentation/networking/regulatory.txt b/Documentation/networking/regulatory.txt
index a96989a8ff3..dcf31648414 100644
--- a/Documentation/networking/regulatory.txt
+++ b/Documentation/networking/regulatory.txt
@@ -131,11 +131,13 @@ are expected to do this during initialization.
r = zd_reg2alpha2(mac->regdomain, alpha2);
if (!r)
- regulatory_hint(hw->wiphy, alpha2, NULL);
+ regulatory_hint(hw->wiphy, alpha2);
Example code - drivers providing a built in regulatory domain:
--------------------------------------------------------------
+[NOTE: This API is not currently available, it can be added when required]
+
If you have regulatory information you can obtain from your
driver and you *need* to use this we let you build a regulatory domain
structure and pass it to the wireless core. To do this you should
@@ -167,7 +169,6 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
Then in some part of your code after your wiphy has been registered:
- int r;
struct ieee80211_regdomain *rd;
int size_of_regd;
int num_rules = mydriver_jp_regdom.n_reg_rules;
@@ -178,17 +179,12 @@ Then in some part of your code after your wiphy has been registered:
rd = kzalloc(size_of_regd, GFP_KERNEL);
if (!rd)
- return -ENOMEM;
+ return -ENOMEM;
memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain));
- for (i=0; i < num_rules; i++) {
- memcpy(&rd->reg_rules[i], &mydriver_jp_regdom.reg_rules[i],
- sizeof(struct ieee80211_reg_rule));
- }
- r = regulatory_hint(hw->wiphy, NULL, rd);
- if (r) {
- kfree(rd);
- return r;
- }
-
+ for (i=0; i < num_rules; i++)
+ memcpy(&rd->reg_rules[i],
+ &mydriver_jp_regdom.reg_rules[i],
+ sizeof(struct ieee80211_reg_rule));
+ regulatory_struct_hint(rd);