2009-03-27 19:40:00

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH] iwlwifi: change check triggering device restart after rfkill change

The STATUS_ALIVE value cannot be used because it is cleared when
interface is brought down and will not be set if rfkill is enabled when
interface is started again. The interface can thus not be brought up if
rfkill was enabled before stopping the interface and disabled after
starting the interface.

Change the test to use priv->is_open instead, this will be set when
interface is started whether rfkill is enabled or not.

Thanks to Helmut Schaa for the suggested fix.

Signed-off-by: Reinette Chatre <[email protected]>
CC: Helmut Schaa <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 18ef713..970c4fd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2058,7 +2058,7 @@ void iwl_bg_rf_kill(struct work_struct *work)
"HW and/or SW RF Kill no longer active, restarting "
"device\n");
if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
- test_bit(STATUS_ALIVE, &priv->status))
+ priv->is_open)
queue_work(priv->workqueue, &priv->restart);
} else {
/* make sure mac80211 stop sending Tx frame */
--
1.5.6.3



2009-03-27 23:51:31

by Helmut Schaa

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: change check triggering device restart after rfkill change

Am Freitag, 27. M=E4rz 2009 schrieb Reinette Chatre:
> The STATUS_ALIVE value cannot be used because it is cleared when
> interface is brought down and will not be set if rfkill is enabled wh=
en
> interface is started again. The interface can thus not be brought up =
if
> rfkill was enabled before stopping the interface and disabled after
> starting the interface.
>=20
> Change the test to use priv->is_open instead, this will be set when
> interface is started whether rfkill is enabled or not.
>=20
> Thanks to Helmut Schaa for the suggested fix.
>=20
> Signed-off-by: Reinette Chatre <[email protected]>
> CC: Helmut Schaa <[email protected]>

Acked-by: Helmut Schaa <[email protected]>

Looks good to me. Thanks Reinette.

> ---
> drivers/net/wireless/iwlwifi/iwl-core.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>=20
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wi=
reless/iwlwifi/iwl-core.c
> index 18ef713..970c4fd 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
> @@ -2058,7 +2058,7 @@ void iwl_bg_rf_kill(struct work_struct *work)
> "HW and/or SW RF Kill no longer active, restarting "
> "device\n");
> if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
> - test_bit(STATUS_ALIVE, &priv->status))
> + priv->is_open)
> queue_work(priv->workqueue, &priv->restart);
> } else {
> /* make sure mac80211 stop sending Tx frame */