Skip to contentSkip to conversation

iwlwifi driver updates 01/20/2009

PATCH In review Reinette Chatre 4 participants 13 messages Jan 21, 2009 1 message not in the archive Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

cover iwlwifi driver updates 01/20/2009

This series contains three fixes to iwlwifi rate scaling. Of most interest is a fix for the "rs_get_rate()" problem that is tracked on kerneloops.org. A similar fix that applies to 2.6.29 will be sent separately.

We also include a fix for the "MAC is in deep sleep" problem tracked in
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1845 and
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1834

We include one 3945 porting patch.

[PATCH 1/5] iwlwifi: fix rs_get_rate WARN_ON() [PATCH 2/5] iwlwifi: allow user to set max rate [PATCH 3/5] iwlagn: fix agn rate scaling
[PATCH 4/5] iwl3945: Use iwl-rfkill
[PATCH 5/5] iwl3945: fix deep sleep when removing the driver.

Thank you

Reinette

#1 lore raw

PATCH 1/5 iwlwifi: fix rs_get_rate WARN_ON()

From: Abbas, Mohamed <[email protected]>

In ieee80211_sta structure there is u64 supp_rates[IEEE80211_NUM_BANDS] this is filled with all support rate from assoc_resp. If we associate with G-band AP only supp_rates of G-band will be set the other band supp_rates will be set to 0. If the user type this command this will cause mac80211 to set to new channel, mac80211 does not disassociate in setting new channel, so the active band is now A-band. then in handling the new essid mac80211 will kick in the assoc steps which involve sending disassociation frame. in this mac80211 will WARN_ON sta->supp_rates[A_BAND] == 0.

This fixes:
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1822
http://www.kerneloops.org/searchweek.php?search=rs_get_rate

---
 drivers/net/wireless/iwlwifi/iwl-3945-rs.c |   14 +++++++++++---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c  |   14 ++++++++++++--
 2 files changed, 23 insertions(+), 5 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945-rs.c +11 -3
index ba64034..25b4356 100644
@@ -649,12 +649,16 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 	s8 scale_action = 0;
 	unsigned long flags;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
-	u16 fc, rate_mask;
+	u16 fc;
+	u16 rate_mask = 0;
 	struct iwl_priv *priv = (struct iwl_priv *)priv_r;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 
 	IWL_DEBUG_RATE("enter\n");
 
+	if (sta)
+		rate_mask = sta->supp_rates[sband->band];
+
 	/* Send management frames and broadcast/multicast data using lowest
 	 * rate. */
 	fc = le16_to_cpu(hdr->frame_control);
@@ -662,11 +666,15 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 	    is_multicast_ether_addr(hdr->addr1) ||
 	    !sta || !priv_sta) {
 		IWL_DEBUG_RATE("leave: No STA priv data to update!\n");
-		info->control.rates[0].idx = rate_lowest_index(sband, sta);
+		if (!rate_mask)
+			info->control.rates[0].idx =
+					rate_lowest_index(sband, NULL);
+		else
+			info->control.rates[0].idx =
+					rate_lowest_index(sband, sta);
 		return;
 	}
 
-	rate_mask = sta->supp_rates[sband->band];
 	index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT_3945 - 1);
 
 	if (sband->band == IEEE80211_BAND_5GHZ)
drivers/net/wireless/iwlwifi/iwl-agn-rs.c +12 -2
index 4c460b1..a82cce5 100644
@@ -945,7 +945,8 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
 	}
 
 	/* See if there's a better rate or modulation mode to try. */
-	rs_rate_scale_perform(priv, hdr, sta, lq_sta);
+	if (sta && sta->supp_rates[sband->band])
+		rs_rate_scale_perform(priv, hdr, sta, lq_sta);
 out:
 	return;
 }
@@ -2105,14 +2106,23 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct iwl_lq_sta *lq_sta = priv_sta;
 	int rate_idx;
+	u64 mask_bit = 0;
 
 	IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n");
 
+	if (sta)
+		mask_bit = sta->supp_rates[sband->band];
+
 	/* Send management frames and broadcast/multicast data using lowest
 	 * rate. */
 	if (!ieee80211_is_data(hdr->frame_control) ||
 	    is_multicast_ether_addr(hdr->addr1) || !sta || !lq_sta) {
-		info->control.rates[0].idx = rate_lowest_index(sband, sta);
+		if (!mask_bit)
+			info->control.rates[0].idx =
+					rate_lowest_index(sband, NULL);
+		else
+			info->control.rates[0].idx =
+					rate_lowest_index(sband, sta);
 		return;
 	}
 
Signature · 1 line
1.5.4.3
#2 lore raw

PATCH 2/5 iwlwifi: allow user to set max rate

From: Abbas, Mohamed <[email protected]>

allow user to set max rate through #iwconfig <inteface> rate XXX. mac80211 will try to force this if user set it, but driver is not in sync which cause mac80211 to report wrong current rate. This patch will check if max rate is set and force it in rate scaling

---
 drivers/net/wireless/iwlwifi/iwl-3945-rs.c |   18 ++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c  |   27 +++++++++++++++++++++++++++
 2 files changed, 45 insertions(+), 0 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945-rs.c +18 -0
index 25b4356..044abf7 100644
@@ -651,6 +651,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	u16 fc;
 	u16 rate_mask = 0;
+	s8 max_rate_idx = -1;
 	struct iwl_priv *priv = (struct iwl_priv *)priv_r;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 
@@ -675,6 +676,13 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 		return;
 	}
 
+	/* get user max rate if set */
+	max_rate_idx = txrc->max_rate_idx;
+	if ((sband->band == IEEE80211_BAND_5GHZ) && (max_rate_idx != -1))
+		max_rate_idx += IWL_FIRST_OFDM_RATE;
+	if ((max_rate_idx < 0) || (max_rate_idx >= IWL_RATE_COUNT))
+		max_rate_idx = -1;
+
 	index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT_3945 - 1);
 
 	if (sband->band == IEEE80211_BAND_5GHZ)
@@ -706,6 +714,12 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 		rs_sta->start_rate = IWL_RATE_INVALID;
 	}
 
+	/* force user max rate if set by user */
+	if ((max_rate_idx != -1) && (max_rate_idx < index)) {
+		if (rate_mask & (1 << max_rate_idx))
+			index = max_rate_idx;
+	}
+
 	window = &(rs_sta->win[index]);
 
 	fail_count = window->counter - window->success_counter;
@@ -732,6 +746,10 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 	low = high_low & 0xff;
 	high = (high_low >> 8) & 0xff;
 
+	/* If user set max rate, dont allow higher than user constrain */
+	if ((max_rate_idx != -1) && (max_rate_idx < high))
+		high = IWL_RATE_INVALID;
+
 	if (low != IWL_RATE_INVALID)
 		low_tpt = rs_sta->win[low].average_tpt;
 
