Przeglądaj źródła

qcacld-3.0: Fix signal strength for mgmt rx pkts in pkt capture

In qdf_nbuf_update_radiotap rssi is filled based on flag
DP_MON_RSSI_IN_DBM. When this flag is enabled
qdf_nbuf_update_radiotap is expecting rssi value in dbm.

So fill rssi_comb based on flag DP_MON_RSSI_IN_DBM.

Change-Id: I9a6542cc27a5e19072e89ae78ff05f4392c64157
CRs-Fixed: 3083133
Vulupala Shashank Reddy 3 lat temu
rodzic
commit
3c92b7d541

+ 9 - 1
components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c

@@ -518,6 +518,14 @@ pkt_capture_is_beacon_forward_enable(struct wlan_objmgr_vdev *vdev,
 	return true;
 }
 
+#ifdef DP_MON_RSSI_IN_DBM
+#define PKT_CAPTURE_FILL_RSSI(rx_params) \
+((rx_params)->snr + NORMALIZED_TO_NOISE_FLOOR)
+#else
+#define PKT_CAPTURE_FILL_RSSI(rx_status) \
+((rx_params)->snr)
+#endif
+
 /**
  * process_pktcapture_mgmt_rx_data_cb() -  process management rx packets
  * @rx_params: mgmt rx event params
@@ -621,8 +629,8 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc,
 	/* rx_params->rate is in Kbps, convert into Mbps */
 	txrx_status.rate = (rx_params->rate / 1000);
 	txrx_status.ant_signal_db = rx_params->snr;
-	txrx_status.rssi_comb = rx_params->snr;
 	txrx_status.chan_noise_floor = NORMALIZED_TO_NOISE_FLOOR;
+	txrx_status.rssi_comb = PKT_CAPTURE_FILL_RSSI(rx_params);
 	txrx_status.nr_ant = 1;
 	txrx_status.rtap_flags |=
 		((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0);