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
This commit is contained in:
Hanumanth Reddy Pothula 2018-06-13 13:41:44 +05:30 committed by nshrivas
parent 275c084ea0
commit e9af116d9b

View File

@ -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;