mac80211: remove unneeded 'bssid' variable

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:42 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=90bcf867ceef50155a1a14af4dc248061f6b8b94
Commit:     90bcf867ceef50155a1a14af4dc248061f6b8b94
Parent:     4c29867790131c281ef96af507d85e3e5f829408
Author:     Johannes Berg <johannes.berg at intel.com>
AuthorDate: Wed Aug 1 15:48:38 2012 +0200
Committer:  Johannes Berg <johannes.berg at intel.com>
CommitDate: Mon Aug 20 13:57:47 2012 +0200

    mac80211: remove unneeded 'bssid' variable
    
    There's no need to copy the BSSID just to print
    it, remove the unnecessary variable.
    
    Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 net/mac80211/mlme.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9d60b49..b7c05bb 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1696,7 +1696,6 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
 {
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 	struct ieee80211_local *local = sdata->local;
-	u8 bssid[ETH_ALEN];
 	u8 frame_buf[DEAUTH_DISASSOC_LEN];
 
 	mutex_lock(&ifmgd->mtx);
@@ -1705,9 +1704,8 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
 		return;
 	}
 
-	memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
-
-	sdata_info(sdata, "Connection to AP %pM lost\n", bssid);
+	sdata_info(sdata, "Connection to AP %pM lost\n",
+		   ifmgd->associated->bssid);
 
 	ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
 			       WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,



More information about the linux-mtd-cvs mailing list