linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mac80211: explicitly disable/enable QoS
@ 2010-03-26 16:46 Stanislaw Gruszka
  2010-03-26 16:46 ` [PATCH 2/2] iwlwifi: manage QoS by mac stack Stanislaw Gruszka
  2010-03-26 17:26 ` [PATCH 1/2] mac80211: explicitly disable/enable QoS Johannes Berg
  0 siblings, 2 replies; 7+ messages in thread
From: Stanislaw Gruszka @ 2010-03-26 16:46 UTC (permalink / raw)
  To: linux-wireless
  Cc: Reinette Chatre, Johannes Berg, John W. Linville, wey-yi.w.guy,
	Stanislaw Gruszka

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@redhat.com>
---
 include/net/mac80211.h     |    5 +++++
 net/mac80211/ieee80211_i.h |    2 +-
 net/mac80211/iface.c       |    2 +-
 net/mac80211/mlme.c        |   13 ++++++++++---
 net/mac80211/util.c        |   12 ++++++++++--
 5 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 45d7d44..3ff4b07 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -580,11 +580,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.
+ * QIEEE80211_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),
 };
 
 
@@ -609,6 +613,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/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 241533e..ef55403 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1137,7 +1137,7 @@ int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
 void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
 				     struct ieee80211_hdr *hdr, const u8 *tsc,
 				     gfp_t gfp);
-void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
+void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, bool wmm_on);
 void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
 void ieee802_11_parse_elems(u8 *start, size_t len,
 			    struct ieee802_11_elems *elems);
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 0793d7a..a083d45 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -315,7 +315,7 @@ static int ieee80211_open(struct net_device *dev)
 		 * need to initialise the hardware if the hardware
 		 * doesn't start up with sane defaults
 		 */
-		ieee80211_set_wmm_default(sdata);
+		ieee80211_set_wmm_default(sdata, true);
 	}
 
 	ieee80211_recalc_ps(local, -1);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index be5f723..3d7ba04 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -589,6 +589,9 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
 	int count;
 	u8 *pos, uapsd_queues = 0;
 
+	if (!local->ops->conf_tx)
+		return;
+
 	if (local->hw.queues < 4)
 		return;
 
@@ -663,11 +666,15 @@ static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
 		       params.aifs, params.cw_min, params.cw_max, params.txop,
 		       params.uapsd);
 #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,
@@ -813,7 +820,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata)
 	changed |= BSS_CHANGED_ASSOC;
 	sdata->vif.bss_conf.assoc = false;
 
-	ieee80211_set_wmm_default(sdata);
+	ieee80211_set_wmm_default(sdata, true);
 
 	/* channel(_type) changes are handled by ieee80211_hw_config */
 	local->oper_channel_type = NL80211_CHAN_NO_HT;
@@ -1130,7 +1137,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
 		ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param,
 					 elems.wmm_param_len);
 	else
-		ieee80211_set_wmm_default(sdata);
+		ieee80211_set_wmm_default(sdata, false);
 
 	local->oper_channel = wk->chan;
 
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index c453226..08fb98b 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -734,7 +734,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
 	return crc;
 }
 
-void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
+void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, bool wmm_on)
 {
 	struct ieee80211_local *local = sdata->local;
 	struct ieee80211_tx_queue_params qparam;
@@ -796,6 +796,14 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
 
 		drv_conf_tx(local, queue, &qparam);
 	}
+
+	/* activate new settings */
+	if (wmm_on)
+		local->hw.conf.flags |=	IEEE80211_CONF_QOS;
+	else
+		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,
@@ -816,7 +824,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
 	else
 		sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
 
-	ieee80211_set_wmm_default(sdata);
+	ieee80211_set_wmm_default(sdata, true);
 }
 
 u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] iwlwifi: manage QoS by mac stack
  2010-03-26 16:46 [PATCH 1/2] mac80211: explicitly disable/enable QoS Stanislaw Gruszka
@ 2010-03-26 16:46 ` Stanislaw Gruszka
  2010-03-26 17:28   ` Johannes Berg
  2010-03-26 17:48   ` Guy, Wey-Yi
  2010-03-26 17:26 ` [PATCH 1/2] mac80211: explicitly disable/enable QoS Johannes Berg
  1 sibling, 2 replies; 7+ messages in thread
From: Stanislaw Gruszka @ 2010-03-26 16:46 UTC (permalink / raw)
  To: linux-wireless
  Cc: Reinette Chatre, Johannes Berg, John W. Linville, wey-yi.w.guy,
	Stanislaw Gruszka

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@redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c      |   15 ---
 drivers/net/wireless/iwlwifi/iwl-core.c     |  141 +++------------------------
 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(+), 170 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 818367b..a912586 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2506,7 +2506,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__);
