OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008-2009 Atheros Communications Inc. | 2 * Copyright (c) 2008-2009 Atheros Communications Inc. |
3 * | 3 * |
4 * Permission to use, copy, modify, and/or distribute this software for any | 4 * Permission to use, copy, modify, and/or distribute this software for any |
5 * purpose with or without fee is hereby granted, provided that the above | 5 * purpose with or without fee is hereby granted, provided that the above |
6 * copyright notice and this permission notice appear in all copies. | 6 * copyright notice and this permission notice appear in all copies. |
7 * | 7 * |
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1625 bf->bf_frmlen -= padsize; | 1625 bf->bf_frmlen -= padsize; |
1626 } | 1626 } |
1627 | 1627 |
1628 if (!txctl->paprd && conf_is_ht(&hw->conf)) { | 1628 if (!txctl->paprd && conf_is_ht(&hw->conf)) { |
1629 bf->bf_state.bf_type |= BUF_HT; | 1629 bf->bf_state.bf_type |= BUF_HT; |
1630 if (tx_info->flags & IEEE80211_TX_CTL_LDPC) | 1630 if (tx_info->flags & IEEE80211_TX_CTL_LDPC) |
1631 use_ldpc = true; | 1631 use_ldpc = true; |
1632 } | 1632 } |
1633 | 1633 |
1634 bf->bf_state.bfs_paprd = txctl->paprd; | 1634 bf->bf_state.bfs_paprd = txctl->paprd; |
1635 if (txctl->paprd) | |
1636 bf->bf_state.bfs_paprd_timestamp = jiffies; | |
1637 bf->bf_flags = setup_tx_flags(skb, use_ldpc); | 1635 bf->bf_flags = setup_tx_flags(skb, use_ldpc); |
1638 | 1636 |
1639 bf->bf_keytype = get_hw_crypto_keytype(skb); | 1637 bf->bf_keytype = get_hw_crypto_keytype(skb); |
1640 if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) { | 1638 if (bf->bf_keytype != ATH9K_KEY_TYPE_CLEAR) { |
1641 bf->bf_frmlen += tx_info->control.hw_key->icv_len; | 1639 bf->bf_frmlen += tx_info->control.hw_key->icv_len; |
1642 bf->bf_keyix = tx_info->control.hw_key->hw_key_idx; | 1640 bf->bf_keyix = tx_info->control.hw_key->hw_key_idx; |
1643 } else { | 1641 } else { |
1644 bf->bf_keyix = ATH9K_TXKEYIX_INVALID; | 1642 bf->bf_keyix = ATH9K_TXKEYIX_INVALID; |
1645 } | 1643 } |
1646 | 1644 |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 if (!txok) { | 1927 if (!txok) { |
1930 tx_flags |= ATH_TX_ERROR; | 1928 tx_flags |= ATH_TX_ERROR; |
1931 | 1929 |
1932 if (bf_isxretried(bf)) | 1930 if (bf_isxretried(bf)) |
1933 tx_flags |= ATH_TX_XRETRY; | 1931 tx_flags |= ATH_TX_XRETRY; |
1934 } | 1932 } |
1935 | 1933 |
1936 dma_unmap_single(sc->dev, bf->bf_dmacontext, skb->len, DMA_TO_DEVICE); | 1934 dma_unmap_single(sc->dev, bf->bf_dmacontext, skb->len, DMA_TO_DEVICE); |
1937 | 1935 |
1938 if (bf->bf_state.bfs_paprd) { | 1936 if (bf->bf_state.bfs_paprd) { |
1939 » » if (time_after(jiffies, | 1937 » » if (!sc->paprd_pending) |
1940 » » » bf->bf_state.bfs_paprd_timestamp + | |
1941 » » » msecs_to_jiffies(ATH_PAPRD_TIMEOUT))) | |
1942 dev_kfree_skb_any(skb); | 1938 dev_kfree_skb_any(skb); |
1943 else | 1939 else |
1944 complete(&sc->paprd_complete); | 1940 complete(&sc->paprd_complete); |
1945 } else { | 1941 } else { |
1946 ath_debug_stat_tx(sc, bf, ts); | 1942 ath_debug_stat_tx(sc, bf, ts); |
1947 ath_tx_complete(sc, skb, bf->aphy, tx_flags, txq); | 1943 ath_tx_complete(sc, skb, bf->aphy, tx_flags, txq); |
1948 | 1944 |
1949 } | 1945 } |
1950 | 1946 |
1951 /* | 1947 /* |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 tid->ac->sched = false; | 2442 tid->ac->sched = false; |
2447 } | 2443 } |
2448 | 2444 |
2449 ath_tid_drain(sc, txq, tid); | 2445 ath_tid_drain(sc, txq, tid); |
2450 tid->state &= ~AGGR_ADDBA_COMPLETE; | 2446 tid->state &= ~AGGR_ADDBA_COMPLETE; |
2451 tid->state &= ~AGGR_CLEANUP; | 2447 tid->state &= ~AGGR_CLEANUP; |
2452 | 2448 |
2453 spin_unlock_bh(&txq->axq_lock); | 2449 spin_unlock_bh(&txq->axq_lock); |
2454 } | 2450 } |
2455 } | 2451 } |
OLD | NEW |