2008-11-04 20:21:16

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 0/3] iwlwifi driver fixes: wireless-testing and 2.6.28

John,

This series contains three fixes for the iwl3945 driver.
All three patches also apply to 2.6.28, could you please
apply them to 2.6.28 also?

The fix for the deadlock in suspend has already been made
for iwlagn and sent to 2.6.28.

The fix for the scanning bits have already been made for
iwlagn in wireless-testing, could you please send that
patch to 2.6.28 also? It is:
iwlwifi: clear scanning bits upon failure
9685e33a2c919c1e95cb7072988fc1e0f0bad3d9

The fix for the channel count is not needed for iwlagn.

[PATCH 1/3] iwl3945: clear scanning bits upon failure
[PATCH 2/3] iwl3945: do not send scan command if channel count zero
[PATCH 3/3] iwl3945: fix deadlock on suspend

Thank you very much

Reinette



2008-11-04 20:21:16

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 1/3] iwl3945: clear scanning bits upon failure

From: Mohamed Abbas <[email protected]>

This patch ensures we clear any scan status bit when
an error occurs while sending the scan command. It is
the implementation of patch:
"iwlwifi: clear scanning bits upon failure"
for iwl3945.

Signed-off-by: Mohamed Abbas <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
Also applies to 2.6.28.

drivers/net/wireless/iwlwifi/iwl3945-base.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 7222d7c..88465e4 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6213,6 +6213,14 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
return;

done:
+ /* can not perform scan make sure we clear scanning
+ * bits from status so next scan request can be performed.
+ * if we dont clear scanning status bit here all next scan
+ * will fail
+ */
+ clear_bit(STATUS_SCAN_HW, &priv->status);
+ clear_bit(STATUS_SCANNING, &priv->status);
+
/* inform mac80211 scan aborted */
queue_work(priv->workqueue, &priv->scan_completed);
mutex_unlock(&priv->mutex);
--
1.5.4.3


2008-11-04 20:21:17

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 2/3] iwl3945: do not send scan command if channel count zero

Do not send scan command if no channels to scan.

This avoids a Microcode error as reported in:
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1650
http://bugzilla.kernel.org/show_bug.cgi?id=11806
http://marc.info/?l=linux-wireless&m=122437145211886&w=2

Signed-off-by: Reinette Chatre <[email protected]>
---
Also applies to 2.6.28.

drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 88465e4..caac74c 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6196,6 +6196,11 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
n_probes,
(void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]);

+ if (scan->channel_count == 0) {
+ IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count);
+ goto done;
+ }
+
cmd.len += le16_to_cpu(scan->tx_cmd.len) +
scan->channel_count * sizeof(struct iwl3945_scan_channel);
cmd.data = scan;
--
1.5.4.3


2008-11-04 20:21:17

by Reinette Chatre

[permalink] [raw]
Subject: [PATCH 3/3] iwl3945: fix deadlock on suspend

From: Zhu, Yi <[email protected]>

This patch fixes iwl3945 deadlock during suspend by moving notify_mac out
of iwl3945 mutex. This is a portion of the same fix for iwlwifi by Tomas.

Signed-off-by: Zhu Yi <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Reinette Chatre <[email protected]>
---
Also applies to 2.6.28.

drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index caac74c..5dd53a1 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -5714,7 +5714,6 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
if (priv->error_recovering)
iwl3945_error_recovery(priv);

- ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
return;

restart:
@@ -5959,6 +5958,7 @@ static void iwl3945_bg_alive_start(struct work_struct *data)
mutex_lock(&priv->mutex);
iwl3945_alive_start(priv);
mutex_unlock(&priv->mutex);
+ ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
}

static void iwl3945_bg_rf_kill(struct work_struct *work)
--
1.5.4.3