All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] mac80211,iwlwifi: disabling qos queues
@ 2010-03-09 13:21 Stanislaw Gruszka
  2010-03-10 15:20 ` Stanislaw Gruszka
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-09 13:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Reinette Chatre

Hi,

I'm trying to solve connection fails to quite old b/g only AP.

wlan0: associate with AP 00:0c:f6:3f:0d:3e
wlan0: RX AssocResp from 00:0c:f6:3f:0d:3e (capab=0x411 status=0 aid=1)
wlan0: associated
wlan0: disassociated (Reason: 14)
wlan0: deauthenticated (Reason: 6)
wlan0: direct probe to AP 00:0c:f6:3f:0d:3e try 1
wlan0 direct probe responded
wlan0: authenticate with AP 00:0c:f6:3f:0d:3e
wlan0: authenticated
wlan0: associate with AP 00:0c:f6:3f:0d:3e
wlan0: RX ReassocResp from 00:0c:f6:3f:0d:3e (capab=0x411 status=12
aid=1)
wlan0: AP denied association (code=12)
wlan0: associate with AP 00:0c:f6:3f:0d:3e
wlan0: RX AssocResp from 00:0c:f6:3f:0d:3e (capab=0x411 status=12 aid=1)
wlan0: AP denied association (code=12)
wlan0: associate with AP 00:0c:f6:3f:0d:3e
wlan0: RX AssocResp from 00:0c:f6:3f:0d:3e (capab=0x411 status=12 aid=1)
wlan0: AP denied association (code=12)
wlan0: association with AP 00:0c:f6:3f:0d:3e timed out

More details are here:
http://bugzilla.redhat.com/show_bug.cgi?id=539878

Since bug is regression, I did bisection and bad commit is:

commit aa837e1d6bd1a71b3c30c7738b6c29d41512fe7d  
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Thu May 7 16:16:24 2009 +0200            

    mac80211: set default QoS values according to spec

After reverting commit on 2.6.31 kernel, I was able to successfully
and permanently associate with AP. But reverting commit on 2.6.33 kernel
do not give positive result, seems something else was changed. 

Problem is that we enable QoS queues, when AP do not send us any QoS
parameters. I think when AP not support QoS and does not tell anything
about that, we should not enable QoS in H/W. I prepared a draft patch,
it fixes the issue. However I'm not sure if this is right approach,
perhaps we should find something better.

Cheers
Stanislaw

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 1c9866d..64639fc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3253,6 +3253,8 @@ static struct attribute_group iwl_attribute_group = {
 	.attrs = iwl_sysfs_entries,
 };
 
+extern int iwl_mac_reset_tx(struct ieee80211_hw *);
+
 static struct ieee80211_ops iwl_hw_ops = {
 	.tx = iwl_mac_tx,
 	.start = iwl_mac_start,
@@ -3266,6 +3268,7 @@ static struct ieee80211_ops iwl_hw_ops = {
 	.get_stats = iwl_mac_get_stats,
 	.get_tx_stats = iwl_mac_get_tx_stats,
 	.conf_tx = iwl_mac_conf_tx,
+	.reset_tx = iwl_mac_reset_tx,
 	.reset_tsf = iwl_mac_reset_tsf,
 	.bss_info_changed = iwl_bss_info_changed,
 	.ampdu_action = iwl_mac_ampdu_action,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index f36f804..cce3ef6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2287,6 +2287,15 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
 }
 EXPORT_SYMBOL(iwl_mac_conf_tx);
 
+int iwl_mac_reset_tx(struct ieee80211_hw *hw)
+{
+	struct iwl_priv *priv = hw->priv;
+	
+	iwl_reset_qos(priv);
+	return 0;
+}
+EXPORT_SYMBOL(iwl_mac_reset_tx);
+
 static void iwl_ht_conf(struct iwl_priv *priv,
 			struct ieee80211_bss_conf *bss_conf)
 {
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 0bf3697..772474c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1523,6 +1523,7 @@ struct ieee80211_ops {
 			enum sta_notify_cmd, struct ieee80211_sta *sta);
 	int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
 		       const struct ieee80211_tx_queue_params *params);
+	int (*reset_tx)(struct ieee80211_hw *hw);
 	int (*get_tx_stats)(struct ieee80211_hw *hw,
 			    struct ieee80211_tx_queue_stats *stats);
 	u64 (*get_tsf)(struct ieee80211_hw *hw);
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 921dd9c..30b0e89 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -198,6 +198,15 @@ static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
 	return ret;
 }
 
+static inline int drv_reset_tx(struct ieee80211_local *local)
+{
+	int ret = -EOPNOTSUPP;
+	if (local->ops->reset_tx)
+		ret = local->ops->reset_tx(&local->hw);
+//	trace_drv_conf_tx(local, queue, params, ret);
+	return ret;
+}
+
 static inline int drv_get_tx_stats(struct ieee80211_local *local,
 				   struct ieee80211_tx_queue_stats *stats)
 {
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 05a18f4..b6cc1b5 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1596,7 +1596,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 		ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param,
 					 elems.wmm_param_len);
 	else
-		ieee80211_set_wmm_default(sdata);
+		drv_reset_tx(local);
 
 	if (elems.ht_info_elem && elems.wmm_param &&
 	    (ifmgd->flags & IEEE80211_STA_WMM_ENABLED) &&


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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-09 13:21 [RFC] mac80211,iwlwifi: disabling qos queues Stanislaw Gruszka
@ 2010-03-10 15:20 ` Stanislaw Gruszka
  2010-03-10 23:59   ` Johannes Berg
  2010-03-10 15:21 ` [RFC PATCH 1/2] mac80211: disable_qos callback Stanislaw Gruszka
  2010-03-10 15:22 ` [RFC PATCH 2/2] iwlwifi: implement disable_qos Stanislaw Gruszka
  2 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-10 15:20 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Reinette Chatre

On Tue, Mar 09, 2010 at 02:21:14PM +0100, Stanislaw Gruszka wrote:
> Problem is that we enable QoS queues, when AP do not send us any QoS
> parameters. I think when AP not support QoS and does not tell anything
> about that, we should not enable QoS in H/W. I prepared a draft patch,
> it fixes the issue. However I'm not sure if this is right approach,
> perhaps we should find something better.

I divide my fix into two patches. I'll send them in next emails.
If no one have objections I'll post them "officially" with -stable cc.

Stanislaw 

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

* [RFC PATCH 1/2] mac80211: disable_qos callback
  2010-03-09 13:21 [RFC] mac80211,iwlwifi: disabling qos queues Stanislaw Gruszka
  2010-03-10 15:20 ` Stanislaw Gruszka
