mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacmn: fix incorrect radiotap rssi for monitor frame
For lithium based chip, the rssi_comb value fetched from monitor buffer TLV is in unit dBm already, if plus noise_floor value in qdf_nbuf_update_radiotap() again, then the rssi showed in wireshark will be incorrect. Convert rssi_comb to unit dB and not impact legacy chip in qdf_nbuf_update_radiotap(). Change-Id: I889a15f39ebc639386405fb0aae1909c0cce75e0 CRs-Fixed: 2844896
This commit is contained in:
parent
3eccecbcd8
commit
ef24abebc8
1 changed files with 24 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1411,6 +1411,27 @@ qdf_nbuf_t dp_rx_mon_restitch_mpdu(struct dp_soc *soc, uint32_t mac_id,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef DP_MON_RSSI_IN_DBM
|
||||
/*
|
||||
* dp_rx_mon_rssi_convert(): convert rssi_comb from unit dBm to dB
|
||||
* to match with radiotap further conversion requirement
|
||||
* @rx_status: monitor mode rx status pointer
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
static inline
|
||||
void dp_rx_mon_rssi_convert(struct mon_rx_status *rx_status)
|
||||
{
|
||||
rx_status->rssi_comb = rx_status->rssi_comb -
|
||||
rx_status->chan_noise_floor;
|
||||
}
|
||||
#else
|
||||
static inline
|
||||
void dp_rx_mon_rssi_convert(struct mon_rx_status *rx_status)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* dp_rx_mon_deliver(): function to deliver packets to stack
|
||||
* @soc: DP soc
|
||||
|
|
@ -1448,6 +1469,8 @@ QDF_STATUS dp_rx_mon_deliver(struct dp_soc *soc, uint32_t mac_id,
|
|||
pdev->ppdu_info.rx_status.device_id = soc->device_id;
|
||||
pdev->ppdu_info.rx_status.chan_noise_floor =
|
||||
pdev->chan_noise_floor;
|
||||
/* convert rssi_comb from dBm to positive dB value */
|
||||
dp_rx_mon_rssi_convert(&pdev->ppdu_info.rx_status);
|
||||
|
||||
dp_handle_tx_capture(soc, pdev, mon_mpdu);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue