diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-01-28 01:25:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:35 -0500 |
commit | d22b0022e75b37e5c5a995754fcf9f61b39022d2 (patch) | |
tree | 2fb64f44491c21d50c4786eab95adb1d2f14dcfb | |
parent | 0cbe0064614ace61e08618948f82c6d525e75017 (diff) |
ath9k: Fix lockdep warning
This patch fixes the lockdep warning shown below, and also
initializes the starting sequence number when starting a TX
aggregation session.
=============================================
[ INFO: possible recursive locking detected ]
2.6.29-rc2-wl #21
---------------------------------------------
swapper/0 is trying to acquire lock:
(_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
but task is already holding lock:
(_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
other info that might help us debug this:
7 locks held by swapper/0:
#0: (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
#1: (_xmit_ETHER#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
#2: (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
#3: (_xmit_IEEE80211#2){-+..}, at: [<ffffffff80456d71>] __qdisc_run+0x221/0x290
#4: (rcu_read_lock){..--}, at: [<ffffffffa0154919>] ieee80211_master_start_xmit+0x219/0x6c0 [mac80211]
#5: (rcu_read_lock){..--}, at: [<ffffffffa01427c6>] ieee80211_start_tx_ba_session+0x66/0x4e0 [mac80211]
#6: (rcu_read_lock){..--}, at: [<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
stack backtrace:
Pid: 0, comm: swapper Not tainted 2.6.29-rc2-wl #21
Call Trace:
<IRQ> [<ffffffff8026c329>] __lock_acquire+0x1be9/0x1c40
[<ffffffff80442af1>] dev_queue_xmit+0xe1/0x620
[<ffffffff8026a8cc>] __lock_acquire+0x18c/0x1c40
[<ffffffff8026c3d5>] lock_acquire+0x55/0x70
[<ffffffff80456d71>] __qdisc_run+0x221/0x290
[<ffffffff804dbeb9>] _spin_lock+0x39/0x50
[<ffffffff80456d71>] __qdisc_run+0x221/0x290
[<ffffffff804dbd2f>] _spin_unlock+0x1f/0x50
[<ffffffff80456d71>] __qdisc_run+0x221/0x290
[<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
[<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
[<ffffffffa0142a63>] ieee80211_start_tx_ba_session+0x303/0x4e0 [mac80211]
[<ffffffffa01427c6>] ieee80211_start_tx_ba_session+0x66/0x4e0 [mac80211]
[<ffffffffa0149dae>] rate_control_get_rate+0xae/0xc0 [mac80211]
[<ffffffffa01526b5>] invoke_tx_handlers+0x655/0x1000 [mac80211]
[<ffffffff802699fd>] mark_held_locks+0x4d/0x90
[<ffffffff804dbcf5>] _spin_unlock_irqrestore+0x65/0x80
[<ffffffffa0151aaa>] __ieee80211_tx_prepare+0x16a/0x310 [mac80211]
[<ffffffffa0151adc>] __ieee80211_tx_prepare+0x19c/0x310 [mac80211]
[<ffffffff80439cc2>] pskb_expand_head+0x112/0x190
[<ffffffffa0154986>] ieee80211_master_start_xmit+0x286/0x6c0 [mac80211]
[<ffffffffa0154919>] ieee80211_master_start_xmit+0x219/0x6c0 [mac80211]
[<ffffffff8026a8cc>] __lock_acquire+0x18c/0x1c40
[<ffffffff80456d8e>] __qdisc_run+0x23e/0x290
[<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
[<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
[<ffffffffa0154221>] ieee80211_subif_start_xmit+0x4a1/0x980 [mac80211]
[<ffffffffa0153f18>] ieee80211_subif_start_xmit+0x198/0x980 [mac80211]
[<ffffffff80456d8e>] __qdisc_run+0x23e/0x290
[<ffffffff80442d18>] dev_queue_xmit+0x308/0x620
[<ffffffff80442a63>] dev_queue_xmit+0x53/0x620
[<ffffffffa028ecfd>] ip6_output+0x62d/0x1230 [ipv6]
[<ffffffff8024ca00>] __mod_timer+0xb0/0xd0
[<ffffffffa02ad25a>] mld_sendpack+0x3fa/0x4a0 [ipv6]
[<ffffffffa02ace60>] mld_sendpack+0x0/0x4a0 [ipv6]
[<ffffffffa02adf90>] mld_ifc_timer_expire+0x0/0x340 [ipv6]
[<ffffffffa02ae219>] mld_ifc_timer_expire+0x289/0x340 [ipv6]
[<ffffffffa02adf90>] mld_ifc_timer_expire+0x0/0x340 [ipv6]
[<ffffffff8024c097>] run_timer_softirq+0x147/0x220
[<ffffffff802473fb>] __do_softirq+0x9b/0x180
[<ffffffff80265516>] tick_dev_program_event+0x36/0xb0
[<ffffffff8020d77c>] call_softirq+0x1c/0x30
[<ffffffff8020f2c5>] do_softirq+0x65/0xb0
[<ffffffff80246ebd>] irq_exit+0x9d/0xc0
[<ffffffff80221db6>] smp_apic_timer_interrupt+0x86/0xd0
[<ffffffff8020d1b3>] apic_timer_interrupt+0x13/0x20
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath9k/rc.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 1 |
2 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c index eb557add6567..61c86c4f9fc4 100644 --- a/drivers/net/wireless/ath9k/rc.c +++ b/drivers/net/wireless/ath9k/rc.c | |||
@@ -1479,6 +1479,20 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
1479 | (is_underrun) ? ATH_11N_TXMAXTRY : | 1479 | (is_underrun) ? ATH_11N_TXMAXTRY : |
1480 | tx_info_priv->tx.ts_longretry); | 1480 | tx_info_priv->tx.ts_longretry); |
1481 | 1481 | ||
1482 | /* Check if aggregation has to be enabled for this tid */ | ||
1483 | if (conf_is_ht(&sc->hw->conf)) { | ||
1484 | if (ieee80211_is_data_qos(fc)) { | ||
1485 | u8 *qc, tid; | ||
1486 | struct ath_node *an; | ||
1487 | |||
1488 | qc = ieee80211_get_qos_ctl(hdr); | ||
1489 | tid = qc[0] & 0xf; | ||
1490 | an = (struct ath_node *)sta->drv_priv; | ||
1491 | |||
1492 | if(ath_tx_aggr_check(sc, an, tid)) | ||
1493 | ieee80211_start_tx_ba_session(sc->hw, hdr->addr1, tid); | ||
1494 | } | ||
1495 | } | ||
1482 | exit: | 1496 | exit: |
1483 | kfree(tx_info_priv); | 1497 | kfree(tx_info_priv); |
1484 | } | 1498 | } |
@@ -1490,7 +1504,6 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
1490 | struct sk_buff *skb = txrc->skb; | 1504 | struct sk_buff *skb = txrc->skb; |
1491 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 1505 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
1492 | struct ath_softc *sc = priv; | 1506 | struct ath_softc *sc = priv; |
1493 | struct ieee80211_hw *hw = sc->hw; | ||
1494 | struct ath_rate_priv *ath_rc_priv = priv_sta; | 1507 | struct ath_rate_priv *ath_rc_priv = priv_sta; |
1495 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1508 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1496 | int is_probe = 0; | 1509 | int is_probe = 0; |
@@ -1508,21 +1521,6 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
1508 | /* Find tx rate for unicast frames */ | 1521 | /* Find tx rate for unicast frames */ |
1509 | ath_rc_ratefind(sc, ath_rc_priv, ATH_11N_TXMAXTRY, 4, | 1522 | ath_rc_ratefind(sc, ath_rc_priv, ATH_11N_TXMAXTRY, 4, |
1510 | tx_info, &is_probe, false); | 1523 | tx_info, &is_probe, false); |
1511 | |||
1512 | /* Check if aggregation has to be enabled for this tid */ | ||
1513 | if (conf_is_ht(&hw->conf)) { | ||
1514 | if (ieee80211_is_data_qos(fc)) { | ||
1515 | u8 *qc, tid; | ||
1516 | struct ath_node *an; | ||
1517 | |||
1518 | qc = ieee80211_get_qos_ctl(hdr); | ||
1519 | tid = qc[0] & 0xf; | ||
1520 | an = (struct ath_node *)sta->drv_priv; | ||
1521 | |||
1522 | if(ath_tx_aggr_check(sc, an, tid)) | ||
1523 | ieee80211_start_tx_ba_session(hw, hdr->addr1, tid); | ||
1524 | } | ||
1525 | } | ||
1526 | } | 1524 | } |
1527 | 1525 | ||
1528 | static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, | 1526 | static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband, |
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 007ca91188d1..d483f3c13501 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -677,6 +677,7 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
677 | txtid = ATH_AN_2_TID(an, tid); | 677 | txtid = ATH_AN_2_TID(an, tid); |
678 | txtid->state |= AGGR_ADDBA_PROGRESS; | 678 | txtid->state |= AGGR_ADDBA_PROGRESS; |
679 | ath_tx_pause_tid(sc, txtid); | 679 | ath_tx_pause_tid(sc, txtid); |
680 | *ssn = txtid->seq_start; | ||
680 | } | 681 | } |
681 | 682 | ||
682 | return 0; | 683 | return 0; |