ath10k: fix QoS tx
PATCH 1/1 ath10k: fix QoS tx
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 <[email protected]>
---
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(-)
drivers/net/wireless/ath/ath10k/core.h +2 -1
@@ -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)
drivers/net/wireless/ath/ath10k/htt_tx.c +1 -7
@@ -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);
drivers/net/wireless/ath/ath10k/mac.c +12 -0
@@ -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);
Signature · 1 line
1.7.9.5
Kalle Valo
AppliedPATCH 1/1 ath10k: fix QoS tx
Quoted 7 lines · Michal Kazior
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 <[email protected]>
Thanks, applied.
Signature · 1 line
Kalle Valo