]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.24.1/b43-fix-suspend-resume.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.24.1 / b43-fix-suspend-resume.patch
1 From stable-bounces@linux.kernel.org Fri Jan 25 03:23:28 2008
2 From: Michael Buesch <mb@bu3sch.de>
3 Date: Fri, 25 Jan 2008 12:11:45 +0100
4 Subject: b43: Fix suspend/resume
5 To: stable@kernel.org
6 Cc: linux-wireless@vger.kernel.org, bcm43xx-dev@lists.berlios.de
7 Message-ID: <200801251211.45980.mb@bu3sch.de>
8 Content-Disposition: inline
9
10 From: Michael Buesch <mb@bu3sch.de>
11
12 patch 7be1bb6b798d506693d2d8668e801951996b5a4a in mainline.
13
14 This patch makes suspend/resume work with the b43 driver.
15 We must not overwrite the MAC addresses in the init function, as this
16 would also overwrite the MAC on resume. With an all-zero MAC the device
17 firmware is not able to ACK any received packets anymore.
18 Fix this by moving the initializion stuff that must be done on init but
19 not on resume to the start function.
20 Also zero out filter_flags to make sure we don't have some flags
21 from a previous instance for a tiny timeframe until mac80211 reconfigures
22 them.
23
24 Signed-off-by: Michael Buesch <mb@bu3sch.de>
25 Signed-off-by: John W. Linville <linville@tuxdriver.com>
26 Signed-off-by: David S. Miller <davem@davemloft.net>
27 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
28
29 ---
30 drivers/net/wireless/b43/main.c | 9 +++++++--
31 1 file changed, 7 insertions(+), 2 deletions(-)
32
33 --- a/drivers/net/wireless/b43/main.c
34 +++ b/drivers/net/wireless/b43/main.c
35 @@ -3395,8 +3395,6 @@ static int b43_wireless_core_init(struct
36 b43_bluetooth_coext_enable(dev);
37
38 ssb_bus_powerup(bus, 1); /* Enable dynamic PCTL */
39 - memset(wl->bssid, 0, ETH_ALEN);
40 - memset(wl->mac_addr, 0, ETH_ALEN);
41 b43_upload_card_macaddress(dev);
42 b43_security_init(dev);
43 b43_rng_init(wl);
44 @@ -3493,6 +3491,13 @@ static int b43_start(struct ieee80211_hw
45 int did_init = 0;
46 int err = 0;
47
48 + /* Kill all old instance specific information to make sure
49 + * the card won't use it in the short timeframe between start
50 + * and mac80211 reconfiguring it. */
51 + memset(wl->bssid, 0, ETH_ALEN);
52 + memset(wl->mac_addr, 0, ETH_ALEN);
53 + wl->filter_flags = 0;
54 +
55 /* First register RFkill.
56 * LEDs that are registered later depend on it. */
57 b43_rfkill_init(dev);