drivers/net/wireless/iwlwifi/iwl-agn-rs.c +27 -0
index a82cce5..12c5e5d 100644
@@ -148,6 +148,7 @@ struct iwl_lq_sta {
 	u16 active_mimo2_rate;
 	u16 active_mimo3_rate;
 	u16 active_rate_basic;
+	s8 max_rate_idx;     /* Max rate set by user */
 
 	struct iwl_link_quality_cmd lq;
 	struct iwl_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */
@@ -1759,6 +1760,15 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
 		return;
 	}
 
+	/* force user max rate if set by user */
+	if ((lq_sta->max_rate_idx != -1) &&
+	    (lq_sta->max_rate_idx < index)) {
+		index = lq_sta->max_rate_idx;
+		update_lq = 1;
+		window = &(tbl->win[index]);
+		goto lq_update;
+	}
+
 	window = &(tbl->win[index]);
 
 	/*
@@ -1850,6 +1860,11 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
 	low = high_low & 0xff;
 	high = (high_low >> 8) & 0xff;
 
+	/* If user set max rate, dont allow higher than user constrain */
+	if ((lq_sta->max_rate_idx != -1) &&
+	    (lq_sta->max_rate_idx < high))
+		high = IWL_RATE_INVALID;
+
 	sr = window->success_ratio;
 
 	/* Collect measured throughputs for current and adjacent rates */
@@ -2110,6 +2125,17 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
 
 	IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n");
 
+	/* Get max rate if user set max rate */
+	if (lq_sta) {
+		lq_sta->max_rate_idx = txrc->max_rate_idx;
+		if ((sband->band == IEEE80211_BAND_5GHZ) &&
+		    (lq_sta->max_rate_idx != -1))
+			lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE;
+		if ((lq_sta->max_rate_idx < 0) ||
+		    (lq_sta->max_rate_idx >= IWL_RATE_COUNT))
+			lq_sta->max_rate_idx = -1;
+	}
+
 	if (sta)
 		mask_bit = sta->supp_rates[sband->band];
 
@@ -2220,6 +2246,7 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
 	}
 
 	lq_sta->is_dup = 0;
+	lq_sta->max_rate_idx = -1;
 	lq_sta->is_green = rs_use_green(priv, conf);
 	lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000);
 	lq_sta->active_rate_basic = priv->active_rate_basic;
Signature · 1 line
1.5.4.3
#3 lore raw

PATCH 3/5 iwlagn: fix agn rate scaling

From: Abbas, Mohamed <[email protected]>

Sometime Tx reply rate different than what rate scale expecting causing rate scale to bail out. This could cause failing to commit LQ cmd. This patch will try to solve this instead of just bail out. It also make sure we start with a valid rate.

---
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c |   31 +++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 8 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-rs.c +23 -8
index 12c5e5d..13039a0 100644
@@ -49,6 +49,8 @@
 #define IWL_RATE_MIN_FAILURE_TH		6	/* min failures to calc tpt */
 #define IWL_RATE_MIN_SUCCESS_TH		8	/* min successes to calc tpt */
 
+/* max allowed rate miss before sync LQ cmd */
+#define IWL_MISSED_RATE_MAX		15
 /* max time to accum history 2 seconds */
 #define IWL_RATE_SCALE_FLUSH_INTVL   (2*HZ)
 
@@ -149,6 +151,7 @@ struct iwl_lq_sta {
 	u16 active_mimo3_rate;
 	u16 active_rate_basic;
 	s8 max_rate_idx;     /* Max rate set by user */
+	u8 missed_rate_counter;
 
 	struct iwl_link_quality_cmd lq;
 	struct iwl_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */
@@ -841,10 +844,15 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
 		/* the last LQ command could failed so the LQ in ucode not
 		 * the same in driver sync up
 		 */
-		iwl_send_lq_cmd(priv, &lq_sta->lq, CMD_ASYNC);
+		lq_sta->missed_rate_counter++;
+		if (lq_sta->missed_rate_counter > IWL_MISSED_RATE_MAX) {
+			lq_sta->missed_rate_counter = 0;
+			iwl_send_lq_cmd(priv, &lq_sta->lq, CMD_ASYNC);
+		}
 		goto out;
 	}
 
+	lq_sta->missed_rate_counter = 0;
 	/* Update frame history window with "failure" for each Tx retry. */
 	while (retries) {
 		/* Look up the rate and other info used for each tx attempt.
@@ -2212,6 +2220,8 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
 	struct ieee80211_conf *conf = &priv->hw->conf;
 	struct iwl_lq_sta *lq_sta = priv_sta;
 	u16 mask_bit = 0;
+	int count;
+	int start_rate = 0;
 
 	lq_sta->flush_timer = 0;
 	lq_sta->supp_rates = sta->supp_rates[sband->band];
@@ -2247,6 +2257,7 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
 
 	lq_sta->is_dup = 0;
 	lq_sta->max_rate_idx = -1;
+	lq_sta->missed_rate_counter = IWL_MISSED_RATE_MAX;
 	lq_sta->is_green = rs_use_green(priv, conf);
 	lq_sta->active_legacy_rate = priv->active_rate & ~(0x1000);
 	lq_sta->active_rate_basic = priv->active_rate_basic;
@@ -2285,16 +2296,20 @@ static void rs_rate_init(void *priv_r, struct ieee80211_supported_band *sband,
 	lq_sta->drv = priv;
 
 	/* Find highest tx rate supported by hardware and destination station */
-	mask_bit = sta->supp_rates[sband->band] & lq_sta->active_legacy_rate;
-	lq_sta->last_txrate_idx = 3;
-	for (i = 0; i < sband->n_bitrates; i++)
+	mask_bit = sta->supp_rates[sband->band];
+	count = sband->n_bitrates;
+	if (sband->band == IEEE80211_BAND_5GHZ) {
+		count += IWL_FIRST_OFDM_RATE;
+		start_rate = IWL_FIRST_OFDM_RATE;
+		mask_bit <<= IWL_FIRST_OFDM_RATE;
+	}
+
+	mask_bit = mask_bit & lq_sta->active_legacy_rate;
+	lq_sta->last_txrate_idx = 4;
+	for (i = start_rate; i < count; i++)
 		if (mask_bit & BIT(i))
 			lq_sta->last_txrate_idx = i;
 
-	/* For MODE_IEEE80211A, skip over cck rates in global rate table */
-	if (sband->band == IEEE80211_BAND_5GHZ)
-		lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE;
-
 	rs_initialize_lq(priv, conf, sta, lq_sta);
 }
 
Signature · 1 line
1.5.4.3
#4 lore raw

PATCH 4/5 iwl3945: Use iwl-rfkill

From: Samuel Ortiz <[email protected]>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

---
 drivers/net/wireless/iwlwifi/Kconfig        |    6 +-
 drivers/net/wireless/iwlwifi/iwl-3945.h     |   12 --
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   34 ------
 drivers/net/wireless/iwlwifi/iwl-core.c     |   35 ++++++
 drivers/net/wireless/iwlwifi/iwl-core.h     |    2 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |  151 +--------------------------
 6 files changed, 42 insertions(+), 198 deletions(-)
drivers/net/wireless/iwlwifi/Kconfig +1 -5
index 47bee0e..4b2d57a 100644
@@ -110,7 +110,7 @@ config IWL3945
 	select IWLWIFI
 	select MAC80211_LEDS if IWL3945_LEDS
 	select LEDS_CLASS if IWL3945_LEDS
-	select RFKILL if IWL3945_RFKILL
+	select RFKILL if IWLWIFI_RFKILL
 	---help---
 	  Select to build the driver supporting the:
 
@@ -133,10 +133,6 @@ config IWL3945
 	  say M here and read <file:Documentation/kbuild/modules.txt>.  The
 	  module will be called iwl3945.ko.
 
-config IWL3945_RFKILL
-	bool "Enable RF kill support in iwl3945 drivers"
-	depends on IWL3945
-
 config IWL3945_SPECTRUM_MEASUREMENT
 	bool "Enable Spectrum Measurement in iwl3945 drivers"
 	depends on IWL3945
drivers/net/wireless/iwlwifi/iwl-3945.h +0 -12
index 97dfa7c..156c828 100644
@@ -301,18 +301,6 @@ extern int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv);
 extern u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id,
 		 u16 tx_rate, u8 flags);
 
-#ifdef CONFIG_IWL3945_RFKILL
-struct iwl_priv;
-
-void iwl3945_rfkill_set_hw_state(struct iwl_priv *priv);
-void iwl3945_rfkill_unregister(struct iwl_priv *priv);
-int iwl3945_rfkill_init(struct iwl_priv *priv);
-#else
-static inline void iwl3945_rfkill_set_hw_state(struct iwl_priv *priv) {}
-static inline void iwl3945_rfkill_unregister(struct iwl_priv *priv) {}
-static inline int iwl3945_rfkill_init(struct iwl_priv *priv) { return 0; }
-#endif
-
 static inline int iwl3945_is_associated(struct iwl_priv *priv)
 {
 	return (priv->active39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -34
index d1994de..c4fadb6 100644
@@ -2143,40 +2143,6 @@ static void iwl_bg_alive_start(struct work_struct *data)
 	mutex_unlock(&priv->mutex);
 }
 
-static void iwl_bg_rf_kill(struct work_struct *work)
-{
-	struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
-
-	wake_up_interruptible(&priv->wait_command_queue);
-
-	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
-		return;
-
-	mutex_lock(&priv->mutex);
-
-	if (!iwl_is_rfkill(priv)) {
-		IWL_DEBUG(IWL_DL_RF_KILL,
-			  "HW and/or SW RF Kill no longer active, restarting "
-			  "device\n");
-		if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
-			queue_work(priv->workqueue, &priv->restart);
-	} else {
-		/* make sure mac80211 stop sending Tx frame */
-		if (priv->mac80211_registered)
-			ieee80211_stop_queues(priv->hw);
-
-		if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
-			IWL_DEBUG_RF_KILL("Can not turn radio back on - "
-					  "disabled by SW switch\n");
-		else
-			IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
-				    "Kill switch must be turned off for "
-				    "wireless networking to work.\n");
-	}
-	mutex_unlock(&priv->mutex);
-	iwl_rfkill_set_hw_state(priv);
-}
-
 static void iwl_bg_run_time_calib_work(struct work_struct *work)
 {
 	struct iwl_priv *priv = container_of(work, struct iwl_priv,
drivers/net/wireless/iwlwifi/iwl-core.c +35 -0
index d2ef3e1..f64e3a4 100644
@@ -1465,3 +1465,38 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
 	return 1;
 }
 EXPORT_SYMBOL(iwl_radio_kill_sw_enable_radio);
+
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+	struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+	wake_up_interruptible(&priv->wait_command_queue);
+
+	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+		return;
+
+	mutex_lock(&priv->mutex);
+
+	if (!iwl_is_rfkill(priv)) {
+		IWL_DEBUG(IWL_DL_RF_KILL,
+			  "HW and/or SW RF Kill no longer active, restarting "
+			  "device\n");
+		if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+			queue_work(priv->workqueue, &priv->restart);
+	} else {
+		/* make sure mac80211 stop sending Tx frame */
+		if (priv->mac80211_registered)
+			ieee80211_stop_queues(priv->hw);
+
+		if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
+			IWL_DEBUG_RF_KILL("Can not turn radio back on - "
+					  "disabled by SW switch\n");
+		else
+			IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
+				    "Kill switch must be turned off for "
+				    "wireless networking to work.\n");
+	}
+	mutex_unlock(&priv->mutex);
+	iwl_rfkill_set_hw_state(priv);
+}
+EXPORT_SYMBOL(iwl_bg_rf_kill);
drivers/net/wireless/iwlwifi/iwl-core.h +1 -1
index 466130f..5ceeedc 100644
@@ -267,7 +267,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force);
  * RF -Kill - here and not in iwl-rfkill.h to be available when
  * RF-kill subsystem is not compiled.
  ****************************************************/
-void iwl_rf_kill(struct iwl_priv *priv);
+void iwl_bg_rf_kill(struct work_struct *work);
 void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv);
 int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv);
 
drivers/net/wireless/iwlwifi/iwl3945-base.c +5 -146

193 lines not on this page · raw message

Signature · 1 line
1.5.4.3
#5 lore raw

PATCH 5/5 iwl3945: fix deep sleep when removing the driver.

From: Abbas, Mohamed <[email protected]>

A warning message "MAC is in deep sleep" sometimes happen when user removes the driver. This warning is related to card not being ready. In __iwl3945_down function some of the going down steps are in wrong order, to fix this this patch do the following:
1- make sure we are calling iwl3945_apm_reset and iwl3945_apm_stop
in the right order.

2- make sure we set CSR_GP_CNTRL_REG_FLAG_INIT_DONE in apm_reset before
poll on CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY.

3- set correct polling counter.

This fixes bug
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1834

---
 drivers/net/wireless/iwlwifi/iwl-3945.c     |    8 +++-----
 drivers/net/wireless/iwlwifi/iwl-io.h       |    2 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    7 ++++++-
 3 files changed, 10 insertions(+), 7 deletions(-)
drivers/net/wireless/iwlwifi/iwl-3945.c +3 -5
index e6d4503..8b486c9 100644
@@ -1332,6 +1332,9 @@ static int iwl3945_apm_reset(struct iwl_priv *priv)
 	spin_lock_irqsave(&priv->lock, flags);
 
 	iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);
+	udelay(10);
+
+	iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
 
 	iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
 			 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
@@ -1341,11 +1344,6 @@ static int iwl3945_apm_reset(struct iwl_priv *priv)
 		iwl_write_prph(priv, APMG_CLK_CTRL_REG,
 					 APMG_CLK_VAL_BSM_CLK_RQT);
 
-		udelay(10);
-
-		iwl_set_bit(priv, CSR_GP_CNTRL,
-			    CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
-
 		iwl_write_prph(priv, APMG_RTC_INT_MSK_REG, 0x0);
 		iwl_write_prph(priv, APMG_RTC_INT_STT_REG,
 					0xFFFFFFFF);
drivers/net/wireless/iwlwifi/iwl-io.h +1 -1
index bc3f3da..7341a2d 100644
@@ -165,7 +165,7 @@ static inline int _iwl_grab_nic_access(struct iwl_priv *priv)
 	ret = _iwl_poll_bit(priv, CSR_GP_CNTRL,
 			   CSR_GP_CNTRL_REG_VAL_MAC_ACCESS_EN,
 			   (CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY |
-			    CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 50);
+			    CSR_GP_CNTRL_REG_FLAG_GOING_TO_SLEEP), 15000);
 	if (ret < 0) {
 		IWL_ERR(priv, "MAC is in deep sleep!\n");
 		return -EIO;
drivers/net/wireless/iwlwifi/iwl3945-base.c +6 -1
index be02272..e595c5a 100644
@@ -5295,6 +5295,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
 			test_bit(STATUS_EXIT_PENDING, &priv->status) <<
 				STATUS_EXIT_PENDING;
 
+	priv->cfg->ops->lib->apm_ops.reset(priv);
 	spin_lock_irqsave(&priv->lock, flags);
 	iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
 	spin_unlock_irqrestore(&priv->lock, flags);
@@ -5312,7 +5313,11 @@ static void __iwl3945_down(struct iwl_priv *priv)
 
 	udelay(5);
 
-	priv->cfg->ops->lib->apm_ops.reset(priv);
+	if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status))
+		priv->cfg->ops->lib->apm_ops.stop(priv);
+	else
+		priv->cfg->ops->lib->apm_ops.reset(priv);
+
  exit:
 	memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
 
Signature · 1 line
1.5.4.3
#6 lore raw

Re: [ipw3945-devel] [PATCH 4/5] iwl3945: Use iwl-rfkill

In reply to Reinette Chatre

Hi,

Am Mittwoch, 21. Januar 2009 schrieb Reinette Chatre:

Quoted 4 lines

From: Samuel Ortiz <[email protected]>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

[...]

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-core.c +7 -0
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+	struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+	wake_up_interruptible(&priv->wait_command_queue);
+
+	if (test_bit(STATUS_EXIT_PENDING, &priv->status))

drivers/net/wireless/iwlwifi/iwl-core.c int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) · line 1485

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-core.c +10 -0
+		return;
+
+	mutex_lock(&priv->mutex);
+
+	if (!iwl_is_rfkill(priv)) {
+		IWL_DEBUG(IWL_DL_RF_KILL,
+			  "HW and/or SW RF Kill no longer active, restarting "
+			  "device\n");
+		if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+			queue_work(priv->workqueue, &priv->restart);

I've changed this check in both rf-kill patches (3945 and agn) to

if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&

    test_bit(STATUS_ALIVE, &priv->status))

in order to avoid restarting the adapter when notified about rfkill changes by interrupt/polling.

I guess this is just an oversight, right?

Thanks,
Helmut

#7 lore raw

Re: [ipw3945-devel] [PATCH 4/5] iwl3945: Use iwl-rfkill

Hi Helmut,

Quoted 30 lines · Helmut Schaa

Hi,

Am Mittwoch, 21. Januar 2009 schrieb Reinette Chatre:

Quoted 4 lines

From: Samuel Ortiz <[email protected]>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

[...]

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-core.c +7 -0
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+     struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+     wake_up_interruptible(&priv->wait_command_queue);
+
+     if (test_bit(STATUS_EXIT_PENDING, &priv->status))

drivers/net/wireless/iwlwifi/iwl-core.c int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) · line 1485

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-core.c +10 -0
+             return;
+
+     mutex_lock(&priv->mutex);
+
+     if (!iwl_is_rfkill(priv)) {
+             IWL_DEBUG(IWL_DL_RF_KILL,
+                       "HW and/or SW RF Kill no longer active, restarting "
+                       "device\n");
+             if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+                     queue_work(priv->workqueue, &priv->restart);

I've changed this check in both rf-kill patches (3945 and agn) to

Quoted 7 lines

if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&

    test_bit(STATUS_ALIVE, &priv->status))

in order to avoid restarting the adapter when notified about rfkill changes by interrupt/polling.

I guess this is just an oversight, right?

Good catch. It is an oversight, yes.
John, Reinette, do you want a new version of this patch or an additional one on top of wireless-testing ?

Cheers,
Samuel.

Signature · 13 lines
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Re: [ipw3945-devel] [PATCH 4/5] iwl3945: Use iwl-rfkill

Hi Sedat,

Quoted 9 lines · Sedat Dilek

Hi,

I applied Helmut's complain towards rfkill-changes into a patch (see below).
Together with the latest iwlwifi-driver-updates (01_19_2009 + 01_20_2009) I played around with the WLAN-LED-button of my notebook.

Turning the LED off, I got the following error-message:
[...]

Jan 21 14:13:32 seduxbox kernel: iwl3945 0000:10:00.0: Error sending REPLY_LEDS_CMD: enqueue_hcmd failed: -5

[...]

A couple questions:
- Are you running the latest wireless-testing ?
- Can you reproduce this error (I can't) ?

Quoted 1 line

What does error-code "-5" mean?

That's -EIO, see iwl_enqueue_hcmd() in iwl-tx.c.

Cheers,
Samuel.

Quoted 65 lines

Is this maybe a 2.6.29 kernel issue?

Turning LED on, the wlan-connection is established automatically and Internet connection works fine again.

Full report is attached.

Kind Regards,
Sedat

----- SNIP -----

Index: linux-2.6/drivers/net/wireless/iwlwifi/iwl-core.c
===================================================================

drivers/net/wireless/iwlwifi/iwl-core.c renamed from drivers/net/wireless/iwlwifi/iwl-core.c.orig +2 -2
@@ -1481,7 +1481,8 @@
         IWL_DEBUG(IWL_DL_RF_KILL,
               "HW and/or SW RF Kill no longer active, restarting "
               "device\n");
-        if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+        if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
+            test_bit(STATUS_ALIVE, &priv->status))
             queue_work(priv->workqueue, &priv->restart);
     } else {
         /* make sure mac80211 stop sending Tx frame */
 
----- SNAP -----

On Wed, Jan 21, 2009 at 8:01 AM, Helmut Schaa <[email protected]<mailto:[email protected]>> wrote:
Hi,

Am Mittwoch, 21. Januar 2009 schrieb Reinette Chatre:

Quoted 4 lines

From: Samuel Ortiz <[email protected]<mailto:[email protected]>>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

[...]

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-core.c +7 -0
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+     struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+     wake_up_interruptible(&priv->wait_command_queue);
+
+     if (test_bit(STATUS_EXIT_PENDING, &priv->status))

drivers/net/wireless/iwlwifi/iwl-core.c int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) · line 1485

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-core.c +10 -0
+             return;
+
+     mutex_lock(&priv->mutex);
+
+     if (!iwl_is_rfkill(priv)) {
+             IWL_DEBUG(IWL_DL_RF_KILL,
+                       "HW and/or SW RF Kill no longer active, restarting "
+                       "device\n");
+             if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+                     queue_work(priv->workqueue, &priv->restart);

I've changed this check in both rf-kill patches (3945 and agn) to

if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
test_bit(STATUS_ALIVE, &priv->status))