@ 2010-03-10 15:21 ` Stanislaw Gruszka
  2010-03-10 20:31   ` Luis R. Rodriguez
  2010-03-10 15:22 ` [RFC PATCH 2/2] iwlwifi: implement disable_qos Stanislaw Gruszka
  2 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-10 15:21 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Reinette Chatre

Add disable_qos callback and use it when AP do not send
QoS (WMM) information.

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

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 998c30f..e646e8f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1504,6 +1504,7 @@ struct ieee80211_ops {
 			enum sta_notify_cmd, struct ieee80211_sta *sta);
 	int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
 		       const struct ieee80211_tx_queue_params *params);
+	int (*disable_qos)(struct ieee80211_hw *hw);
 	int (*get_tx_stats)(struct ieee80211_hw *hw,
 			    struct ieee80211_tx_queue_stats *stats);
 	u64 (*get_tsf)(struct ieee80211_hw *hw);
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 020a94a..471e297 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -198,6 +198,15 @@ static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
 	return ret;
 }
 
+static inline int drv_disable_qos(struct ieee80211_local *local)
+{
+	int ret = -EOPNOTSUPP;
+	if (local->ops->disable_qos)
+		ret = local->ops->disable_qos(&local->hw);
+	/* TODO trace_drv_disable_qos(local); */
+	return ret;
+}
+
 static inline int drv_get_tx_stats(struct ieee80211_local *local,
 				   struct ieee80211_tx_queue_stats *stats)
 {
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 6cae295..928cc07 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1584,8 +1584,11 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 	if (elems.wmm_param)
 		ieee80211_sta_wmm_params(local, ifmgd, elems.wmm_param,
 					 elems.wmm_param_len);
-	else
+	else {
+		/* set QoS default parameters but disable it */
 		ieee80211_set_wmm_default(sdata);
+		drv_disable_qos(sdata->local);
+	}
 
 	if (elems.ht_info_elem && elems.wmm_param &&
 	    (ifmgd->flags & IEEE80211_STA_WMM_ENABLED) &&
-- 
1.6.6


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

* [RFC PATCH 2/2] iwlwifi: implement disable_qos
  2010-03-09 13:21 [RFC] mac80211,iwlwifi: disabling qos queues Stanislaw Gruszka
  2010-03-10 15:20 ` Stanislaw Gruszka
  2010-03-10 15:21 ` [RFC PATCH 1/2] mac80211: disable_qos callback Stanislaw Gruszka
@ 2010-03-10 15:22 ` Stanislaw Gruszka
  2 siblings, 0 replies; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-10 15:22 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Reinette Chatre

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-agn.c      |    1 +
 drivers/net/wireless/iwlwifi/iwl-core.c     |   16 +++++++++++++++-
 drivers/net/wireless/iwlwifi/iwl-core.h     |    1 +
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    1 +
 4 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 921dc4a..56bfe49 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2879,6 +2879,7 @@ static struct ieee80211_ops iwl_hw_ops = {
 	.get_stats = iwl_mac_get_stats,
 	.get_tx_stats = iwl_mac_get_tx_stats,
 	.conf_tx = iwl_mac_conf_tx,
+	.disable_qos = iwl_mac_disable_qos,
 	.reset_tsf = iwl_mac_reset_tsf,
 	.bss_info_changed = iwl_bss_info_changed,
 	.ampdu_action = iwl_mac_ampdu_action,
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 0cd4ec4..f99fdae 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -303,7 +303,7 @@ EXPORT_SYMBOL(iwl_activate_qos);
  * 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;
@@ -2227,6 +2227,20 @@ int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
 }
 EXPORT_SYMBOL(iwl_mac_conf_tx);
 
