mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] net/wireless/ibss.c: replace memcpy by ether_addr_copy
@ 2014-05-12 17:30 Fabian Frederick
  2014-05-12 17:50 ` Joe Perches
  0 siblings, 1 reply; 7+ messages in thread
From: Fabian Frederick @ 2014-05-12 17:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: Johannes Berg, John W. Linville, akpm

This patch also fixes some comment checkpatch warnings

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 net/wireless/ibss.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
index a6b5bda..a0a1381 100644
--- a/net/wireless/ibss.c
+++ b/net/wireless/ibss.c
@@ -49,7 +49,7 @@ void __cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
 				GFP_KERNEL);
 #ifdef CONFIG_CFG80211_WEXT
 	memset(&wrqu, 0, sizeof(wrqu));
-	memcpy(wrqu.ap_addr.sa_data, bssid, ETH_ALEN);
+	ether_addr_copy(wrqu.ap_addr.sa_data, bssid);
 	wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
 #endif
 }
@@ -72,7 +72,7 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
 		return;
 
 	ev->type = EVENT_IBSS_JOINED;
-	memcpy(ev->ij.bssid, bssid, ETH_ALEN);
+	ether_addr_copy(ev->ij.bssid, bssid);
 	ev->ij.channel = channel;
 
 	spin_lock_irqsave(&wdev->event_lock, flags);
@@ -98,11 +98,10 @@ static int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
 		return -EALREADY;
 
 	if (!params->basic_rates) {
-		/*
-		* If no rates were explicitly configured,
-		* use the mandatory rate set for 11b or
-		* 11a for maximum compatibility.
-		*/
+		/* If no rates were explicitly configured,
+		 * use the mandatory rate set for 11b or
+		 * 11a for maximum compatibility.
+		 */
 		struct ieee80211_supported_band *sband =
 			rdev->wiphy.bands[params->chandef.chan->band];
 		int j;
@@ -190,8 +189,7 @@ static void __cfg80211_clear_ibss(struct net_device *dev, bool nowext)
 
 	rdev_set_qos_map(rdev, dev, NULL);
 
-	/*
-	 * Delete all the keys ... pairwise keys can't really
+	/* Delete all the keys ... pairwise keys can't really
 	 * exist any more anyway, but default keys might.
 	 */
 	if (rdev->ops->del_key)
@@ -524,7 +522,7 @@ int cfg80211_ibss_wext_siwap(struct net_device *dev,
 		return err;
 
 	if (bssid) {
-		memcpy(wdev->wext.bssid, bssid, ETH_ALEN);
+		ether_addr_copy(wdev->wext.bssid, bssid);
 		wdev->wext.ibss.bssid = wdev->wext.bssid;
 	} else
 		wdev->wext.ibss.bssid = NULL;
@@ -550,9 +548,9 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev,
 
 	wdev_lock(wdev);
 	if (wdev->current_bss)
-		memcpy(ap_addr->sa_data, wdev->current_bss->pub.bssid, ETH_ALEN);
+		ether_addr_copy(ap_addr->sa_data, wdev->current_bss->pub.bssid);
 	else if (wdev->wext.ibss.bssid)
-		memcpy(ap_addr->sa_data, wdev->wext.ibss.bssid, ETH_ALEN);
+		ether_addr_copy(ap_addr->sa_data, wdev->wext.ibss.bssid);
 	else
 		memset(ap_addr->sa_data, 0, ETH_ALEN);
 
-- 
1.9.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-13  7:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-12 17:30 [PATCH 1/1] net/wireless/ibss.c: replace memcpy by ether_addr_copy Fabian Frederick
2014-05-12 17:50 ` Joe Perches
2014-05-12 18:00   ` Fabian Frederick
2014-05-12 18:07     ` Joe Perches
2014-05-12 18:51       ` Johannes Berg
2014-05-12 19:17         ` Joe Perches
2014-05-13  7:30           ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®