summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath12k/dp_rx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 3e4dd9d2b6af..8193f95b13da 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -2137,7 +2137,7 @@ static void ath12k_get_dot11_hdr_from_rx_desc(struct ath12k *ar,
struct ath12k_base *ab = ar->ab;
size_t hdr_len, crypto_len;
struct ieee80211_hdr hdr;
- u16 qos_ctl;
+ __le16 qos_ctl;
u8 *crypto_hdr, mesh_ctrl;
ath12k_dp_rx_desc_get_dot11_hdr(ab, rx_desc, &hdr);
@@ -2158,13 +2158,13 @@ static void ath12k_get_dot11_hdr_from_rx_desc(struct ath12k *ar,
/* Add QOS header */
if (ieee80211_is_data_qos(hdr.frame_control)) {
- qos_ctl = rxcb->tid;
+ struct ieee80211_hdr *qos_ptr = (struct ieee80211_hdr *)msdu->data;
+
+ qos_ctl = cpu_to_le16(rxcb->tid & IEEE80211_QOS_CTL_TID_MASK);
if (mesh_ctrl)
- qos_ctl |= IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT;
+ qos_ctl |= cpu_to_le16(IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT);
- /* TODO: Add other QoS ctl fields when required */
- memcpy(msdu->data + (hdr_len - IEEE80211_QOS_CTL_LEN),
- &qos_ctl, IEEE80211_QOS_CTL_LEN);
+ memcpy(ieee80211_get_qos_ctl(qos_ptr), &qos_ctl, IEEE80211_QOS_CTL_LEN);
}
}