Bug 1921 - WARNING: at net/mac80211/agg-tx.c:159
: WARNING: at net/mac80211/agg-tx.c:159
Status: VERIFIED FIXED
: iwlwifi
others
: iwlwifi-2.6 development tree
: 5100/5300 (Intel(R) WiFi Link 5100/5300) Fedora 10
: P1 major
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-03-03 17:27 by
Modified: 2009-05-05 19:51 (History)


Attachments
detail log message (67.03 KB, application/octet-stream)
2009-03-03 17:27, ximin luo
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-03-03 17:27:37
Created an attachment (id=1854) [details]
detail log message

Testing Environment
==============================================
Platform        :       Intel SDV M3M41 
Wireless Card   :       Intel(R) WiFi Link 5100
OS              :       Redhat Fedora release 10 (Cambridge) 32bit
AP              :       Cisco 1250
uCode           :       iwlwifi-5000-1.ucode 5.4.1.16
Source          :       commit 37c528166103f362138eac869f0ea68d36046275

Issue
==============================================
Encounter a call trace as below, if reset channel & essid after S4. It didn't
hang system.

Possible Steps to Reproduce (hard to reproduce)
===============================================
1.       modprobe –r iwlagn
2.       modprobe iwlagn
3.       ifconfig wlan0 up
4.       iwconfig wlan0 channel <CHAN> essid <ESSID>
5.       ifconfig wlan0 <IP_ADDR>
6.       ping <SRV_IP_ADDR>  ---- can receive ping packets
7.       echo -n mem > /sys/power/state
8.       after resume can’t receive ping packets & iwconfig wlan0 channel
<CHAN> essid <ESSID> 
9.       ping <SRV_IP_ADDR>  ---- can receive ping packets
10.    echo -n disk > /sys/power/state
11.    after resume & iwconfig wlan0 channel <CHAN> essid <ESSID> then see the
following WARNING message.

Potential cause
=============================================
The WARN_ON is triggered by iwl_sta_rx_agg_stop()

Basice root-causing log messge
======================================================
------------[ cut here ]------------
WARNING: at net/mac80211/agg-tx.c:159 ___ieee80211_stop_tx_ba_session+0xa1/0xb9
[mac80211]()
Hardware name: Montevina platform
Modules linked in: iwlagn iwlcore rfkill lib80211 mac80211 cfg80211 aes_i586
aes_generic netconsole sit tunnel4 e1000 sco bridge stp bnep l2cap bluetooth
sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables
ip6t_REJECT xt_tcpudp nf_conntrack_ipv6 xt_state nf_conntrack ip6table_filter
ip6_tables x_tables ipv6 cpufreq_ondemand acpi_cpufreq dm_mirror dm_region_hash
dm_log dm_multipath dm_mod uinput snd_hda_intel snd_hda_codec snd_hwdep
snd_seq_dummy snd_seq_oss snd_seq_midi_event arc4 snd_seq ecb snd_seq_device
snd_pcm_oss snd_mixer_oss snd_pcm video sr_mod i2c_i801 snd_timer snd soundcore
snd_page_alloc pcspkr i2c_core output serio_raw button battery cdrom ac sg
ata_generic ata_piix libata sd_mod scsi_mod ext3 jbd mbcache uhci_hcd ohci_hcd
ehci_hcd [last unloaded: cfg80211]
Pid: 28654, comm: iwconfig Tainted: G        W  2.6.29-rc6-wl #2
Call Trace:
 [<c0428eb9>] warn_slowpath+0x71/0xa8
 [<f9360f9a>] ? iwl_tx_agg_stop+0x71/0x215 [iwlcore]
 [<f93889a9>] ? iwl_mac_ampdu_action+0x237/0x298 [iwlagn]
 [<f9338121>] ___ieee80211_stop_tx_ba_session+0xa1/0xb9 [mac80211]
 [<f9338256>] __ieee80211_stop_tx_ba_session+0x36/0x47 [mac80211]
 [<f9337f28>] ieee80211_sta_tear_down_BA_sessions+0x17/0x32 [mac80211]
 [<f933a6ac>] ieee80211_set_disassoc+0x99/0x199 [mac80211]
 [<f933a88d>] ieee80211_sta_req_auth+0x4c/0x7f [mac80211]
 [<f93350e6>] ieee80211_ioctl_siwessid+0xb9/0xd8 [mac80211]
 [<c06373f8>] ioctl_standard_call+0x1af/0x263
 [<c0636fc9>] wext_handle_ioctl+0xe2/0x178
 [<f933502d>] ? ieee80211_ioctl_siwessid+0x0/0xd8 [mac80211]
 [<c05d99a6>] dev_ioctl+0x5b8/0x5d8
 [<c05cc15d>] ? sock_ioctl+0x0/0x200
 [<c05cc351>] sock_ioctl+0x1f4/0x200
 [<c05cc15d>] ? sock_ioctl+0x0/0x200
 [<c049290f>] vfs_ioctl+0x22/0x69
 [<c0493135>] do_vfs_ioctl+0x4cc/0x505
 [<c047ce77>] ? free_pages_and_swap_cache+0x66/0x7f
 [<c0477956>] ? remove_vma+0x55/0x5b
 [<c04931ae>] sys_ioctl+0x40/0x5a
 [<c0403141>] sysenter_do_call+0x12/0x21
 [<c0640000>] ? acpi_pci_root_add+0x26a/0x2d1
