From patchwork Thu May 25 00:11:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9747217 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC0F86032B for ; Thu, 25 May 2017 00:11:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE9FD205F8 for ; Thu, 25 May 2017 00:11:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B34BA26E98; Thu, 25 May 2017 00:11:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AB9726E54 for ; Thu, 25 May 2017 00:11:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164762AbdEYALt (ORCPT ); Wed, 24 May 2017 20:11:49 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:36147 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164706AbdEYALl (ORCPT ); Wed, 24 May 2017 20:11:41 -0400 Received: by mail-pf0-f169.google.com with SMTP id m17so150175208pfg.3 for ; Wed, 24 May 2017 17:11:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qHDkXS/h2mp5oMoYzlBKey7w9nYfezgwjGslihRHy/Q=; b=g4kx8Z2zuUbHeZrjVHDnX5HIZXGzUvK8X9Buuwzc8OG79i1EFzdkoejz4xe+uhHn9R ftErFCs4WeTx2ZYxLxFELOuV9TCrrSeEjUgicgi7gfknO5SaJVc83wB1zPUgPTaHrjtN ufbB9walKTtmtuZi+vo5KDMo3MMRmF650mydA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qHDkXS/h2mp5oMoYzlBKey7w9nYfezgwjGslihRHy/Q=; b=WwvmtrLpOAiJbjEHL3sZn5BEtujcH7bCYyCEKoRrSG8OLuYsBonl5e5VnwPrnOPv+n ywaogc9SzTAk8a9ZtC8QkSncwf337oOCGz7p+dLsn+O5eyCOTIgwXf5S+kK/AKlUP+jD qp8S3B4LDdGBpELrRShc9H9asYrFc+cOhLtBQlsv5ma3Bwc768q4zYkhezhNtEtqZJrz gZrLRhr6PL82aVrxzctGNcIed5XezIbfhvfmsWYa21d2qXmzw5WmMpgyluNjtqG1fJDX nWh7LRIiqPg52eF7msnYy4P/CB7DMMaRt71JkdlzrbgEmtqWxTOC9hd3iDdGO1zh4W/I 5x8A== X-Gm-Message-State: AODbwcA5TDQdBaPNpVFYL1mL7NtIqxKqZC1fEaSSEZSsmy9x39QdPTLc xOxylJRU7pOdCchx X-Received: by 10.98.193.129 with SMTP id i123mr41691233pfg.203.1495671100609; Wed, 24 May 2017 17:11:40 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id s23sm9823692pfg.81.2017.05.24.17.11.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 17:11:40 -0700 (PDT) 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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);