rpms/kernel/F-13 iwlwifi-manage-QoS-by-mac-stack.patch, NONE, 1.1 mac80211-do-not-wipe-out-old-supported-rates.patch, NONE, 1.1 mac80211-explicitly-disable-enable-QoS.patch, NONE, 1.1 mac80211-fix-supported-rates-IE-if-AP-doesnt-give-us-its-rates.patch, NONE, 1.1 kernel.spec, 1.2064, 1.2065

Kyle McMartin kyle at fedoraproject.org
Sun Jun 13 12:29:40 UTC 2010


Author: kyle

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv29847

Modified Files:
	kernel.spec 
Added Files:
	iwlwifi-manage-QoS-by-mac-stack.patch 
	mac80211-do-not-wipe-out-old-supported-rates.patch 
	mac80211-explicitly-disable-enable-QoS.patch 
	mac80211-fix-supported-rates-IE-if-AP-doesnt-give-us-its-rates.patch 
Log Message:
* Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com> 2.6.33.5-128
- mac80211/iwlwifi fix connections to some APs (rhbz#558002)
  patches from sgruszka at .


iwlwifi-manage-QoS-by-mac-stack.patch:
 iwl-agn.c      |   15 ------
 iwl-core.c     |  142 ++++++---------------------------------------------------
 iwl-core.h     |    3 -
 iwl-dev.h      |   21 --------
 iwl3945-base.c |    8 ---
 5 files changed, 17 insertions(+), 172 deletions(-)

--- NEW FILE iwlwifi-manage-QoS-by-mac-stack.patch ---
From: Stanislaw Gruszka <sgruszka at redhat.com>
To: kernel at lists.fedoraproject.org, "John W. Linville" <linville at redhat.com>
Subject: [PATCH 2/4 2.6.33.y] iwlwifi: manage QoS by mac stack
Date: Fri, 11 Jun 2010 17:04:18 +0200

commit e61146e36b40fd9d346118c40285913236c329f3 upstream.

We activate/deactivate QoS and setup default queue parameters in iwlwifi
driver. Mac stack do the same, so we do not need repeat that work here.
Stack also will tell when disable QoS, this will fix driver when working
with older APs, that do not have QoS implemented.

Patch make "force = true" in iwl_active_qos() assuming we always want
to do with QoS what mac stack wish.

Patch also remove unused qos_cap bits, do not initialize qos_active = 0,
as we have it initialized to zero by kzalloc.

Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   15 ---
 drivers/net/wireless/iwlwifi/iwl-core.c     |  142 +++------------------------
 drivers/net/wireless/iwlwifi/iwl-core.h     |    3 +-
 drivers/net/wireless/iwlwifi/iwl-dev.h      |   21 ----
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    7 --
 5 files changed, 17 insertions(+), 171 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 5622a55..9ba4207 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2327,7 +2327,6 @@ void iwl_post_associate(struct iwl_priv *priv)
 {
 	struct ieee80211_conf *conf = NULL;
 	int ret = 0;
-	unsigned long flags;
 
 	if (priv->iw_mode == NL80211_IFTYPE_AP) {
 		IWL_ERR(priv, "%s Should not be called in AP mode\n", __func__);
@@ -2412,10 +2411,6 @@ void iwl_post_associate(struct iwl_priv *priv)
 	if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
 		priv->assoc_station_added = 1;
 
-	spin_lock_irqsave(&priv->lock, flags);
-	iwl_activate_qos(priv, 0);
-	spin_unlock_irqrestore(&priv->lock, flags);
-
 	/* the chain noise calibration will enabled PM upon completion
 	 * If chain noise has already been run, then we need to enable
 	 * power management here */
@@ -2602,7 +2597,6 @@ static int iwl_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 void iwl_config_ap(struct iwl_priv *priv)
 {
 	int ret = 0;
-	unsigned long flags;
 
 	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
 		return;
@@ -2654,10 +2648,6 @@ void iwl_config_ap(struct iwl_priv *priv)
 		/* restore RXON assoc */
 		priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
 		iwlcore_commit_rxon(priv);
-		iwl_reset_qos(priv);
-		spin_lock_irqsave(&priv->lock, flags);
-		iwl_activate_qos(priv, 1);
-		spin_unlock_irqrestore(&priv->lock, flags);
 		iwl_add_bcast_station(priv);
 	}
 	iwl_send_beacon_cmd(priv);
@@ -3195,11 +3185,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
 
 	iwl_init_scan_params(priv);
 
-	iwl_reset_qos(priv);
-
-	priv->qos_data.qos_active = 0;
-	priv->qos_data.qos_cap.val = 0;
-
 	priv->rates_mask = IWL_RATES_MASK;
 	/* Set the tx_power_user_lmt to the lowest power level
 	 * this value will get overwritten by channel max power avg
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 6e9e156..d79b1e9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -301,17 +301,13 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
 /*
  * QoS  support
 */
-void iwl_activate_qos(struct iwl_priv *priv, u8 force)
+static void iwl_update_qos(struct iwl_priv *priv)
 {
 	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
 		return;
 
 	priv->qos_data.def_qos_parm.qos_flags = 0;
 
-	if (priv->qos_data.qos_cap.q_AP.queue_request &&
-	    !priv->qos_data.qos_cap.q_AP.txop_request)
-		priv->qos_data.def_qos_parm.qos_flags |=
-			QOS_PARAM_FLG_TXOP_TYPE_MSK;
 	if (priv->qos_data.qos_active)
 		priv->qos_data.def_qos_parm.qos_flags |=
 			QOS_PARAM_FLG_UPDATE_EDCA_MSK;
@@ -319,118 +315,14 @@ void iwl_activate_qos(struct iwl_priv *priv, u8 force)
 	if (priv->current_ht_config.is_ht)
 		priv->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
 
-	if (force || iwl_is_associated(priv)) {
-		IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
-				priv->qos_data.qos_active,
-				priv->qos_data.def_qos_parm.qos_flags);
+	IWL_DEBUG_QOS(priv, "send QoS cmd with Qos active=%d FLAGS=0x%X\n",
+		      priv->qos_data.qos_active,
+		      priv->qos_data.def_qos_parm.qos_flags);
 
-		iwl_send_cmd_pdu_async(priv, REPLY_QOS_PARAM,
-				       sizeof(struct iwl_qosparam_cmd),
-				       &priv->qos_data.def_qos_parm, NULL);
-	}
+	iwl_send_cmd_pdu_async(priv, REPLY_QOS_PARAM,
+			       sizeof(struct iwl_qosparam_cmd),
+			       &priv->qos_data.def_qos_parm, NULL);
 }
-EXPORT_SYMBOL(iwl_activate_qos);
-
-/*
- * AC        CWmin         CW max      AIFSN      TXOP Limit    TXOP Limit
- *                                              (802.11b)      (802.11a/g)
- * AC_BK      15            1023        7           0               0
- * AC_BE      15            1023        3           0               0
- * AC_VI       7              15        2          6.016ms       3.008ms
- * AC_VO       3               7        2          3.264ms       1.504ms
- */
-void iwl_reset_qos(struct iwl_priv *priv)
-{
-	u16 cw_min = 15;
-	u16 cw_max = 1023;
-	u8 aifs = 2;
-	bool is_legacy = false;
-	unsigned long flags;
-	int i;
-
-	spin_lock_irqsave(&priv->lock, flags);
-	/* QoS always active in AP and ADHOC mode
-	 * In STA mode wait for association
-	 */
-	if (priv->iw_mode == NL80211_IFTYPE_ADHOC ||
-	    priv->iw_mode == NL80211_IFTYPE_AP)
-		priv->qos_data.qos_active = 1;
-	else
-		priv->qos_data.qos_active = 0;
-
-	/* check for legacy mode */
-	if ((priv->iw_mode == NL80211_IFTYPE_ADHOC &&
-	    (priv->active_rate & IWL_OFDM_RATES_MASK) == 0) ||
-	    (priv->iw_mode == NL80211_IFTYPE_STATION &&
-	    (priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK) == 0)) {
-		cw_min = 31;
-		is_legacy = 1;
-	}
-
-	if (priv->qos_data.qos_active)
-		aifs = 3;
-
-	/* AC_BE */
-	priv->qos_data.def_qos_parm.ac[0].cw_min = cpu_to_le16(cw_min);
-	priv->qos_data.def_qos_parm.ac[0].cw_max = cpu_to_le16(cw_max);
-	priv->qos_data.def_qos_parm.ac[0].aifsn = aifs;
-	priv->qos_data.def_qos_parm.ac[0].edca_txop = 0;
-	priv->qos_data.def_qos_parm.ac[0].reserved1 = 0;
-
-	if (priv->qos_data.qos_active) {
-		/* AC_BK */
-		i = 1;
-		priv->qos_data.def_qos_parm.ac[i].cw_min = cpu_to_le16(cw_min);
-		priv->qos_data.def_qos_parm.ac[i].cw_max = cpu_to_le16(cw_max);
-		priv->qos_data.def_qos_parm.ac[i].aifsn = 7;
-		priv->qos_data.def_qos_parm.ac[i].edca_txop = 0;
-		priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
-
-		/* AC_VI */
-		i = 2;
-		priv->qos_data.def_qos_parm.ac[i].cw_min =
-			cpu_to_le16((cw_min + 1) / 2 - 1);
-		priv->qos_data.def_qos_parm.ac[i].cw_max =
-			cpu_to_le16(cw_min);
-		priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
-		if (is_legacy)
-			priv->qos_data.def_qos_parm.ac[i].edca_txop =
-				cpu_to_le16(6016);
-		else
-			priv->qos_data.def_qos_parm.ac[i].edca_txop =
-				cpu_to_le16(3008);
-		priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
-
-		/* AC_VO */
-		i = 3;
-		priv->qos_data.def_qos_parm.ac[i].cw_min =
-			cpu_to_le16((cw_min + 1) / 4 - 1);
-		priv->qos_data.def_qos_parm.ac[i].cw_max =
-			cpu_to_le16((cw_min + 1) / 2 - 1);
-		priv->qos_data.def_qos_parm.ac[i].aifsn = 2;
-		priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
-		if (is_legacy)
-			priv->qos_data.def_qos_parm.ac[i].edca_txop =
-				cpu_to_le16(3264);
-		else
-			priv->qos_data.def_qos_parm.ac[i].edca_txop =
-				cpu_to_le16(1504);
-	} else {
-		for (i = 1; i < 4; i++) {
-			priv->qos_data.def_qos_parm.ac[i].cw_min =
-				cpu_to_le16(cw_min);
-			priv->qos_data.def_qos_parm.ac[i].cw_max =
-				cpu_to_le16(cw_max);
-			priv->qos_data.def_qos_parm.ac[i].aifsn = aifs;
-			priv->qos_data.def_qos_parm.ac[i].edca_txop = 0;
-			priv->qos_data.def_qos_parm.ac[i].reserved1 = 0;
-		}
-	}
-	IWL_DEBUG_QOS(priv, "set QoS to default \n");
-
-	spin_unlock_irqrestore(&priv->lock, flags);
-}
-EXPORT_SYMBOL(iwl_reset_qos);
 
 #define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
 #define MAX_BIT_RATE_20_MHZ 72 /* Mbps */
@@ -2273,12 +2165,6 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
 			cpu_to_le16((params->txop * 32));
 
 	priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
-	priv->qos_data.qos_active = 1;
-
-	if (priv->iw_mode == NL80211_IFTYPE_AP)
-		iwl_activate_qos(priv, 1);
-	else if (priv->assoc_id && iwl_is_associated(priv))
-		iwl_activate_qos(priv, 0);
 
 	spin_unlock_irqrestore(&priv->lock, flags);
 
@@ -2554,11 +2440,8 @@ int iwl_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
 	IWL_DEBUG_MAC80211(priv, "leave\n");
 	spin_unlock_irqrestore(&priv->lock, flags);
 
-	iwl_reset_qos(priv);
-
 	priv->cfg->ops->lib->post_associate(priv);
 
-
 	return 0;
 }
 EXPORT_SYMBOL(iwl_mac_beacon_update);
@@ -2790,6 +2673,15 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
 	if (priv->cfg->ops->hcmd->set_rxon_chain)
 		priv->cfg->ops->hcmd->set_rxon_chain(priv);
 
+	if (changed & IEEE80211_CONF_CHANGE_QOS) {
+		bool qos_active = !!(conf->flags & IEEE80211_CONF_QOS);
+
+		spin_lock_irqsave(&priv->lock, flags);
+		priv->qos_data.qos_active = qos_active;
+		iwl_update_qos(priv);
+		spin_unlock_irqrestore(&priv->lock, flags);
+	}
+
 	if (!iwl_is_ready(priv)) {
 		IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
 		goto out;
@@ -2860,8 +2752,6 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
 	memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_config));
 	spin_unlock_irqrestore(&priv->lock, flags);
 
