lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20140512193631.248a7ed5ede5537fd973a501@skynet.be>
Date:	Mon, 12 May 2014 19:36:31 +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/mlme.c: replace memcpy by ether_addr_copy

This patch also fixes some checkpatch warnings.

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/mlme.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index c52ff59..4c43eed 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -31,8 +31,7 @@ void cfg80211_rx_assoc_resp(struct net_device *dev, struct cfg80211_bss *bss,
 
 	trace_cfg80211_send_rx_assoc(dev, bss);
 
-	/*
-	 * This is a bit of a hack, we don't notify userspace of
+	/* This is a bit of a hack, we don't notify userspace of
 	 * a (re-)association reply if we tried to send a reassoc
 	 * and got a reject -- we only try again with an assoc
 	 * frame instead of reassoc.
@@ -256,9 +255,9 @@ void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
 		return;
 	}
 
-	p1 = (u8*)(ht_capa);
-	p2 = (u8*)(ht_capa_mask);
-	for (i = 0; i<sizeof(*ht_capa); i++)
+	p1 = (u8 *)(ht_capa);
+	p2 = (u8 *)(ht_capa_mask);
+	for (i = 0; i < sizeof(*ht_capa); i++)
 		p1[i] &= p2[i];
 }
 
@@ -273,8 +272,8 @@ void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,
 		return;
 	}
 
-	p1 = (u8*)(vht_capa);
-	p2 = (u8*)(vht_capa_mask);
+	p1 = (u8 *)(vht_capa);
+	p2 = (u8 *)(vht_capa_mask);
 	for (i = 0; i < sizeof(*vht_capa); i++)
 		p1[i] &= p2[i];
 }
@@ -392,7 +391,7 @@ void cfg80211_mlme_down(struct cfg80211_registered_device *rdev,
 	if (!wdev->current_bss)
 		return;
 
-	memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
+	ether_addr_copy(bssid, wdev->current_bss->pub.bssid);
 	cfg80211_mlme_deauth(rdev, dev, bssid, NULL, 0,
 			     WLAN_REASON_DEAUTH_LEAVING, false);
 }
@@ -564,8 +563,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
 				break;
 			}
 
-			/*
-			 * check for IBSS DA must be done by driver as
+			/* check for IBSS DA must be done by driver as
 			 * cfg80211 doesn't track the stations
 			 */
 			if (wdev->iftype == NL80211_IFTYPE_ADHOC)
@@ -589,14 +587,12 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
 				err = -EINVAL;
 				break;
 			}
-			/*
-			 * check for mesh DA must be done by driver as
+			/* check for mesh DA must be done by driver as
 			 * cfg80211 doesn't track the stations
 			 */
 			break;
 		case NL80211_IFTYPE_P2P_DEVICE:
-			/*
-			 * fall through, P2P device only supports
+			/* fall through, P2P device only supports
 			 * public action frames
 			 */
 		default:
-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