+int iwl_mac_disable_qos(struct ieee80211_hw *hw)
+{
+	struct iwl_priv *priv = hw->priv;
+	unsigned long flags;
+
+	spin_lock_irqsave(&priv->lock, flags);
+	priv->qos_data.qos_active = 0;
+	iwl_activate_qos(priv, 1);
+	spin_unlock_irqrestore(&priv->lock, flags);
+
+	return 0;
+}
+EXPORT_SYMBOL(iwl_mac_disable_qos);
+
 static void iwl_ht_conf(struct iwl_priv *priv,
 			    struct ieee80211_bss_conf *bss_conf)
 {
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 7754538..61ccd44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -270,6 +270,7 @@ void iwl_reset_qos(struct iwl_priv *priv);
 void iwl_activate_qos(struct iwl_priv *priv, u8 force);
 int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
 		    const struct ieee80211_tx_queue_params *params);
+int iwl_mac_disable_qos(struct ieee80211_hw *hw);
 void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, int hw_decrypt);
 int iwl_check_rxon_cmd(struct iwl_priv *priv);
 int iwl_full_rxon_required(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 5f26c93..1b90171 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3774,6 +3774,7 @@ static struct ieee80211_ops iwl3945_hw_ops = {
 	.set_key = iwl3945_mac_set_key,
 	.get_tx_stats = iwl_mac_get_tx_stats,
 	.conf_tx = iwl_mac_conf_tx,
+	.disable_qos = iwl_mac_disable_qos,
 	.reset_tsf = iwl_mac_reset_tsf,
 	.bss_info_changed = iwl_bss_info_changed,
 	.hw_scan = iwl_mac_hw_scan
-- 
1.6.6


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

* Re: [RFC PATCH 1/2] mac80211: disable_qos callback
  2010-03-10 15:21 ` [RFC PATCH 1/2] mac80211: disable_qos callback Stanislaw Gruszka
@ 2010-03-10 20:31   ` Luis R. Rodriguez
  2010-03-11  9:33     ` Stanislaw Gruszka
  0 siblings, 1 reply; 19+ messages in thread
From: Luis R. Rodriguez @ 2010-03-10 20:31 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Johannes Berg, Reinette Chatre

On Wed, Mar 10, 2010 at 7:21 AM, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> Add disable_qos callback and use it when AP do not send
> QoS (WMM) information.
>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

What's the justification of a new callback for this? Can we not do
this through the general conf?

  Luis

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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-10 15:20 ` Stanislaw Gruszka
@ 2010-03-10 23:59   ` Johannes Berg
  2010-03-11  9:56     ` Stanislaw Gruszka
  0 siblings, 1 reply; 19+ messages in thread
From: Johannes Berg @ 2010-03-10 23:59 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Reinette Chatre

On Wed, 2010-03-10 at 16:20 +0100, Stanislaw Gruszka wrote:
> On Tue, Mar 09, 2010 at 02:21:14PM +0100, Stanislaw Gruszka wrote:
> > Problem is that we enable QoS queues, when AP do not send us any QoS
> > parameters. I think when AP not support QoS and does not tell anything
> > about that, we should not enable QoS in H/W. I prepared a draft patch,
> > it fixes the issue. However I'm not sure if this is right approach,
> > perhaps we should find something better.
> 
> I divide my fix into two patches. I'll send them in next emails.
> If no one have objections I'll post them "officially" with -stable cc.

I have objections. Or maybe not, but I don't think this makes a whole
lot of sense since the BE queue should be programmed in the "qos turned
off" way normally. That may be broken right now, but to me your patches
seem like a workaround rather than a solution which would require an
analysis of what's really going on.

johannes


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

* Re: [RFC PATCH 1/2] mac80211: disable_qos callback
  2010-03-10 20:31   ` Luis R. Rodriguez
@ 2010-03-11  9:33     ` Stanislaw Gruszka
  2010-03-17  9:19       ` Stanislaw Gruszka
  0 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-11  9:33 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless, Johannes Berg, Reinette Chatre

On Wed, Mar 10, 2010 at 12:31:58PM -0800, Luis R. Rodriguez wrote:
> What's the justification of a new callback for this? Can we not do
> this through the general conf?

Missed that, I'll fix.

Thanks
Stanislaw

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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-10 23:59   ` Johannes Berg
@ 2010-03-11  9:56     ` Stanislaw Gruszka
  2010-03-11 15:06       ` Johannes Berg
  0 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-11  9:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

On Wed, Mar 10, 2010 at 03:59:57PM -0800, Johannes Berg wrote:
> I have objections. Or maybe not, but I don't think this makes a whole
> lot of sense since the BE queue should be programmed in the "qos turned
> off" way normally. That may be broken right now, but to me your patches
> seem like a workaround rather than a solution which would require an
> analysis of what's really going on.

I looked at this on the air. Everything is fine until device send QoS
NULL frame (even with default parameters: normal ACK, TXOP request). 
Then AP send two strange Probe Response frames and Disassociate frame
with "Micheal MIC failure" error.

So I think problem is with that, when WMM is configured device send
QoS frames, which AP do not expect. So when AP does not support WMM, we
should have QoS disabled. Currently in mac80211 there is no such option,
so I add it. In kernels before 2.6.31 everything works fine, because
drivers use own tx queue defaults with QoS disabled.

I guess we can do something better with that, for example change
ieee80211_set_wmm_default() to do:

if (data->vif.type == NL80211_IFTYPE_AP || data->vif.type ==  NL80211_IFTYPE_ADHOC)
	set_default_tx_queues();
else
	disable_qos();

But I wrote fix to do not affect other drivers, which I'm unable
to test and which may relay on current mac80211 behaviour. Fix is
intended to be backported. During next development cycle I plan
revise my patch and maybe send some more code changes related with
that area.

Stanislaw

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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-11  9:56     ` Stanislaw Gruszka
@ 2010-03-11 15:06       ` Johannes Berg
  2010-03-16 14:51         ` Stanislaw Gruszka
  0 siblings, 1 reply; 19+ messages in thread
From: Johannes Berg @ 2010-03-11 15:06 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Reinette Chatre

On Thu, 2010-03-11 at 10:56 +0100, Stanislaw Gruszka wrote:
> On Wed, Mar 10, 2010 at 03:59:57PM -0800, Johannes Berg wrote:
> > I have objections. Or maybe not, but I don't think this makes a whole
> > lot of sense since the BE queue should be programmed in the "qos turned
> > off" way normally. That may be broken right now, but to me your patches
> > seem like a workaround rather than a solution which would require an
> > analysis of what's really going on.
> 
> I looked at this on the air. Everything is fine until device send QoS
> NULL frame (even with default parameters: normal ACK, TXOP request). 
> Then AP send two strange Probe Response frames and Disassociate frame
> with "Micheal MIC failure" error.

So here's good information, why did you not mention that before? :)

Yeah I guess in some sense this code dates back in mac80211 to where it
assumed that the driver wasn't sending frames. I'll give it a thought,
but I'm at a conference right now.

johannes


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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-11 15:06       ` Johannes Berg
@ 2010-03-16 14:51         ` Stanislaw Gruszka
  2010-03-16 21:18           ` Johannes Berg
  0 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-16 14:51 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

Hi Johannes

On Thu, Mar 11, 2010 at 07:06:00AM -0800, Johannes Berg wrote:
> > > I have objections. Or maybe not, but I don't think this makes a whole
> > > lot of sense since the BE queue should be programmed in the "qos turned
> > > off" way normally. That may be broken right now, but to me your patches
> > > seem like a workaround rather than a solution which would require an
> > > analysis of what's really going on.
> > 
> > I looked at this on the air. Everything is fine until device send QoS
> > NULL frame (even with default parameters: normal ACK, TXOP request). 
> > Then AP send two strange Probe Response frames and Disassociate frame
> > with "Micheal MIC failure" error.
> 
> So here's good information, why did you not mention that before? :)
> 
> Yeah I guess in some sense this code dates back in mac80211 to where it
> assumed that the driver wasn't sending frames. I'll give it a thought,
> but I'm at a conference right now.

May I proceed with my patches or do you have a better idea how to solve
issue?

Thanks
Stanislaw

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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-16 14:51         ` Stanislaw Gruszka
@ 2010-03-16 21:18           ` Johannes Berg
  2010-03-17  9:26             ` Stanislaw Gruszka
  0 siblings, 1 reply; 19+ messages in thread
From: Johannes Berg @ 2010-03-16 21:18 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Reinette Chatre

Hi,

> > > I looked at this on the air. Everything is fine until device send QoS
> > > NULL frame (even with default parameters: normal ACK, TXOP request). 
> > > Then AP send two strange Probe Response frames and Disassociate frame
> > > with "Micheal MIC failure" error.
> > 
> > So here's good information, why did you not mention that before? :)
> > 
> > Yeah I guess in some sense this code dates back in mac80211 to where it
> > assumed that the driver wasn't sending frames. I'll give it a thought,
> > but I'm at a conference right now.
> 
> May I proceed with my patches or do you have a better idea how to solve
> issue?

Sorry ... I had given this some thought and then got distracted ...
still had it unread but no time to reply. What I finally realised is
that we set the information per queue, and even the userspace API is
built that way, so we really need to have a separate configuration to
enable/disable QoS. Maybe a BSS config flag would be appropriate?

johannes


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

* Re: [RFC PATCH 1/2] mac80211: disable_qos callback
  2010-03-11  9:33     ` Stanislaw Gruszka
@ 2010-03-17  9:19       ` Stanislaw Gruszka
  0 siblings, 0 replies; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-17  9:19 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless, Johannes Berg, Reinette Chatre

On Thu, Mar 11, 2010 at 10:33:50AM +0100, Stanislaw Gruszka wrote:
> On Wed, Mar 10, 2010 at 12:31:58PM -0800, Luis R. Rodriguez wrote:
> > What's the justification of a new callback for this? Can we not do
> > this through the general conf?
> 
> Missed that, I'll fix.

No, currently I do not want to change that, not in patch that is
intended to backport to -stable. Some drivers do some work no matter
what change flags are in ieee80211_ops->config , so that change would
be much more intrusive then I want it to be.

Stanislaw

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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-16 21:18           ` Johannes Berg
@ 2010-03-17  9:26             ` Stanislaw Gruszka
  2010-03-17 15:51               ` Johannes Berg
  0 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-17  9:26 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

On Tue, Mar 16, 2010 at 02:18:02PM -0700, Johannes Berg wrote:
> > > > I looked at this on the air. Everything is fine until device send QoS
> > > > NULL frame (even with default parameters: normal ACK, TXOP request). 
> > > > Then AP send two strange Probe Response frames and Disassociate frame
> > > > with "Micheal MIC failure" error.
> > > 
> > > So here's good information, why did you not mention that before? :)
> > > 
> > > Yeah I guess in some sense this code dates back in mac80211 to where it
> > > assumed that the driver wasn't sending frames. I'll give it a thought,
> > > but I'm at a conference right now.
> > 
> > May I proceed with my patches or do you have a better idea how to solve
> > issue?
> 
> Sorry ... I had given this some thought and then got distracted ...
> still had it unread but no time to reply. What I finally realised is
> that we set the information per queue, and even the userspace API is
> built that way, so we really need to have a separate configuration to
> enable/disable QoS. Maybe a BSS config flag would be appropriate?

Maybe in -next but not in -stable since drivers in ieee80211_ops->config 
and ieee80211_ops->bss_info_chnged do some additional work not looking at
changed variable. So my plan is put change I proposed in stable and
further optimize it in -next, ok?

Stanislaw

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

* Re: [RFC] mac80211,iwlwifi: disabling qos queues
  2010-03-17  9:26             ` Stanislaw Gruszka
@ 2010-03-17 15:51               ` Johannes Berg
  2010-03-19 10:56                 ` [RFC PATCH 1/2] mac80211: add interface for disabling QoS Stanislaw Gruszka
  0 siblings, 1 reply; 19+ messages in thread
From: Johannes Berg @ 2010-03-17 15:51 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Reinette Chatre

On Wed, 2010-03-17 at 10:26 +0100, Stanislaw Gruszka wrote:

> > Sorry ... I had given this some thought and then got distracted ...
> > still had it unread but no time to reply. What I finally realised is
> > that we set the information per queue, and even the userspace API is
> > built that way, so we really need to have a separate configuration to
> > enable/disable QoS. Maybe a BSS config flag would be appropriate?
> 
> Maybe in -next but not in -stable since drivers in ieee80211_ops->config 
> and ieee80211_ops->bss_info_chnged do some additional work not looking at
> changed variable. So my plan is put change I proposed in stable and
> further optimize it in -next, ok?

I really don't think it should work that way. I'd like to see the patch
for the current kernels including 2.6.34 first, and then we can decide
how to backport it. FWIW, I don't think drivers should be having trouble
with a new flag there.

johannes


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

* [RFC PATCH 1/2] mac80211: add interface for disabling QoS
  2010-03-17 15:51               ` Johannes Berg
@ 2010-03-19 10:56                 ` Stanislaw Gruszka
  2010-03-19 10:59                   ` [RFC PATCH 2/2] iwlwifi: implement " Stanislaw Gruszka
  2010-03-19 14:37                   ` [RFC PATCH 1/2] mac80211: add interface for " Johannes Berg
  0 siblings, 2 replies; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-19 10:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

Add BSS_CHANGE_QOS_DISABLED flag to pass to drivers when want to disable
QoS (aka WMM, WME).

When AP do not provide QoS parameters, we should assume that it not
supporting QoS and we should not send QoS frames to it.

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

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 45d7d44..11a192d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -144,6 +144,7 @@ struct ieee80211_low_level_stats {
  *	new beacon (beaconing modes)
  * @BSS_CHANGED_BEACON_ENABLED: Beaconing should be
  *	enabled/disabled (beaconing modes)
+ * @BSS_CHANGED_QOS_DISABLED: QoS should be disabled
  */
 enum ieee80211_bss_change {
 	BSS_CHANGED_ASSOC		= 1<<0,
@@ -156,6 +157,7 @@ enum ieee80211_bss_change {
 	BSS_CHANGED_BSSID		= 1<<7,
 	BSS_CHANGED_BEACON		= 1<<8,
 	BSS_CHANGED_BEACON_ENABLED	= 1<<9,
+	BSS_CHANGED_QOS_DISABLED	= 1<<10,
 };
 
 /**
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index be5f723..64be5f4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1130,7 +1130,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);
+		changed |= BSS_CHANGED_QOS_DISABLED;
 
 	local->oper_channel = wk->chan;
 
-- 
1.6.2.5


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

* [RFC PATCH 2/2] iwlwifi: implement disabling QoS
  2010-03-19 10:56                 ` [RFC PATCH 1/2] mac80211: add interface for disabling QoS Stanislaw Gruszka
@ 2010-03-19 10:59                   ` Stanislaw Gruszka
  2010-03-19 14:37                   ` [RFC PATCH 1/2] mac80211: add interface for " Johannes Berg
  1 sibling, 0 replies; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-19 10:59 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlwifi/iwl-core.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 112149e..75436b0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2409,6 +2409,15 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
 		dev_kfree_skb(priv->ibss_beacon);
 		priv->ibss_beacon = ieee80211_beacon_get(hw, vif);
 	}
+	
+	if (changes & BSS_CHANGED_QOS_DISABLED) {
+		unsigned long flags;
+
+		spin_lock_irqsave(&priv->lock, flags);
+		priv->qos_data.qos_active = 0;
+		iwl_activate_qos(priv, 1);
+		spin_unlock_irqrestore(&priv->lock, flags);
+	}
 
 	if (changes & BSS_CHANGED_BEACON_INT) {
 		priv->beacon_int = bss_conf->beacon_int;
-- 
1.6.2.5


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

* Re: [RFC PATCH 1/2] mac80211: add interface for disabling QoS
  2010-03-19 10:56                 ` [RFC PATCH 1/2] mac80211: add interface for disabling QoS Stanislaw Gruszka
  2010-03-19 10:59                   ` [RFC PATCH 2/2] iwlwifi: implement " Stanislaw Gruszka
@ 2010-03-19 14:37                   ` Johannes Berg
  2010-03-19 15:57                     ` Stanislaw Gruszka
  1 sibling, 1 reply; 19+ messages in thread
From: Johannes Berg @ 2010-03-19 14:37 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Reinette Chatre

On Fri, 2010-03-19 at 11:56 +0100, Stanislaw Gruszka wrote:
> Add BSS_CHANGE_QOS_DISABLED flag to pass to drivers when want to disable
> QoS (aka WMM, WME).

Umm? Take another look at how the change flags etc. work

johannes


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

* Re: [RFC PATCH 1/2] mac80211: add interface for disabling QoS
  2010-03-19 14:37                   ` [RFC PATCH 1/2] mac80211: add interface for " Johannes Berg
@ 2010-03-19 15:57                     ` Stanislaw Gruszka
  2010-03-19 16:39                       ` Johannes Berg
  0 siblings, 1 reply; 19+ messages in thread
From: Stanislaw Gruszka @ 2010-03-19 15:57 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Reinette Chatre

On Fri, Mar 19, 2010 at 07:37:29AM -0700, Johannes Berg wrote:
> On Fri, 2010-03-19 at 11:56 +0100, Stanislaw Gruszka wrote:
> > Add BSS_CHANGE_QOS_DISABLED flag to pass to drivers when want to disable
> > QoS (aka WMM, WME).
> 
> Umm? Take another look at how the change flags etc. work

You want it that way:
      changed |= BSS_CHANGED_QOS
      sdata->vif.bss_conf.qos_disabled = true;	
?

Stanislaw

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

* Re: [RFC PATCH 1/2] mac80211: add interface for disabling QoS
  2010-03-19 15:57                     ` Stanislaw Gruszka
@ 2010-03-19 16:39                       ` Johannes Berg
  0 siblings, 0 replies; 19+ messages in thread
From: Johannes Berg @ 2010-03-19 16:39 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Reinette Chatre


On Fri, 19 Mar 2010 16:57:50 +0100, Stanislaw Gruszka
<sgruszka@redhat.com>
wrote:
> On Fri, Mar 19, 2010 at 07:37:29AM -0700, Johannes Berg wrote:
>> On Fri, 2010-03-19 at 11:56 +0100, Stanislaw Gruszka wrote:
>> > Add BSS_CHANGE_QOS_DISABLED flag to pass to drivers when want to
>> > disable
>> > QoS (aka WMM, WME).
>> 
>> Umm? Take another look at how the change flags etc. work
> 
> You want it that way:
>       changed |= BSS_CHANGED_QOS
>       sdata->vif.bss_conf.qos_disabled = true;
> ?

Yes.

johannes

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

end of thread, other threads:[~2010-03-19 16:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-09 13:21 [RFC] mac80211,iwlwifi: disabling qos queues Stanislaw Gruszka
2010-03-10 15:20 ` Stanislaw Gruszka
2010-03-10 23:59   ` Johannes Berg
2010-03-11  9:56     ` Stanislaw Gruszka
2010-03-11 15:06       ` Johannes Berg
2010-03-16 14:51         ` Stanislaw Gruszka
2010-03-16 21:18           ` Johannes Berg
2010-03-17  9:26             ` Stanislaw Gruszka
2010-03-17 15:51               ` Johannes Berg
2010-03-19 10:56                 ` [RFC PATCH 1/2] mac80211: add interface for disabling QoS Stanislaw Gruszka
2010-03-19 10:59                   ` [RFC PATCH 2/2] iwlwifi: implement " Stanislaw Gruszka
2010-03-19 14:37                   ` [RFC PATCH 1/2] mac80211: add interface for " Johannes Berg
2010-03-19 15:57                     ` Stanislaw Gruszka
2010-03-19 16:39                       ` Johannes Berg
2010-03-10 15:21 ` [RFC PATCH 1/2] mac80211: disable_qos callback Stanislaw Gruszka
2010-03-10 20:31   ` Luis R. Rodriguez
2010-03-11  9:33     ` Stanislaw Gruszka
2010-03-17  9:19       ` Stanislaw Gruszka
2010-03-10 15:22 ` [RFC PATCH 2/2] iwlwifi: implement disable_qos Stanislaw Gruszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.