-	iwl_reset_qos(priv);
-
 	spin_lock_irqsave(&priv->lock, flags);
 	priv->assoc_id = 0;
 	priv->assoc_capability = 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index b69e972..403f512 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -298,8 +298,7 @@ struct iwl_cfg {
 struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
 		struct ieee80211_ops *hw_ops);
 void iwl_hw_detect(struct iwl_priv *priv);
-void iwl_reset_qos(struct iwl_priv *priv);
-void iwl_activate_qos(struct iwl_priv *priv, u8 force);
+void iwl_activate_qos(struct iwl_priv *priv);
 int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
 		    const struct ieee80211_tx_queue_params *params);
 void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt);
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 3822cf5..f2a9356 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -518,30 +518,9 @@ struct iwl_ht_config {
 	u8 non_GF_STA_present;
 };
 
-union iwl_qos_capabity {
-	struct {
-		u8 edca_count:4;	/* bit 0-3 */
-		u8 q_ack:1;		/* bit 4 */
-		u8 queue_request:1;	/* bit 5 */
-		u8 txop_request:1;	/* bit 6 */
-		u8 reserved:1;		/* bit 7 */
-	} q_AP;
-	struct {
-		u8 acvo_APSD:1;		/* bit 0 */
-		u8 acvi_APSD:1;		/* bit 1 */
-		u8 ac_bk_APSD:1;	/* bit 2 */
-		u8 ac_be_APSD:1;	/* bit 3 */
-		u8 q_ack:1;		/* bit 4 */
-		u8 max_len:2;		/* bit 5-6 */
-		u8 more_data_ack:1;	/* bit 7 */
-	} q_STA;
-	u8 val;
-};
-
 /* QoS structures */
 struct iwl_qos_info {
 	int qos_active;
-	union iwl_qos_capabity qos_cap;
 	struct iwl_qosparam_cmd def_qos_parm;
 };
 
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index adbb3ea..2280ba7 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3127,8 +3127,6 @@ void iwl3945_post_associate(struct iwl_priv *priv)
 		break;
 	}
 
