diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 490b19edfe..14a0037ba1 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -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; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index a26cfe9635..e6d758c4ba 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -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);