summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath11k/dp_tx.c
diff options
context:
space:
mode:
authorKarthikeyan Periyasamy <periyasa@codeaurora.org>2021-07-21 00:31:47 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-09-16 12:15:40 +0300
commite20cfa3b62aeb1b5fc5ffa86a007af97f9954767 (patch)
tree984d53574d598cc3c989010897980483c249a7ae /drivers/net/wireless/ath/ath11k/dp_tx.c
parent34c67dc366419e06129dad0f32f521842bdff9bc (diff)
downloadlinux-e20cfa3b62aeb1b5fc5ffa86a007af97f9954767.tar.xz
ath11k: fix 4addr multicast packet tx
In 4addr, AP wired backbone to STA wired backbone ping fails due to ARP request not getting answered. Here 4addr ARP multicast packet is sent in 3addr, so that 4addr STA not honouring the 3addr ARP multicast packet. Fix this issue by sending out multicast packet in 4addr format, firmware expects peer meta flag instead of vdev meta flag in Tx descriptor. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01641-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy <periyasa@codeaurora.org> Signed-off-by: Jouni Malinen <jouni@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210720213147.90042-2-jouni@codeaurora.org
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp_tx.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/dp_tx.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 8bba5234f81f..3acdd4050d5b 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -78,7 +78,7 @@ enum hal_encrypt_type ath11k_dp_tx_get_encrypt_type(u32 cipher)
}
int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
- struct sk_buff *skb)
+ struct ath11k_sta *arsta, struct sk_buff *skb)
{
struct ath11k_base *ab = ar->ab;
struct ath11k_dp *dp = &ab->dp;
@@ -145,7 +145,15 @@ tcl_ring_sel:
FIELD_PREP(DP_TX_DESC_ID_MSDU_ID, ret) |
FIELD_PREP(DP_TX_DESC_ID_POOL_ID, pool_id);
ti.encap_type = ath11k_dp_tx_get_encap_type(arvif, skb);
- ti.meta_data_flags = arvif->tcl_metadata;
+
+ if (ieee80211_has_a4(hdr->frame_control) &&
+ is_multicast_ether_addr(hdr->addr3) && arsta &&
+ arsta->use_4addr_set) {
+ ti.meta_data_flags = arsta->tcl_metadata;
+ ti.flags0 |= FIELD_PREP(HAL_TCL_DATA_CMD_INFO1_TO_FW, 1);
+ } else {
+ ti.meta_data_flags = arvif->tcl_metadata;
+ }
if (ti.encap_type == HAL_TCL_ENCAP_TYPE_RAW) {
if (skb_cb->flags & ATH11K_SKB_CIPHER_SET) {