-	iwl_activate_qos(priv, 0);
-
 	/* we have just associated, don't start scan too early */
 	priv->next_scan_jiffies = jiffies + IWL_DELAY_NEXT_SCAN;
 }
@@ -3841,11 +3839,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
 
 	priv->iw_mode = NL80211_IFTYPE_STATION;
 
-	iwl_reset_qos(priv);
-
-	priv->qos_data.qos_active = 0;
-	priv->qos_data.qos_cap.val = 0;
-
 	priv->rates_mask = IWL_RATES_MASK;
 	priv->tx_power_user_lmt = IWL_DEFAULT_TX_POWER;
 
-- 
1.6.2.5

_______________________________________________
kernel mailing list
kernel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel


mac80211-do-not-wipe-out-old-supported-rates.patch:
 scan.c |   22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

--- NEW FILE mac80211-do-not-wipe-out-old-supported-rates.patch ---
From: Stanislaw Gruszka <sgruszka at redhat.com>
To: kernel at lists.fedoraproject.org, "John W. Linville" <linville at redhat.com>
Subject: [PATCH 3/4 2.6.33.y] mac80211: do not wip out old supported rates
Date: Fri, 11 Jun 2010 17:04:19 +0200

commit f0b058b61711ebf5be94d6865ca7b2c259b71d37 upstream.

