summaryrefslogtreecommitdiff
path: root/net/wireless/pmsr.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-02-06 07:59:41 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-02-06 10:37:42 +0100
commit0acd99282bef617fdbc4dff29359fe8160f00846 (patch)
treeee6674fabfbc1e8822493e25216630c1c9fe10bc /net/wireless/pmsr.c
parentf09bef61f1ed72869b231e5cff16e73a06505cfb (diff)
cfg80211: pmsr: fix MAC address setting
When we *don't* have a MAC address attribute, we shouldn't try to use this - this was intended to copy the local MAC address instead, so fix it. Fixes: 9bb7e0f24e7e ("cfg80211: add peer measurement with FTM initiator API") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/pmsr.c')
-rw-r--r--net/wireless/pmsr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/wireless/pmsr.c b/net/wireless/pmsr.c
index de9286703280..f2e388e329fd 100644
--- a/net/wireless/pmsr.c
+++ b/net/wireless/pmsr.c
@@ -256,8 +256,7 @@ int nl80211_pmsr_start(struct sk_buff *skb, struct genl_info *info)
if (err)
goto out_err;
} else {
- memcpy(req->mac_addr, nla_data(info->attrs[NL80211_ATTR_MAC]),
- ETH_ALEN);
+ memcpy(req->mac_addr, wdev_address(wdev), ETH_ALEN);
memset(req->mac_addr_mask, 0xff, ETH_ALEN);
}