qcacld-3.0: Fix monitor mode radiotap bw and rssi info
For vht bw, there is a transformation of rx_status->vht_flag_values2 in qdf_nbuf_update_radiotap_vht_flags(), so strictly copy rx_status->vht_flag_values2 from rx_desc, do not transform twice which leads to wrong vht bw. For rssi, only show first mpdu rssi info in a ppdu, firmware reports -86 rssi_comb for mpdus other than the first one, calculate ANTSIGNAL by adding with noise floor will show a wrong rssi for those mpdus. Change-Id: I776d85cea2cf0f48beeed351ed0643699d805d54 CRs-Fixed: 2588768
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
c1020daa87
commit
8edf8c6c17
@@ -47,6 +47,8 @@ enum {
|
|||||||
HW_RX_DECAP_FORMAT_ETH2,
|
HW_RX_DECAP_FORMAT_ETH2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct mon_rx_status g_ppdu_rx_status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htt_rx_mon_note_capture_channel() - Make note of channel to update in
|
* htt_rx_mon_note_capture_channel() - Make note of channel to update in
|
||||||
* radiotap
|
* radiotap
|
||||||
@@ -423,12 +425,7 @@ static void htt_mon_rx_get_phy_info(struct htt_host_rx_desc_base *rx_desc,
|
|||||||
rx_status->ht_flags = ht_flags;
|
rx_status->ht_flags = ht_flags;
|
||||||
rx_status->vht_flags = vht_flags;
|
rx_status->vht_flags = vht_flags;
|
||||||
rx_status->rtap_flags |= ((preamble == SHORT_PREAMBLE) ? BIT(1) : 0);
|
rx_status->rtap_flags |= ((preamble == SHORT_PREAMBLE) ? BIT(1) : 0);
|
||||||
if (bw == 0)
|
rx_status->vht_flag_values2 = bw;
|
||||||
rx_status->vht_flag_values2 = 0;
|
|
||||||
else if (bw == 1)
|
|
||||||
rx_status->vht_flag_values2 = 1;
|
|
||||||
else if (bw == 2)
|
|
||||||
rx_status->vht_flag_values2 = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -517,7 +514,6 @@ int htt_rx_mon_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
|
|||||||
uint32_t *msg_word;
|
uint32_t *msg_word;
|
||||||
uint32_t msdu_count;
|
uint32_t msdu_count;
|
||||||
struct htt_host_rx_desc_base *rx_desc;
|
struct htt_host_rx_desc_base *rx_desc;
|
||||||
struct mon_rx_status rx_status = {0};
|
|
||||||
uint32_t amsdu_len;
|
uint32_t amsdu_len;
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
uint32_t last_frag;
|
uint32_t last_frag;
|
||||||
@@ -628,7 +624,12 @@ int htt_rx_mon_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
|
|||||||
* Make the netbuf's data pointer point to the payload rather
|
* Make the netbuf's data pointer point to the payload rather
|
||||||
* than the descriptor.
|
* than the descriptor.
|
||||||
*/
|
*/
|
||||||
htt_rx_mon_get_rx_status(pdev, rx_desc, &rx_status);
|
if (rx_desc->attention.first_mpdu) {
|
||||||
|
memset(&g_ppdu_rx_status, 0,
|
||||||
|
sizeof(struct mon_rx_status));
|
||||||
|
htt_rx_mon_get_rx_status(pdev, rx_desc,
|
||||||
|
&g_ppdu_rx_status);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* For certain platform, 350 bytes of headroom is already
|
* For certain platform, 350 bytes of headroom is already
|
||||||
* appended to accommodate radiotap header but
|
* appended to accommodate radiotap header but
|
||||||
@@ -664,7 +665,7 @@ int htt_rx_mon_amsdu_rx_in_order_pop_ll(htt_pdev_handle pdev,
|
|||||||
*/
|
*/
|
||||||
if (qdf_nbuf_head(msdu) == qdf_nbuf_data(msdu))
|
if (qdf_nbuf_head(msdu) == qdf_nbuf_data(msdu))
|
||||||
qdf_nbuf_pull_head(msdu, HTT_RX_STD_DESC_RESERVATION);
|
qdf_nbuf_pull_head(msdu, HTT_RX_STD_DESC_RESERVATION);
|
||||||
qdf_nbuf_update_radiotap(&rx_status, msdu,
|
qdf_nbuf_update_radiotap(&g_ppdu_rx_status, msdu,
|
||||||
HTT_RX_STD_DESC_RESERVATION);
|
HTT_RX_STD_DESC_RESERVATION);
|
||||||
amsdu_len = HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET(*(msg_word +
|
amsdu_len = HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET(*(msg_word +
|
||||||
NEXT_FIELD_OFFSET_IN32));
|
NEXT_FIELD_OFFSET_IN32));
|
||||||
|
Reference in New Issue
Block a user