@@ -2591,10 +2590,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 */
@@ -2771,7 +2766,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;
@@ -2823,10 +2817,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);
@@ -3386,11 +3376,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 112149e..1043b28 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -321,17 +321,13 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
 /*
  * QoS  support
 */
-void iwl_activate_qos(struct iwl_priv *priv, u8 force)
+void iwl_activate_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;
@@ -339,119 +335,16 @@ 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 */
 static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
@@ -2302,12 +2195,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);
 
@@ -2583,11 +2470,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);
@@ -2829,6 +2713,15 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
 		iwl_set_tx_power(priv, conf->power_level, false);
 	}
 
+	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_activate_qos(priv);
+		spin_unlock_irqrestore(&priv->lock, flags);
+	}
+
 	if (!iwl_is_ready(priv)) {
 		IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
 		goto out;
@@ -2863,8 +2756,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 4ef7739..da7c449 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -304,8 +304,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 6054c5f..5da9d57 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -519,30 +519,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 54daa38..21e855a 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3150,8 +3150,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;
 }
@@ -3859,11 +3857,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
 	priv->iw_mode = NL80211_IFTYPE_STATION;
 	priv->missed_beacon_threshold = IWL_MISSED_BEACON_THRESHOLD_DEF;
 
-	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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] mac80211: explicitly disable/enable QoS
  2010-03-26 16:46 [PATCH 1/2] mac80211: explicitly disable/enable QoS Stanislaw Gruszka
  2010-03-26 16:46 ` [PATCH 2/2] iwlwifi: manage QoS by mac stack Stanislaw Gruszka
@ 2010-03-26 17:26 ` Johannes Berg
  2010-03-29  7:17   ` Stanislaw Gruszka
  1 sibling, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2010-03-26 17:26 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Reinette Chatre, John W. Linville, wey-yi.w.guy

On Fri, 2010-03-26 at 17:46 +0100, Stanislaw Gruszka wrote:

> + * QIEEE80211_CONF_QOS: Enable 802.11e QoS also know as WMM (Wireless
      ^ typo

> +
> +	/* activate new settings */
> +	if (wmm_on)
> +		local->hw.conf.flags |=	IEEE80211_CONF_QOS;
> +	else
> +		local->hw.conf.flags &=	~IEEE80211_CONF_QOS;
> +
> +	drv_config(local, IEEE80211_CONF_CHANGE_QOS);

Ok, fair enough, we need to think this through in the multi-vif case
anyway.
 
>  void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
> @@ -816,7 +824,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
>  	else
>  		sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
>  
> -	ieee80211_set_wmm_default(sdata);
> +	ieee80211_set_wmm_default(sdata, true);

Shouldn't that be false though?

johannes


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] iwlwifi: manage QoS by mac stack
  2010-03-26 16:46 ` [PATCH 2/2] iwlwifi: manage QoS by mac stack Stanislaw Gruszka
@ 2010-03-26 17:28   ` Johannes Berg
  2010-03-26 17:48   ` Guy, Wey-Yi
  1 sibling, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2010-03-26 17:28 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Reinette Chatre, John W. Linville, wey-yi.w.guy

On Fri, 2010-03-26 at 17:46 +0100, Stanislaw Gruszka wrote:

> --- a/drivers/net/wireless/iwlwifi/iwl-core.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
> @@ -321,17 +321,13 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
>  /*
>   * QoS  support
>  */
> -void iwl_activate_qos(struct iwl_priv *priv, u8 force)
> +void iwl_activate_qos(struct iwl_priv *priv)

I would advocate renaming this function to something like
iwl_update_qos.

Also, since you remove it from 3945/agn, I think it can probably be
static now and lose the export?

johannes


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] iwlwifi: manage QoS by mac stack
  2010-03-26 16:46 ` [PATCH 2/2] iwlwifi: manage QoS by mac stack Stanislaw Gruszka
  2010-03-26 17:28   ` Johannes Berg
