Commit 7be1bb6b authored by Michael Buesch's avatar Michael Buesch Committed by David S. Miller

b43: Fix suspend/resume

This fixes suspend/resume.

We must not overwrite the MAC addresses on resume. Otherwise
the card won't ACK any packets anymore.
Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 76f3915b
...@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev) ...@@ -3532,8 +3532,6 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
b43_bluetooth_coext_enable(dev); b43_bluetooth_coext_enable(dev);
ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */ ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */
memset(wl->bssid, 0, ETH_ALEN);
memset(wl->mac_addr, 0, ETH_ALEN);
b43_upload_card_macaddress(dev); b43_upload_card_macaddress(dev);
b43_security_init(dev); b43_security_init(dev);
b43_rng_init(wl); b43_rng_init(wl);
...@@ -3632,6 +3630,14 @@ static int b43_op_start(struct ieee80211_hw *hw) ...@@ -3632,6 +3630,14 @@ static int b43_op_start(struct ieee80211_hw *hw)
int err = 0; int err = 0;
bool do_rfkill_exit = 0; bool do_rfkill_exit = 0;
/* Kill all old instance specific information to make sure
* the card won't use it in the short timeframe between start
* and mac80211 reconfiguring it. */
memset(wl->bssid, 0, ETH_ALEN);
memset(wl->mac_addr, 0, ETH_ALEN);
wl->filter_flags = 0;
wl->radiotap_enabled = 0;
/* First register RFkill. /* First register RFkill.
* LEDs that are registered later depend on it. */ * LEDs that are registered later depend on it. */
b43_rfkill_init(dev); b43_rfkill_init(dev);
......
...@@ -237,7 +237,9 @@ void b43_generate_txhdr(struct b43_wldev *dev, ...@@ -237,7 +237,9 @@ void b43_generate_txhdr(struct b43_wldev *dev,
B43_WARN_ON(key_idx >= dev->max_nr_keys); B43_WARN_ON(key_idx >= dev->max_nr_keys);
key = &(dev->key[key_idx]); key = &(dev->key[key_idx]);
B43_WARN_ON(!key->keyconf);
if (likely(key->keyconf)) {
/* This key is valid. Use it for encryption. */
/* Hardware appends ICV. */ /* Hardware appends ICV. */
plcp_fragment_len += txctl->icv_len; plcp_fragment_len += txctl->icv_len;
...@@ -252,6 +254,7 @@ void b43_generate_txhdr(struct b43_wldev *dev, ...@@ -252,6 +254,7 @@ void b43_generate_txhdr(struct b43_wldev *dev,
ARRAY_SIZE(txhdr->iv)); ARRAY_SIZE(txhdr->iv));
memcpy(txhdr->iv, ((u8 *) wlhdr) + wlhdr_len, iv_len); memcpy(txhdr->iv, ((u8 *) wlhdr) + wlhdr_len, iv_len);
} }
}
if (b43_is_old_txhdr_format(dev)) { if (b43_is_old_txhdr_format(dev)) {
b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->old_format.plcp), b43_generate_plcp_hdr((struct b43_plcp_hdr4 *)(&txhdr->old_format.plcp),
plcp_fragment_len, rate); plcp_fragment_len, rate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment