linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhu Yi <yi.zhu@intel.com>
To: linville@tuxdriver.com
To: ipwpatch@vger.kernel.org
Cc: linux-wireless@vger.kernel.org, Zhu Yi <yi.zhu@intel.com>,
	Mohamed Abbas <mabbas@linux.intel.com>
Subject: [PATCH 14/17] iwlwifi: fix channel switch assert
Date: Fri, 27 Jul 2007 17:26:38 +0800	[thread overview]
Message-ID: <11855284263627-git-send-email-yi.zhu@intel.com> (raw)
In-Reply-To: <11855284253382-git-send-email-yi.zhu@intel.com>

Fix the system freeze when do channel switch to radar channel.
If we are switching to a radar channel then we need to set
expect_beacon. Otherwise we get assert from ucode. we still
see assert if we do more than one channel switch currently,
fix will be coming next.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwl-4965.c |    7 +++++++
 drivers/net/wireless/iwl-base.c |    8 ++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwl-4965.c b/drivers/net/wireless/iwl-4965.c
index fcee3f5..da3e9a7 100644
--- a/drivers/net/wireless/iwl-4965.c
+++ b/drivers/net/wireless/iwl-4965.c
@@ -2607,11 +2607,14 @@ int iwl_hw_channel_switch(struct iwl_priv *priv, u8 channel)
 	u8 is_fat = 0;
 	u8 ctrl_chan_high = 0;
 	struct iwl_channel_switch_cmd cmd = { 0 };
+	const struct iwl_channel_info *ch_info;
 
 	band = ((priv->phymode == MODE_IEEE80211B) ||
 		(priv->phymode == MODE_IEEE80211G) ||
 		(priv->phymode == MODE_ATHEROS_TURBOG)) ? 1 : 0;
 
+	ch_info = iwl_get_channel_info(priv, priv->phymode, channel);
+
 	is_fat = is_fat_channel(priv->staging_rxon.flags);
 
 	if (is_fat &&
@@ -2624,6 +2627,10 @@ int iwl_hw_channel_switch(struct iwl_priv *priv, u8 channel)
 	cmd.rxon_flags = priv->active_rxon.flags;
 	cmd.rxon_filter_flags = priv->active_rxon.filter_flags;
 	cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
+	if (ch_info)
+		cmd.expect_beacon = is_channel_radar(ch_info);
+	else
+		cmd.expect_beacon = 1;
 
 	rc = iwl4965_fill_txpower_tbl(priv, band, channel, is_fat,
 				      ctrl_chan_high, &cmd.tx_power);
diff --git a/drivers/net/wireless/iwl-base.c b/drivers/net/wireless/iwl-base.c
index a17fbd9..c28a56a 100644
--- a/drivers/net/wireless/iwl-base.c
+++ b/drivers/net/wireless/iwl-base.c
@@ -7484,8 +7484,12 @@ static int iwl_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
 	/* if we are switching fron ht to 2.4 clear flags
 	 * from any ht related info since 2.4 does not
 	 * support ht */
-	if (is_channel_bg_band(ch_info) &&
-	    (priv->staging_rxon.channel != conf->channel))
+	if ((priv->staging_rxon.channel != conf->channel)
+#ifdef IEEE80211_CONF_CHANNEL_SWITCH
+	    && !(conf->flags & IEEE80211_CONF_CHANNEL_SWITCH))
+#else
+	    )
+#endif
 		priv->staging_rxon.flags = 0;
 #endif /* CONFIG_IWLWIFI_HT */
 #endif /* IWL == 4965 */
-- 
1.5.2

  reply	other threads:[~2007-07-27  9:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11855284012123-git-send-email-yi.zhu@intel.com>
2007-07-27  9:26 ` [PATCH 01/17] iwlwifi: provide frequency to radiotap monitor not channel index Zhu Yi
2007-07-27  9:26   ` [PATCH 02/17] iwlwifi: Calculate and report noise level while associated Zhu Yi
2007-07-27  9:26     ` [PATCH 03/17] iwlwifi: modify station fix Zhu Yi
2007-07-27  9:26       ` [PATCH 04/17] iwlwifi: cleanup tx queue allocation Zhu Yi
2007-07-27  9:26         ` [PATCH 05/17] iwlwifi: rxon filter_flags endianity fix Zhu Yi
2007-07-27  9:26           ` [PATCH 06/17] iwlwifi: rename base.c to iwl-base.c Zhu Yi
2007-07-27  9:26             ` [PATCH 07/17] iwilwifi: removed unused constant Zhu Yi
2007-07-27  9:26               ` [PATCH 08/17] iwlwifi: QoS control endianity fixes Zhu Yi
2007-07-27  9:26                 ` [PATCH 09/17] iwlwifi: EEPROM reading fix Zhu Yi
2007-07-27  9:26                   ` [PATCH 10/17] iwlwifi: endianity cleaning of iwl_print_rx_config_cmd Zhu Yi
2007-07-27  9:26                     ` [PATCH 11/17] iwlwifi: endianity cleanup for QoS host command Zhu Yi
2007-07-27  9:26                       ` [PATCH 12/17] iwlwifi: endianity cleanup for power table " Zhu Yi
2007-07-27  9:26                         ` [PATCH 13/17] iwlwifi: fix 11n on 2.4 channel Zhu Yi
2007-07-27  9:26                           ` Zhu Yi [this message]
2007-07-27  9:26                             ` [PATCH 15/17] iwlwifi: fix scaing watchdog time out Zhu Yi
2007-07-27  9:26                               ` [PATCH 16/17] iwlwifi: Add uCode/driver compatibility version number Zhu Yi
2007-07-27  9:26                                 ` [PATCH 17/17] iwlwifi: update version stamp to 0.1.5 Zhu Yi
2007-07-27 11:22                   ` [PATCH 09/17] iwlwifi: EEPROM reading fix Michael Buesch
2007-07-27 22:24                     ` Tomas Winkler
2007-07-27 22:32                       ` Michael Buesch
2007-07-27  9:30 ` [PATCH 00/17] iwlwifi driver updated to version 0.1.5 Zhu Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11855284263627-git-send-email-yi.zhu@intel.com \
    --to=yi.zhu@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mabbas@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).