aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-12-27 09:05:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-04 14:35:14 -0500
commita39fd6be19bde021314262a6d2193b3792c808db (patch)
treed3f3c3a2729422edaf659a4d6fe99a8cb719a568
parent773d1b98268a9effac047fd2ab1c47bf9f7a9e5f (diff)
rt2x00: remove intf->mac field.
The mac field of the rt2x00_intf structure is written to once and used twice. In both these uses the mac address is available via other means. Remove this field as it does not appear to be necessary. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h5
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c6
2 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 5f7f52ff74d2..755b723400f5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -360,11 +360,6 @@ struct rt2x00_intf {
360 spinlock_t lock; 360 spinlock_t lock;
361 361
362 /* 362 /*
363 * MAC of the device.
364 */
365 u8 mac[ETH_ALEN];
366
367 /*
368 * beacon->skb must be protected with the mutex. 363 * beacon->skb must be protected with the mutex.
369 */ 364 */
370 struct mutex beacon_skb_mutex; 365 struct mutex beacon_skb_mutex;
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 23250a5d8331..f8775c488be4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -282,9 +282,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
282 * STA interfaces at this time, since this can cause 282 * STA interfaces at this time, since this can cause
283 * invalid behavior in the device. 283 * invalid behavior in the device.
284 */ 284 */
285 memcpy(&intf->mac, vif->addr, ETH_ALEN);
286 rt2x00lib_config_intf(rt2x00dev, intf, vif->type, 285 rt2x00lib_config_intf(rt2x00dev, intf, vif->type,
287 intf->mac, NULL); 286 vif->addr, NULL);
288 287
289 /* 288 /*
290 * Some filters depend on the current working mode. We can force 289 * Some filters depend on the current working mode. We can force
@@ -492,7 +491,6 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
492 struct ieee80211_key_conf *key) 491 struct ieee80211_key_conf *key)
493{ 492{
494 struct rt2x00_dev *rt2x00dev = hw->priv; 493 struct rt2x00_dev *rt2x00dev = hw->priv;
495 struct rt2x00_intf *intf = vif_to_intf(vif);
496 int (*set_key) (struct rt2x00_dev *rt2x00dev, 494 int (*set_key) (struct rt2x00_dev *rt2x00dev,
497 struct rt2x00lib_crypto *crypto, 495 struct rt2x00lib_crypto *crypto,
498 struct ieee80211_key_conf *key); 496 struct ieee80211_key_conf *key);
@@ -516,7 +514,7 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
516 if (rt2x00dev->intf_sta_count) 514 if (rt2x00dev->intf_sta_count)
517 crypto.bssidx = 0; 515 crypto.bssidx = 0;
518 else 516 else
519 crypto.bssidx = intf->mac[5] & (rt2x00dev->ops->max_ap_intf - 1); 517 crypto.bssidx = vif->addr[5] & (rt2x00dev->ops->max_ap_intf - 1);
520 518
521 crypto.cipher = rt2x00crypto_key_to_cipher(key); 519 crypto.cipher = rt2x00crypto_key_to_cipher(key);
522 if (crypto.cipher == CIPHER_NONE) 520 if (crypto.cipher == CIPHER_NONE)