Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650048 > unrolled thread

[PATCH 08/14] mwifiex: ensure "disable auto DS" struct is initialized

Started byBrian Norris <briannorris@chromium.org>
First post2017-05-25 02:20 +0200
Last post2017-05-25 02:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 08/14] mwifiex: ensure "disable auto DS" struct is initialized Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200

#1650048 — [PATCH 08/14] mwifiex: ensure "disable auto DS" struct is initialized

FromBrian Norris <briannorris@chromium.org>
Date2017-05-25 02:20 +0200
Subject[PATCH 08/14] mwifiex: ensure "disable auto DS" struct is initialized
Message-ID<tKOFs-Qx-15@gated-at.bofh.it>
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 <briannorris@chromium.org>
---
 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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web