* [ath9k-devel] [PATCH] ath10k: fix QoS tx
@ 2013-04-18 12:51 Michal Kazior
2013-04-22 8:50 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Michal Kazior @ 2013-04-18 12:51 UTC (permalink / raw)
To: ath9k-devel
Since we have a silly FW workaround we must
extract the tid *before* we apply the workaround.
Otherwise we cut out QoS Control field containing
the tid so it can't be accessed later on from
inside the tx frame.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
I broke QoS in one of my earlier tx patches some time ago.
drivers/net/wireless/ath/ath10k/core.h | 3 ++-
drivers/net/wireless/ath/ath10k/htt_tx.c | 8 +-------
drivers/net/wireless/ath/ath10k/mac.c | 12 ++++++++++++
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 97a79db..de82c80 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -55,6 +55,7 @@ struct ath10k_skb_cb {
struct {
u8 vdev_id;
+ u8 tid;
u16 msdu_id;
bool is_offchan;
bool is_conf;
@@ -69,7 +70,7 @@ struct ath10k_skb_cb {
u8 credits_used;
} __packed htc;
- /* 5 bytes left on 64bit arch */
+ /* 4 bytes left on 64bit arch */
} __packed;
static inline struct ath10k_skb_cb *ATH10K_SKB_CB(struct sk_buff *skb)
diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 2186056..5b3cad1 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -343,13 +343,7 @@ int ath10k_htt_tx(struct htt_struct *htt, struct sk_buff *msdu)
cmd = (struct htt_cmd *)txdesc->data;
memset(cmd, 0, desc_len);
- tid = HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST;
-
- if (ieee80211_is_data_qos(hdr->frame_control) &&
- is_unicast_ether_addr(ieee80211_get_DA(hdr))) {
- u8 *qc = ieee80211_get_qos_ctl(hdr);
- tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
- }
+ tid = ATH10K_SKB_CB(msdu)->htt.tid;
ath10k_dbg(ATH10K_DBG_HTT, "htt data tx using tid %hhu\n", tid);
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 4ca10bd..60855fb 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1469,9 +1469,11 @@ static void ath10k_tx(struct ieee80211_hw *hw,
struct sk_buff *skb)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ath10k *ar = hw->priv;
struct ath10k_vif *arvif = NULL;
u32 vdev_id = 0;
+ u8 tid;
if (info->control.vif) {
arvif = ath10k_vif_to_arvif(info->control.vif);
@@ -1483,6 +1485,15 @@ static void ath10k_tx(struct ieee80211_hw *hw,
if (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
ath10k_dbg(ATH10K_DBG_MAC, "IEEE80211_TX_CTL_NO_CCK_RATE\n");
+ /* we must calculate tid before we apply qos workaround
+ * as we'd lose the qos control field */
+ tid = HTT_DATA_TX_EXT_TID_NON_QOS_MCAST_BCAST;
+ if (ieee80211_is_data_qos(hdr->frame_control) &&
+ is_unicast_ether_addr(ieee80211_get_DA(hdr))) {
+ u8 *qc = ieee80211_get_qos_ctl(hdr);
+ tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
+ }
+
ath10k_tx_h_qos_workaround(hw, control, skb);
ath10k_tx_h_update_wep_key(skb);
ath10k_tx_h_add_p2p_noa_ie(ar, skb);
@@ -1490,6 +1501,7 @@ static void ath10k_tx(struct ieee80211_hw *hw,
memset(ATH10K_SKB_CB(skb), 0, sizeof(*ATH10K_SKB_CB(skb)));
ATH10K_SKB_CB(skb)->htt.vdev_id = vdev_id;
+ ATH10K_SKB_CB(skb)->htt.tid = tid;
if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) {
spin_lock_bh(&ar->data_lock);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-22 8:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 12:51 [ath9k-devel] [PATCH] ath10k: fix QoS tx Michal Kazior
2013-04-22 8:50 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.