summaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-06-18 09:29:57 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-08-20 09:36:33 +0200
commit8a54d8fc160e67ad485d95a0322ce1221f80770a (patch)
tree9dd0aab2ce48109879f06e9d9f98a7f25be1a7ed /net/wireless/reg.c
parent484004339d4514fde425f6e8a9f6a6cc979bb0c3 (diff)
downloadtalos-obmc-linux-8a54d8fc160e67ad485d95a0322ce1221f80770a.tar.gz
talos-obmc-linux-8a54d8fc160e67ad485d95a0322ce1221f80770a.zip
cfg80211: remove division by size of sizeof(struct ieee80211_wmm_rule)
Pointer arithmetic already adjusts by the size of the struct, so the sizeof() calculation is wrong. This is basically the same as Colin King's patch for similar code in the iwlwifi driver. Fixes: 230ebaa189af ("cfg80211: read wmm rules from regulatory database") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
-rw-r--r--net/wireless/reg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 4fc66a117b7d..283902974fbf 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -452,8 +452,7 @@ reg_copy_regd(const struct ieee80211_regdomain *src_regd)
continue;
regd->reg_rules[i].wmm_rule = d_wmm +
- (src_regd->reg_rules[i].wmm_rule - s_wmm) /
- sizeof(struct ieee80211_wmm_rule);
+ (src_regd->reg_rules[i].wmm_rule - s_wmm);
}
return regd;
}
OpenPOWER on IntegriCloud