---[ end trace f19ce7cd32721ea5 ]---
HW problem - can not stop rx aggregation for tid 0
------- Comment #1 From 2009-03-10 12:14:02 -------
patch submitted to address the issue.
if mac80211 issue stop rx agg when driver/uCode on the way going down, uCode
will reject the incoming Host command. driver shall check the
STATUS_EXIT_PENDING bit; then decide what return code shall send back to
mac80211
------- Comment #2 From 2009-03-12 12:21:53 -------
FIx Rx aggregation (BUg 1878). THis bug only only address TX aggregation. 
Follow patch submit and hope to root cause the issue

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

This fix related to bug 1921 at
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1921

when detect error during stopping tx aggregation queue, report the error to
help identify the problem.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-5000.c |    2 +-
 drivers/net/wireless/iwlwifi/iwl-tx.c   |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c
b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 08c19be..a3d9a95 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1077,7 +1077,7 @@ static int iwl5000_txq_agg_disable(struct iwl_priv *priv,
u16 txq_id,

     if ((IWL50_FIRST_AMPDU_QUEUE > txq_id) ||
         (IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES <= txq_id)) {
-        IWL_WARN(priv,
+        IWL_ERR(priv,
             "queue number out of range: %d, must be %d to %d\n",
             txq_id, IWL50_FIRST_AMPDU_QUEUE,
             IWL50_FIRST_AMPDU_QUEUE + IWL50_NUM_AMPDU_QUEUES - 1);
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c
b/drivers/net/wireless/iwlwifi/iwl-tx.c
index dff60fb..71a72cf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -1221,8 +1221,10 @@ int iwl_tx_agg_stop(struct iwl_priv *priv , const u8
*ra, u16 tid)

     sta_id = iwl_find_station(priv, ra);

-    if (sta_id == IWL_INVALID_STATION)
+    if (sta_id == IWL_INVALID_STATION) {
+        IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid);
         return -ENXIO;
+    }

     if (priv->stations[sta_id].tid[tid].agg.state != IWL_AGG_ON)
         IWL_WARN(priv, "Stopping AGG while state not IWL_AGG_ON\n");
-- 
1.5.6.3
------- Comment #3 From 2009-04-22 07:44:21 -------
fix
------- Comment #4 From 2009-05-05 19:51:31 -------
So far , I do not encouter it again. Marked it as verified.