FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 11-14-2008, 12:04 AM
Andy Whitcroft
 
Default SRU: UBUNTU: iwlagn -- fix rfkill when on when driver loaded

From: Mohamed Abbas <mohamed.abbas@intel.com>

OriginalAuthor: Mohamed Abbas <mohamed.abbas@intel.com>
Bug: #193970

When the iwlagn driver is loaded and the rfkill switch is already on
then we do not start notifications. This prevents the switch enabling
wireless.

This patch is currently on its way upstream. This has been tested on an
iwl5300. Proposing this fix for SRU for Intrepid.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 5 ++++-
drivers/net/wireless/iwlwifi/iwl-core.c | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index c00b25d..36aeb15 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1656,8 +1656,11 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
* the driver as well won't allow loading if RFKILL is set
* therefore no need to restart the driver from this handler
*/
- if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
+ if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
clear_bit(STATUS_RF_KILL_HW, &priv->status);
+ if (priv->is_open && !iwl_is_rfkill(priv))
+ queue_work(priv->workqueue, &priv->up);
+ }

handled |= CSR_INT_BIT_RF_KILL;
}
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 1383fd1..22987f4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1435,6 +1435,16 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
return 0;
}

+ /* when driver is up while rfkill is on, it wont receive
+ * any CARD_STATE_NOTIFICATION notifications so we have to
+ * restart it in here
+ */
+ if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) {
+ clear_bit(STATUS_RF_KILL_SW, &priv->status);
+ if (!iwl_is_rfkill(priv))
+ queue_work(priv->workqueue, &priv->up);
+ }
+
/* If the driver is already loaded, it will receive
* CARD_STATE_NOTIFICATION notifications and the handler will
* call restart to reload the driver.
--
1.5.6.3


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 11-14-2008, 05:06 AM
Tim Gardner
 
Default SRU: UBUNTU: iwlagn -- fix rfkill when on when driver loaded

Andy Whitcroft wrote:
> From: Mohamed Abbas <mohamed.abbas@intel.com>
>
> OriginalAuthor: Mohamed Abbas <mohamed.abbas@intel.com>
> Bug: #193970
>
> When the iwlagn driver is loaded and the rfkill switch is already on
> then we do not start notifications. This prevents the switch enabling
> wireless.
>
> This patch is currently on its way upstream. This has been tested on an
> iwl5300. Proposing this fix for SRU for Intrepid.
>
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
> drivers/net/wireless/iwlwifi/iwl-agn.c | 5 ++++-
> drivers/net/wireless/iwlwifi/iwl-core.c | 10 ++++++++++
> 2 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
> index c00b25d..36aeb15 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
> @@ -1656,8 +1656,11 @@ static void iwl4965_irq_tasklet(struct iwl_priv *priv)
> * the driver as well won't allow loading if RFKILL is set
> * therefore no need to restart the driver from this handler
> */
> - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
> + if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
> clear_bit(STATUS_RF_KILL_HW, &priv->status);
> + if (priv->is_open && !iwl_is_rfkill(priv))
> + queue_work(priv->workqueue, &priv->up);
> + }
>
> handled |= CSR_INT_BIT_RF_KILL;
> }
> diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
> index 1383fd1..22987f4 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
> @@ -1435,6 +1435,16 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
> return 0;
> }
>
> + /* when driver is up while rfkill is on, it wont receive
> + * any CARD_STATE_NOTIFICATION notifications so we have to
> + * restart it in here
> + */
> + if (priv->is_open && !test_bit(STATUS_ALIVE, &priv->status)) {
> + clear_bit(STATUS_RF_KILL_SW, &priv->status);
> + if (!iwl_is_rfkill(priv))
> + queue_work(priv->workqueue, &priv->up);
> + }
> +
> /* If the driver is already loaded, it will receive
> * CARD_STATE_NOTIFICATION notifications and the handler will
> * call restart to reload the driver.

ACK - applied.

--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 06:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org