From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164811AbdEYAM1 (ORCPT ); Wed, 24 May 2017 20:12:27 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:36146 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164737AbdEYALq (ORCPT ); Wed, 24 May 2017 20:11:46 -0400 From: Brian Norris To: Ganapathi Bhat , Nishant Sarmukadam Cc: , Dmitry Torokhov , Amitkumar Karwar , Kalle Valo , linux-wireless@vger.kernel.org, Brian Norris Subject: [PATCH 08/14] mwifiex: ensure "disable auto DS" struct is initialized Date: Wed, 24 May 2017 17:11:13 -0700 Message-Id: <20170525001119.64791-8-briannorris@chromium.org> X-Mailer: git-send-email 2.13.0.219.gdb65acc882-goog In-Reply-To: <20170525001119.64791-1-briannorris@chromium.org> References: <20170525001119.64791-1-briannorris@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The .idle_time field *should* be unused, but technically, we're allowing unitialized stack garbage to pass all the way through to the firmware host command. Let's zero it out instead. Signed-off-by: Brian Norris --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index 42997e05d90f..43ecd621d1ef 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -654,9 +654,9 @@ int mwifiex_get_bss_info(struct mwifiex_private *priv, */ int mwifiex_disable_auto_ds(struct mwifiex_private *priv) { - struct mwifiex_ds_auto_ds auto_ds; - - auto_ds.auto_ds = DEEP_SLEEP_OFF; + struct mwifiex_ds_auto_ds auto_ds = { + .auto_ds = DEEP_SLEEP_OFF, + }; return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH, DIS_AUTO_PS, BITMAP_AUTO_DS, &auto_ds, true); -- 2.13.0.219.gdb65acc882-goog