Skip to contentSkip to conversation

bcm43xx-softmac - set correct value in mac_suspended for ifdown/ifup sequence

PATCH In review Larry Finger 2 participants 2 messages Aug 23, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bcm43xx-softmac - set correct value in mac_suspended for ifdown/ifup sequence

John,

Please apply this to wireless-2.6.

Michael - bcm43xx-d80211 probably needs this as well.

Larry

---------------------------------------------------

When bcm43xx-softmac is given an ifdown/ifup sequence, the value for bcm->mac_suspended ends up wrong, which leads to a large number of assert(bcm->mac_suspended>=0) messages. This one-line patch fixes this problem.

index b095f3c..f532f3c 100644

drivers/net/wireless/bcm43xx/bcm43xx_main.c +1 -0
@@ -3484,6 +3484,7 @@ int bcm43xx_select_wireless_core(struct
 	bcm43xx_macfilter_clear(bcm, BCM43xx_MACFILTER_ASSOC);
 	bcm43xx_macfilter_set(bcm, BCM43xx_MACFILTER_SELF, (u8 *)(bcm->net_dev->dev_addr));
 	bcm43xx_security_init(bcm);
+	bcm->mac_suspended = 1;
 	ieee80211softmac_start(bcm->net_dev);
 
 	/* Let's go! Be careful after enabling the IRQs.
#1 lore raw
Quoted 6 lines · Larry Finger

John,

Please apply this to wireless-2.6.

Michael - bcm43xx-d80211 probably needs this as well.

Quoted 7 lines

Larry

---------------------------------------------------

When bcm43xx-softmac is given an ifdown/ifup sequence, the value for bcm->mac_suspended ends up wrong, which leads to a large number of assert(bcm->mac_suspended>=0) messages. This one-line patch fixes this problem.

I think the following is the correct fix for the issue.
It is already in the d80211 branch. (Seems like it got lost somehow). Can you test this?

drivers/net/wireless/bcm43xx/bcm43xx_main.c +2 -0
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
@@ -3349,6 +3349,8 @@
 	memset(bcm->dma_reason, 0, sizeof(bcm->dma_reason));
 	bcm->irq_savedstate = BCM43xx_IRQ_INITIAL;
 
+	bcm->mac_suspended = 1;
+
 	/* Noise calculation context */
 	memset(&bcm->noisecalc, 0, sizeof(bcm->noisecalc));
 
Signature · 1 line
Greetings Michael.