iwlagn: fix "Received BA when not expected"
PATCH v2 1/1 iwlagn: fix "Received BA when not expected"
Need to use broadcast sta_id for management frames, otherwise we broke BA session in the firmware and get messages like that:
"Received BA when not expected"
or (on older kernels):
"BA scd_flow 0 does not match txq_id 10"
This fix regression introduced in 2.6.35 during station management code rewrite by:
commit 2a87c26bbe9587baeb9e56d3ce0b4971bd777643
Author: Johannes Berg <[email protected]> Date: Fri Apr 30 11:30:45 2010 -0700
iwlwifi: use iwl_find_station less
Patch partially resolve:
https://bugzilla.kernel.org/show_bug.cgi?id=16691
However, there are still 11n performance problems on 4965 and 5xxx devices that need to be investigated.
--- drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-tx.c +11 -6
@@ -582,12 +582,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) hdr_len =ieee80211_hdrlen (fc); -/* Find index into station table for destination station */ - sta_id =iwl_sta_id_or_broadcast (priv, ctx, info->control.sta); -if (sta_id ==IWL_INVALID_STATION ) { -IWL_DEBUG_DROP (priv,"Dropping - INVALID STATION: %pM\n" , - hdr->addr1); - goto drop_unlock; +/* For management frames use broadcast id to do not break aggregation */ +if (!ieee80211_is_data (fc)) + sta_id = ctx->bcast_sta_id; +else { +/* Find index into station table for destination station */ + sta_id =iwl_sta_id_or_broadcast (priv, ctx, info->control.sta); +if (sta_id ==IWL_INVALID_STATION ) { +IWL_DEBUG_DROP (priv,"Dropping - INVALID STATION: %pM\n" , + hdr->addr1); + goto drop_unlock; + } }IWL_DEBUG_TX (priv,"station Id %d\n" , sta_id);
Signature · 1 line
1.7.1
Quoted 18 lines · Stanislaw Gruszka
Need to use broadcast
sta_idfor management frames, otherwise we broke BA session in the firmware and get messages like that:"Received BA when not expected"
or (on older kernels):
"BA
scd_flow0 does not matchtxq_id10"This fix regression introduced in 2.6.35 during station management code rewrite by:
commit
2a87c26bbe9587baeb9e56d3ce0b4971bd777643Author: Johannes Berg <[email protected]> Date: Fri Apr 30 11:30:45 2010 -0700iwlwifi: use
iwl_find_stationless
Quoted 7 lines
Patch partially resolve:
https://bugzilla.kernel.org/show_bug.cgi?id=16691
However, there are still 11n performance problems on 4965 and 5xxx devices that need to be investigated.Cc [email protected] # 2.6.35+Signed-off-by Stanislaw Gruszka <[email protected]>
Clearly, the behaviour here was modified by me.That wasn't intentional, but I still want to find out why it breaks anything. But that'll have to wait, I have too much other stuff to fix up right now :(
Thanks.
johannes
Quoted 32 lines
--- drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-)drivers/net/wireless/iwlwifi/iwl-agn-tx.c +11
-6@@ -582,12 +582,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) hdr_len =ieee80211_hdrlen (fc); -/* Find index into station table for destination station */ - sta_id =iwl_sta_id_or_broadcast (priv, ctx, info->control.sta); -if (sta_id ==IWL_INVALID_STATION ) { -IWL_DEBUG_DROP (priv,"Dropping - INVALID STATION: %pM\n" , - hdr->addr1); - goto drop_unlock; +/* For management frames use broadcast id to do not break aggregation */ +if (!ieee80211_is_data (fc)) + sta_id = ctx->bcast_sta_id; +else { +/* Find index into station table for destination station */ + sta_id =iwl_sta_id_or_broadcast (priv, ctx, info->control.sta); +if (sta_id ==IWL_INVALID_STATION ) { +IWL_DEBUG_DROP (priv,"Dropping - INVALID STATION: %pM\n" , + hdr->addr1); + goto drop_unlock; + } }IWL_DEBUG_TX (priv,"station Id %d\n" , sta_id);
wwguy
Acked-byQuoted 24 lines · Johannes Berg
Quoted 23 lines · Stanislaw Gruszka
Need to use broadcast
sta_idfor management frames, otherwise we broke BA session in the firmware and get messages like that:"Received BA when not expected"
or (on older kernels):
"BA
scd_flow0 does not matchtxq_id10"This fix regression introduced in 2.6.35 during station management code rewrite by:
commit
2a87c26bbe9587baeb9e56d3ce0b4971bd777643Author: Johannes Berg <[email protected]> Date: Fri Apr 30 11:30:45 2010 -0700iwlwifi: use
iwl_find_stationlessPatch partially resolve:
https://bugzilla.kernel.org/show_bug.cgi?id=16691
However, there are still 11n performance problems on 4965 and 5xxx devices that need to be investigated.
Quoted 4 lines
Quoted 2 lines
Cc [email protected] # 2.6.35+Signed-off-by Stanislaw Gruszka <[email protected]>Acked-by Johannes Berg <[email protected]>
Quoted 43 lines
Clearly, the behaviour here was modified by me.That wasn't intentional, but I still want to find out why it breaks anything. But that'll have to wait, I have too much other stuff to fix up right now :(
Thanks.
johannes
Quoted 32 lines
--- drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-)drivers/net/wireless/iwlwifi/iwl-agn-tx.c +11
-6@@ -582,12 +582,17 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) hdr_len =ieee80211_hdrlen (fc); -/* Find index into station table for destination station */ - sta_id =iwl_sta_id_or_broadcast (priv, ctx, info->control.sta); -if (sta_id ==IWL_INVALID_STATION ) { -IWL_DEBUG_DROP (priv,"Dropping - INVALID STATION: %pM\n" , - hdr->addr1); - goto drop_unlock; +/* For management frames use broadcast id to do not break aggregation */ +if (!ieee80211_is_data (fc)) + sta_id = ctx->bcast_sta_id; +else { +/* Find index into station table for destination station */ + sta_id =iwl_sta_id_or_broadcast (priv, ctx, info->control.sta); +if (sta_id ==IWL_INVALID_STATION ) { +IWL_DEBUG_DROP (priv,"Dropping - INVALID STATION: %pM\n" , + hdr->addr1); + goto drop_unlock; + } }IWL_DEBUG_TX (priv,"station Id %d\n" , sta_id);