Use old supported rates, if some buggy AP do not provide
supported rates information element in managment frame.

Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
---
 net/mac80211/scan.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index bc17cf7..697dc54 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -60,7 +60,7 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
 			  bool beacon)
 {
 	struct ieee80211_bss *bss;
-	int clen;
+	int clen, srlen;
 	s32 signal = 0;
 
 	if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
@@ -92,23 +92,24 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
 	if (bss->dtim_period == 0)
 		bss->dtim_period = 1;
 
-	bss->supp_rates_len = 0;
+	/* replace old supported rates if we get new values */
+	srlen = 0;
 	if (elems->supp_rates) {
-		clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len;
+		clen = IEEE80211_MAX_SUPP_RATES;
 		if (clen > elems->supp_rates_len)
 			clen = elems->supp_rates_len;
-		memcpy(&bss->supp_rates[bss->supp_rates_len], elems->supp_rates,
-		       clen);
-		bss->supp_rates_len += clen;
+		memcpy(bss->supp_rates, elems->supp_rates, clen);
+		srlen += clen;
 	}
 	if (elems->ext_supp_rates) {
-		clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len;
+		clen = IEEE80211_MAX_SUPP_RATES - srlen;
 		if (clen > elems->ext_supp_rates_len)
 			clen = elems->ext_supp_rates_len;
-		memcpy(&bss->supp_rates[bss->supp_rates_len],
-		       elems->ext_supp_rates, clen);
-		bss->supp_rates_len += clen;
+		memcpy(bss->supp_rates + srlen, elems->ext_supp_rates, clen);
+		srlen += clen;
 	}
+	if (srlen)
+		bss->supp_rates_len = srlen;
 
 	bss->wmm_used = elems->wmm_param || elems->wmm_info;
 
-- 
1.6.2.5

_______________________________________________
kernel mailing list
kernel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel


mac80211-explicitly-disable-enable-QoS.patch:
 include/net/mac80211.h |    5 +++++
 net/mac80211/mlme.c    |    9 ++++++++-
 net/mac80211/util.c    |    6 +++++-
 3 files changed, 18 insertions(+), 2 deletions(-)

--- NEW FILE mac80211-explicitly-disable-enable-QoS.patch ---
From: Stanislaw Gruszka <sgruszka at redhat.com>
To: kernel at lists.fedoraproject.org, "John W. Linville" <linville at redhat.com>
Subject: [PATCH 1/4 2.6.33.y] mac80211: explicitly disable/enable QoS
Date: Fri, 11 Jun 2010 17:04:17 +0200

commit e1b3ec1a2a336c328c336cfa5485a5f0484cc90d upstream.

Add interface to disable/enable QoS (aka WMM or WME). Currently drivers
enable it explicitly when ->conf_tx method is called, and newer disable.
Disabling is needed for some APs, which do not support QoS, such
we should send QoS frames to them.

Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
---
 include/net/mac80211.h |    5 +++++
 net/mac80211/mlme.c    |    9 ++++++++-
 net/mac80211/util.c    |    5 +++++
 3 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f39b303..8c1f0ee 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -577,11 +577,15 @@ struct ieee80211_rx_status {
  *	may turn the device off as much as possible. Typically, this flag will
  *	be set when an interface is set UP but not associated or scanning, but
  *	it can also be unset in that case when monitor interfaces are active.
+ * @IEEE80211_CONF_QOS: Enable 802.11e QoS also know as WMM (Wireless
+ *      Multimedia). On some drivers (iwlwifi is one of know) we have
+ *      to enable/disable QoS explicitly.
  */
 enum ieee80211_conf_flags {
 	IEEE80211_CONF_MONITOR		= (1<<0),
 	IEEE80211_CONF_PS		= (1<<1),
 	IEEE80211_CONF_IDLE		= (1<<2),
+	IEEE80211_CONF_QOS		= (1<<3),
 };
 
 
@@ -604,6 +608,7 @@ enum ieee80211_conf_changed {
 	IEEE80211_CONF_CHANGE_CHANNEL		= BIT(6),
 	IEEE80211_CONF_CHANGE_RETRY_LIMITS	= BIT(7),
 	IEEE80211_CONF_CHANGE_IDLE		= BIT(8),
+	IEEE80211_CONF_CHANGE_QOS		= BIT(9),
 };
 
 /**
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1a209ac..950088d 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -798,6 +798,9 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
 	int count;
 	u8 *pos;
 
+	if (!local->ops->conf_tx)
+		return;
+
 	if (!(ifmgd->flags & IEEE80211_STA_WMM_ENABLED))
 		return;
 
@@ -856,11 +859,15 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
 		       wiphy_name(local->hw.wiphy), queue, aci, acm,
 		       params.aifs, params.cw_min, params.cw_max, params.txop);
 #endif
-		if (drv_conf_tx(local, queue, &params) && local->ops->conf_tx)
+		if (drv_conf_tx(local, queue, &params))
 			printk(KERN_DEBUG "%s: failed to set TX queue "
 			       "parameters for queue %d\n",
 			       wiphy_name(local->hw.wiphy), queue);
 	}
+
+	/* enable WMM or activate new settings */
+	local->hw.conf.flags |=	IEEE80211_CONF_QOS;
+	drv_config(local, IEEE80211_CONF_CHANGE_QOS);
 }
 
 static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 27212e8..9e35dcb 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -795,6 +795,11 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
 
 		drv_conf_tx(local, queue, &qparam);
 	}
