qcacmn: Fix the use of the incorrect rx pkt tlv length
Currently the monitor mode processing assumes the rx pkt tlv to be consisting of RX_PACKET_HEADER tlv. This assumption is incorrect in case of sta+monitor mode, where the RX_PACKET_HDR tlv has not been subscribed. Due to the above incorrect assumption, a certain portion of the actual payload is being discarded, when the rx_pkt_hdr tlvs are stripped off from the received buffer. To mitigate this issue, use the rx_pkt_tlv length based on the tlvs which are enabled, and configured to the rxdma for reception. Change-Id: I8f29db85bbd50316e3c2073ae9a2e79fd724be05 CRs-Fixed: 3318038
This commit is contained in:

committed by
Madan Koyyalamudi

父節點
31f0994955
當前提交
6271fe1a98
@@ -163,6 +163,18 @@ dp_rx_mon_link_desc_return(struct dp_pdev *dp_pdev,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
|
||||
static inline uint16_t dp_rx_mon_get_rx_pkt_tlv_size(struct dp_soc *soc)
|
||||
{
|
||||
return soc->curr_rx_pkt_tlv_size;
|
||||
}
|
||||
#else
|
||||
static inline uint16_t dp_rx_mon_get_rx_pkt_tlv_size(struct dp_soc *soc)
|
||||
{
|
||||
return soc->rx_mon_pkt_tlv_size;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* dp_mon_adjust_frag_len() - MPDU and MSDU may spread across
|
||||
* multiple nbufs. This function
|
||||
@@ -712,7 +724,7 @@ dp_rx_mon_parse_desc_buffer(struct dp_soc *dp_soc,
|
||||
bool *is_frag_non_raw_p, void *data)
|
||||
{
|
||||
struct hal_rx_mon_dest_buf_info frame_info;
|
||||
uint32_t rx_pkt_tlv_len = dp_soc->rx_mon_pkt_tlv_size;
|
||||
uint32_t rx_pkt_tlv_len = dp_rx_mon_get_rx_pkt_tlv_size(dp_soc);
|
||||
|
||||
/*
|
||||
* HW structures call this L3 header padding
|
||||
|
@@ -389,7 +389,7 @@ dp_rx_mon_mpdu_pop(struct dp_soc *soc, uint32_t mac_id,
|
||||
total_frag_len, frag_len,
|
||||
msdu_list.msdu_info[i].msdu_flags);
|
||||
|
||||
rx_pkt_offset = soc->rx_mon_pkt_tlv_size;
|
||||
rx_pkt_offset = dp_rx_mon_get_rx_pkt_tlv_size(soc);
|
||||
|
||||
rx_buf_size = rx_pkt_offset + l2_hdr_offset
|
||||
+ frag_len;
|
||||
@@ -1436,7 +1436,7 @@ void dp_rx_msdus_set_payload(struct dp_soc *soc, qdf_nbuf_t msdu,
|
||||
uint32_t rx_pkt_offset;
|
||||
|
||||
data = qdf_nbuf_data(msdu);
|
||||
rx_pkt_offset = soc->rx_mon_pkt_tlv_size;
|
||||
rx_pkt_offset = dp_rx_mon_get_rx_pkt_tlv_size(soc);
|
||||
qdf_nbuf_pull_head(msdu, rx_pkt_offset + l2_hdr_offset);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user