* [PATCH] bcm43xx: Fix loss of association after resume
@ 2007-02-09 16:18 Larry Finger
[not found] ` <45cc9ebb.+9O/IXvs/C9RyFnk%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2007-02-09 16:18 UTC (permalink / raw)
To: John Linville
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, Michael Buesch
After a suspend/resume cycle, bcm43xx-softmac has lost its association with
the AP and requires manual intervention. This situation is fixed by making
one of softmac's internal routines public and calling it.
Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
---
Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
===================================================================
--- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -4278,6 +4278,7 @@ static int bcm43xx_resume(struct pci_dev
{
struct net_device *net_dev = pci_get_drvdata(pdev);
struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
+ struct ieee80211softmac_device *mac = ieee80211_priv(net_dev);
int err = 0;
dprintk(KERN_INFO PFX "Resuming...\n");
@@ -4299,6 +4300,9 @@ static int bcm43xx_resume(struct pci_dev
}
netif_device_attach(net_dev);
+ if (mac->associnfo.associated)
+ ieee80211softmac_try_reassoc(mac);
+
dprintk(KERN_INFO PFX "Device resumed.\n");
return 0;
Index: linux-2.6/include/net/ieee80211softmac.h
===================================================================
--- linux-2.6.orig/include/net/ieee80211softmac.h
+++ linux-2.6/include/net/ieee80211softmac.h
@@ -254,6 +254,7 @@ struct ieee80211softmac_device {
};
extern void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm);
+extern void ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac);
static inline void * ieee80211softmac_priv(struct net_device *dev)
{
Index: linux-2.6/net/ieee80211/softmac/ieee80211softmac_assoc.c
===================================================================
--- linux-2.6.orig/net/ieee80211/softmac/ieee80211softmac_assoc.c
+++ linux-2.6/net/ieee80211/softmac/ieee80211softmac_assoc.c
@@ -441,6 +441,7 @@ ieee80211softmac_try_reassoc(struct ieee
schedule_delayed_work(&mac->associnfo.work, 0);
spin_unlock_irqrestore(&mac->lock, flags);
}
+EXPORT_SYMBOL_GPL(ieee80211softmac_try_reassoc);
int
ieee80211softmac_handle_disassoc(struct net_device * dev,
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <45cc9ebb.+9O/IXvs/C9RyFnk%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>]
* Re: [PATCH] bcm43xx: Fix loss of association after resume [not found] ` <45cc9ebb.+9O/IXvs/C9RyFnk%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org> @ 2007-02-09 16:53 ` Michael Buesch [not found] ` <200702091753.12419.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Michael Buesch @ 2007-02-09 16:53 UTC (permalink / raw) To: Larry Finger Cc: netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless-u79uwXL29TY76Z2rM5mHXA, John Linville, Bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w On Friday 09 February 2007 17:18, Larry Finger wrote: > After a suspend/resume cycle, bcm43xx-softmac has lost its association with > the AP and requires manual intervention. This situation is fixed by making > one of softmac's internal routines public and calling it. > > Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org> Ack, this is good as workaround. > > Index: linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c > =================================================================== > --- linux-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_main.c > +++ linux-2.6/drivers/net/wireless/bcm43xx/bcm43xx_main.c > @@ -4278,6 +4278,7 @@ static int bcm43xx_resume(struct pci_dev > { > struct net_device *net_dev = pci_get_drvdata(pdev); > struct bcm43xx_private *bcm = bcm43xx_priv(net_dev); > + struct ieee80211softmac_device *mac = ieee80211_priv(net_dev); > int err = 0; > > dprintk(KERN_INFO PFX "Resuming...\n"); > @@ -4299,6 +4300,9 @@ static int bcm43xx_resume(struct pci_dev > } > netif_device_attach(net_dev); > > + if (mac->associnfo.associated) > + ieee80211softmac_try_reassoc(mac); > + > dprintk(KERN_INFO PFX "Device resumed.\n"); > > return 0; > Index: linux-2.6/include/net/ieee80211softmac.h > =================================================================== > --- linux-2.6.orig/include/net/ieee80211softmac.h > +++ linux-2.6/include/net/ieee80211softmac.h > @@ -254,6 +254,7 @@ struct ieee80211softmac_device { > }; > > extern void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm); > +extern void ieee80211softmac_try_reassoc(struct ieee80211softmac_device *mac); > > static inline void * ieee80211softmac_priv(struct net_device *dev) > { > Index: linux-2.6/net/ieee80211/softmac/ieee80211softmac_assoc.c > =================================================================== > --- linux-2.6.orig/net/ieee80211/softmac/ieee80211softmac_assoc.c > +++ linux-2.6/net/ieee80211/softmac/ieee80211softmac_assoc.c > @@ -441,6 +441,7 @@ ieee80211softmac_try_reassoc(struct ieee > schedule_delayed_work(&mac->associnfo.work, 0); > spin_unlock_irqrestore(&mac->lock, flags); > } > +EXPORT_SYMBOL_GPL(ieee80211softmac_try_reassoc); > > int > ieee80211softmac_handle_disassoc(struct net_device * dev, > - > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- Greetings Michael. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <200702091753.12419.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>]
* Re: [PATCH] bcm43xx: Fix loss of association after resume [not found] ` <200702091753.12419.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org> @ 2007-02-10 17:11 ` Rafael J. Wysocki 0 siblings, 0 replies; 3+ messages in thread From: Rafael J. Wysocki @ 2007-02-10 17:11 UTC (permalink / raw) To: Larry Finger Cc: bcm43xx-dev-0fE9KPoRgkgATYTw5x5z8w, Michael Buesch, netdev-u79uwXL29TY76Z2rM5mHXA, linux-wireless-u79uwXL29TY76Z2rM5mHXA, John Linville On Friday, 9 February 2007 17:53, Michael Buesch wrote: > On Friday 09 February 2007 17:18, Larry Finger wrote: > > After a suspend/resume cycle, bcm43xx-softmac has lost its association with > > the AP and requires manual intervention. This situation is fixed by making > > one of softmac's internal routines public and calling it. > > > > Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org> > > Ack, this is good as workaround. I'm running with this patch applied right now, but the association is lost after the resume anyway. I have to reload bcm43xx to make it associate with the AP again (no big deal). Greetings, Rafael -- If you don't have the time to read, you don't have the time or the tools to write. - Stephen King - To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-10 17:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-09 16:18 [PATCH] bcm43xx: Fix loss of association after resume Larry Finger
[not found] ` <45cc9ebb.+9O/IXvs/C9RyFnk%Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
2007-02-09 16:53 ` Michael Buesch
[not found] ` <200702091753.12419.mb-fseUSCV1ubazQB+pC5nmwQ@public.gmane.org>
2007-02-10 17:11 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).