From e9af116d9b7279a76786531434c8539e5f389617 Mon Sep 17 00:00:00 2001 From: Hanumanth Reddy Pothula Date: Wed, 13 Jun 2018 13:41:44 +0530 Subject: [PATCH] qcacld-3.0: Initialize start logging object While processing WIFI_LOGGER_START vendor command, HDD passes uninitialized 'user_triggered' variable(member of start logging object), to down layers, which may lead to enable packet logging, not in the way user intended. Make sure valid data is passed to down layers by initialize start logging object and assigning valid data to the user_triggered variable. Change-Id: I38ac09a6b658eefb52ab113c885ce3ab54f36535 CRs-Fixed: 2235153 --- core/hdd/src/wlan_hdd_cfg80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 85ab99a417..1ed3161052 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -7583,7 +7583,7 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy, QDF_STATUS status; struct hdd_context *hdd_ctx = wiphy_priv(wiphy); struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX + 1]; - struct sir_wifi_start_log start_log; + struct sir_wifi_start_log start_log = { 0 }; hdd_enter_dev(wdev->netdev); @@ -7635,6 +7635,8 @@ static int __wlan_hdd_cfg80211_wifi_logger_start(struct wiphy *wiphy, start_log.is_iwpriv_command = nla_get_u32( tb[QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_FLAGS]); + start_log.user_triggered = 1; + /* size is buff size which can be set using iwpriv command*/ start_log.size = 0; start_log.is_pktlog_buff_clear = false;