in order to avoid restarting the adapter when notified about rfkill changes by interrupt/polling.

Quoted 9 lines

I guess this is just an oversight, right?

Thanks,
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]<mailto:[email protected]> More majordomo info at http://vger.kernel.org/majordomo-info.html

Content-Description: report_iwlwifi_rfkill_2.6.29-rc2-git1-iniza-4.txt

Quoted 40 lines

----- BEGIN LED OFF -----

Jan 21 14:13:27 seduxbox kernel: iwl3945 0000:10:00.0: Radio Frequency Kill Switch is On:
Jan 21 14:13:27 seduxbox kernel: Kill switch must be turned off for wireless networking to work.
Jan 21 14:13:28 seduxbox kernel: usb 1-2: USB disconnect, address 2
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB0: Sierra USB modem converter now disconnected from ttyUSB0
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB1: Sierra USB modem converter now disconnected from ttyUSB1
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB2: Sierra USB modem converter now disconnected from ttyUSB2
Jan 21 14:13:28 seduxbox kernel: sierra 1-2:1.0: device disconnected
Jan 21 14:13:32 seduxbox kernel: wlan0: No ProbeResp from current AP 00:04:0e:e4:00:3d - assume out of range
Jan 21 14:13:32 seduxbox kernel: iwl3945 0000:10:00.0: Error sending REPLY_LEDS_CMD: enqueue_hcmd failed: -5

----- END LED OFF -----

----- BEGIN LED ON -----

Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:radio
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:assoc
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:RX
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:TX
Jan 21 14:14:50 seduxbox kernel: usb 1-2: new full speed USB device using uhci_hcd and address 3
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device found, idVendor=03f0, idProduct=1e1d
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Product: HP hs2300 HSDPA Broadband Wireless Module
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Manufacturer: HP
Jan 21 14:14:50 seduxbox kernel: usb 1-2: configuration #1 chosen from 1 choice
Jan 21 14:14:50 seduxbox kernel: sierra 1-2:1.0: Sierra USB modem converter detected
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB1
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB2
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticated
Jan 21 14:15:18 seduxbox kernel: wlan0: associate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: RX ReassocResp from 00:04:0e:e4:00:3d (capab=0x411 status=0 aid=1)
Jan 21 14:15:18 seduxbox kernel: wlan0: associated

----- END LED ON -----

Signature · 13 lines
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#10 lore raw

Re: [ipw3945-devel] [PATCH 4/5] iwl3945: Use iwl-rfkill

Hi Samuel,

my original email was bounced by the linux-wireless-mailing-mailserver complaining email was not in plain-text & "suspicious" file attachment, tststs.

Quoted 8 lines · Samuel Ortiz

Hi Sedat,

Quoted 5 lines · Sedat Dilek

Hi,

I applied Helmut's complain towards rfkill-changes into a patch (see below).
Together with the latest iwlwifi-driver-updates (01_19_2009 + 01_20_2009) I played around with the WLAN-LED-button of my notebook.

Quoted 8 lines
Quoted 4 lines

Turning the LED off, I got the following error-message:
[...]

Jan 21 14:13:32 seduxbox kernel: iwl3945 0000:10:00.0: Error sending REPLY_LEDS_CMD: enqueue_hcmd failed: -5

[...]

A couple questions:
- Are you running the latest wireless-testing ?
- Can you reproduce this error (I can't) ?

I am running wl.git (master-2009-01-19) plus latest two iwlwifi-updates (19-Jan-2009/20-Jan-2009) patchseries, enriched with the "overseen rfkill-patch" complained by Helmut and finally 2.6.29-rc2-git1 patch.
Well I tested once (1st testing), and after my first euphoric gladness I had two or three reconnects to my WLAN-AP - I noticed some dis- and reconnections in my IRC-client.

Right now (2nd testing), I loaded the iwl3945-kernel-module with debug-options:

$ modprobe iwl3945 debug=0x43fff

Report is added. Euphoria is gone :-).

Quoted 3 lines
Quoted 1 line

What does error-code "-5" mean?

That's -EIO, see iwl_enqueue_hcmd() in iwl-tx.c.

drivers/net/wireless/iwlwifi/iwl-tx.c says:
[...]
iwl_enqueue_hcmd - enqueue a uCode command
[...]
The function returns < 0 values to indicate the operation is failed. [...]

So is this a ucode-problem?

Kind regards,
Sedat

Quoted 138 lines

Cheers,
Samuel.

Quoted 65 lines

Is this maybe a 2.6.29 kernel issue?

Turning LED on, the wlan-connection is established automatically and Internet connection works fine again.

Full report is attached.

Kind Regards,
Sedat

----- SNIP -----

Index: linux-2.6/drivers/net/wireless/iwlwifi/iwl-core.c
===================================================================

drivers/net/wireless/iwlwifi/iwl-core.c renamed from drivers/net/wireless/iwlwifi/iwl-core.c.orig +2 -2
@@ -1481,7 +1481,8 @@
         IWL_DEBUG(IWL_DL_RF_KILL,
               "HW and/or SW RF Kill no longer active, restarting "
               "device\n");
-        if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+        if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
+            test_bit(STATUS_ALIVE, &priv->status))
             queue_work(priv->workqueue, &priv->restart);
     } else {
         /* make sure mac80211 stop sending Tx frame */
 
----- SNAP -----

On Wed, Jan 21, 2009 at 8:01 AM, Helmut Schaa <[email protected]<mailto:[email protected]>> wrote:
Hi,

Am Mittwoch, 21. Januar 2009 schrieb Reinette Chatre:

Quoted 4 lines

From: Samuel Ortiz <[email protected]<mailto:[email protected]>>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

[...]

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-core.c +7 -0
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+     struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+     wake_up_interruptible(&priv->wait_command_queue);
+
+     if (test_bit(STATUS_EXIT_PENDING, &priv->status))

drivers/net/wireless/iwlwifi/iwl-core.c int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) · line 1485

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-core.c +10 -0
+             return;
+
+     mutex_lock(&priv->mutex);
+
+     if (!iwl_is_rfkill(priv)) {
+             IWL_DEBUG(IWL_DL_RF_KILL,
+                       "HW and/or SW RF Kill no longer active, restarting "
+                       "device\n");
+             if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+                     queue_work(priv->workqueue, &priv->restart);

I've changed this check in both rf-kill patches (3945 and agn) to

if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
test_bit(STATUS_ALIVE, &priv->status))

