qcacmn: Add hal_rx_msdu_end_l3_hdr_padding_get API

Implement hal_rx_msdu_end_l3_hdr_padding_get API
based on the chipset as the macro to retrieve
sa_idx value is chipset dependent.

Change-Id: Ice1fc2d70e339dc1d80fa6f34f37c5a7aa074be5
CRs-Fixed: 2522133
This commit is contained in:
Venkata Sharath Chandra Manchala
2019-09-20 17:25:21 -07:00
committed by nshrivas
orang tua 43d563277d
melakukan f05b2ae5c2
16 mengubah file dengan 164 tambahan dan 19 penghapusan

Melihat File

@@ -455,7 +455,7 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
* header begins.
*/
l2_hdr_offset =
hal_rx_msdu_end_l3_hdr_padding_get(data);
hal_rx_msdu_end_l3_hdr_padding_get(soc->hal_soc, data);
rx_buf_size = rx_pkt_offset + l2_hdr_offset
+ frag_len;
@@ -529,14 +529,14 @@ next_msdu:
}
static inline
void dp_rx_msdus_set_payload(qdf_nbuf_t msdu)
void dp_rx_msdus_set_payload(struct dp_soc *soc, qdf_nbuf_t msdu)
{
uint8_t *data;
uint32_t rx_pkt_offset, l2_hdr_offset;
data = qdf_nbuf_data(msdu);
rx_pkt_offset = HAL_RX_MON_HW_RX_DESC_SIZE();
l2_hdr_offset = hal_rx_msdu_end_l3_hdr_padding_get(data);
l2_hdr_offset = hal_rx_msdu_end_l3_hdr_padding_get(soc->hal_soc, data);
qdf_nbuf_pull_head(msdu, rx_pkt_offset + l2_hdr_offset);
}
@@ -596,7 +596,7 @@ qdf_nbuf_t dp_rx_mon_restitch_mpdu_from_msdus(struct dp_soc *soc,
* - but the RX status is usually enough
*/
dp_rx_msdus_set_payload(head_msdu);
dp_rx_msdus_set_payload(soc, head_msdu);
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
"[%s][%d] decap format raw head %pK head->next %pK last_msdu %pK last_msdu->next %pK",
@@ -613,7 +613,7 @@ qdf_nbuf_t dp_rx_mon_restitch_mpdu_from_msdus(struct dp_soc *soc,
while (msdu) {
dp_rx_msdus_set_payload(msdu);
dp_rx_msdus_set_payload(soc, msdu);
if (is_first_frag) {
is_first_frag = 0;
@@ -772,7 +772,7 @@ qdf_nbuf_t dp_rx_mon_restitch_mpdu_from_msdus(struct dp_soc *soc,
dest += amsdu_pad;
qdf_mem_copy(dest, hdr_desc, msdu_llc_len);
dp_rx_msdus_set_payload(msdu);
dp_rx_msdus_set_payload(soc, msdu);
/* Push the MSDU buffer beyond the decap header */
qdf_nbuf_pull_head(msdu, decap_hdr_pull_bytes);