[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20140512194106.98f34913dded9af040f31d3d@skynet.be>
Date: Mon, 12 May 2014 19:41:06 +0200
From: Fabian Frederick <fabf@...net.be>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: Johannes Berg <johannes@...solutions.net>,
"John W. Linville" <linville@...driver.com>,
akpm <akpm@...ux-foundation.org>
Subject: [PATCH 1/1] net/wireless/sme.c: replace memcpy by ether_addr_copy
Cc: Johannes Berg <johannes@...solutions.net>
Cc: "John W. Linville" <linville@...driver.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
net/wireless/sme.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index acdcb4a8..6f88abc 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -225,7 +225,7 @@ void cfg80211_conn_work(struct work_struct *work)
continue;
}
if (wdev->conn->params.bssid) {
- memcpy(bssid_buf, wdev->conn->params.bssid, ETH_ALEN);
+ ether_addr_copy(bssid_buf, wdev->conn->params.bssid);
bssid = bssid_buf;
}
if (cfg80211_conn_do_work(wdev)) {
@@ -263,7 +263,7 @@ static struct cfg80211_bss *cfg80211_get_conn_bss(struct wireless_dev *wdev)
if (!bss)
return NULL;
- memcpy(wdev->conn->bssid, bss->bssid, ETH_ALEN);
+ ether_addr_copy(wdev->conn->bssid, bss->bssid);
wdev->conn->params.bssid = wdev->conn->bssid;
wdev->conn->params.channel = bss->channel;
wdev->conn->state = CFG80211_CONN_AUTHENTICATE_NEXT;
@@ -444,7 +444,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
memcpy(&wdev->conn->params, connect, sizeof(*connect));
if (connect->bssid) {
wdev->conn->params.bssid = wdev->conn->bssid;
- memcpy(wdev->conn->bssid, connect->bssid, ETH_ALEN);
+ ether_addr_copy(wdev->conn->bssid, connect->bssid);
}
if (connect->ie) {
@@ -474,7 +474,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
bss = cfg80211_get_conn_bss(wdev);
if (prev_bssid) {
- memcpy(wdev->conn->prev_bssid, prev_bssid, ETH_ALEN);
+ ether_addr_copy(wdev->conn->prev_bssid, prev_bssid);
wdev->conn->prev_bssid_valid = true;
}
@@ -616,8 +616,8 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
memset(&wrqu, 0, sizeof(wrqu));
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
if (bssid && status == WLAN_STATUS_SUCCESS) {
- memcpy(wrqu.ap_addr.sa_data, bssid, ETH_ALEN);
- memcpy(wdev->wext.prev_bssid, bssid, ETH_ALEN);
+ ether_addr_copy(wrqu.ap_addr.sa_data, bssid);
+ ether_addr_copy(wdev->wext.prev_bssid, bssid);
wdev->wext.prev_bssid_valid = true;
}
wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
@@ -697,7 +697,7 @@ void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
ev->type = EVENT_CONNECT_RESULT;
if (bssid)
- memcpy(ev->cr.bssid, bssid, ETH_ALEN);
+ ether_addr_copy(ev->cr.bssid, bssid);
if (req_ie_len) {
ev->cr.req_ie = ((u8 *)ev) + sizeof(*ev);
ev->cr.req_ie_len = req_ie_len;
@@ -763,8 +763,8 @@ void __cfg80211_roamed(struct wireless_dev *wdev,
memset(&wrqu, 0, sizeof(wrqu));
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
- memcpy(wrqu.ap_addr.sa_data, bss->bssid, ETH_ALEN);
- memcpy(wdev->wext.prev_bssid, bss->bssid, ETH_ALEN);
+ ether_addr_copy(wrqu.ap_addr.sa_data, bss->bssid);
+ ether_addr_copy(wdev->wext.prev_bssid, bss->bssid);
wdev->wext.prev_bssid_valid = true;
wireless_send_event(wdev->netdev, SIOCGIWAP, &wrqu, NULL);
#endif
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists