Skip to content

Commit a1eb567

Browse files
Sarika Sharmagregkh
authored andcommitted
wifi: ath12k: correctly handle mcast packets for clients
commit 4541b0c upstream. Currently, RX is_mcbc bit is set for packets sent from client as destination address (DA) is multicast/broadcast address, but packets are actually unicast as receiver address (RA) is not multicast address. Hence, packets are not handled properly due to this is_mcbc bit. Therefore, reset the is_mcbc bit if interface type is AP. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sarika Sharma <[email protected]> Reviewed-by: Vasanthakumar Thiagarajan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jeff Johnson <[email protected]> [ Adjust context ] Signed-off-by: Oliver Sedlbauer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent a017b98 commit a1eb567

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,6 +2214,11 @@ static void ath12k_dp_rx_h_mpdu(struct ath12k *ar,
22142214
spin_lock_bh(&ar->ab->base_lock);
22152215
peer = ath12k_dp_rx_h_find_peer(ar->ab, msdu);
22162216
if (peer) {
2217+
/* resetting mcbc bit because mcbc packets are unicast
2218+
* packets only for AP as STA sends unicast packets.
2219+
*/
2220+
rxcb->is_mcbc = rxcb->is_mcbc && !peer->ucast_ra_only;
2221+
22172222
if (rxcb->is_mcbc)
22182223
enctype = peer->sec_type_grp;
22192224
else

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,9 @@ int ath12k_peer_create(struct ath12k *ar, struct ath12k_vif *arvif,
331331
arvif->ast_idx = peer->hw_peer_id;
332332
}
333333

334+
if (arvif->vif->type == NL80211_IFTYPE_AP)
335+
peer->ucast_ra_only = true;
336+
334337
peer->sec_type = HAL_ENCRYPT_TYPE_OPEN;
335338
peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN;
336339

drivers/net/wireless/ath/ath12k/peer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ struct ath12k_peer {
4747

4848
/* protected by ab->data_lock */
4949
bool dp_setup_done;
50+
51+
bool ucast_ra_only;
5052
};
5153

5254
void ath12k_peer_unmap_event(struct ath12k_base *ab, u16 peer_id);

0 commit comments

Comments
 (0)