qcacmn: Get the correct MSDU length in the RX path

Skb under panic issue is seen when a packet comes via RX err path,
MSDU length read by SW is coming as 0 and leaving no space for skb_push
in buffer, data is moving beyond the head and causing the issue.
MSDU length is read by generic API which is architecture-independent,
hence the struct size for one architecture is different from another
architecture.

FIX is to get the MSDU length by architecture-specific API.

Change-Id: I5a6259034e5e06ae9ce7ba6b135b44f2849f2fd9
CRs-Fixed: 3235636
Tento commit je obsažen v:
Devender Kumar
2022-07-04 20:39:59 +05:30
odevzdal Madan Koyyalamudi
rodič 81d963fc50
revize e198badbe6
5 změnil soubory, kde provedl 105 přidání a 0 odebrání

Zobrazit soubor

@@ -206,6 +206,25 @@ static uint32_t hal_rx_msdu_start_nss_get_9000(uint8_t *buf)
return qdf_get_hweight8(mimo_ss_bitmap);
}
/**
* hal_rx_msdu_start_get_len_9000(): API to get the MSDU length
* from rx_msdu_start TLV
*
* @ buf: pointer to the start of RX PKT TLV headers
* Return: (uint32_t)msdu length
*/
static uint32_t hal_rx_msdu_start_get_len_9000(uint8_t *buf)
{
struct rx_pkt_tlvs *pkt_tlvs = (struct rx_pkt_tlvs *)buf;
struct rx_msdu_start *msdu_start =
&pkt_tlvs->msdu_start_tlv.rx_msdu_start;
uint32_t msdu_len;
msdu_len = HAL_RX_MSDU_START_MSDU_LEN_GET(msdu_start);
return msdu_len;
}
/**
* hal_rx_mon_hw_desc_get_mpdu_status_9000(): Retrieve MPDU status
*
@@ -1946,6 +1965,8 @@ static void hal_hw_txrx_ops_attach_qcn9000(struct hal_soc *hal_soc)
hal_soc->ops->hal_setup_link_idle_list =
hal_setup_link_idle_list_generic_li;
hal_soc->ops->hal_compute_reo_remap_ix0 = NULL;
hal_soc->ops->hal_rx_tlv_msdu_len_get =
hal_rx_msdu_start_get_len_9000;
};
struct hal_hw_srng_config hw_srng_table_9000[] = {