diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2019-04-17 09:34:40 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-04-26 13:02:11 +0200 |
commit | a680fe468df7550ed18fbcae30e382252fdc35c6 (patch) | |
tree | 241b57f57956bf3fb1ff81db3499e3d1f7bbcb95 /net/wireless/nl80211.c | |
parent | 622fce81280aadb277dd3fc55c676b4bdc3e0527 (diff) | |
download | linux-a680fe468df7550ed18fbcae30e382252fdc35c6.tar.bz2 |
nl80211: do a struct assignment to radar_chandef instead of memcpy()
We are copying one entire structure to another of the same type in
nl80211_notify_radar_detection, so it's simpler and safer to do a
struct assignment instead of memcpy().
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 0524a6fb84ad..5dfc4dba9e56 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -8181,7 +8181,7 @@ static int nl80211_notify_radar_detection(struct sk_buff *skb, cfg80211_sched_dfs_chan_update(rdev); - memcpy(&rdev->radar_chandef, &chandef, sizeof(chandef)); + rdev->radar_chandef = chandef; /* Propagate this notification to other radios as well */ queue_work(cfg80211_wq, &rdev->propagate_radar_detect_wk); |