]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: fix cfg80211_beacon_dup
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Feb 2018 15:31:23 +0000 (16:31 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Feb 2018 12:12:14 +0000 (13:12 +0100)
commite2e1af29d98801050450be46d928e755d944aea6
treee53dc20642a3d744b036d2dd7ab4892496e21702
parent0ff39edcf00dd69de886f947e4fab3cf49113dd6
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: 34c03a103c9d ("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>
net/mac80211/cfg.c