in order to avoid restarting the adapter when notified about rfkill changes by interrupt/polling.

Quoted 9 lines

I guess this is just an oversight, right?

Thanks,
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]<mailto:[email protected]> More majordomo info at http://vger.kernel.org/majordomo-info.html

Content-Description: report_iwlwifi_rfkill_2.6.29-rc2-git1-iniza-4.txt

Quoted 38 lines

----- BEGIN LED OFF -----

Jan 21 14:13:27 seduxbox kernel: iwl3945 0000:10:00.0: Radio Frequency Kill Switch is On:
Jan 21 14:13:27 seduxbox kernel: Kill switch must be turned off for wireless networking to work.
Jan 21 14:13:28 seduxbox kernel: usb 1-2: USB disconnect, address 2
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB0: Sierra USB modem converter now disconnected from ttyUSB0
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB1: Sierra USB modem converter now disconnected from ttyUSB1
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB2: Sierra USB modem converter now disconnected from ttyUSB2
Jan 21 14:13:28 seduxbox kernel: sierra 1-2:1.0: device disconnected
Jan 21 14:13:32 seduxbox kernel: wlan0: No ProbeResp from current AP 00:04:0e:e4:00:3d - assume out of range
Jan 21 14:13:32 seduxbox kernel: iwl3945 0000:10:00.0: Error sending REPLY_LEDS_CMD: enqueue_hcmd failed: -5

----- END LED OFF -----

----- BEGIN LED ON -----

Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:radio
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:assoc
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:RX
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:TX
Jan 21 14:14:50 seduxbox kernel: usb 1-2: new full speed USB device using uhci_hcd and address 3
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device found, idVendor=03f0, idProduct=1e1d
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Product: HP hs2300 HSDPA Broadband Wireless Module
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Manufacturer: HP
Jan 21 14:14:50 seduxbox kernel: usb 1-2: configuration #1 chosen from 1 choice
Jan 21 14:14:50 seduxbox kernel: sierra 1-2:1.0: Sierra USB modem converter detected
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB1
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB2
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticated
Jan 21 14:15:18 seduxbox kernel: wlan0: associate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: RX ReassocResp from 00:04:0e:e4:00:3d (capab=0x411 status=0 aid=1)
Jan 21 14:15:18 seduxbox kernel: wlan0: associated
Quoted 2 lines

----- END LED ON -----

--
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#11 lore raw

Re: [ipw3945-devel] [PATCH 4/5] iwl3945: Use iwl-rfkill

Hi Sedat,

Quoted 5 lines · Sedat Dilek
Quoted 4 lines
Quoted 2 lines

What does error-code "-5" mean?

That's -EIO, see iwl_enqueue_hcmd() in iwl-tx.c.

Quoted 8 lines

drivers/net/wireless/iwlwifi/iwl-tx.c says:
[...]
iwl_enqueue_hcmd - enqueue a uCode command
[...]
The function returns < 0 values to indicate the operation is failed. [...]

So is this a ucode-problem?

No, the problem is the following one:
1) You're associated with an AP
2) You turn the rf kill switch on
3) mac80211 detects the AP is not there anymore
4) iwl3945 calls the association led handler, which tries to send a REPLY_LEDS_CMD host command.
5) Since we're RF killed, enqueue_hcmd cancels the command sending and returns -EIO.

This is not a bug, as we dont want to be sending host commands while being RF killed.
I bet you can reproduce this behaviour on wireless-testing without the 2 latest iwlwifi patch sets.

Cheers,
Samuel.

Quoted 142 lines

Kind regards,
Sedat

Quoted 138 lines

Cheers,
Samuel.

Quoted 65 lines

Is this maybe a 2.6.29 kernel issue?

Turning LED on, the wlan-connection is established automatically and Internet connection works fine again.

Full report is attached.

Kind Regards,
Sedat

----- SNIP -----

Index: linux-2.6/drivers/net/wireless/iwlwifi/iwl-core.c
===================================================================

drivers/net/wireless/iwlwifi/iwl-core.c renamed from drivers/net/wireless/iwlwifi/iwl-core.c.orig +2 -2
@@ -1481,7 +1481,8 @@
         IWL_DEBUG(IWL_DL_RF_KILL,
               "HW and/or SW RF Kill no longer active, restarting "
               "device\n");
-        if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+        if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
+            test_bit(STATUS_ALIVE, &priv->status))
             queue_work(priv->workqueue, &priv->restart);
     } else {
         /* make sure mac80211 stop sending Tx frame */
 
----- SNAP -----

On Wed, Jan 21, 2009 at 8:01 AM, Helmut Schaa <[email protected]<mailto:[email protected]>> wrote:
Hi,

Am Mittwoch, 21. Januar 2009 schrieb Reinette Chatre:

Quoted 4 lines

From: Samuel Ortiz <[email protected]<mailto:[email protected]>>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

[...]

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-core.c +7 -0
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+     struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+     wake_up_interruptible(&priv->wait_command_queue);
+
+     if (test_bit(STATUS_EXIT_PENDING, &priv->status))

drivers/net/wireless/iwlwifi/iwl-core.c int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) · line 1485

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-core.c +10 -0
+             return;
+
+     mutex_lock(&priv->mutex);
+
+     if (!iwl_is_rfkill(priv)) {
+             IWL_DEBUG(IWL_DL_RF_KILL,
+                       "HW and/or SW RF Kill no longer active, restarting "
+                       "device\n");
+             if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+                     queue_work(priv->workqueue, &priv->restart);

I've changed this check in both rf-kill patches (3945 and agn) to

if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
test_bit(STATUS_ALIVE, &priv->status))

in order to avoid restarting the adapter when notified about rfkill changes by interrupt/polling.

Quoted 9 lines

I guess this is just an oversight, right?

Thanks,
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]<mailto:[email protected]> More majordomo info at http://vger.kernel.org/majordomo-info.html

Content-Description: report_iwlwifi_rfkill_2.6.29-rc2-git1-iniza-4.txt

Quoted 38 lines

----- BEGIN LED OFF -----

Jan 21 14:13:27 seduxbox kernel: iwl3945 0000:10:00.0: Radio Frequency Kill Switch is On:
Jan 21 14:13:27 seduxbox kernel: Kill switch must be turned off for wireless networking to work.
Jan 21 14:13:28 seduxbox kernel: usb 1-2: USB disconnect, address 2
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB0: Sierra USB modem converter now disconnected from ttyUSB0
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB1: Sierra USB modem converter now disconnected from ttyUSB1
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB2: Sierra USB modem converter now disconnected from ttyUSB2
Jan 21 14:13:28 seduxbox kernel: sierra 1-2:1.0: device disconnected
Jan 21 14:13:32 seduxbox kernel: wlan0: No ProbeResp from current AP 00:04:0e:e4:00:3d - assume out of range
Jan 21 14:13:32 seduxbox kernel: iwl3945 0000:10:00.0: Error sending REPLY_LEDS_CMD: enqueue_hcmd failed: -5

