[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#635653: [linux-2.6] Please pick: iwlagn: check for !priv->txq in iwlagn_wait_tx_queue_empty



Package: linux-2.6
Version: 3.0.0-1-amd64
Severity: normal
Tags: patch

--- Please enter the report below this line. ---

There is a mean bug in the 3.0 version of the iwlagn driver causing a 
kernel panic when going into suspend with a wireless card that is down. 
However, there is a fix for that already that is small clean and works 
like a charm. It would be nice if you could cherry pick it for the next 
update, thanks.

For the origin of the patch and further info see [1]. 

Kind regards,
Florian.


[1] https://patchwork.kernel.org/patch/1005892/

--- System information. ---
Architecture: amd64
Kernel:       Linux 3.0.0-1-amd64

Debian Release: wheezy/sid
  500 unstable        www.debian-multimedia.org 
  500 unstable        ftp.de.debian.org 
  500 testing         ftp.de.debian.org 
  100 experimental-snapshots qt-kde.debian.net 
    1 experimental    ftp.de.debian.org 

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index f803fb6..d6ae444 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1487,6 +1487,9 @@  int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv)
 	unsigned long now = jiffies;
 	int ret = 0;
 
+	if (!priv->txq)
+		return 0;
+
 	/* waiting for all the tx frames complete might take a while */
 	for (cnt = 0; cnt < priv->hw_params.max_txq_num; cnt++) {
 		if (cnt == priv->cmd_queue)

Reply to: