* Re: [RFC v2] mac80211: Fix HT channel selection
@ 2008-12-09 12:54 Mats Johannesson
2008-12-09 13:14 ` Holger Schurig
0 siblings, 1 reply; 16+ messages in thread
From: Mats Johannesson @ 2008-12-09 12:54 UTC (permalink / raw)
To: Sujith, Johannes Berg, linux-wireless, Jouni.Malinen
Confirmation from one userland of ath9k. This patch on top of latest
wireless-testing (pulled an hour ago) allows me to scan (root or normal
user) without loss of connectivity or Kernel panic in "Channel Width:
Auto 20/40 MHz" mode. Thank you devs.
Boot finished at 13:25, scan with Wicd Manager at 13:30:
13:24:46 : ath0: authenticate with AP 00:1b:11:60:7a:3d
13:24:46 : ath0: authenticated
13:24:46 : ath0: associate with AP 00:1b:11:60:7a:3d
13:24:46 : ath0: RX AssocResp from 00:1b:11:60:7a:3d (capab=0x431 status=0 aid=4)
13:24:46 : ath0: associated
13:24:46 : ath9k: Choosing rate table for mode: 10
13:24:46 : ath9k: Configure tx [queue/halq] [2/1], aifs: 3, cw_min: 15, cw_max: 1023, txop: 0
13:24:46 : ath9k: Configure tx [queue/halq] [3/0], aifs: 7, cw_min: 15, cw_max: 1023, txop: 0
13:24:46 : ath9k: Configure tx [queue/halq] [1/2], aifs: 2, cw_min: 7, cw_max: 15, txop: 94
13:24:46 : ath9k: Configure tx [queue/halq] [0/3], aifs: 2, cw_min: 3, cw_max: 7, txop: 47
13:24:46 : ath9k: Set channel: 2412 MHz
13:24:46 : ath9k: (2412 MHz) -> (2412 MHz), cflags:300e0, chanwidth: 1
13:24:46 : ath9k: tx chmask: 5, rx chmask: 5
13:24:46 : ath9k: BSS Changed PREAMBLE 1
13:24:46 : ath9k: BSS Changed ASSOC 1
13:24:46 : ath9k: Bss Info ASSOC 4, bssid: 00:1b:11:60:7a:3d
13:24:46 : ADDRCONF(NETDEV_CHANGE): ath0: link becomes ready
13:24:46 : ath9k: Set HW RX filter: 0x0
13:24:46 : ath9k: Set HW RX filter: 0x0
13:24:46 : Clocksource tsc unstable (delta = -87796076 ns)
13:24:54 : ath9k: Set HW RX filter: 0x0
13:24:54 : ath9k: Set HW RX filter: 0x0
13:24:56 : ath0: no IPv6 routers present
13:25:07 : ACPI: EC: missing confirmations, switch off interrupt mode.
13:30:15 : ath9k: Set HW RX filter: 0x0
13:30:15 : ath9k: Set HW RX filter: 0x10
13:30:15 : ath9k: Set channel: 2412 MHz
13:30:15 : ath9k: (2412 MHz) -> (2412 MHz), cflags:300e0, chanwidth: 0
13:30:15 : ath9k: tx chmask: 1, rx chmask: 1
13:30:15 : ath9k: Set channel: 2417 MHz
13:30:15 : ath9k: (2412 MHz) -> (2417 MHz), cflags:300e0, chanwidth: 0
13:30:15 : ath9k: tx chmask: 1, rx chmask: 1
13:30:15 : ath9k: Set channel: 2422 MHz
13:30:15 : ath9k: (2417 MHz) -> (2422 MHz), cflags:300e0, chanwidth: 0
13:30:15 : ath9k: tx chmask: 1, rx chmask: 1
13:30:15 : ath9k: Set channel: 2427 MHz
13:30:15 : ath9k: (2422 MHz) -> (2427 MHz), cflags:300e0, chanwidth: 0
13:30:15 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2432 MHz
13:30:16 : ath9k: (2427 MHz) -> (2432 MHz), cflags:700e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2437 MHz
13:30:16 : ath9k: (2432 MHz) -> (2437 MHz), cflags:700e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2442 MHz
13:30:16 : ath9k: (2437 MHz) -> (2442 MHz), cflags:700e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2447 MHz
13:30:16 : ath9k: (2442 MHz) -> (2447 MHz), cflags:500e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2452 MHz
13:30:16 : ath9k: (2447 MHz) -> (2452 MHz), cflags:500e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2457 MHz
13:30:16 : ath9k: (2452 MHz) -> (2457 MHz), cflags:500e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2462 MHz
13:30:16 : ath9k: (2457 MHz) -> (2462 MHz), cflags:500e0, chanwidth: 0
13:30:16 : ath9k: tx chmask: 1, rx chmask: 1
13:30:16 : ath9k: Set channel: 2412 MHz
13:30:16 : ath9k: (2462 MHz) -> (2412 MHz), cflags:300e0, chanwidth: 1
13:30:16 : ath9k: tx chmask: 5, rx chmask: 5
13:30:16 : ath9k: Set HW RX filter: 0x0
/Mats
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 12:54 [RFC v2] mac80211: Fix HT channel selection Mats Johannesson
@ 2008-12-09 13:14 ` Holger Schurig
2008-12-09 13:31 ` Sujith
0 siblings, 1 reply; 16+ messages in thread
From: Holger Schurig @ 2008-12-09 13:14 UTC (permalink / raw)
To: linux-wireless; +Cc: Mats Johannesson, Sujith, Johannes Berg, Jouni.Malinen
> 13:30:16 : ath9k: (2452 MHz) -> (2457 MHz), cflags:500e0, chanwidth: 0
Why the useless brackets?
And is it by intent that this uses frequencies and not channel numbers?
I personally tend to be much more able to remember channels, but
frequencies are more versatile.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 13:14 ` Holger Schurig
@ 2008-12-09 13:31 ` Sujith
2008-12-09 15:16 ` Mats Johannesson
0 siblings, 1 reply; 16+ messages in thread
From: Sujith @ 2008-12-09 13:31 UTC (permalink / raw)
To: Holger Schurig
Cc: linux-wireless, Mats Johannesson, Johannes Berg, Jouni.Malinen
Holger Schurig wrote:
> > 13:30:16 : ath9k: (2452 MHz) -> (2457 MHz), cflags:500e0, chanwidth: 0
>
> Why the useless brackets?
>
No reason, actually. :)
> And is it by intent that this uses frequencies and not channel numbers?
> I personally tend to be much more able to remember channels, but
> frequencies are more versatile.
Nope, no intent here. :)
Sujith
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 13:31 ` Sujith
@ 2008-12-09 15:16 ` Mats Johannesson
0 siblings, 0 replies; 16+ messages in thread
From: Mats Johannesson @ 2008-12-09 15:16 UTC (permalink / raw)
To: Sujith; +Cc: Holger Schurig, linux-wireless, Johannes Berg, Jouni.Malinen
Sujith, there seems to be a slight issue. After having done a scan (one
is enough) DNS lookups start to be delayed. Prior to a scan I get
maximum 1 seconds DNS lookups, after scan it can be like 5 seconds up
to 25 and even to the point of timeout.
I've tested this several times now, for some hours, and am rather
confident that the scan is the culprit. It is very obvious at marc.info
where the DNS in addition seems to be forgotten within minutes,
requiring a new lookup. Possibly the DNS is forgotten normally as well,
but the lookup is so quick that I don't notice it...
/Mats
^ permalink raw reply [flat|nested] 16+ messages in thread
* [RFC v2] mac80211: Fix HT channel selection
@ 2008-12-09 8:59 Sujith
2008-12-09 10:24 ` Johannes Berg
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Sujith @ 2008-12-09 8:59 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, johannes, jouni.malinen, lrodriguez,
tomas.winkler
HT management is done differently for AP and STA modes, unify
to just the ->config() callback since HT is fundamentally a
PHY property and cannot be per-BSS.
Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
the channel type ( NO_HT, HT20, HT40+, HT40- ).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath9k/main.c | 124 ++++++++------------------------
drivers/net/wireless/iwlwifi/iwl-agn.c | 18 ++++--
drivers/net/wireless/mac80211_hwsim.c | 6 +-
include/linux/nl80211.h | 22 +++---
include/net/cfg80211.h | 2 +-
include/net/mac80211.h | 9 +--
net/mac80211/cfg.c | 4 +-
net/mac80211/ht.c | 35 ++++++---
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/main.c | 27 +++-----
net/mac80211/mlme.c | 1 +
net/mac80211/util.c | 2 +-
net/wireless/nl80211.c | 27 ++++----
13 files changed, 110 insertions(+), 169 deletions(-)
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 92206dd..b09bdbd 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -623,37 +623,40 @@ static int ath_get_channel(struct ath_softc *sc,
return -1;
}
-/* ext_chan_offset: (-1, 0, 1) (below, none, above) */
-
static u32 ath_get_extchanmode(struct ath_softc *sc,
struct ieee80211_channel *chan,
- int ext_chan_offset,
- enum ath9k_ht_macmode tx_chan_width)
+ enum nl80211_channel_type channel_type)
{
u32 chanmode = 0;
switch (chan->band) {
case IEEE80211_BAND_2GHZ:
- if ((ext_chan_offset == 0) &&
- (tx_chan_width == ATH9K_HT_MACMODE_20))
+ switch(channel_type) {
+ case NL80211_CHAN_NO_HT:
+ case NL80211_CHAN_HT20:
chanmode = CHANNEL_G_HT20;
- if ((ext_chan_offset == 1) &&
- (tx_chan_width == ATH9K_HT_MACMODE_2040))
+ break;
+ case NL80211_CHAN_HT40PLUS:
chanmode = CHANNEL_G_HT40PLUS;
- if ((ext_chan_offset == -1) &&
- (tx_chan_width == ATH9K_HT_MACMODE_2040))
+ break;
+ case NL80211_CHAN_HT40MINUS:
chanmode = CHANNEL_G_HT40MINUS;
+ break;
+ }
break;
case IEEE80211_BAND_5GHZ:
- if ((ext_chan_offset == 0) &&
- (tx_chan_width == ATH9K_HT_MACMODE_20))
+ switch(channel_type) {
+ case NL80211_CHAN_NO_HT:
+ case NL80211_CHAN_HT20:
chanmode = CHANNEL_A_HT20;
- if ((ext_chan_offset == 1) &&
- (tx_chan_width == ATH9K_HT_MACMODE_2040))
+ break;
+ case NL80211_CHAN_HT40PLUS:
chanmode = CHANNEL_A_HT40PLUS;
- if ((ext_chan_offset == -1) &&
- (tx_chan_width == ATH9K_HT_MACMODE_2040))
+ break;
+ case NL80211_CHAN_HT40MINUS:
chanmode = CHANNEL_A_HT40MINUS;
+ break;
+ }
break;
default:
break;
@@ -829,46 +832,17 @@ static void setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info)
ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
}
-static void ath9k_ht_conf(struct ath_softc *sc,
- struct ieee80211_bss_conf *bss_conf)
-{
- if (sc->hw->conf.ht.enabled) {
- if (bss_conf->ht.width_40_ok)
- sc->tx_chan_width = ATH9K_HT_MACMODE_2040;
- else
- sc->tx_chan_width = ATH9K_HT_MACMODE_20;
-
- ath9k_hw_set11nmac2040(sc->sc_ah, sc->tx_chan_width);
-
- DPRINTF(sc, ATH_DBG_CONFIG,
- "BSS Changed HT, chanwidth: %d\n", sc->tx_chan_width);
- }
-}
-
-static inline int ath_sec_offset(u8 ext_offset)
-{
- if (ext_offset == IEEE80211_HT_PARAM_CHA_SEC_NONE)
- return 0;
- else if (ext_offset == IEEE80211_HT_PARAM_CHA_SEC_ABOVE)
- return 1;
- else if (ext_offset == IEEE80211_HT_PARAM_CHA_SEC_BELOW)
- return -1;
-
- return 0;
-}
-
static void ath9k_bss_assoc_info(struct ath_softc *sc,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf)
{
- struct ieee80211_hw *hw = sc->hw;
- struct ieee80211_channel *curchan = hw->conf.channel;
struct ath_vap *avp = (void *)vif->drv_priv;
- int pos;
DECLARE_MAC_BUF(mac);
if (bss_conf->assoc) {
- DPRINTF(sc, ATH_DBG_CONFIG, "Bss Info ASSOC %d\n", bss_conf->aid);
+ DPRINTF(sc, ATH_DBG_CONFIG, "Bss Info ASSOC %d, bssid: %s\n",
+ bss_conf->aid,
+ print_mac(mac, sc->sc_curbssid));
/* New association, store aid */
if (avp->av_opmode == NL80211_IFTYPE_STATION) {
@@ -887,40 +861,6 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
sc->sc_halstats.ns_avgtxrssi = ATH_RSSI_DUMMY_MARKER;
sc->sc_halstats.ns_avgtxrate = ATH_RATE_DUMMY_MARKER;
- /* Update chainmask */
- ath_update_chainmask(sc, hw->conf.ht.enabled);
-
- DPRINTF(sc, ATH_DBG_CONFIG,
- "bssid %s aid 0x%x\n",
- print_mac(mac, sc->sc_curbssid), sc->sc_curaid);
-
- pos = ath_get_channel(sc, curchan);
- if (pos == -1) {
- DPRINTF(sc, ATH_DBG_FATAL,
- "Invalid channel: %d\n", curchan->center_freq);
- return;
- }
-
- if (hw->conf.ht.enabled) {
- int offset =
- ath_sec_offset(bss_conf->ht.secondary_channel_offset);
- sc->tx_chan_width = (bss_conf->ht.width_40_ok) ?
- ATH9K_HT_MACMODE_2040 : ATH9K_HT_MACMODE_20;
-
- sc->sc_ah->ah_channels[pos].chanmode =
- ath_get_extchanmode(sc, curchan,
- offset, sc->tx_chan_width);
- } else {
- sc->sc_ah->ah_channels[pos].chanmode =
- (curchan->band == IEEE80211_BAND_2GHZ) ?
- CHANNEL_G : CHANNEL_A;
- }
-
- /* set h/w channel */
- if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0)
- DPRINTF(sc, ATH_DBG_FATAL, "Unable to set channel: %d\n",
- curchan->center_freq);
-
/* Start ANI */
mod_timer(&sc->sc_ani.timer,
jiffies + msecs_to_jiffies(ATH_ANI_POLLINTERVAL));
@@ -2147,7 +2087,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
struct ath_softc *sc = hw->priv;
struct ieee80211_conf *conf = &hw->conf;
- if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+ if (changed & (IEEE80211_CONF_CHANGE_CHANNEL |
+ IEEE80211_CONF_CHANGE_HT)) {
struct ieee80211_channel *curchan = hw->conf.channel;
int pos;
@@ -2166,25 +2107,23 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
(curchan->band == IEEE80211_BAND_2GHZ) ?
CHANNEL_G : CHANNEL_A;
- if ((sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) &&
- (conf->ht.enabled)) {
- sc->tx_chan_width = (!!conf->ht.sec_chan_offset) ?
- ATH9K_HT_MACMODE_2040 : ATH9K_HT_MACMODE_20;
+ if (conf->ht.enabled) {
+ if (conf->ht.channel_type == NL80211_CHAN_HT40PLUS ||
+ conf->ht.channel_type == NL80211_CHAN_HT40MINUS)
+ sc->tx_chan_width = ATH9K_HT_MACMODE_2040;
sc->sc_ah->ah_channels[pos].chanmode =
ath_get_extchanmode(sc, curchan,
- conf->ht.sec_chan_offset,
- sc->tx_chan_width);
+ conf->ht.channel_type);
}
if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0) {
DPRINTF(sc, ATH_DBG_FATAL, "Unable to set channel\n");
return -EINVAL;
}
- }
- if (changed & IEEE80211_CONF_CHANGE_HT)
ath_update_chainmask(sc, conf->ht.enabled);
+ }
if (changed & IEEE80211_CONF_CHANGE_POWER)
sc->sc_config.txpowlimit = 2 * conf->power_level;
@@ -2420,9 +2359,6 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
sc->sc_flags &= ~SC_OP_PROTECT_ENABLE;
}
- if (changed & BSS_CHANGED_HT)
- ath9k_ht_conf(sc, bss_conf);
-
if (changed & BSS_CHANGED_ASSOC) {
DPRINTF(sc, ATH_DBG_CONFIG, "BSS Changed ASSOC %d\n",
bss_conf->assoc);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index fc4e7e4..90957f0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -516,19 +516,27 @@ static void iwl_ht_conf(struct iwl_priv *priv,
iwl_conf->supported_chan_width =
!!(ht_conf->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40);
- iwl_conf->extension_chan_offset = bss_conf->ht.secondary_channel_offset;
+ /*
+ * XXX: The HT configuration needs to be moved into iwl_mac_config()
+ * to be done there correctly.
+ */
+
+ iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ if (priv->hw->conf.ht.channel_type == NL80211_CHAN_HT40MINUS)
+ iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ else if(priv->hw->conf.ht.channel_type == NL80211_CHAN_HT40PLUS)
+ iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+
/* If no above or below channel supplied disable FAT channel */
if (iwl_conf->extension_chan_offset != IEEE80211_HT_PARAM_CHA_SEC_ABOVE &&
- iwl_conf->extension_chan_offset != IEEE80211_HT_PARAM_CHA_SEC_BELOW) {
- iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ iwl_conf->extension_chan_offset != IEEE80211_HT_PARAM_CHA_SEC_BELOW)
iwl_conf->supported_chan_width = 0;
- }
iwl_conf->sm_ps = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2);
memcpy(&iwl_conf->mcs, &ht_conf->mcs, 16);
- iwl_conf->tx_chan_width = bss_conf->ht.width_40_ok;
+ iwl_conf->tx_chan_width = iwl_conf->supported_chan_width != 0;
iwl_conf->ht_protection =
bss_conf->ht.operation_mode & IEEE80211_HT_OP_MODE_PROTECTION;
iwl_conf->non_GF_STA_present =
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index f43da1c..d1f4d60 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -497,11 +497,9 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
}
if (changed & BSS_CHANGED_HT) {
- printk(KERN_DEBUG " %s: HT: sec_ch_offs=%d width_40_ok=%d "
- "op_mode=%d\n",
+ printk(KERN_DEBUG " %s: HT: op_mode=0x%x\n",
wiphy_name(hw->wiphy),
- info->ht.secondary_channel_offset,
- info->ht.width_40_ok, info->ht.operation_mode);
+ info->ht.operation_mode);
}
if (changed & BSS_CHANGED_BASIC_RATES) {
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 04d4516..acb1d5d 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -201,13 +201,13 @@ enum nl80211_commands {
* @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
* @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
* @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
- * @NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET: included with NL80211_ATTR_WIPHY_FREQ
+ * @NL80211_ATTR_WIPHY_CHANNEL_TYPE: included with NL80211_ATTR_WIPHY_FREQ
* if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
- * NL80211_SEC_CHAN_NO_HT = HT not allowed (i.e., same as not including
+ * NL80211_CHAN_NO_HT = HT not allowed (i.e., same as not including
* this attribute)
- * NL80211_SEC_CHAN_DISABLED = HT20 only
- * NL80211_SEC_CHAN_BELOW = secondary channel is below the primary channel
- * NL80211_SEC_CHAN_ABOVE = secondary channel is above the primary channel
+ * NL80211_CHAN_HT20 = HT20 only
+ * NL80211_CHAN_HT40MINUS = secondary channel is below the primary channel
+ * NL80211_CHAN_HT40PLUS = secondary channel is above the primary channel
*
* @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
* @NL80211_ATTR_IFNAME: network interface name
@@ -344,7 +344,7 @@ enum nl80211_attrs {
NL80211_ATTR_WIPHY_TXQ_PARAMS,
NL80211_ATTR_WIPHY_FREQ,
- NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
+ NL80211_ATTR_WIPHY_CHANNEL_TYPE,
/* add attributes here, update the policy in nl80211.c */
@@ -774,10 +774,10 @@ enum nl80211_txq_q {
NL80211_TXQ_Q_BK
};
-enum nl80211_sec_chan_offset {
- NL80211_SEC_CHAN_NO_HT /* No HT */,
- NL80211_SEC_CHAN_DISABLED /* HT20 only */,
- NL80211_SEC_CHAN_BELOW /* HT40- */,
- NL80211_SEC_CHAN_ABOVE /* HT40+ */
+enum nl80211_channel_type {
+ NL80211_CHAN_NO_HT,
+ NL80211_CHAN_HT20,
+ NL80211_CHAN_HT40PLUS,
+ NL80211_CHAN_HT40MINUS
};
#endif /* __LINUX_NL80211_H */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index a0c0bf1..666c3c9 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -523,7 +523,7 @@ struct cfg80211_ops {
int (*set_channel)(struct wiphy *wiphy,
struct ieee80211_channel *chan,
- enum nl80211_sec_chan_offset);
+ enum nl80211_channel_type channel_type);
};
/* temporary wext handlers */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 346f373..815eed8 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -165,14 +165,9 @@ enum ieee80211_bss_change {
/**
* struct ieee80211_bss_ht_conf - BSS's changing HT configuration
- * @secondary_channel_offset: secondary channel offset, uses
- * %IEEE80211_HT_PARAM_CHA_SEC_ values
- * @width_40_ok: indicates that 40 MHz bandwidth may be used for TX
* @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
*/
struct ieee80211_bss_ht_conf {
- u8 secondary_channel_offset;
- bool width_40_ok;
u16 operation_mode;
};
@@ -508,9 +503,7 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
struct ieee80211_ht_conf {
bool enabled;
- int sec_chan_offset; /* 0 = HT40 disabled; -1 = HT40 enabled, secondary
- * channel below primary; 1 = HT40 enabled,
- * secondary channel above primary */
+ enum nl80211_channel_type channel_type;
};
/**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7912eb1..69b114c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1099,12 +1099,12 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
static int ieee80211_set_channel(struct wiphy *wiphy,
struct ieee80211_channel *chan,
- enum nl80211_sec_chan_offset sec_chan_offset)
+ enum nl80211_channel_type channel_type)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
local->oper_channel = chan;
- local->oper_sec_chan_offset = sec_chan_offset;
+ local->oper_channel_type = channel_type;
return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
}
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index ece79ae..0bec1fb 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -98,6 +98,7 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
struct ieee80211_bss_ht_conf ht;
u32 changed = 0;
bool enable_ht = true, ht_changed;
+ s8 channel_type = NL80211_CHAN_NO_HT;
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
@@ -112,24 +113,36 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
ieee80211_channel_to_frequency(hti->control_chan))
enable_ht = false;
- /*
- * XXX: This is totally incorrect when there are multiple virtual
- * interfaces, needs to be fixed later.
- */
- ht_changed = local->hw.conf.ht.enabled != enable_ht;
+ if (enable_ht) {
+ channel_type = NL80211_CHAN_HT20;
+
+ if (!(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
+ (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
+ (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
+ switch(hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+ case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
+ channel_type = NL80211_CHAN_HT40PLUS;
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
+ channel_type = NL80211_CHAN_HT40MINUS;
+ break;
+ }
+ }
+ }
+
+ ht_changed = local->hw.conf.ht.enabled != enable_ht ||
+ channel_type != local->hw.conf.ht.channel_type;
+
+ local->oper_channel_type = channel_type;
local->hw.conf.ht.enabled = enable_ht;
+
if (ht_changed)
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
/* disable HT */
if (!enable_ht)
return 0;
- ht.secondary_channel_offset =
- hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET;
- ht.width_40_ok =
- !(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
- (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
- (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY);
+
ht.operation_mode = le16_to_cpu(hti->operation_mode);
/* if bss configuration changed store the new one */
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 527205f..65cdf07 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -626,7 +626,7 @@ struct ieee80211_local {
struct delayed_work scan_work;
struct ieee80211_sub_if_data *scan_sdata;
struct ieee80211_channel *oper_channel, *scan_channel;
- enum nl80211_sec_chan_offset oper_sec_chan_offset;
+ enum nl80211_channel_type oper_channel_type;
u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
size_t scan_ssid_len;
struct list_head bss_list;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index df7e9a8..d64dd7a 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -195,37 +195,30 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
struct ieee80211_channel *chan;
int ret = 0;
int power;
- enum nl80211_sec_chan_offset sec_chan_offset;
+ enum nl80211_channel_type channel_type;
might_sleep();
if (local->sw_scanning) {
chan = local->scan_channel;
- sec_chan_offset = NL80211_SEC_CHAN_NO_HT;
+ channel_type = NL80211_CHAN_NO_HT;
} else {
chan = local->oper_channel;
- sec_chan_offset = local->oper_sec_chan_offset;
+ channel_type = local->oper_channel_type;
}
if (chan != local->hw.conf.channel ||
- sec_chan_offset != local->hw.conf.ht.sec_chan_offset) {
+ channel_type != local->hw.conf.ht.channel_type) {
local->hw.conf.channel = chan;
- switch (sec_chan_offset) {
- case NL80211_SEC_CHAN_NO_HT:
+ local->hw.conf.ht.channel_type = channel_type;
+ switch (channel_type) {
+ case NL80211_CHAN_NO_HT:
local->hw.conf.ht.enabled = false;
- local->hw.conf.ht.sec_chan_offset = 0;
break;
- case NL80211_SEC_CHAN_DISABLED:
+ case NL80211_CHAN_HT20:
+ case NL80211_CHAN_HT40MINUS:
+ case NL80211_CHAN_HT40PLUS:
local->hw.conf.ht.enabled = true;
- local->hw.conf.ht.sec_chan_offset = 0;
- break;
- case NL80211_SEC_CHAN_BELOW:
- local->hw.conf.ht.enabled = true;
- local->hw.conf.ht.sec_chan_offset = -1;
- break;
- case NL80211_SEC_CHAN_ABOVE:
- local->hw.conf.ht.enabled = true;
- local->hw.conf.ht.sec_chan_offset = 1;
break;
}
changed |= IEEE80211_CONF_CHANGE_CHANNEL;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 07b0cc3..955461b 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -864,6 +864,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
rcu_read_unlock();
local->hw.conf.ht.enabled = false;
+ local->oper_channel_type = NL80211_CHAN_NO_HT;
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
ieee80211_bss_info_change_notify(sdata, changed);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 505d68f..71a8391 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -641,7 +641,7 @@ int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
chan->flags & IEEE80211_CHAN_NO_IBSS)
return ret;
local->oper_channel = chan;
- local->oper_sec_chan_offset = NL80211_SEC_CHAN_NO_HT;
+ local->oper_channel_type = NL80211_CHAN_NO_HT;
if (local->sw_scanning || local->hw_scanning)
ret = 0;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 4335f76..4c8bfc4 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -60,7 +60,7 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
.len = BUS_ID_SIZE-1 },
[NL80211_ATTR_WIPHY_TXQ_PARAMS] = { .type = NLA_NESTED },
[NL80211_ATTR_WIPHY_FREQ] = { .type = NLA_U32 },
- [NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET] = { .type = NLA_U32 },
+ [NL80211_ATTR_WIPHY_CHANNEL_TYPE] = { .type = NLA_U32 },
[NL80211_ATTR_IFTYPE] = { .type = NLA_U32 },
[NL80211_ATTR_IFINDEX] = { .type = NLA_U32 },
@@ -362,8 +362,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
}
if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) {
- enum nl80211_sec_chan_offset sec_chan_offset =
- NL80211_SEC_CHAN_NO_HT;
+ enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
struct ieee80211_channel *chan;
struct ieee80211_sta_ht_cap *ht_cap;
u32 freq, sec_freq;
@@ -375,13 +374,13 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
result = -EINVAL;
- if (info->attrs[NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET]) {
- sec_chan_offset = nla_get_u32(info->attrs[
- NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET]);
- if (sec_chan_offset != NL80211_SEC_CHAN_NO_HT &&
- sec_chan_offset != NL80211_SEC_CHAN_DISABLED &&
- sec_chan_offset != NL80211_SEC_CHAN_BELOW &&
- sec_chan_offset != NL80211_SEC_CHAN_ABOVE)
+ if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) {
+ channel_type = nla_get_u32(info->attrs[
+ NL80211_ATTR_WIPHY_CHANNEL_TYPE]);
+ if (channel_type != NL80211_CHAN_NO_HT &&
+ channel_type != NL80211_CHAN_HT20 &&
+ channel_type != NL80211_CHAN_HT40PLUS &&
+ channel_type != NL80211_CHAN_HT40MINUS)
goto bad_res;
}
@@ -392,9 +391,9 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
if (!chan || chan->flags & IEEE80211_CHAN_DISABLED)
goto bad_res;
- if (sec_chan_offset == NL80211_SEC_CHAN_BELOW)
+ if (channel_type == NL80211_CHAN_HT40MINUS)
sec_freq = freq - 20;
- else if (sec_chan_offset == NL80211_SEC_CHAN_ABOVE)
+ else if (channel_type == NL80211_CHAN_HT40PLUS)
sec_freq = freq + 20;
else
sec_freq = 0;
@@ -402,7 +401,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
ht_cap = &rdev->wiphy.bands[chan->band]->ht_cap;
/* no HT capabilities */
- if (sec_chan_offset != NL80211_SEC_CHAN_NO_HT &&
+ if (channel_type != NL80211_CHAN_NO_HT &&
!ht_cap->ht_supported)
goto bad_res;
@@ -422,7 +421,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
}
result = rdev->ops->set_channel(&rdev->wiphy, chan,
- sec_chan_offset);
+ channel_type);
if (result)
goto bad_res;
}
--
1.6.0.5
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 8:59 Sujith
@ 2008-12-09 10:24 ` Johannes Berg
2008-12-09 18:12 ` Sujith
2008-12-11 13:53 ` Johannes Berg
2008-12-12 21:48 ` Johannes Berg
2 siblings, 1 reply; 16+ messages in thread
From: Johannes Berg @ 2008-12-09 10:24 UTC (permalink / raw)
To: Sujith; +Cc: linville, linux-wireless, jouni.malinen, lrodriguez,
tomas.winkler
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
On Tue, 2008-12-09 at 14:29 +0530, Sujith wrote:
> HT management is done differently for AP and STA modes, unify
> to just the ->config() callback since HT is fundamentally a
> PHY property and cannot be per-BSS.
>
> Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
> the channel type ( NO_HT, HT20, HT40+, HT40- ).
Thanks, also for rebasing to the current tree. For all I care, we can
apply this, but should maybe test on Intel hw?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 10:24 ` Johannes Berg
@ 2008-12-09 18:12 ` Sujith
2008-12-11 19:07 ` Johannes Berg
0 siblings, 1 reply; 16+ messages in thread
From: Sujith @ 2008-12-09 18:12 UTC (permalink / raw)
To: Johannes Berg
Cc: linville, linux-wireless, jouni.malinen, lrodriguez,
tomas.winkler
Johannes Berg wrote:
> Thanks, also for rebasing to the current tree. For all I care, we can
> apply this, but should maybe test on Intel hw?
Thanks for reviewing.
Yep, I think testing with Intel hw would be prudent. I'll do it tomorrow
(if I can find a 4965) and send out a patch.
Sujith
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 18:12 ` Sujith
@ 2008-12-11 19:07 ` Johannes Berg
2008-12-12 1:45 ` Sujith
0 siblings, 1 reply; 16+ messages in thread
From: Johannes Berg @ 2008-12-11 19:07 UTC (permalink / raw)
To: Sujith; +Cc: linville, linux-wireless, jouni.malinen, lrodriguez,
tomas.winkler
[-- Attachment #1: Type: text/plain, Size: 27870 bytes --]
On Tue, 2008-12-09 at 23:42 +0530, Sujith wrote:
> Johannes Berg wrote:
> > Thanks, also for rebasing to the current tree. For all I care, we can
> > apply this, but should maybe test on Intel hw?
>
> Thanks for reviewing.
> Yep, I think testing with Intel hw would be prudent. I'll do it tomorrow
> (if I can find a 4965) and send out a patch.
tried, it pushed ~2.9 MByte/sec TCP from my AP which isn't a lot... Then
it crashed (see below). I say we put the patch in.
johannes
[ 681.733255] wlan0: authenticate with AP 00:1d:7e:4a:a1:ab
[ 681.735567] wlan0: authenticated
[ 681.735584] wlan0: associate with AP 00:1d:7e:4a:a1:ab
[ 681.740386] wlan0: RX AssocResp from 00:1d:7e:4a:a1:ab (capab=0x401 status=0 aid=1)
[ 681.740403] wlan0: associated
[ 681.748913] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 698.110602] wlan0: no IPv6 routers present
[ 714.920520] tg3: eth0: Link is down.
[ 787.694171] Rx A-MPDU request on tid 0 result 0
[ 787.698548] ------------[ cut here ]------------
[ 787.698557] Badness at net/mac80211/rx.c:395
[ 787.698563] NIP: d000000001a68ff0 LR: d000000001a68fac CTR: 0000000000000000
[ 787.698572] REGS: c00000020029b330 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 787.698579] MSR: 9000000000029032 <EE,ME,IR,DR> CR: 44ffff22 XER: 20000000
[ 787.698607] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 787.698616] GPR00: 0000000000000001 c00000020029b5b0 d000000001aa7170 000000000000001a
[ 787.698634] GPR04: c0000002009f081b 0000000000000006 c0000001c9afec05 c000000201e07380
[ 787.698653] GPR08: 0000000000000000 d000000001a9f2ec 0000000000008802 0000000000000002
[ 787.698671] GPR12: d000000001a7b498 c000000000c43780 00000000f8000000 0000000000000000
[ 787.698690] GPR16: 00000000fff03244 0000000000000000 0000000000000000 0000000000000000
[ 787.698708] GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
[ 787.698726] GPR24: 0000000000000440 c000000150c20580 c0000002009f080c c00000020029b7d0
[ 787.698745] GPR28: c000000200cf7728 c000000201e07380 d000000001aa30c8 c00000020029b7d0
[ 787.698811] NIP [d000000001a68ff0] .__ieee80211_rx_handle_packet+0x250/0x3ac [mac80211]
[ 787.698852] LR [d000000001a68fac] .__ieee80211_rx_handle_packet+0x20c/0x3ac [mac80211]
[ 787.698859] Call Trace:
[ 787.698898] [c00000020029b5b0] [d000000001a68e38] .__ieee80211_rx_handle_packet+0x98/0x3ac [mac80211] (unreliable)
[ 787.698944] [c00000020029b6c0] [d000000001a69888] .__ieee80211_rx+0x12c/0x18c [mac80211]
[ 787.698978] [c00000020029b760] [d000000001a515f4] .ieee80211_tasklet_handler+0xb8/0x168 [mac80211]
[ 787.698995] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 787.699007] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 787.699019] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 787.699031] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 787.699042] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 787.699053] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 787.699068] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 787.699070] LR = .cpu_idle+0x118/0x200
[ 787.699080] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 787.699096] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 787.699108] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 787.699116] Instruction dump:
[ 787.699125] 3803000e 7c0307b4 e9210070 e80900b8 7c001a14 780b07a1 41820030 e93e8078
[ 787.699154] 80090000 7c000034 5400d97e 78000020 <0b000000> 2fa00000 419e0010 e93e8078
[ 787.798375] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 787.798392] BA request denied - queue unavailable for tid 0
[ 804.616225] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 804.616241] BA request denied - queue unavailable for tid 0
[ 849.615526] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 849.615543] BA request denied - queue unavailable for tid 0
[ 932.033429] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 932.033447] BA request denied - queue unavailable for tid 0
[ 934.043577] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.043597] BA request denied - queue unavailable for tid 0
[ 934.111624] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.111644] BA request denied - queue unavailable for tid 0
[ 934.200870] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.200890] BA request denied - queue unavailable for tid 0
[ 934.295039] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.295057] BA request denied - queue unavailable for tid 0
[ 934.368822] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.368842] BA request denied - queue unavailable for tid 0
[ 934.552240] Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.552259] BA request denied - queue unavailable for tid 0
[ 934.690190] wrong command queue 11, sequence 0x6B6B readp=34 writep=34
[ 934.690238] ------------[ cut here ]------------
[ 934.690245] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.690252] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.690261] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.690268] MSR: 9000000000029032 <EE,ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.690296] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.690305] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.690324] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.690343] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.690361] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.690380] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.690399] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.690418] GPR24: 00000000000000d8 c000000150c23a40 c000000150c21d60 c000000150c23a40
[ 934.690436] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c0000001579dc700
[ 934.690485] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.690508] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.690514] Call Trace:
[ 934.690536] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.690570] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.690595] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.690613] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.690626] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.690639] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.690650] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.690662] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.690675] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.690691] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.690693] LR = .cpu_idle+0x118/0x200
[ 934.690702] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.690719] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
<7>Open BA session requested for 00:1d:7e:4a:a1:ab tid 0
[ 934.690734]
[ 934.690741] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
<7>BA request denied - queue unavailable for tid 0
[ 934.690752]
[ 934.690756] Instruction dump:
[ 934.690764] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.690793] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.690834] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.690851] ------------[ cut here ]------------
[ 934.690857] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.690863] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.690871] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.690877] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.690902] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.690911] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.690933] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.690952] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.690972] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.690991] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.691011] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.691030] GPR24: 00000000000000d9 c000000150c23a68 c000000150c21d60 c000000150c23a68
[ 934.691051] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c000000157998200
[ 934.691089] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.691112] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.691118] Call Trace:
[ 934.691140] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.691169] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.691194] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.691206] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.691218] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.691229] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.691241] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.691254] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.691266] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.691281] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.691283] LR = .cpu_idle+0x118/0x200
[ 934.691293] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.691306] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.691318] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.691327] Instruction dump:
[ 934.691334] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.691365] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.691402] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.691419] ------------[ cut here ]------------
[ 934.691425] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.691432] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.691440] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.691446] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.691472] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.691483] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.691504] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.691525] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.691547] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.691568] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.691589] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.691610] GPR24: 00000000000000da c000000150c23a90 c000000150c21d60 c000000150c23a90
[ 934.691631] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c0000001579c8600
[ 934.691672] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.691695] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.691702] Call Trace:
[ 934.691724] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.691752] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.691776] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.691789] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.691801] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.691812] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.691825] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.691838] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.691849] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.691864] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.691866] LR = .cpu_idle+0x118/0x200
[ 934.691876] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.691890] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.691902] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.691911] Instruction dump:
[ 934.691919] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.691948] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.691983] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.692000] ------------[ cut here ]------------
[ 934.692006] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.692012] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.692020] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.692026] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.692051] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.692060] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.692079] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.692098] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.692117] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.692136] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.692155] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.692174] GPR24: 00000000000000db c000000150c23ab8 c000000150c21d60 c000000150c23ab8
[ 934.692193] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c000000157990200
[ 934.692232] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.692255] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.692261] Call Trace:
[ 934.692282] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.692310] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.692335] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.692347] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.692359] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.692371] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.692383] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.692394] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.692406] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.692421] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.692423] LR = .cpu_idle+0x118/0x200
[ 934.692433] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.692447] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.692459] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.692468] Instruction dump:
[ 934.692475] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.692505] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.692540] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.692557] ------------[ cut here ]------------
[ 934.692564] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.692570] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.692578] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.692584] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.692610] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.692619] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.692639] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.692657] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.692677] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.692696] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.692715] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.692734] GPR24: 00000000000000dc c000000150c23ae0 c000000150c21d60 c000000150c23ae0
[ 934.692753] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c0000001579b8400
[ 934.692792] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.692815] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.692821] Call Trace:
[ 934.692843] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.692871] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.692896] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.692908] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.692920] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.692932] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.692943] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.692955] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.692966] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.692981] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.692984] LR = .cpu_idle+0x118/0x200
[ 934.692993] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.693007] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.693019] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.693028] Instruction dump:
[ 934.693035] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.693066] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.693100] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.693117] ------------[ cut here ]------------
[ 934.693123] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.693130] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.693138] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.693144] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.693169] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.693178] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.693197] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.693216] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.693235] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.693254] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.693272] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.693291] GPR24: 00000000000000dd c000000150c23b08 c000000150c21d60 c000000150c23b08
[ 934.693309] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c00000015798c100
[ 934.693347] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.693370] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.693376] Call Trace:
[ 934.693397] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.693425] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.693450] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.693462] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.693474] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.693485] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.693497] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.693508] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.693520] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.693535] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.693537] LR = .cpu_idle+0x118/0x200
[ 934.693546] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.693561] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.693573] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.693581] Instruction dump:
[ 934.693588] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.693619] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.693653] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.693669] ------------[ cut here ]------------
[ 934.693675] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.693682] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.693690] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.693696] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.693720] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.693729] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.693748] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.693766] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.693784] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.693803] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.693822] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.693840] GPR24: 00000000000000de c000000150c23b30 c000000150c21d60 c000000150c23b30
[ 934.693859] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c0000001579f4900
[ 934.693897] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.693920] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.693925] Call Trace:
[ 934.693947] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.693975] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.694000] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.694012] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.694023] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.694035] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.694046] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.694057] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.694068] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.694083] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.694085] LR = .cpu_idle+0x118/0x200
[ 934.694094] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.694108] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.694120] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.694128] Instruction dump:
[ 934.694135] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.694164] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 934.714333] wrong command queue 11, sequence 0x6B6B readp=34 writep=35
[ 934.714350] ------------[ cut here ]------------
[ 934.714356] Badness at drivers/net/wireless/iwlwifi/iwl-tx.c:1258
[ 934.714363] NIP: d000000001b2b3c4 LR: d000000001b2b3c0 CTR: c0000000002f6208
[ 934.714370] REGS: c00000020029b360 TRAP: 0700 Tainted: G W (2.6.28-rc7-wl-dirty)
[ 934.714377] MSR: 9000000000021032 <ME,IR,DR> CR: 28ff8f84 XER: 00000000
[ 934.714401] TASK = c000000200246ea0[0] 'swapper' THREAD: c000000200298000 CPU: 2
[ 934.714410] GPR00: d000000001b2b3c0 c00000020029b5e0 d000000001b540b8 000000000000004d
[ 934.714428] GPR04: 0000000000000001 c000000000052930 0000000000000000 0000000000000002
[ 934.714446] GPR08: 0000000000000000 c000000200298000 c000000000b93a60 0000000000000000
[ 934.714465] GPR12: 00000000000186a0 c000000000c43780 00000000f8000000 0000000000000000
[ 934.714483] GPR16: 0000000000000000 c000000150c266a0 c000000200298000 c000000150c266c8
[ 934.714501] GPR20: 0000000000000001 c000000150c31d60 00000000000000e0 0000000000000008
[ 934.714519] GPR24: 00000000000000df c000000150c23b58 c000000150c21d60 c000000150c23b58
[ 934.714538] GPR28: ffffffff80000008 c000000150c21d60 d000000001b52680 c0000001579bc500
[ 934.714576] NIP [d000000001b2b3c4] .iwl_tx_cmd_complete+0x68/0x294 [iwlcore]
[ 934.714598] LR [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore]
[ 934.714604] Call Trace:
[ 934.714625] [c00000020029b5e0] [d000000001b2b3c0] .iwl_tx_cmd_complete+0x64/0x294 [iwlcore] (unreliable)
[ 934.714653] [c00000020029b680] [d000000001beb6ec] .iwl_rx_handle+0x318/0x4a0 [iwlagn]
[ 934.714677] [c00000020029b780] [d000000001bebfc0] .iwl_irq_tasklet+0x74c/0xaa0 [iwlagn]
[ 934.714689] [c00000020029b840] [c000000000058f60] .tasklet_action+0x14c/0x244
[ 934.714700] [c00000020029b8f0] [c00000000005a058] .__do_softirq+0xf4/0x218
[ 934.714712] [c00000020029b9b0] [c00000000000c0ec] .do_softirq+0x5c/0xb8
[ 934.714723] [c00000020029ba30] [c000000000059a68] .irq_exit+0x74/0xe0
[ 934.714734] [c00000020029bab0] [c00000000000c268] .do_IRQ+0x120/0x164
[ 934.714745] [c00000020029bb40] [c000000000004714] hardware_interrupt_entry+0x1c/0x20
[ 934.714760] --- Exception: 501 at .cpu_idle+0x118/0x200
[ 934.714762] LR = .cpu_idle+0x118/0x200
[ 934.714771] [c00000020029be30] [c000000000011fa8] .cpu_idle+0xd0/0x200 (unreliable)
[ 934.714785] [c00000020029bed0] [c000000000419ea4] .start_secondary+0x378/0x3b4
[ 934.714796] [c00000020029bf90] [c0000000000072b4] .start_secondary_prolog+0x10/0x14
[ 934.714805] Instruction dump:
[ 934.714812] a1290006 5520c23e 5120442e 78050420 78a4c6e2 2f840004 41be0208 e8dd6aaa
[ 934.714841] e8fd6aa6 e87e8140 4800ce95 e8410028 <0fe00000> 3d3d0001 8009310c 780907e1
[ 939.746085] wlan0: No ProbeResp from current AP 00:1d:7e:4a:a1:ab - assume out of range
[ 939.746114] Rx BA session stop requested for 00:1d:7e:4a:a1:ab tid 0
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 8:59 Sujith
2008-12-09 10:24 ` Johannes Berg
@ 2008-12-11 13:53 ` Johannes Berg
2008-12-12 21:48 ` Johannes Berg
2 siblings, 0 replies; 16+ messages in thread
From: Johannes Berg @ 2008-12-11 13:53 UTC (permalink / raw)
To: Sujith; +Cc: linville, linux-wireless, jouni.malinen, lrodriguez,
tomas.winkler
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
Hi,
I was reading this patch again because I was looking for something, but
noticed something else:
> --- a/net/mac80211/ht.c
> +++ b/net/mac80211/ht.c
> @@ -98,6 +98,7 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
> struct ieee80211_bss_ht_conf ht;
> u32 changed = 0;
> bool enable_ht = true, ht_changed;
> + s8 channel_type = NL80211_CHAN_NO_HT;
That variable has the wrong type. Doesn't really matter much, but s8 is
a bit strange.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: Fix HT channel selection
2008-12-09 8:59 Sujith
2008-12-09 10:24 ` Johannes Berg
2008-12-11 13:53 ` Johannes Berg
@ 2008-12-12 21:48 ` Johannes Berg
2 siblings, 0 replies; 16+ messages in thread
From: Johannes Berg @ 2008-12-12 21:48 UTC (permalink / raw)
To: Sujith; +Cc: linville, linux-wireless, jouni.malinen, lrodriguez,
tomas.winkler
[-- Attachment #1: Type: text/plain, Size: 482 bytes --]
On Tue, 2008-12-09 at 14:29 +0530, Sujith wrote:
> HT management is done differently for AP and STA modes, unify
> to just the ->config() callback since HT is fundamentally a
> PHY property and cannot be per-BSS.
>
> Rename enum nl80211_sec_chan_offset as nl80211_channel_type to denote
> the channel type ( NO_HT, HT20, HT40+, HT40- ).
I've updated iw accordingly (but it didn't matter since iw ships its own
header file and it was still binary compatible)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* [RFC v2] mac80211: fix HT channel selection
@ 2008-12-08 10:12 Sujith
2008-12-08 13:01 ` Johannes Berg
2008-12-08 13:14 ` Jouni Malinen
0 siblings, 2 replies; 16+ messages in thread
From: Sujith @ 2008-12-08 10:12 UTC (permalink / raw)
To: linville
Cc: linux-wireless, Jouni.Malinen, Luis.Rodriguez, johannes,
tomas.winkler
HT management is done differently for AP and STA modes, unify
to just the ->config() callback since HT is fundamentally a
PHY property and cannot be per-BSS.
Add a new NL80211 attribute to enable/disable HT (NL80211_ATTR_WIPHY_HT).
NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET now has only the secondary channel
offsets.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
v2:
---
Add a new NL80211 attribute to enable/disable HT (NL80211_ATTR_WIPHY_HT).
NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET now has only the secondary channel
offsets.
ieee80211_enable_ht() and ieee8021_hw_config() have been cleaned up a bit to handle the revised
nl80211 attributes. I have tested this with ath9k, works okay in both STA and AP mode.
v3:
---
Missed the 40 MHZ intolerance check in ieee8021_enable_ht(), added it.
drivers/net/wireless/ath9k/main.c | 108 ++++++-------------------------
drivers/net/wireless/iwlwifi/iwl-agn.c | 21 +++++--
drivers/net/wireless/mac80211_hwsim.c | 7 +--
include/linux/nl80211.h | 8 +--
include/net/cfg80211.h | 1 +
include/net/mac80211.h | 9 +---
net/mac80211/cfg.c | 2 +
net/mac80211/ht.c | 57 -----------------
net/mac80211/ieee80211_i.h | 4 +-
net/mac80211/main.c | 26 ++------
net/mac80211/mlme.c | 69 ++++++++++++++++++++-
net/mac80211/util.c | 3 +-
net/wireless/nl80211.c | 14 +++--
13 files changed, 132 insertions(+), 197 deletions(-)
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 9939749..0a646e9 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -622,8 +622,6 @@ static int ath_get_channel(struct ath_softc *sc,
return -1;
}
-/* ext_chan_offset: (-1, 0, 1) (below, none, above) */
-
static u32 ath_get_extchanmode(struct ath_softc *sc,
struct ieee80211_channel *chan,
int ext_chan_offset,
@@ -633,24 +631,24 @@ static u32 ath_get_extchanmode(struct ath_softc *sc,
switch (chan->band) {
case IEEE80211_BAND_2GHZ:
- if ((ext_chan_offset == 0) &&
+ if ((ext_chan_offset == NL80211_SEC_CHAN_DISABLED) &&
(tx_chan_width == ATH9K_HT_MACMODE_20))
chanmode = CHANNEL_G_HT20;
- if ((ext_chan_offset == 1) &&
+ if ((ext_chan_offset == NL80211_SEC_CHAN_ABOVE) &&
(tx_chan_width == ATH9K_HT_MACMODE_2040))
chanmode = CHANNEL_G_HT40PLUS;
- if ((ext_chan_offset == -1) &&
+ if ((ext_chan_offset == NL80211_SEC_CHAN_BELOW) &&
(tx_chan_width == ATH9K_HT_MACMODE_2040))
chanmode = CHANNEL_G_HT40MINUS;
break;
case IEEE80211_BAND_5GHZ:
- if ((ext_chan_offset == 0) &&
+ if ((ext_chan_offset == NL80211_SEC_CHAN_DISABLED) &&
(tx_chan_width == ATH9K_HT_MACMODE_20))
chanmode = CHANNEL_A_HT20;
- if ((ext_chan_offset == 1) &&
+ if ((ext_chan_offset == NL80211_SEC_CHAN_ABOVE) &&
(tx_chan_width == ATH9K_HT_MACMODE_2040))
chanmode = CHANNEL_A_HT40PLUS;
- if ((ext_chan_offset == -1) &&
+ if ((ext_chan_offset == NL80211_SEC_CHAN_BELOW) &&
(tx_chan_width == ATH9K_HT_MACMODE_2040))
chanmode = CHANNEL_A_HT40MINUS;
break;
@@ -828,42 +826,11 @@ static void setup_ht_cap(struct ieee80211_sta_ht_cap *ht_info)
ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
}
-static void ath9k_ht_conf(struct ath_softc *sc,
- struct ieee80211_bss_conf *bss_conf)
-{
- if (sc->hw->conf.ht.enabled) {
- if (bss_conf->ht.width_40_ok)
- sc->tx_chan_width = ATH9K_HT_MACMODE_2040;
- else
- sc->tx_chan_width = ATH9K_HT_MACMODE_20;
-
- ath9k_hw_set11nmac2040(sc->sc_ah, sc->tx_chan_width);
-
- DPRINTF(sc, ATH_DBG_CONFIG,
- "BSS Changed HT, chanwidth: %d\n", sc->tx_chan_width);
- }
-}
-
-static inline int ath_sec_offset(u8 ext_offset)
-{
- if (ext_offset == IEEE80211_HT_PARAM_CHA_SEC_NONE)
- return 0;
- else if (ext_offset == IEEE80211_HT_PARAM_CHA_SEC_ABOVE)
- return 1;
- else if (ext_offset == IEEE80211_HT_PARAM_CHA_SEC_BELOW)
- return -1;
-
- return 0;
-}
-
static void ath9k_bss_assoc_info(struct ath_softc *sc,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf)
{
- struct ieee80211_hw *hw = sc->hw;
- struct ieee80211_channel *curchan = hw->conf.channel;
struct ath_vap *avp = (void *)vif->drv_priv;
- int pos;
DECLARE_MAC_BUF(mac);
if (bss_conf->assoc) {
@@ -886,40 +853,6 @@ static void ath9k_bss_assoc_info(struct ath_softc *sc,
sc->sc_halstats.ns_avgtxrssi = ATH_RSSI_DUMMY_MARKER;
sc->sc_halstats.ns_avgtxrate = ATH_RATE_DUMMY_MARKER;
- /* Update chainmask */
- ath_update_chainmask(sc, hw->conf.ht.enabled);
-
- DPRINTF(sc, ATH_DBG_CONFIG,
- "bssid %s aid 0x%x\n",
- print_mac(mac, sc->sc_curbssid), sc->sc_curaid);
-
- pos = ath_get_channel(sc, curchan);
- if (pos == -1) {
- DPRINTF(sc, ATH_DBG_FATAL,
- "Invalid channel: %d\n", curchan->center_freq);
- return;
- }
-
- if (hw->conf.ht.enabled) {
- int offset =
- ath_sec_offset(bss_conf->ht.secondary_channel_offset);
- sc->tx_chan_width = (bss_conf->ht.width_40_ok) ?
- ATH9K_HT_MACMODE_2040 : ATH9K_HT_MACMODE_20;
-
- sc->sc_ah->ah_channels[pos].chanmode =
- ath_get_extchanmode(sc, curchan,
- offset, sc->tx_chan_width);
- } else {
- sc->sc_ah->ah_channels[pos].chanmode =
- (curchan->band == IEEE80211_BAND_2GHZ) ?
- CHANNEL_G : CHANNEL_A;
- }
-
- /* set h/w channel */
- if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0)
- DPRINTF(sc, ATH_DBG_FATAL, "Unable to set channel: %d\n",
- curchan->center_freq);
-
/* Start ANI */
mod_timer(&sc->sc_ani.timer,
jiffies + msecs_to_jiffies(ATH_ANI_POLLINTERVAL));
@@ -2146,13 +2079,16 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
struct ath_softc *sc = hw->priv;
struct ieee80211_conf *conf = &hw->conf;
- if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+ if (changed & (IEEE80211_CONF_CHANGE_CHANNEL |
+ IEEE80211_CONF_CHANGE_HT)) {
struct ieee80211_channel *curchan = hw->conf.channel;
int pos;
DPRINTF(sc, ATH_DBG_CONFIG, "Set channel: %d MHz\n",
curchan->center_freq);
+ ath_update_chainmask(sc, conf->ht.enabled);
+
pos = ath_get_channel(sc, curchan);
if (pos == -1) {
DPRINTF(sc, ATH_DBG_FATAL, "Invalid channel: %d\n",
@@ -2160,21 +2096,25 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
return -EINVAL;
}
- sc->tx_chan_width = ATH9K_HT_MACMODE_20;
+ switch(conf->ht.sec_chan_offset) {
+ case NL80211_SEC_CHAN_ABOVE:
+ case NL80211_SEC_CHAN_BELOW:
+ sc->tx_chan_width = ATH9K_HT_MACMODE_2040;
+ break;
+ case NL80211_SEC_CHAN_DISABLED:
+ sc->tx_chan_width = ATH9K_HT_MACMODE_20;
+ break;
+ }
+
sc->sc_ah->ah_channels[pos].chanmode =
(curchan->band == IEEE80211_BAND_2GHZ) ?
CHANNEL_G : CHANNEL_A;
- if ((sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) &&
- (conf->ht.enabled)) {
- sc->tx_chan_width = (!!conf->ht.sec_chan_offset) ?
- ATH9K_HT_MACMODE_2040 : ATH9K_HT_MACMODE_20;
-
+ if(conf->ht.enabled)
sc->sc_ah->ah_channels[pos].chanmode =
ath_get_extchanmode(sc, curchan,
conf->ht.sec_chan_offset,
sc->tx_chan_width);
- }
if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0) {
DPRINTF(sc, ATH_DBG_FATAL, "Unable to set channel\n");
@@ -2182,9 +2122,6 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
}
}
- if (changed & IEEE80211_CONF_CHANGE_HT)
- ath_update_chainmask(sc, conf->ht.enabled);
-
if (changed & IEEE80211_CONF_CHANGE_POWER)
sc->sc_config.txpowlimit = 2 * conf->power_level;
@@ -2419,9 +2356,6 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
sc->sc_flags &= ~SC_OP_PROTECT_ENABLE;
}
- if (changed & BSS_CHANGED_HT)
- ath9k_ht_conf(sc, bss_conf);
-
if (changed & BSS_CHANGED_ASSOC) {
DPRINTF(sc, ATH_DBG_CONFIG, "BSS Changed ASSOC %d\n",
bss_conf->assoc);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index fc4e7e4..28668e1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -516,19 +516,28 @@ static void iwl_ht_conf(struct iwl_priv *priv,
iwl_conf->supported_chan_width =
!!(ht_conf->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40);
- iwl_conf->extension_chan_offset = bss_conf->ht.secondary_channel_offset;
- /* If no above or below channel supplied disable FAT channel */
- if (iwl_conf->extension_chan_offset != IEEE80211_HT_PARAM_CHA_SEC_ABOVE &&
- iwl_conf->extension_chan_offset != IEEE80211_HT_PARAM_CHA_SEC_BELOW) {
+ /*
+ * XXX: The HT configuration needs to be moved into iwl_mac_config()
+ * to be done there correctly.
+ */
+ switch (priv->hw->conf.ht.sec_chan_offset) {
+ case NL80211_SEC_CHAN_BELOW:
+ iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ break;
+ case NL80211_SEC_CHAN_ABOVE:
+ iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ break;
+ case NL80211_SEC_CHAN_DISABLED:
iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
- iwl_conf->supported_chan_width = 0;
+ break;
}
iwl_conf->sm_ps = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2);
memcpy(&iwl_conf->mcs, &ht_conf->mcs, 16);
- iwl_conf->tx_chan_width = bss_conf->ht.width_40_ok;
+ iwl_conf->tx_chan_width =
+ iwl_conf->extension_chan_offset != NL80211_SEC_CHAN_DISABLED;
iwl_conf->ht_protection =
bss_conf->ht.operation_mode & IEEE80211_HT_OP_MODE_PROTECTION;
iwl_conf->non_GF_STA_present =
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index f43da1c..d6d01cd 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -497,11 +497,8 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
}
if (changed & BSS_CHANGED_HT) {
- printk(KERN_DEBUG " %s: HT: sec_ch_offs=%d width_40_ok=%d "
- "op_mode=%d\n",
- wiphy_name(hw->wiphy),
- info->ht.secondary_channel_offset,
- info->ht.width_40_ok, info->ht.operation_mode);
+ printk(KERN_DEBUG " %s: HT: op_mode=%d\n",
+ wiphy_name(hw->wiphy), info->ht.operation_mode);
}
if (changed & BSS_CHANGED_BASIC_RATES) {
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 04d4516..c074e04 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -202,13 +202,11 @@ enum nl80211_commands {
* @NL80211_ATTR_WIPHY_TXQ_PARAMS: a nested array of TX queue parameters
* @NL80211_ATTR_WIPHY_FREQ: frequency of the selected channel in MHz
* @NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET: included with NL80211_ATTR_WIPHY_FREQ
- * if HT20 or HT40 are allowed (i.e., 802.11n disabled if not included):
- * NL80211_SEC_CHAN_NO_HT = HT not allowed (i.e., same as not including
- * this attribute)
* NL80211_SEC_CHAN_DISABLED = HT20 only
* NL80211_SEC_CHAN_BELOW = secondary channel is below the primary channel
* NL80211_SEC_CHAN_ABOVE = secondary channel is above the primary channel
- *
+ * @NL80211_ATTR_WIPHY_HT: included with NL80211_ATTR_WIPHY_FREQ,
+ * specifies whether HT is enabled for the channel
* @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
* @NL80211_ATTR_IFNAME: network interface name
* @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
@@ -345,6 +343,7 @@ enum nl80211_attrs {
NL80211_ATTR_WIPHY_TXQ_PARAMS,
NL80211_ATTR_WIPHY_FREQ,
NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET,
+ NL80211_ATTR_WIPHY_HT,
/* add attributes here, update the policy in nl80211.c */
@@ -775,7 +774,6 @@ enum nl80211_txq_q {
};
enum nl80211_sec_chan_offset {
- NL80211_SEC_CHAN_NO_HT /* No HT */,
NL80211_SEC_CHAN_DISABLED /* HT20 only */,
NL80211_SEC_CHAN_BELOW /* HT40- */,
NL80211_SEC_CHAN_ABOVE /* HT40+ */
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index a0c0bf1..775819b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -523,6 +523,7 @@ struct cfg80211_ops {
int (*set_channel)(struct wiphy *wiphy,
struct ieee80211_channel *chan,
+ bool enable_ht,
enum nl80211_sec_chan_offset);
};
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e84c922..23914a5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -165,14 +165,9 @@ enum ieee80211_bss_change {
/**
* struct ieee80211_bss_ht_conf - BSS's changing HT configuration
- * @secondary_channel_offset: secondary channel offset, uses
- * %IEEE80211_HT_PARAM_CHA_SEC_ values
- * @width_40_ok: indicates that 40 MHz bandwidth may be used for TX
* @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
*/
struct ieee80211_bss_ht_conf {
- u8 secondary_channel_offset;
- bool width_40_ok;
u16 operation_mode;
};
@@ -508,9 +503,7 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
struct ieee80211_ht_conf {
bool enabled;
- int sec_chan_offset; /* 0 = HT40 disabled; -1 = HT40 enabled, secondary
- * channel below primary; 1 = HT40 enabled,
- * secondary channel above primary */
+ enum nl80211_sec_chan_offset sec_chan_offset;
};
/**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7a7a6c1..0a5b24b 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1097,11 +1097,13 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy,
static int ieee80211_set_channel(struct wiphy *wiphy,
struct ieee80211_channel *chan,
+ bool enable_ht,
enum nl80211_sec_chan_offset sec_chan_offset)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
local->oper_channel = chan;
+ local->oper_ht = enable_ht;
local->oper_sec_chan_offset = sec_chan_offset;
return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index ece79ae..76616fe 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -84,63 +84,6 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
ht_cap->mcs.rx_mask[32/8] |= 1;
}
-/*
- * ieee80211_enable_ht should be called only after the operating band
- * has been determined as ht configuration depends on the hw's
- * HT abilities for a specific band.
- */
-u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_ht_info *hti,
- u16 ap_ht_cap_flags)
-{
- struct ieee80211_local *local = sdata->local;
- struct ieee80211_supported_band *sband;
- struct ieee80211_bss_ht_conf ht;
- u32 changed = 0;
- bool enable_ht = true, ht_changed;
-
- sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
-
- memset(&ht, 0, sizeof(ht));
-
- /* HT is not supported */
- if (!sband->ht_cap.ht_supported)
- enable_ht = false;
-
- /* check that channel matches the right operating channel */
- if (local->hw.conf.channel->center_freq !=
- ieee80211_channel_to_frequency(hti->control_chan))
- enable_ht = false;
-
- /*
- * XXX: This is totally incorrect when there are multiple virtual
- * interfaces, needs to be fixed later.
- */
- ht_changed = local->hw.conf.ht.enabled != enable_ht;
- local->hw.conf.ht.enabled = enable_ht;
- if (ht_changed)
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
-
- /* disable HT */
- if (!enable_ht)
- return 0;
- ht.secondary_channel_offset =
- hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET;
- ht.width_40_ok =
- !(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
- (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
- (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY);
- ht.operation_mode = le16_to_cpu(hti->operation_mode);
-
- /* if bss configuration changed store the new one */
- if (memcmp(&sdata->vif.bss_conf.ht, &ht, sizeof(ht))) {
- changed |= BSS_CHANGED_HT;
- sdata->vif.bss_conf.ht = ht;
- }
-
- return changed;
-}
-
static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u8 dialog_token, u16 start_seq_num,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 527205f..e43391a 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -626,6 +626,7 @@ struct ieee80211_local {
struct delayed_work scan_work;
struct ieee80211_sub_if_data *scan_sdata;
struct ieee80211_channel *oper_channel, *scan_channel;
+ bool oper_ht;
enum nl80211_sec_chan_offset oper_sec_chan_offset;
u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
size_t scan_ssid_len;
@@ -929,9 +930,6 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev);
void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
struct ieee80211_ht_cap *ht_cap_ie,
struct ieee80211_sta_ht_cap *ht_cap);
-u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_ht_info *hti,
- u16 ap_ht_cap_flags);
void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *da,
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 29c3ecf..57bad73 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -195,39 +195,27 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
struct ieee80211_channel *chan;
int ret = 0;
int power;
+ bool enable_ht;
enum nl80211_sec_chan_offset sec_chan_offset;
might_sleep();
if (local->sw_scanning) {
chan = local->scan_channel;
- sec_chan_offset = NL80211_SEC_CHAN_NO_HT;
+ enable_ht = false;
+ sec_chan_offset = NL80211_SEC_CHAN_DISABLED;
} else {
chan = local->oper_channel;
+ enable_ht = local->oper_ht;
sec_chan_offset = local->oper_sec_chan_offset;
}
if (chan != local->hw.conf.channel ||
+ enable_ht != local->hw.conf.ht.enabled ||
sec_chan_offset != local->hw.conf.ht.sec_chan_offset) {
local->hw.conf.channel = chan;
- switch (sec_chan_offset) {
- case NL80211_SEC_CHAN_NO_HT:
- local->hw.conf.ht.enabled = false;
- local->hw.conf.ht.sec_chan_offset = 0;
- break;
- case NL80211_SEC_CHAN_DISABLED:
- local->hw.conf.ht.enabled = true;
- local->hw.conf.ht.sec_chan_offset = 0;
- break;
- case NL80211_SEC_CHAN_BELOW:
- local->hw.conf.ht.enabled = true;
- local->hw.conf.ht.sec_chan_offset = -1;
- break;
- case NL80211_SEC_CHAN_ABOVE:
- local->hw.conf.ht.enabled = true;
- local->hw.conf.ht.sec_chan_offset = 1;
- break;
- }
+ local->hw.conf.ht.sec_chan_offset = sec_chan_offset;
+ local->hw.conf.ht.enabled = enable_ht;
changed |= IEEE80211_CONF_CHANGE_CHANNEL;
}
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 07b0cc3..be79613 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -863,7 +863,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
rcu_read_unlock();
- local->hw.conf.ht.enabled = false;
+ local->oper_ht = false;
+ local->oper_sec_chan_offset = NL80211_SEC_CHAN_DISABLED;
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
ieee80211_bss_info_change_notify(sdata, changed);
@@ -1192,6 +1193,72 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
ieee80211_set_disassoc(sdata, ifsta, false, false, reason_code);
}
+/*
+ * ieee80211_enable_ht should be called only after the operating band
+ * has been determined as ht configuration depends on the hw's
+ * HT abilities for a specific band.
+ */
+static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_ht_info *hti,
+ u16 ap_ht_cap_flags)
+{
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_supported_band *sband;
+ struct ieee80211_bss_ht_conf ht;
+ u32 changed = 0;
+ bool enable_ht = true, ht_changed;
+ s8 secchan = NL80211_SEC_CHAN_DISABLED;
+
+ sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
+
+ memset(&ht, 0, sizeof(ht));
+
+ /* HT is not supported */
+ if (!sband->ht_cap.ht_supported)
+ enable_ht = false;
+
+ /* check that channel matches the right operating channel */
+ if (local->hw.conf.channel->center_freq !=
+ ieee80211_channel_to_frequency(hti->control_chan))
+ enable_ht = false;
+
+ if (enable_ht &&
+ !(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
+ (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
+ (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
+ switch (hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+ case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
+ secchan = NL80211_SEC_CHAN_ABOVE;
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
+ secchan = NL80211_SEC_CHAN_BELOW;
+ break;
+ }
+ }
+
+ ht_changed = local->hw.conf.ht.enabled != enable_ht ||
+ secchan != local->hw.conf.ht.sec_chan_offset;
+
+ local->oper_sec_chan_offset = secchan;
+ local->oper_ht = enable_ht;
+
+ if (ht_changed)
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
+
+ /* disable HT */
+ if (!enable_ht)
+ return 0;
+
+ ht.operation_mode = le16_to_cpu(hti->operation_mode);
+
+ /* if bss configuration changed store the new one */
+ if (memcmp(&sdata->vif.bss_conf.ht, &ht, sizeof(ht))) {
+ changed |= BSS_CHANGED_HT;
+ sdata->vif.bss_conf.ht = ht;
+ }
+
+ return changed;
+}
static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
struct ieee80211_if_sta *ifsta,
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 505d68f..c7beb7a 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -641,7 +641,8 @@ int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freqMHz)
chan->flags & IEEE80211_CHAN_NO_IBSS)
return ret;
local->oper_channel = chan;
- local->oper_sec_chan_offset = NL80211_SEC_CHAN_NO_HT;
+ local->oper_ht = false;
+ local->oper_sec_chan_offset = NL80211_SEC_CHAN_DISABLED;
if (local->sw_scanning || local->hw_scanning)
ret = 0;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9caee60..f17b4aa 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -60,6 +60,7 @@ static struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] __read_mostly = {
.len = BUS_ID_SIZE-1 },
[NL80211_ATTR_WIPHY_TXQ_PARAMS] = { .type = NLA_NESTED },
[NL80211_ATTR_WIPHY_FREQ] = { .type = NLA_U32 },
+ [NL80211_ATTR_WIPHY_HT] = { .type = NLA_U8 },
[NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET] = { .type = NLA_U32 },
[NL80211_ATTR_IFTYPE] = { .type = NLA_U32 },
@@ -363,21 +364,24 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
if (info->attrs[NL80211_ATTR_WIPHY_FREQ]) {
enum nl80211_sec_chan_offset sec_chan_offset =
- NL80211_SEC_CHAN_NO_HT;
+ NL80211_SEC_CHAN_DISABLED;
struct ieee80211_channel *chan;
u32 freq, sec_freq;
+ bool enable_ht = false;
if (!rdev->ops->set_channel) {
result = -EOPNOTSUPP;
goto bad_res;
}
- if (info->attrs[NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET]) {
+ if (info->attrs[NL80211_ATTR_WIPHY_HT])
+ enable_ht = nla_get_u8(info->attrs[NL80211_ATTR_WIPHY_HT]);
+
+ if (enable_ht && info->attrs[NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET]) {
sec_chan_offset = nla_get_u32(
info->attrs[
NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET]);
- if (sec_chan_offset != NL80211_SEC_CHAN_NO_HT &&
- sec_chan_offset != NL80211_SEC_CHAN_DISABLED &&
+ if (sec_chan_offset != NL80211_SEC_CHAN_DISABLED &&
sec_chan_offset != NL80211_SEC_CHAN_BELOW &&
sec_chan_offset != NL80211_SEC_CHAN_ABOVE) {
result = -EINVAL;
@@ -409,7 +413,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
}
}
- result = rdev->ops->set_channel(&rdev->wiphy, chan,
+ result = rdev->ops->set_channel(&rdev->wiphy, chan, enable_ht,
sec_chan_offset);
if (result)
goto bad_res;
--
1.6.0.3
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [RFC v2] mac80211: fix HT channel selection
2008-12-08 10:12 [RFC v2] mac80211: fix " Sujith
@ 2008-12-08 13:01 ` Johannes Berg
2008-12-08 13:14 ` Jouni Malinen
1 sibling, 0 replies; 16+ messages in thread
From: Johannes Berg @ 2008-12-08 13:01 UTC (permalink / raw)
To: Sujith
Cc: linville, linux-wireless, Jouni.Malinen, Luis.Rodriguez,
tomas.winkler
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
On Mon, 2008-12-08 at 15:42 +0530, Sujith wrote:
>
> HT management is done differently for AP and STA modes, unify
> to just the ->config() callback since HT is fundamentally a
> PHY property and cannot be per-BSS.
>
> Add a new NL80211 attribute to enable/disable HT (NL80211_ATTR_WIPHY_HT).
> NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET now has only the secondary channel
> offsets.
Why do this?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: fix HT channel selection
2008-12-08 10:12 [RFC v2] mac80211: fix " Sujith
2008-12-08 13:01 ` Johannes Berg
@ 2008-12-08 13:14 ` Jouni Malinen
2008-12-08 13:19 ` Johannes Berg
1 sibling, 1 reply; 16+ messages in thread
From: Jouni Malinen @ 2008-12-08 13:14 UTC (permalink / raw)
To: Sujith
Cc: linville, linux-wireless, Jouni.Malinen, Luis.Rodriguez, johannes,
tomas.winkler
On Mon, Dec 08, 2008 at 03:42:23PM +0530, Sujith wrote:
> HT management is done differently for AP and STA modes, unify
> to just the ->config() callback since HT is fundamentally a
> PHY property and cannot be per-BSS.
>
> Add a new NL80211 attribute to enable/disable HT (NL80211_ATTR_WIPHY_HT).
> NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET now has only the secondary channel
> offsets.
Looks reasonable to me. Please just make sure this gets in before
NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET additions get included in any
official kernel release since otherwise this would change the userspace
API..
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: fix HT channel selection
2008-12-08 13:14 ` Jouni Malinen
@ 2008-12-08 13:19 ` Johannes Berg
2008-12-08 13:24 ` Sujith
0 siblings, 1 reply; 16+ messages in thread
From: Johannes Berg @ 2008-12-08 13:19 UTC (permalink / raw)
To: Jouni Malinen
Cc: Sujith, linville, linux-wireless, Jouni.Malinen, Luis.Rodriguez,
tomas.winkler
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
On Mon, 2008-12-08 at 15:14 +0200, Jouni Malinen wrote:
> On Mon, Dec 08, 2008 at 03:42:23PM +0530, Sujith wrote:
>
> > HT management is done differently for AP and STA modes, unify
> > to just the ->config() callback since HT is fundamentally a
> > PHY property and cannot be per-BSS.
> >
> > Add a new NL80211 attribute to enable/disable HT (NL80211_ATTR_WIPHY_HT).
> > NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET now has only the secondary channel
> > offsets.
>
> Looks reasonable to me. Please just make sure this gets in before
> NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET additions get included in any
> official kernel release since otherwise this would change the userspace
> API..
I don't like it because it allows specifying "disabled/_above" and a
bunch of other invalid combinations.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC v2] mac80211: fix HT channel selection
2008-12-08 13:19 ` Johannes Berg
@ 2008-12-08 13:24 ` Sujith
0 siblings, 0 replies; 16+ messages in thread
From: Sujith @ 2008-12-08 13:24 UTC (permalink / raw)
To: Johannes Berg
Cc: Jouni Malinen, linville, linux-wireless, Jouni.Malinen,
Luis.Rodriguez, tomas.winkler
Johannes Berg wrote:
> On Mon, 2008-12-08 at 15:14 +0200, Jouni Malinen wrote:
> > On Mon, Dec 08, 2008 at 03:42:23PM +0530, Sujith wrote:
> >
> > > HT management is done differently for AP and STA modes, unify
> > > to just the ->config() callback since HT is fundamentally a
> > > PHY property and cannot be per-BSS.
> > >
> > > Add a new NL80211 attribute to enable/disable HT (NL80211_ATTR_WIPHY_HT).
> > > NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET now has only the secondary channel
> > > offsets.
> >
> > Looks reasonable to me. Please just make sure this gets in before
> > NL80211_ATTR_WIPHY_SEC_CHAN_OFFSET additions get included in any
> > official kernel release since otherwise this would change the userspace
> > API..
>
> I don't like it because it allows specifying "disabled/_above" and a
> bunch of other invalid combinations.
>
Ok, I'll remove this attribute and just rename enum nl80211_sec_chan_offset to
something else.
Sujith
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-12-12 21:48 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-09 12:54 [RFC v2] mac80211: Fix HT channel selection Mats Johannesson
2008-12-09 13:14 ` Holger Schurig
2008-12-09 13:31 ` Sujith
2008-12-09 15:16 ` Mats Johannesson
-- strict thread matches above, loose matches on Subject: below --
2008-12-09 8:59 Sujith
2008-12-09 10:24 ` Johannes Berg
2008-12-09 18:12 ` Sujith
2008-12-11 19:07 ` Johannes Berg
2008-12-12 1:45 ` Sujith
2008-12-11 13:53 ` Johannes Berg
2008-12-12 21:48 ` Johannes Berg
2008-12-08 10:12 [RFC v2] mac80211: fix " Sujith
2008-12-08 13:01 ` Johannes Berg
2008-12-08 13:14 ` Jouni Malinen
2008-12-08 13:19 ` Johannes Berg
2008-12-08 13:24 ` Sujith
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).