----- END LED OFF -----

----- BEGIN LED ON -----

Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:radio
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:assoc
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:RX
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:TX
Jan 21 14:14:50 seduxbox kernel: usb 1-2: new full speed USB device using uhci_hcd and address 3
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device found, idVendor=03f0, idProduct=1e1d
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Product: HP hs2300 HSDPA Broadband Wireless Module
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Manufacturer: HP
Jan 21 14:14:50 seduxbox kernel: usb 1-2: configuration #1 chosen from 1 choice
Jan 21 14:14:50 seduxbox kernel: sierra 1-2:1.0: Sierra USB modem converter detected
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB1
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB2
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticated
Jan 21 14:15:18 seduxbox kernel: wlan0: associate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: RX ReassocResp from 00:04:0e:e4:00:3d (capab=0x411 status=0 aid=1)
Jan 21 14:15:18 seduxbox kernel: wlan0: associated
Quoted 2 lines

----- END LED ON -----

--
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

Signature · 13 lines
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#12 lore raw

Re: [ipw3945-devel] [PATCH 4/5] iwl3945: Use iwl-rfkill

THX for the detailed explanations.

-SD

Quoted 194 lines · Samuel Ortiz

Hi Sedat,

Quoted 5 lines · Sedat Dilek
Quoted 4 lines
Quoted 2 lines

What does error-code "-5" mean?

That's -EIO, see iwl_enqueue_hcmd() in iwl-tx.c.

Quoted 8 lines

drivers/net/wireless/iwlwifi/iwl-tx.c says:
[...]
iwl_enqueue_hcmd - enqueue a uCode command
[...]
The function returns < 0 values to indicate the operation is failed. [...]

So is this a ucode-problem?

No, the problem is the following one:
1) You're associated with an AP
2) You turn the rf kill switch on
3) mac80211 detects the AP is not there anymore
4) iwl3945 calls the association led handler, which tries to send a REPLY_LEDS_CMD host command.
5) Since we're RF killed, enqueue_hcmd cancels the command sending and returns -EIO.

This is not a bug, as we dont want to be sending host commands while being RF killed.
I bet you can reproduce this behaviour on wireless-testing without the 2 latest iwlwifi patch sets.

Cheers,
Samuel.

Quoted 142 lines

Kind regards,
Sedat

Quoted 138 lines

Cheers,
Samuel.

Quoted 65 lines

Is this maybe a 2.6.29 kernel issue?

Turning LED on, the wlan-connection is established automatically and Internet connection works fine again.

Full report is attached.

Kind Regards,
Sedat

----- SNIP -----

Index: linux-2.6/drivers/net/wireless/iwlwifi/iwl-core.c
===================================================================

drivers/net/wireless/iwlwifi/iwl-core.c renamed from drivers/net/wireless/iwlwifi/iwl-core.c.orig +2 -2
@@ -1481,7 +1481,8 @@
         IWL_DEBUG(IWL_DL_RF_KILL,
               "HW and/or SW RF Kill no longer active, restarting "
               "device\n");
-        if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+        if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
+            test_bit(STATUS_ALIVE, &priv->status))
             queue_work(priv->workqueue, &priv->restart);
     } else {
         /* make sure mac80211 stop sending Tx frame */
 
----- SNAP -----

On Wed, Jan 21, 2009 at 8:01 AM, Helmut Schaa <[email protected]<mailto:[email protected]>> wrote:
Hi,

Am Mittwoch, 21. Januar 2009 schrieb Reinette Chatre:

Quoted 4 lines

From: Samuel Ortiz <[email protected]<mailto:[email protected]>>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

[...]

Quoted 7 lines
drivers/net/wireless/iwlwifi/iwl-core.c +7 -0
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+     struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+     wake_up_interruptible(&priv->wait_command_queue);
+
+     if (test_bit(STATUS_EXIT_PENDING, &priv->status))

drivers/net/wireless/iwlwifi/iwl-core.c int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv) · line 1485

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-core.c +10 -0
+             return;
+
+     mutex_lock(&priv->mutex);
+
+     if (!iwl_is_rfkill(priv)) {
+             IWL_DEBUG(IWL_DL_RF_KILL,
+                       "HW and/or SW RF Kill no longer active, restarting "
+                       "device\n");
+             if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
+                     queue_work(priv->workqueue, &priv->restart);

I've changed this check in both rf-kill patches (3945 and agn) to

if (!test_bit(STATUS_EXIT_PENDING, &priv->status) &&
test_bit(STATUS_ALIVE, &priv->status))

in order to avoid restarting the adapter when notified about rfkill changes by interrupt/polling.

Quoted 9 lines

I guess this is just an oversight, right?

Thanks,
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]<mailto:[email protected]> More majordomo info at http://vger.kernel.org/majordomo-info.html

Content-Description: report_iwlwifi_rfkill_2.6.29-rc2-git1-iniza-4.txt

Quoted 38 lines

----- BEGIN LED OFF -----

Jan 21 14:13:27 seduxbox kernel: iwl3945 0000:10:00.0: Radio Frequency Kill Switch is On:
Jan 21 14:13:27 seduxbox kernel: Kill switch must be turned off for wireless networking to work.
Jan 21 14:13:28 seduxbox kernel: usb 1-2: USB disconnect, address 2
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB0: Sierra USB modem converter now disconnected from ttyUSB0
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB1: Sierra USB modem converter now disconnected from ttyUSB1
Jan 21 14:13:28 seduxbox kernel: sierra ttyUSB2: Sierra USB modem converter now disconnected from ttyUSB2
Jan 21 14:13:28 seduxbox kernel: sierra 1-2:1.0: device disconnected
Jan 21 14:13:32 seduxbox kernel: wlan0: No ProbeResp from current AP 00:04:0e:e4:00:3d - assume out of range
Jan 21 14:13:32 seduxbox kernel: iwl3945 0000:10:00.0: Error sending REPLY_LEDS_CMD: enqueue_hcmd failed: -5

----- END LED OFF -----

----- BEGIN LED ON -----

Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:radio
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:assoc
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:RX
Jan 21 14:14:47 seduxbox kernel: Registered led device: iwl-phy0:TX
Jan 21 14:14:50 seduxbox kernel: usb 1-2: new full speed USB device using uhci_hcd and address 3
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device found, idVendor=03f0, idProduct=1e1d
Jan 21 14:14:50 seduxbox kernel: usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Product: HP hs2300 HSDPA Broadband Wireless Module
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Manufacturer: HP
Jan 21 14:14:50 seduxbox kernel: usb 1-2: configuration #1 chosen from 1 choice
Jan 21 14:14:50 seduxbox kernel: sierra 1-2:1.0: Sierra USB modem converter detected
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB0
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB1
Jan 21 14:14:50 seduxbox kernel: usb 1-2: Sierra USB modem converter now attached to ttyUSB2
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: authenticated
Jan 21 14:15:18 seduxbox kernel: wlan0: associate with AP 00:04:0e:e4:00:3d
Jan 21 14:15:18 seduxbox kernel: wlan0: RX ReassocResp from 00:04:0e:e4:00:3d (capab=0x411 status=0 aid=1)
Jan 21 14:15:18 seduxbox kernel: wlan0: associated
Quoted 2 lines

