提交 06b3cda0 编写于 作者: I Ivo van Doorn 提交者: John W. Linville

rt2x00: Fix regression for rt2500pci

Since commit:
     commit f1aa4c54
     Author: Ivo van Doorn <ivdoorn@gmail.com>
     Date:   Tue Jun 29 21:38:55 2010 +0200

     rt2x00: Write the BSSID to register when interface is added

mananged mode in rt2500pci was broken, due to intf->bssid containing
random data rather then the expected 00:00:00:00:00:00

This is corrected by sending the BSSID to rt2x00lib_config_intf
only in AP mode where the bssid is set to a valid value.
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Acked-by: NHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d9734979
......@@ -273,17 +273,24 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
mutex_init(&intf->beacon_skb_mutex);
intf->beacon = entry;
if (vif->type == NL80211_IFTYPE_AP)
memcpy(&intf->bssid, vif->addr, ETH_ALEN);
memcpy(&intf->mac, vif->addr, ETH_ALEN);
/*
* The MAC adddress must be configured after the device
* has been initialized. Otherwise the device can reset
* the MAC registers.
* The BSSID address must only be configured in AP mode,
* however we should not send an empty BSSID address for
* STA interfaces at this time, since this can cause
* invalid behavior in the device.
*/
memcpy(&intf->mac, vif->addr, ETH_ALEN);
if (vif->type == NL80211_IFTYPE_AP) {
memcpy(&intf->bssid, vif->addr, ETH_ALEN);
rt2x00lib_config_intf(rt2x00dev, intf, vif->type,
intf->mac, intf->bssid);
} else {
rt2x00lib_config_intf(rt2x00dev, intf, vif->type,
intf->mac, NULL);
}
/*
* Some filters depend on the current working mode. We can force
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册