From: Luca Coelho <luca@coelho.fi>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH v2 03/11] nl80211: do a struct assignment to radar_chandef instead of memcpy()
Date: Wed, 17 Apr 2019 09:34:40 +0300 [thread overview]
Message-ID: <20190417063441.19909-1-luca@coelho.fi> (raw)
In-Reply-To: <35f813d89f2d0eed572fe9ceb6530ab42d081aa2.camel@sipsolutions.net>
From: Luca Coelho <luciano.coelho@intel.com>
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>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 846d25d2dc82..64af8309f397 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8182,7 +8182,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);
--
2.20.1
next prev parent reply other threads:[~2019-04-17 6:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-15 15:38 [PATCH 00/11] cfg80211/mac80211 patches from our internal tree 2019-03-15 Luca Coelho
2019-03-15 15:38 ` [PATCH 01/11] mac80211: Increase MAX_MSG_LEN Luca Coelho
2019-03-15 15:38 ` [PATCH 02/11] nl80211: increase NL80211_MAX_SUPP_REG_RULES Luca Coelho
2019-03-15 15:38 ` [PATCH 03/11] nl80211: copy the length of dst of src in nl80211_notify_radar_detection() Luca Coelho
2019-03-23 12:34 ` Johannes Berg
2019-04-17 6:34 ` Luca Coelho [this message]
2019-03-15 15:39 ` [PATCH 04/11] cfg80211: Handle WMM rules in regulatory domain intersection Luca Coelho
2019-03-15 15:39 ` [PATCH 05/11] mac80211_hwsim: set p2p device interface support indication Luca Coelho
2019-03-18 10:56 ` Arend Van Spriel
2019-03-15 15:39 ` [PATCH 06/11] cfg80211: don't skip multi-bssid index element Luca Coelho
2019-03-26 4:27 ` [cfg80211] 83db2c9ebd: hwsim.scan_multi_bssid_check_ie.fail kernel test robot
2019-03-15 15:39 ` [PATCH 07/11] cfg80211: support non-inheritance element Luca Coelho
2019-03-15 15:39 ` [PATCH 08/11] mac80211: " Luca Coelho
2019-03-15 15:39 ` [PATCH 09/11] cfg80211: support profile split between elements Luca Coelho
2019-03-19 9:06 ` Dan Carpenter
2019-03-15 15:39 ` [PATCH 10/11] mac80211: " Luca Coelho
2019-03-15 15:39 ` [PATCH 11/11] ieee80211: update HE IEs to D4.0 spec Luca Coelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190417063441.19909-1-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox