]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.32.10/iwlwifi-set-ht-flags-after-channel-in-rxon.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.32.10 / iwlwifi-set-ht-flags-after-channel-in-rxon.patch
1 From 5e2f75b8993a0d83d469388b50716dd5551f2eb4 Mon Sep 17 00:00:00 2001
2 From: Dan Halperin <dhalperi@cs.washington.edu>
3 Date: Thu, 18 Feb 2010 22:01:39 -0800
4 Subject: iwlwifi: set HT flags after channel in rxon
5
6 From: Dan Halperin <dhalperi@cs.washington.edu>
7
8 commit 5e2f75b8993a0d83d469388b50716dd5551f2eb4 upstream.
9
10 The HT extension channel settings require priv->staging_rxon.channel to be
11 accurate. However, iwl_set_rxon_ht was being called before iwl_set_rxon_channel
12 and thus HT40 could be broken unless another call to iwl_mac_config came in.
13
14 This problem was recently introduced by "iwlwifi: Fix to set correct ht
15 configuration"
16
17 The particular setting in which I noticed this was monitor mode:
18
19 iwconfig wlan0 mode monitor
20 ifconfig wlan0 up
21 ./iw wlan0 set channel 64 HT40-
22 #./iw wlan0 set channel 64 HT40-
23 tcpdump -i wlan0 -y IEEE802_11_RADIO
24
25 would only catch HT40 packets if I issued the IW command twice.
26
27 From visual inspection, iwl_set_rxon_channel does not depend on
28 iwl_set_rxon_ht, so simply swapping them should be safe and fixes this problem.
29
30 Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
31 Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
32 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
33 Signed-off-by: John W. Linville <linville@tuxdriver.com>
34 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
35
36 ---
37 drivers/net/wireless/iwlwifi/iwl-core.c | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
39
40 --- a/drivers/net/wireless/iwlwifi/iwl-core.c
41 +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
42 @@ -2645,8 +2645,8 @@ int iwl_mac_config(struct ieee80211_hw *
43 if ((le16_to_cpu(priv->staging_rxon.channel) != ch))
44 priv->staging_rxon.flags = 0;
45
46 - iwl_set_rxon_ht(priv, ht_conf);
47 iwl_set_rxon_channel(priv, conf->channel);
48 + iwl_set_rxon_ht(priv, ht_conf);
49
50 iwl_set_flags_for_band(priv, conf->channel->band);
51 spin_unlock_irqrestore(&priv->lock, flags);