+
+	/* after reinitialize QoS TX queues setting to default,
+	 * disable QoS at all */
+	local->hw.conf.flags &=	~IEEE80211_CONF_QOS;
+	drv_config(local, IEEE80211_CONF_CHANGE_QOS);
 }
 
 void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
-- 
1.6.2.5

_______________________________________________
kernel mailing list
kernel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel


mac80211-fix-supported-rates-IE-if-AP-doesnt-give-us-its-rates.patch:
 mlme.c |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

--- NEW FILE mac80211-fix-supported-rates-IE-if-AP-doesnt-give-us-its-rates.patch ---
Return-path: <kernel-bounces at lists.fedoraproject.org>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	bombadil.infradead.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=T_RP_MATCHES_RCVD
	autolearn=ham version=3.3.1
Envelope-to: kyle at mcmartin.ca
Delivery-date: Fri, 11 Jun 2010 15:05:50 +0000
Received: from bastion02.fedoraproject.org ([209.132.181.3] helo=bastion.fedoraproject.org)
	by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux))
	id 1ON5np-0006qq-A4
	for kyle at mcmartin.ca; Fri, 11 Jun 2010 15:05:50 +0000
Received: from lists.fedoraproject.org (collab1.vpn.fedoraproject.org [192.168.1.21])
	by bastion02.phx2.fedoraproject.org (Postfix) with ESMTP id C8AFE110FA4;
	Fri, 11 Jun 2010 15:05:48 +0000 (UTC)
