diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2018-02-02 10:31:23 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2018-02-19 07:12:14 -0500 |
| commit | bee92d06157fc39d5d7836a061c7d41289a55797 (patch) | |
| tree | e53dc20642a3d744b036d2dd7ab4892496e21702 /net/mac80211/cfg.c | |
| parent | c4de37ee2b55deac7d6aeac33e02e3d6be243898 (diff) | |
cfg80211: fix cfg80211_beacon_dup
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.
Cc: stable@vger.kernel.org
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>
Diffstat (limited to 'net/mac80211/cfg.c')
| -rw-r--r-- | net/mac80211/cfg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index fb15d3b97cb2..84f757c5d91a 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -2863,7 +2863,7 @@ cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon) | |||
| 2863 | } | 2863 | } |
| 2864 | if (beacon->probe_resp_len) { | 2864 | if (beacon->probe_resp_len) { |
| 2865 | new_beacon->probe_resp_len = beacon->probe_resp_len; | 2865 | new_beacon->probe_resp_len = beacon->probe_resp_len; |
| 2866 | beacon->probe_resp = pos; | 2866 | new_beacon->probe_resp = pos; |
| 2867 | memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); | 2867 | memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); |
| 2868 | pos += beacon->probe_resp_len; | 2868 | pos += beacon->probe_resp_len; |
| 2869 | } | 2869 | } |
