diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-11-14 09:20:10 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-17 16:19:23 -0500 |
commit | 28d167086227969fd6586953ee4ac682a3c394ff (patch) | |
tree | f4dc62f175cc3b934aeadb72375967aba27937bd /drivers/net/wireless/ath/ath9k/beacon.c | |
parent | c5992618259598ade82c386aa1595bf105e92d1f (diff) |
ath9k: clean up code duplication around ath_tx_start
Merge initial processing for the CAB queue and regular tx.
Also move ath_tx_cabq() to beacon.c and make it static.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 2377376c8d4d..30724a4e8bb2 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -109,6 +109,25 @@ static void ath_beacon_setup(struct ath_softc *sc, struct ath_vif *avp, | |||
109 | series, 4, 0); | 109 | series, 4, 0); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb) | ||
113 | { | ||
114 | struct ath_wiphy *aphy = hw->priv; | ||
115 | struct ath_softc *sc = aphy->sc; | ||
116 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | ||
117 | struct ath_tx_control txctl; | ||
118 | |||
119 | memset(&txctl, 0, sizeof(struct ath_tx_control)); | ||
120 | txctl.txq = sc->beacon.cabq; | ||
121 | |||
122 | ath_print(common, ATH_DBG_XMIT, | ||
123 | "transmitting CABQ packet, skb: %p\n", skb); | ||
124 | |||
125 | if (ath_tx_start(hw, skb, &txctl) != 0) { | ||
126 | ath_print(common, ATH_DBG_XMIT, "CABQ TX failed\n"); | ||
127 | dev_kfree_skb_any(skb); | ||
128 | } | ||
129 | } | ||
130 | |||
112 | static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, | 131 | static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, |
113 | struct ieee80211_vif *vif) | 132 | struct ieee80211_vif *vif) |
114 | { | 133 | { |