lkml.org 
[lkml]   [2014]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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@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/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

\
 
 \ /
  Last update: 2014-05-12 20:21    [W:0.035 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site