summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-02-02 16:31:23 +0100
committerBen Hutchings <ben@decadent.org.uk>2018-06-16 22:22:20 +0100
commit4ed8140eb8a36f42aac9659192fbe90040addd17 (patch)
treea66eb6562925049fdc91e9e2ffce3291fce42132 /net/mac80211
parent57b60ea00db754dd5478577c369d09c1cdbb2870 (diff)
downloadlinux-stable-4ed8140eb8a36f42aac9659192fbe90040addd17.tar.gz
linux-stable-4ed8140eb8a36f42aac9659192fbe90040addd17.tar.bz2
linux-stable-4ed8140eb8a36f42aac9659192fbe90040addd17.zip
cfg80211: fix cfg80211_beacon_dup
commit bee92d06157fc39d5d7836a061c7d41289a55797 upstream. gcc-8 warns about some obviously incorrect code: net/mac80211/cfg.c: In function 'cfg80211_beacon_dup': net/mac80211/cfg.c:2896:3: error: 'memcpy' source argument is the same as destination [-Werror=restrict] From the context, I conclude that we want to copy from beacon into new_beacon, as we do in the rest of the function. Fixes: 73da7d5bab79 ("mac80211: add channel switch command and beacon callbacks") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d8d65fed4e32..4b1a0e5dd701 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3054,7 +3054,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
}
if (beacon->probe_resp_len) {
new_beacon->probe_resp_len = beacon->probe_resp_len;
- beacon->probe_resp = pos;
+ new_beacon->probe_resp = pos;
memcpy(pos, beacon->probe_resp, beacon->probe_resp_len);
pos += beacon->probe_resp_len;
}