Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351730
b: refs/heads/master
c: 1a91931
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Jan 3, 2013
1 parent 07730e4 commit 8faae37
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 196 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75e2dba866706ab9b133983b7fd9a6297b24c22d
refs/heads/master: 1a9193185f462a51815fe48491f8a6fb6b942551
15 changes: 6 additions & 9 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -4259,7 +4259,7 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
dfs_region = nla_get_u8(info->attrs[NL80211_ATTR_DFS_REGION]);

nla_for_each_nested(nl_reg_rule, info->attrs[NL80211_ATTR_REG_RULES],
rem_reg_rules) {
rem_reg_rules) {
num_rules++;
if (num_rules > NL80211_MAX_SUPP_REG_RULES)
return -EINVAL;
Expand All @@ -4273,7 +4273,7 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
}

size_of_regd = sizeof(struct ieee80211_regdomain) +
(num_rules * sizeof(struct ieee80211_reg_rule));
num_rules * sizeof(struct ieee80211_reg_rule);

rd = kzalloc(size_of_regd, GFP_KERNEL);
if (!rd) {
Expand All @@ -4293,10 +4293,10 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
rd->dfs_region = dfs_region;

nla_for_each_nested(nl_reg_rule, info->attrs[NL80211_ATTR_REG_RULES],
rem_reg_rules) {
rem_reg_rules) {
nla_parse(tb, NL80211_REG_RULE_ATTR_MAX,
nla_data(nl_reg_rule), nla_len(nl_reg_rule),
reg_rule_policy);
nla_data(nl_reg_rule), nla_len(nl_reg_rule),
reg_rule_policy);
r = parse_reg_rule(tb, &rd->reg_rules[rule_idx]);
if (r)
goto bad_reg;
Expand All @@ -4312,10 +4312,7 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
BUG_ON(rule_idx != num_rules);

r = set_regdom(rd);

mutex_unlock(&cfg80211_mutex);

return r;
rd = NULL;

bad_reg:
mutex_unlock(&cfg80211_mutex);
Expand Down
Loading

0 comments on commit 8faae37

Please sign in to comment.