Received: from collab1.fedoraproject.org (localhost.localdomain [127.0.0.1])
	by lists.fedoraproject.org (Postfix) with ESMTP id 7CD7932677B;
	Fri, 11 Jun 2010 15:05:48 +0000 (UTC)
X-Original-To: kernel at lists.fedoraproject.org
Delivered-To: kernel at lists.fedoraproject.org
Received: from smtp-mm2.fedoraproject.org (smtp-mm2.fedoraproject.org
	[66.35.62.164])
	by lists.fedoraproject.org (Postfix) with ESMTP id EBB823267E8
	for <kernel at lists.fedoraproject.org>;
	Fri, 11 Jun 2010 15:05:45 +0000 (UTC)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
	by smtp-mm2.fedoraproject.org (Postfix) with ESMTP id 5F31DE71E6
	for <kernel at lists.fedoraproject.org>;
	Fri, 11 Jun 2010 15:05:45 +0000 (UTC)
Received: from int-mx01.intmail.prod.int.phx2.redhat.com
	(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
	by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5BF5ifi002333
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <kernel at lists.fedoraproject.org>; Fri, 11 Jun 2010 11:05:45 -0400
Received: from localhost (vpn-10-251.rdu.redhat.com [10.11.10.251])
	by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id o5BF5h8Z029086; Fri, 11 Jun 2010 11:05:44 -0400
From: Stanislaw Gruszka <sgruszka at redhat.com>
To: kernel at lists.fedoraproject.org, "John W. Linville" <linville at redhat.com>
Subject: [PATCH 4/4 2.6.33.y] mac80211: fix supported rates IE if AP doesn't
	give us it's rates
Date: Fri, 11 Jun 2010 17:04:20 +0200
Message-Id: <1276268660-18830-4-git-send-email-sgruszka at redhat.com>
In-Reply-To: <1276268660-18830-3-git-send-email-sgruszka at redhat.com>
References: <1276268660-18830-1-git-send-email-sgruszka at redhat.com>
	<1276268660-18830-2-git-send-email-sgruszka at redhat.com>
	<1276268660-18830-3-git-send-email-sgruszka at redhat.com>
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Cc: Stanislaw Gruszka <sgruszka at redhat.com>
X-BeenThere: kernel at lists.fedoraproject.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "Fedora kernel development." <kernel.lists.fedoraproject.org>
List-Unsubscribe: <https://admin.fedoraproject.org/mailman/listinfo/kernel>,
	<mailto:kernel-request at lists.fedoraproject.org?subject=unsubscribe>
List-Archive: <http://lists.fedoraproject.org/pipermail/kernel>
List-Post: <mailto:kernel at lists.fedoraproject.org>
List-Help: <mailto:kernel-request at lists.fedoraproject.org?subject=help>
List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/kernel>,
	<mailto:kernel-request at lists.fedoraproject.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: kernel-bounces at lists.fedoraproject.org
Errors-To: kernel-bounces at lists.fedoraproject.org
X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20100611_110549_564657_0ED6FEC7 
X-CRM114-Status: GOOD (  17.72  )
Content-Length: 1846

commit 76f273640134f3eb8257179cd5b3bc6ba5fe4a96 upstream.

If AP do not provide us supported rates before assiociation, send
all rates we are supporting instead of empty information element.

Signed-off-by: Stanislaw Gruszka <sgruszka at redhat.com>
---
 net/mac80211/mlme.c |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 950088d..aa90100 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -270,12 +270,6 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
 	if (wk->bss->wmm_used)
 		wmm = 1;
 
-	/* get all rates supported by the device and the AP as
-	 * some APs don't like getting a superset of their rates
-	 * in the association request (e.g. D-Link DAP 1353 in
-	 * b-only mode) */
-	rates_len = ieee80211_compatible_rates(wk->bss, sband, &rates);
-
 	if ((wk->bss->cbss.capability & WLAN_CAPABILITY_SPECTRUM_MGMT) &&
 	    (local->hw.flags & IEEE80211_HW_SPECTRUM_MGMT))
 		capab |= WLAN_CAPABILITY_SPECTRUM_MGMT;
@@ -310,6 +304,17 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
 	*pos++ = wk->ssid_len;
 	memcpy(pos, wk->ssid, wk->ssid_len);
 
+	if (wk->bss->supp_rates_len) {
+		/* get all rates supported by the device and the AP as
+		 * some APs don't like getting a superset of their rates
+		 * in the association request (e.g. D-Link DAP 1353 in
+		 * b-only mode) */
+		rates_len = ieee80211_compatible_rates(wk->bss, sband, &rates);
+	} else {
+		rates = ~0;
+		rates_len = sband->n_bitrates;
+	}
+
 	/* add all rates which were marked to be used above */
 	supp_rates_len = rates_len;
 	if (supp_rates_len > 8)
-- 
1.6.2.5

_______________________________________________
kernel mailing list
kernel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/kernel



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2064
retrieving revision 1.2065
diff -u -p -r1.2064 -r1.2065
--- kernel.spec	11 Jun 2010 19:24:18 -0000	1.2064
+++ kernel.spec	13 Jun 2010 12:29:40 -0000	1.2065
@@ -850,6 +850,11 @@ Patch12911: iwlwifi-fix-internal-scan-ra
 # iwlwifi: recover_from_tx_stall
 Patch12912: iwlwifi-recover_from_tx_stall.patch
 
+Patch12913: iwlwifi-manage-QoS-by-mac-stack.patch
+Patch12914: mac80211-do-not-wipe-out-old-supported-rates.patch
+Patch12915: mac80211-explicitly-disable-enable-QoS.patch
+Patch12916: mac80211-fix-supported-rates-IE-if-AP-doesnt-give-us-its-rates.patch
+
 # CVE-2010-1437
 Patch13000: keys-find-keyring-by-name-can-gain-access-to-the-freed-keyring.patch
 
@@ -1550,6 +1555,12 @@ ApplyPatch iwlwifi-fix-internal-scan-rac
 # iwlwifi: recover_from_tx_stall
 ApplyPatch iwlwifi-recover_from_tx_stall.patch
 
+# mac80211/iwlwifi fix connections to some APs (rhbz#558002)
+ApplyPatch mac80211-explicitly-disable-enable-QoS.patch
+ApplyPatch iwlwifi-manage-QoS-by-mac-stack.patch
+ApplyPatch mac80211-do-not-wipe-out-old-supported-rates.patch
+ApplyPatch mac80211-fix-supported-rates-IE-if-AP-doesnt-give-us-its-rates.patch
+
 # CVE-2010-1437
 ApplyPatch keys-find-keyring-by-name-can-gain-access-to-the-freed-keyring.patch
 
@@ -2206,6 +2217,10 @@ fi
 # and build.
 
 %changelog
+* Sun Jun 13 2010 Kyle McMartin <kyle at redhat.com> 2.6.33.5-128
+- mac80211/iwlwifi fix connections to some APs (rhbz#558002)
+  patches from sgruszka at .
+
 * Fri Jun 11 2010 Justin M. Forbes <jforbes at redhat.com> 2.6.33.5-127
 - Disable xsave for so that kernel will boot on ancient EC2 hosts.
 



More information about the scm-commits mailing list