aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/regulatory.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/networking/regulatory.txt')
-rw-r--r--Documentation/networking/regulatory.txt13
1 files changed, 3 insertions, 10 deletions
diff --git a/Documentation/networking/regulatory.txt b/Documentation/networking/regulatory.txt
index a96989a8ff35..357d4ba4f135 100644
--- a/Documentation/networking/regulatory.txt
+++ b/Documentation/networking/regulatory.txt
@@ -167,7 +167,6 @@ struct ieee80211_regdomain mydriver_jp_regdom = {
167 167
168Then in some part of your code after your wiphy has been registered: 168Then in some part of your code after your wiphy has been registered:
169 169
170 int r;
171 struct ieee80211_regdomain *rd; 170 struct ieee80211_regdomain *rd;
172 int size_of_regd; 171 int size_of_regd;
173 int num_rules = mydriver_jp_regdom.n_reg_rules; 172 int num_rules = mydriver_jp_regdom.n_reg_rules;
@@ -178,17 +177,11 @@ Then in some part of your code after your wiphy has been registered:
178 177
179 rd = kzalloc(size_of_regd, GFP_KERNEL); 178 rd = kzalloc(size_of_regd, GFP_KERNEL);
180 if (!rd) 179 if (!rd)
181 return -ENOMEM; 180 return -ENOMEM;
182 181
183 memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain)); 182 memcpy(rd, &mydriver_jp_regdom, sizeof(struct ieee80211_regdomain));
184 183
185 for (i=0; i < num_rules; i++) { 184 for (i=0; i < num_rules; i++)
186 memcpy(&rd->reg_rules[i], &mydriver_jp_regdom.reg_rules[i], 185 memcpy(&rd->reg_rules[i], &mydriver_jp_regdom.reg_rules[i],
187 sizeof(struct ieee80211_reg_rule)); 186 sizeof(struct ieee80211_reg_rule));
188 } 187 return regulatory_hint(hw->wiphy, NULL, rd);
189 r = regulatory_hint(hw->wiphy, NULL, rd);
190 if (r) {
191 kfree(rd);
192 return r;
193 }
194