@ 2010-03-26 17:48   ` Guy, Wey-Yi
  1 sibling, 0 replies; 7+ messages in thread
From: Guy, Wey-Yi @ 2010-03-26 17:48 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Chatre, Reinette, Johannes Berg, John W. Linville

Hi Stanislaw,

On Fri, 2010-03-26 at 09:46 -0700, Stanislaw Gruszka wrote:
> 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@redhat.com>
> ---
>  drivers/net/wireless/iwlwifi/iwl-agn.c      |   15 ---
>  drivers/net/wireless/iwlwifi/iwl-core.c     |  141 +++------------------------
>  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(+), 170 deletions(-)
> 
> diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
> index 818367b..a912586 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-agn.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
> @@ -2506,7 +2506,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__);
> @@ -2591,10 +2590,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 */
> @@ -2771,7 +2766,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;
> @@ -2823,10 +2817,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);
> @@ -3386,11 +3376,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 112149e..1043b28 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.c
> @@ -321,17 +321,13 @@ EXPORT_SYMBOL(iwl_hw_nic_init);
>  /*
>   * QoS  support
>  */
> -void iwl_activate_qos(struct iwl_priv *priv, u8 force)
> +void iwl_activate_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;
> @@ -339,119 +335,16 @@ 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 */
>  static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
> @@ -2302,12 +2195,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);
>  
> @@ -2583,11 +2470,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);
> @@ -2829,6 +2713,15 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
>  		iwl_set_tx_power(priv, conf->power_level, false);
>  	}
>  
> +	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_activate_qos(priv);
> +		spin_unlock_irqrestore(&priv->lock, flags);
> +	}
> +
>  	if (!iwl_is_ready(priv)) {
>  		IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
>  		goto out;
> @@ -2863,8 +2756,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 4ef7739..da7c449 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-core.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-core.h
> @@ -304,8 +304,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 6054c5f..5da9d57 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-dev.h
> +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
> @@ -519,30 +519,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 54daa38..21e855a 100644
> --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
> +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
> @@ -3150,8 +3150,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;
>  }
> @@ -3859,11 +3857,6 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
>  	priv->iw_mode = NL80211_IFTYPE_STATION;
>  	priv->missed_beacon_threshold = IWL_MISSED_BEACON_THRESHOLD_DEF;
>  
> -	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;
>  
it is much simple now, thanks

Wey


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] mac80211: explicitly disable/enable QoS
  2010-03-26 17:26 ` [PATCH 1/2] mac80211: explicitly disable/enable QoS Johannes Berg
@ 2010-03-29  7:17   ` Stanislaw Gruszka
  2010-03-29  8:27     ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Stanislaw Gruszka @ 2010-03-29  7:17 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless, Reinette Chatre, John W. Linville, wey-yi.w.guy

On Fri, Mar 26, 2010 at 10:26:03AM -0700, Johannes Berg wrote:
> >  void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
> > @@ -816,7 +824,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
> >  	else
> >  		sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
> >  
> > -	ieee80211_set_wmm_default(sdata);
> > +	ieee80211_set_wmm_default(sdata, true);
> 
> Shouldn't that be false though?

I think so, I did like that just to not change old behaviour (on iwlwifi).

But I think also, that all ieee80211_set_wmm_default function calls
should be with false, in other words, we should disable QoS in
ieee80211_set_wmm_default().

What is your opinion?

Stanislaw

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] mac80211: explicitly disable/enable QoS
  2010-03-29  7:17   ` Stanislaw Gruszka
@ 2010-03-29  8:27     ` Johannes Berg
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Berg @ 2010-03-29  8:27 UTC (permalink / raw)
  To: Stanislaw Gruszka
  Cc: linux-wireless, Reinette Chatre, John W. Linville, wey-yi.w.guy

On Mon, 2010-03-29 at 09:17 +0200, Stanislaw Gruszka wrote:
> On Fri, Mar 26, 2010 at 10:26:03AM -0700, Johannes Berg wrote:
> > >  void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
> > > @@ -816,7 +824,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
> > >  	else
> > >  		sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
> > >  
> > > -	ieee80211_set_wmm_default(sdata);
> > > +	ieee80211_set_wmm_default(sdata, true);
> > 
> > Shouldn't that be false though?
> 
> I think so, I did like that just to not change old behaviour (on iwlwifi).
> 
> But I think also, that all ieee80211_set_wmm_default function calls
> should be with false, in other words, we should disable QoS in
> ieee80211_set_wmm_default().
> 
> What is your opinion?

Yeah that seems right to me, if we're going to set to the default then
that should probably mean off, even if we do configure the queues. I'm
just not exactly sure how AP should be handled wrt. turning QoS on,
probably on the first queue config from userspace?

johannes


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-03-29  8:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-26 16:46 [PATCH 1/2] mac80211: explicitly disable/enable QoS Stanislaw Gruszka
2010-03-26 16:46 ` [PATCH 2/2] iwlwifi: manage QoS by mac stack Stanislaw Gruszka
2010-03-26 17:28   ` Johannes Berg
2010-03-26 17:48   ` Guy, Wey-Yi
2010-03-26 17:26 ` [PATCH 1/2] mac80211: explicitly disable/enable QoS Johannes Berg
2010-03-29  7:17   ` Stanislaw Gruszka
2010-03-29  8:27     ` Johannes Berg

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).