Skip to content

Commit 282fdf1

Browse files
Ramasamy Kaliappansmb49
authored andcommitted
wifi: ath12k: Fix the QoS control field offset to build QoS header
BugLink: https://bugs.launchpad.net/bugs/2119603 [ Upstream commit 8599d4cc4191c8c1af34207a8b9414acca4afb59 ] Currently, in the mac80211 layer, received EAPOL packets are dropped when the HT control field is present in the QoS header. This issue arises due to an incorrect QoS control field offset used to build the QoS header in the MSDU data, leading to a corrupted header in the mac80211 layer. This issue also applies to other frames that contain the QoS control field, such as QoS data or Null frames. To resolve this, use ieee80211_get_qos_ctl() to obtain the correct QoS control offset from the MSDU data. Additionally, ensure the QoS control header is copied in little-endian format within the MSDU data. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3 Fixes: d889913 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Ramasamy Kaliappan <[email protected]> Signed-off-by: Nithyanantham Paramasivam <[email protected]> Reviewed-by: Vasanthakumar Thiagarajan <[email protected]> Link: https://patch.msgid.link/20250415184102.2707300-1-nithyanantham.paramasivam@oss.qualcomm.com Signed-off-by: Jeff Johnson <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Mehmet Basaran <[email protected]>
1 parent 0a1ac50 commit 282fdf1

File tree

1 file changed

+6
-6
lines changed
  • drivers/net/wireless/ath/ath12k

1 file changed

+6
-6
lines changed

drivers/net/wireless/ath/ath12k/dp_rx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,7 @@ static void ath12k_get_dot11_hdr_from_rx_desc(struct ath12k *ar,
21192119
struct ath12k_base *ab = ar->ab;
21202120
size_t hdr_len, crypto_len;
21212121
struct ieee80211_hdr hdr;
2122-
u16 qos_ctl;
2122+
__le16 qos_ctl;
21232123
u8 *crypto_hdr, mesh_ctrl;
21242124

21252125
ath12k_dp_rx_desc_get_dot11_hdr(ab, rx_desc, &hdr);
@@ -2140,13 +2140,13 @@ static void ath12k_get_dot11_hdr_from_rx_desc(struct ath12k *ar,
21402140

21412141
/* Add QOS header */
21422142
if (ieee80211_is_data_qos(hdr.frame_control)) {
2143-
qos_ctl = rxcb->tid;
2143+
struct ieee80211_hdr *qos_ptr = (struct ieee80211_hdr *)msdu->data;
2144+
2145+
qos_ctl = cpu_to_le16(rxcb->tid & IEEE80211_QOS_CTL_TID_MASK);
21442146
if (mesh_ctrl)
2145-
qos_ctl |= IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT;
2147+
qos_ctl |= cpu_to_le16(IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT);
21462148

2147-
/* TODO: Add other QoS ctl fields when required */
2148-
memcpy(msdu->data + (hdr_len - IEEE80211_QOS_CTL_LEN),
2149-
&qos_ctl, IEEE80211_QOS_CTL_LEN);
2149+
memcpy(ieee80211_get_qos_ctl(qos_ptr), &qos_ctl, IEEE80211_QOS_CTL_LEN);
21502150
}
21512151
}
21522152

0 commit comments

Comments
 (0)