diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-10-29 00:44:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:14:56 -0500 |
commit | 528f0c6b3b6bbed1328ee49bfc906543daa00866 (patch) | |
tree | e477793c6ece92ea2f0226e5d87555e7c255a67d /drivers/net/wireless/ath9k/main.c | |
parent | c51701632c8becdf0ffedb96d9cedc1149f2183a (diff) |
ath9k: Revamp transmit control block
Use the ath_buf instance associated with each tx frame
directly and remove all redundant information in ath_tx_control.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index b1b1e7f3b0b..839db2312ca 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -412,7 +412,7 @@ void ath_get_beaconconfig(struct ath_softc *sc, | |||
412 | } | 412 | } |
413 | 413 | ||
414 | void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, | 414 | void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, |
415 | struct ath_xmit_status *tx_status, struct ath_node *an) | 415 | struct ath_xmit_status *tx_status) |
416 | { | 416 | { |
417 | struct ieee80211_hw *hw = sc->hw; | 417 | struct ieee80211_hw *hw = sc->hw; |
418 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 418 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
@@ -906,6 +906,7 @@ static int ath_attach(u16 devid, | |||
906 | } | 906 | } |
907 | 907 | ||
908 | hw->queues = 4; | 908 | hw->queues = 4; |
909 | hw->sta_data_size = sizeof(struct ath_node); | ||
909 | 910 | ||
910 | /* Register rate control */ | 911 | /* Register rate control */ |
911 | hw->rate_control_algorithm = "ath9k_rate_control"; | 912 | hw->rate_control_algorithm = "ath9k_rate_control"; |
@@ -1016,9 +1017,12 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1016 | static int ath9k_tx(struct ieee80211_hw *hw, | 1017 | static int ath9k_tx(struct ieee80211_hw *hw, |
1017 | struct sk_buff *skb) | 1018 | struct sk_buff *skb) |
1018 | { | 1019 | { |
1020 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
1019 | struct ath_softc *sc = hw->priv; | 1021 | struct ath_softc *sc = hw->priv; |
1022 | struct ath_tx_control txctl; | ||
1020 | int hdrlen, padsize; | 1023 | int hdrlen, padsize; |
1021 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | 1024 | |
1025 | memset(&txctl, 0, sizeof(struct ath_tx_control)); | ||
1022 | 1026 | ||
1023 | /* | 1027 | /* |
1024 | * As a temporary workaround, assign seq# here; this will likely need | 1028 | * As a temporary workaround, assign seq# here; this will likely need |
@@ -1043,18 +1047,25 @@ static int ath9k_tx(struct ieee80211_hw *hw, | |||
1043 | memmove(skb->data, skb->data + padsize, hdrlen); | 1047 | memmove(skb->data, skb->data + padsize, hdrlen); |
1044 | } | 1048 | } |
1045 | 1049 | ||
1050 | /* Check if a tx queue is available */ | ||
1051 | |||
1052 | txctl.txq = ath_test_get_txq(sc, skb); | ||
1053 | if (!txctl.txq) | ||
1054 | goto exit; | ||
1055 | |||
1046 | DPRINTF(sc, ATH_DBG_XMIT, "%s: transmitting packet, skb: %p\n", | 1056 | DPRINTF(sc, ATH_DBG_XMIT, "%s: transmitting packet, skb: %p\n", |
1047 | __func__, | 1057 | __func__, |
1048 | skb); | 1058 | skb); |
1049 | 1059 | ||
1050 | if (ath_tx_start(sc, skb) != 0) { | 1060 | if (ath_tx_start(sc, skb, &txctl) != 0) { |
1051 | DPRINTF(sc, ATH_DBG_XMIT, "%s: TX failed\n", __func__); | 1061 | DPRINTF(sc, ATH_DBG_XMIT, "%s: TX failed\n", __func__); |
1052 | dev_kfree_skb_any(skb); | 1062 | goto exit; |
1053 | /* FIXME: Check for proper return value from ATH_DEV */ | ||
1054 | return 0; | ||
1055 | } | 1063 | } |
1056 | 1064 | ||
1057 | return 0; | 1065 | return 0; |
1066 | exit: | ||
1067 | dev_kfree_skb_any(skb); | ||
1068 | return 0; | ||
1058 | } | 1069 | } |
1059 | 1070 | ||
1060 | static void ath9k_stop(struct ieee80211_hw *hw) | 1071 | static void ath9k_stop(struct ieee80211_hw *hw) |