diff mbox series

wifi: ath12k: fix packets are sent in native wifi mode while we set raw mode

Message ID 20230320052427.12271-1-quic_aarasahu@quicinc.com
State New
Headers show
Series wifi: ath12k: fix packets are sent in native wifi mode while we set raw mode | expand

Commit Message

Aaradhana Sahu March 20, 2023, 5:24 a.m. UTC
Currently, if we set raw mode as encap type, packets are sent
in native wifi mode which is default mode. This is caused by
no check being present for raw mode in ath12k_dp_tx_get_encap_type
function, so it's always going in native wifi mode.

Fix, this issue by adding check condition for raw mode.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/dp_tx.c | 4 ++++
 1 file changed, 4 insertions(+)


base-commit: 3df3715e556027e94246b2cb30986563362a65f4

Comments

Kalle Valo March 24, 2023, 2:48 p.m. UTC | #1
Aaradhana Sahu <quic_aarasahu@quicinc.com> wrote:

> Currently, if we set raw mode as encap type, packets are sent
> in native wifi mode which is default mode. This is caused by
> no check being present for raw mode in ath12k_dp_tx_get_encap_type
> function, so it's always going in native wifi mode.
> 
> Fix, this issue by adding check condition for raw mode.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

e93bbd65547e wifi: ath12k: fix packets are sent in native wifi mode while we set raw mode
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
index fd8d850f9818..d3c7c76d6b75 100644
--- a/drivers/net/wireless/ath/ath12k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
@@ -13,6 +13,10 @@  static enum hal_tcl_encap_type
 ath12k_dp_tx_get_encap_type(struct ath12k_vif *arvif, struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
+	struct ath12k_base *ab = arvif->ar->ab;
+
+	if (test_bit(ATH12K_FLAG_RAW_MODE, &ab->dev_flags))
+		return HAL_TCL_ENCAP_TYPE_RAW;
 
 	if (tx_info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)
 		return HAL_TCL_ENCAP_TYPE_ETHERNET;