----- END LED ON -----

--
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

--
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

#13 lore raw

PATCH v2 4/5 iwl3945: Use iwl-rfkill

In reply to Reinette Chatre

From: Samuel Ortiz <[email protected]>

Here again, the rfkill routines are duplicated between agn and 3945. Let's move the agn one to iwlcore, and so we can get rid of the 3945 ones.

---

Changes from v1:
- Add Helmut's code back, after a merge mistake.

---
 drivers/net/wireless/iwlwifi/Kconfig        |    6 +-
 drivers/net/wireless/iwlwifi/iwl-3945.h     |   12 --
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   34 ------
 drivers/net/wireless/iwlwifi/iwl-core.c     |   36 +++++++
 drivers/net/wireless/iwlwifi/iwl-core.h     |    2 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |  151 +--------------------------
 6 files changed, 43 insertions(+), 198 deletions(-)
drivers/net/wireless/iwlwifi/Kconfig +1 -5
index 47bee0e..4b2d57a 100644
@@ -110,7 +110,7 @@ config IWL3945
 	select IWLWIFI
 	select MAC80211_LEDS if IWL3945_LEDS
 	select LEDS_CLASS if IWL3945_LEDS
-	select RFKILL if IWL3945_RFKILL
+	select RFKILL if IWLWIFI_RFKILL
 	---help---
 	  Select to build the driver supporting the:
 
@@ -133,10 +133,6 @@ config IWL3945
 	  say M here and read <file:Documentation/kbuild/modules.txt>.  The
 	  module will be called iwl3945.ko.
 
-config IWL3945_RFKILL
-	bool "Enable RF kill support in iwl3945 drivers"
-	depends on IWL3945
-
 config IWL3945_SPECTRUM_MEASUREMENT
 	bool "Enable Spectrum Measurement in iwl3945 drivers"
 	depends on IWL3945
drivers/net/wireless/iwlwifi/iwl-3945.h +0 -12
index 97dfa7c..156c828 100644
@@ -301,18 +301,6 @@ extern int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv);
 extern u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id,
 		 u16 tx_rate, u8 flags);
 
-#ifdef CONFIG_IWL3945_RFKILL
-struct iwl_priv;
-
-void iwl3945_rfkill_set_hw_state(struct iwl_priv *priv);
-void iwl3945_rfkill_unregister(struct iwl_priv *priv);
-int iwl3945_rfkill_init(struct iwl_priv *priv);
-#else
-static inline void iwl3945_rfkill_set_hw_state(struct iwl_priv *priv) {}
-static inline void iwl3945_rfkill_unregister(struct iwl_priv *priv) {}
-static inline int iwl3945_rfkill_init(struct iwl_priv *priv) { return 0; }
-#endif
-
 static inline int iwl3945_is_associated(struct iwl_priv *priv)
 {
 	return (priv->active39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
drivers/net/wireless/iwlwifi/iwl-agn.c +0 -34
index d1994de..c4fadb6 100644
@@ -2143,40 +2143,6 @@ static void iwl_bg_alive_start(struct work_struct *data)
 	mutex_unlock(&priv->mutex);
 }
 
-static void iwl_bg_rf_kill(struct work_struct *work)
-{
-	struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
-
-	wake_up_interruptible(&priv->wait_command_queue);
-
-	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
-		return;
-
-	mutex_lock(&priv->mutex);
-
-	if (!iwl_is_rfkill(priv)) {
-		IWL_DEBUG(IWL_DL_RF_KILL,
-			  "HW and/or SW RF Kill no longer active, restarting "
-			  "device\n");
-		if (!test_bit(STATUS_EXIT_PENDING, &priv->status))
-			queue_work(priv->workqueue, &priv->restart);
-	} else {
-		/* make sure mac80211 stop sending Tx frame */
-		if (priv->mac80211_registered)
-			ieee80211_stop_queues(priv->hw);
-
-		if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
-			IWL_DEBUG_RF_KILL("Can not turn radio back on - "
-					  "disabled by SW switch\n");
-		else
-			IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
-				    "Kill switch must be turned off for "
-				    "wireless networking to work.\n");
-	}
-	mutex_unlock(&priv->mutex);
-	iwl_rfkill_set_hw_state(priv);
-}
-
 static void iwl_bg_run_time_calib_work(struct work_struct *work)
 {
 	struct iwl_priv *priv = container_of(work, struct iwl_priv,
drivers/net/wireless/iwlwifi/iwl-core.c +36 -0
index d2ef3e1..f24d3b4 100644
@@ -1465,3 +1465,39 @@ int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv)
 	return 1;
 }
 EXPORT_SYMBOL(iwl_radio_kill_sw_enable_radio);
+
+void iwl_bg_rf_kill(struct work_struct *work)
+{
+	struct iwl_priv *priv = container_of(work, struct iwl_priv, rf_kill);
+
+	wake_up_interruptible(&priv->wait_command_queue);
+
+	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+		return;
+
+	mutex_lock(&priv->mutex);
+
+	if (!iwl_is_rfkill(priv)) {
+		IWL_DEBUG(IWL_DL_RF_KILL,
+			  "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))
+			queue_work(priv->workqueue, &priv->restart);
+	} else {
+		/* make sure mac80211 stop sending Tx frame */
+		if (priv->mac80211_registered)
+			ieee80211_stop_queues(priv->hw);
+
+		if (!test_bit(STATUS_RF_KILL_HW, &priv->status))
+			IWL_DEBUG_RF_KILL("Can not turn radio back on - "
+					  "disabled by SW switch\n");
+		else
+			IWL_WARN(priv, "Radio Frequency Kill Switch is On:\n"
+				    "Kill switch must be turned off for "
+				    "wireless networking to work.\n");
+	}
+	mutex_unlock(&priv->mutex);
+	iwl_rfkill_set_hw_state(priv);
+}
+EXPORT_SYMBOL(iwl_bg_rf_kill);
drivers/net/wireless/iwlwifi/iwl-core.h +1 -1
index 466130f..5ceeedc 100644
@@ -267,7 +267,7 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force);
  * RF -Kill - here and not in iwl-rfkill.h to be available when
  * RF-kill subsystem is not compiled.
  ****************************************************/
-void iwl_rf_kill(struct iwl_priv *priv);
+void iwl_bg_rf_kill(struct work_struct *work);
 void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv);
 int iwl_radio_kill_sw_enable_radio(struct iwl_priv *priv);
 
drivers/net/wireless/iwlwifi/iwl3945-base.c +5 -146

193 lines not on this page · raw message

Signature · 16 lines
1.6.0.4.766.g6fc4a.dirty

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.