From patchwork Tue Jul 25 01:13:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9861021 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 1BED56038C for ; Tue, 25 Jul 2017 01:20:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E3FB2837D for ; Tue, 25 Jul 2017 01:20:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0237B285A2; Tue, 25 Jul 2017 01:20:04 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable 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 BB4622837D for ; Tue, 25 Jul 2017 01:20:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932342AbdGYBSO (ORCPT ); Mon, 24 Jul 2017 21:18:14 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:33614 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756753AbdGYBOS (ORCPT ); Mon, 24 Jul 2017 21:14:18 -0400 Received: by mail-pf0-f174.google.com with SMTP id s70so53108408pfs.0 for ; Mon, 24 Jul 2017 18:14:18 -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=HPIacOkT1QV9aaxuUMxGufWvdfF/Wtz/mvGmV2qfiVA=; b=L7OVthPtyydfdYitP3ZaInbTqH6jQpNUlAFqwzfeUqwqSXrAn2zh2LI9PUyTVtOdG7 woasYCky27PAWiLpnMkCQ5baj6eK7mTmFj/UsY8jCUJ51Jb9eQeoOxsiosvpW7tJUQ2L C41nwywHAazMiDaO0vLlchb8xn0mBIKEBVbf4= 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=HPIacOkT1QV9aaxuUMxGufWvdfF/Wtz/mvGmV2qfiVA=; b=gDhFWb+0FLwMtV3AN8Pjb+4nBVYsnxyqj8zYQtTopj5+fIeZEPdohpAAdLasI1KwHb uFnoJ08gaXx8TvI1RSP7j02bo1G5JWsa2mW+RGtQ0y7wrQeiQgV8kq6nzfTQN2aMVn0y ROOE8ty2KfIbiqBi4sFYrMlScNr6hpcLqxfTaspMlE1Q0ud4876Mh60nkffRSNpeBGF8 sPa+RKr5ghfB6jiK3fr/POjdMj+KzKm0U3S8IUnfKlxAKn++J6sdT55S3VM6pj4nZX7v V3LUmazSwegXuROUIFo4vUoWTMUJZClBeTu7zRFxxg4qd8fsCzY6sUMtHsNVpFt9CT8e u9NQ== X-Gm-Message-State: AIVw113K5/GY58u3vbCXxVgcYyytABxiXAc55hr8HR/G7HkqbdOZoqSF cQBBGjeNWr1UyejN X-Received: by 10.98.18.131 with SMTP id 3mr17631892pfs.19.1500945258428; Mon, 24 Jul 2017 18:14:18 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.113.17]) by smtp.gmail.com with ESMTPSA id h123sm21497036pgc.36.2017.07.24.18.14.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Jul 2017 18:14:17 -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 v2 08/20] mwifiex: ensure "disable auto DS" struct is initialized Date: Mon, 24 Jul 2017 18:13:24 -0700 Message-Id: <20170725011336.99993-9-briannorris@chromium.org> X-Mailer: git-send-email 2.14.0.rc0.284.gd933b75aa4-goog In-Reply-To: <20170725011336.99993-1-briannorris@chromium.org> References: <20170725011336.99993-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 --- v2: no change --- 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);