Merge "qcacmn: Code movement to enable multipass support without WDS"

This commit is contained in:
Linux Build Service Account
2023-04-21 09:15:21 -07:00
committed by Gerrit - the friendly Code Review server
6 fájl változott, egészen pontosan 396 új sor hozzáadva és 388 régi sor törölve

Fájl megtekintése

@@ -42,6 +42,7 @@
#ifdef DP_RATETABLE_SUPPORT
#include "dp_ratetable.h"
#endif
#include "enet.h"
#ifndef WLAN_SOFTUMAC_SUPPORT /* WLAN_SOFTUMAC_SUPPORT */
@@ -3299,3 +3300,33 @@ bool dp_rx_deliver_special_frame(struct dp_soc *soc,
return false;
}
#endif
#ifdef QCA_MULTIPASS_SUPPORT
bool dp_rx_multipass_process(struct dp_txrx_peer *txrx_peer, qdf_nbuf_t nbuf,
uint8_t tid)
{
struct vlan_ethhdr *vethhdrp;
if (qdf_unlikely(!txrx_peer->vlan_id))
return true;
vethhdrp = (struct vlan_ethhdr *)qdf_nbuf_data(nbuf);
/*
* h_vlan_proto & h_vlan_TCI should be 0x8100 & zero respectively
* as it is expected to be padded by 0
* return false if frame doesn't have above tag so that caller will
* drop the frame.
*/
if (qdf_unlikely(vethhdrp->h_vlan_proto != htons(QDF_ETH_TYPE_8021Q)) ||
qdf_unlikely(vethhdrp->h_vlan_TCI != 0))
return false;
vethhdrp->h_vlan_TCI = htons(((tid & 0x7) << VLAN_PRIO_SHIFT) |
(txrx_peer->vlan_id & VLAN_VID_MASK));
if (vethhdrp->h_vlan_encapsulated_proto == htons(ETHERTYPE_PAE))
dp_tx_remove_vlan_tag(txrx_peer->vdev, nbuf);
return true;
}
#endif /* QCA_MULTIPASS_SUPPORT */