qcacld-3.0: refine pktlog enable logic in KPI test

PKTLOG can be enabled from both 802.11 and WEXT, customer
integrates pktlog ctrl in script and is toggled frequently.
This leads host pktlog status variable and FW status out of
sync. Host bus vote logic need disable pktlog when TPUT is
high, based on host status. At last, it will not take effect,
KPI continues dropped by PKTLOG.

Change-Id: Ifad7b53060b6046361621bf927c99b6b66e0c278
CRs-Fixed: 2715362
Dieser Commit ist enthalten in:
Yu Tian
2020-06-18 11:11:46 +08:00
committet von nshrivas
Ursprung ee0a4c12c9
Commit 8b371301f4
2 geänderte Dateien mit 25 neuen und 18 gelöschten Zeilen

Datei anzeigen

@@ -10064,13 +10064,15 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
return 0;
}
if (hdd_ctx->is_pktlog_enabled &&
(start_log.verbose_level == WLAN_LOG_LEVEL_ACTIVE))
return 0;
if (start_log.ring_id == RING_ID_PER_PACKET_STATS) {
if (hdd_ctx->is_pktlog_enabled &&
(start_log.verbose_level == WLAN_LOG_LEVEL_ACTIVE))
return 0;
if ((!hdd_ctx->is_pktlog_enabled) &&
(start_log.verbose_level != WLAN_LOG_LEVEL_ACTIVE))
return 0;
if ((!hdd_ctx->is_pktlog_enabled) &&
(start_log.verbose_level != WLAN_LOG_LEVEL_ACTIVE))
return 0;
}
mac_handle = hdd_ctx->mac_handle;
status = sme_wifi_start_logger(mac_handle, start_log);
@@ -10080,10 +10082,12 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy,
return -EINVAL;
}
if (start_log.verbose_level != WLAN_LOG_LEVEL_ACTIVE)
hdd_ctx->is_pktlog_enabled = true;
else
hdd_ctx->is_pktlog_enabled = false;
if (start_log.ring_id == RING_ID_PER_PACKET_STATS) {
if (start_log.verbose_level == WLAN_LOG_LEVEL_ACTIVE)
hdd_ctx->is_pktlog_enabled = true;
else
hdd_ctx->is_pktlog_enabled = false;
}
return 0;
}

Datei anzeigen

@@ -9136,6 +9136,7 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
if (hdd_ctx->cur_vote_level != next_vote_level) {
hdd_debug("BW Vote level %d, tx_packets: %lld, rx_packets: %lld",
next_vote_level, tx_packets, rx_packets);
hdd_ctx->cur_vote_level = next_vote_level;
vote_level_change = true;
@@ -9194,14 +9195,16 @@ static void hdd_pld_request_bus_bandwidth(struct hdd_context *hdd_ctx,
else
hdd_disable_rx_ol_for_low_tput(hdd_ctx, false);
if (hdd_ctx->is_pktlog_enabled) {
if (next_vote_level >= PLD_BUS_WIDTH_HIGH)
hdd_pktlog_enable_disable(hdd_ctx, false,
0, 0);
else
hdd_pktlog_enable_disable(hdd_ctx, true,
0, 0);
}
/*
* force disable pktlog and only re-enable based
* on ini config
*/
if (next_vote_level >= PLD_BUS_WIDTH_HIGH)
hdd_pktlog_enable_disable(hdd_ctx, false,
0, 0);
else if (cds_is_packet_log_enabled())
hdd_pktlog_enable_disable(hdd_ctx, true,
0, 0);
}
qdf_dp_trace_apply_tput_policy(dptrace_high_tput_req);