aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4d8d2320c9fd..235e037e6509 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -273,17 +273,24 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
273 mutex_init(&intf->beacon_skb_mutex); 273 mutex_init(&intf->beacon_skb_mutex);
274 intf->beacon = entry; 274 intf->beacon = entry;
275 275
276 if (vif->type == NL80211_IFTYPE_AP)
277 memcpy(&intf->bssid, vif->addr, ETH_ALEN);
278 memcpy(&intf->mac, vif->addr, ETH_ALEN);
279
280 /* 276 /*
281 * The MAC adddress must be configured after the device 277 * The MAC adddress must be configured after the device
282 * has been initialized. Otherwise the device can reset 278 * has been initialized. Otherwise the device can reset
283 * the MAC registers. 279 * the MAC registers.
280 * The BSSID address must only be configured in AP mode,
281 * however we should not send an empty BSSID address for
282 * STA interfaces at this time, since this can cause
283 * invalid behavior in the device.
284 */ 284 */
285 rt2x00lib_config_intf(rt2x00dev, intf, vif->type, 285 memcpy(&intf->mac, vif->addr, ETH_ALEN);
286 intf->mac, intf->bssid); 286 if (vif->type == NL80211_IFTYPE_AP) {
287 memcpy(&intf->bssid, vif->addr, ETH_ALEN);
288 rt2x00lib_config_intf(rt2x00dev, intf, vif->type,
289 intf->mac, intf->bssid);
290 } else {
291 rt2x00lib_config_intf(rt2x00dev, intf, vif->type,
292 intf->mac, NULL);
293 }
287 294
288 /* 295 /*
289 * Some filters depend on the current working mode. We can force 296 * Some filters depend on the current working mode. We can force