* [PATCH 1/2] wl1271: Indicate disconnection on hardware failure
@ 2010-09-30 10:43 juuso.oikarinen
2010-09-30 10:43 ` [PATCH 2/2] wl1271: Move work-init calls to hw allocation juuso.oikarinen
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: juuso.oikarinen @ 2010-09-30 10:43 UTC (permalink / raw)
To: luciano.coelho; +Cc: linux-wireless
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
In the event of a hardware failure, reconfiguring a live connection back
with the wl1271 chip does not work as expected. The chip has management
features which require setting up the association from scratch to work
correctly. To ensure this is done every time, in managed mode, when associated,
indicate connection loss to the mac80211 before asking to reconfigure the
hardware.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271_main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index cb18f22..2253458 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -636,6 +636,9 @@ static void wl1271_recovery_work(struct work_struct *work)
wl1271_info("Hardware recovery in progress.");
+ if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags))
+ ieee80211_connection_loss(wl->vif);
+
/* reboot the chipset */
__wl1271_op_remove_interface(wl);
ieee80211_restart_hw(wl->hw);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] wl1271: Move work-init calls to hw allocation
2010-09-30 10:43 [PATCH 1/2] wl1271: Indicate disconnection on hardware failure juuso.oikarinen
@ 2010-09-30 10:43 ` juuso.oikarinen
2010-10-04 10:45 ` Luciano Coelho
[not found] ` <1285846632.11177.163.camel@wimaxnb.nmp.nokia.com>
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: juuso.oikarinen @ 2010-09-30 10:43 UTC (permalink / raw)
To: luciano.coelho; +Cc: linux-wireless
From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Due to legacy reason, dating back to when the wl1251 and wl1271 still were
a unified driver, some work-structures are initialized on hardware startup.
The hardware recovery code creates a scenario in which it is possible for a
workstruct to be re-initialized while the work-function itself is running,
which causes a kernel WARNing and a subsequent reboot.
To remedy this, move the work initialization calls to the hw allocation,
which is the logically correct place for them anyway.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
drivers/net/wireless/wl12xx/wl1271_main.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 2253458..1ed9d11 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -667,11 +667,6 @@ static int wl1271_setup(struct wl1271 *wl)
return -ENOMEM;
}
- INIT_WORK(&wl->irq_work, wl1271_irq_work);
- INIT_WORK(&wl->tx_work, wl1271_tx_work);
- INIT_WORK(&wl->recovery_work, wl1271_recovery_work);
- INIT_DELAYED_WORK(&wl->scan_complete_work, wl1271_scan_complete_work);
-
return 0;
}
@@ -2489,6 +2484,10 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
INIT_DELAYED_WORK(&wl->elp_work, wl1271_elp_work);
INIT_DELAYED_WORK(&wl->pspoll_work, wl1271_pspoll_work);
+ INIT_WORK(&wl->irq_work, wl1271_irq_work);
+ INIT_WORK(&wl->tx_work, wl1271_tx_work);
+ INIT_WORK(&wl->recovery_work, wl1271_recovery_work);
+ INIT_DELAYED_WORK(&wl->scan_complete_work, wl1271_scan_complete_work);
wl->channel = WL1271_DEFAULT_CHANNEL;
wl->beacon_int = WL1271_DEFAULT_BEACON_INT;
wl->default_key = 0;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] wl1271: Move work-init calls to hw allocation
[not found] ` <1285846632.11177.163.camel@wimaxnb.nmp.nokia.com>
@ 2010-09-30 11:45 ` Tuomas Katila
0 siblings, 0 replies; 6+ messages in thread
From: Tuomas Katila @ 2010-09-30 11:45 UTC (permalink / raw)
To: Juuso Oikarinen; +Cc: linux-wireless, Luciano Coelho
On Thu, 2010-09-30 at 13:37 +0200, Juuso Oikarinen wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> Due to legacy reason, dating back to when the wl1251 and wl1271 still were
> a unified driver, some work-structures are initialized on hardware startup.
>
> The hardware recovery code creates a scenario in which it is possible for a
> workstruct to be re-initialized while the work-function itself is running,
> which causes a kernel WARNing and a subsequent reboot.
>
> To remedy this, move the work initialization calls to the hw allocation,
> which is the logically correct place for them anyway.
>
> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> ---
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
-Tuomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] wl1271: Indicate disconnection on hardware failure
2010-09-30 10:43 [PATCH 1/2] wl1271: Indicate disconnection on hardware failure juuso.oikarinen
2010-09-30 10:43 ` [PATCH 2/2] wl1271: Move work-init calls to hw allocation juuso.oikarinen
[not found] ` <1285846632.11177.163.camel@wimaxnb.nmp.nokia.com>
@ 2010-10-04 10:45 ` Luciano Coelho
2010-10-05 11:18 ` Luciano Coelho
3 siblings, 0 replies; 6+ messages in thread
From: Luciano Coelho @ 2010-10-04 10:45 UTC (permalink / raw)
To: juuso.oikarinen@nokia.com; +Cc: linux-wireless@vger.kernel.org
On Thu, 2010-09-30 at 12:43 +0200, juuso.oikarinen@nokia.com wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> In the event of a hardware failure, reconfiguring a live connection back
> with the wl1271 chip does not work as expected. The chip has management
> features which require setting up the association from scratch to work
> correctly. To ensure this is done every time, in managed mode, when associated,
> indicate connection loss to the mac80211 before asking to reconfigure the
> hardware.
>
> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> ---
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
I'll apply this to wl12xx soon.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] wl1271: Move work-init calls to hw allocation
2010-09-30 10:43 ` [PATCH 2/2] wl1271: Move work-init calls to hw allocation juuso.oikarinen
@ 2010-10-04 10:45 ` Luciano Coelho
0 siblings, 0 replies; 6+ messages in thread
From: Luciano Coelho @ 2010-10-04 10:45 UTC (permalink / raw)
To: juuso.oikarinen@nokia.com; +Cc: linux-wireless@vger.kernel.org
On Thu, 2010-09-30 at 12:43 +0200, juuso.oikarinen@nokia.com wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> Due to legacy reason, dating back to when the wl1251 and wl1271 still were
> a unified driver, some work-structures are initialized on hardware startup.
>
> The hardware recovery code creates a scenario in which it is possible for a
> workstruct to be re-initialized while the work-function itself is running,
> which causes a kernel WARNing and a subsequent reboot.
>
> To remedy this, move the work initialization calls to the hw allocation,
> which is the logically correct place for them anyway.
>
> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> ---
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
I'll apply this soon.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] wl1271: Indicate disconnection on hardware failure
2010-09-30 10:43 [PATCH 1/2] wl1271: Indicate disconnection on hardware failure juuso.oikarinen
` (2 preceding siblings ...)
2010-10-04 10:45 ` [PATCH 1/2] wl1271: Indicate disconnection on hardware failure Luciano Coelho
@ 2010-10-05 11:18 ` Luciano Coelho
3 siblings, 0 replies; 6+ messages in thread
From: Luciano Coelho @ 2010-10-05 11:18 UTC (permalink / raw)
To: juuso.oikarinen@nokia.com; +Cc: linux-wireless@vger.kernel.org
On Thu, 2010-09-30 at 12:43 +0200, juuso.oikarinen@nokia.com wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> In the event of a hardware failure, reconfiguring a live connection back
> with the wl1271 chip does not work as expected. The chip has management
> features which require setting up the association from scratch to work
> correctly. To ensure this is done every time, in managed mode, when associated,
> indicate connection loss to the mac80211 before asking to reconfigure the
> hardware.
>
> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> ---
Thank you. Applied the series to wl12xx/master.
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-05 11:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-30 10:43 [PATCH 1/2] wl1271: Indicate disconnection on hardware failure juuso.oikarinen
2010-09-30 10:43 ` [PATCH 2/2] wl1271: Move work-init calls to hw allocation juuso.oikarinen
2010-10-04 10:45 ` Luciano Coelho
[not found] ` <1285846632.11177.163.camel@wimaxnb.nmp.nokia.com>
2010-09-30 11:45 ` Tuomas Katila
2010-10-04 10:45 ` [PATCH 1/2] wl1271: Indicate disconnection on hardware failure Luciano Coelho
2010-10-05 11:18 ` Luciano Coelho
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).