From patchwork Tue Aug 1 01:38:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 9873551 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 E61B460365 for ; Tue, 1 Aug 2017 01:38:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAE3D28632 for ; Tue, 1 Aug 2017 01:38:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B050128622; Tue, 1 Aug 2017 01:38:35 +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, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 B9E142863E for ; Tue, 1 Aug 2017 01:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751352AbdHABic (ORCPT ); Mon, 31 Jul 2017 21:38:32 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:38838 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751106AbdHABib (ORCPT ); Mon, 31 Jul 2017 21:38:31 -0400 Received: by mail-pf0-f195.google.com with SMTP id e3so313919pfc.5 for ; Mon, 31 Jul 2017 18:38:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ns9jXESBkDhLg56aevca/MXUGS54PPUqxIpUoDUG0BA=; b=a2hVSMt2a/D1T/2vdyb9kwGAVjFa9/bJjXR7SsWYO9Gl/ER00PRTyk996QcRArroQr Jxs8zQiMNnnBmct1HvYbk2XiYDSearEK71lqFoq60QE5mbppAahZ8Ym4X2pUyWf8RiCO tKbH1nXT0GIfZByNbpyUkr3IpbH+bCJ0JZ778kL/hiZ1A1YTjVriKkqZGthLCfWIx9Wl nURx8gb1JBn19KPxSJOXxByHrZpwTOUttN6QQvaXg2rQn2/8aYhUB/RfssLePZ0+sLga M8uleKY4lq8Fjjgs8tfXVMDxoTbVwCe5msyQb/wl0HhyIVZD+vcBuH5oCD6sm8wHM3Tx RKKw== 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; bh=ns9jXESBkDhLg56aevca/MXUGS54PPUqxIpUoDUG0BA=; b=qaWAo8fu54WRYv7bmDmb0Pzcuca/GpWcMliHN+RPPQ2b4Xg/gI8XuvX/+G6YBFXC0X yKs8gErNHsuanKQv0TYJhBWC0OIY1B+wHMm4yMfSPBF0yrA8IuxDUl4iT2ZILloJMYDO dYO9yAuwP2gBtCL/Rlzw5m89vR+k86kedLrG60luLgw60ISBK3VcW8wnVcDPrrV4fUAi 2sYNQQ7v/cP4ZMDB7lvSeYWsgn3TZzSbSRmKf+2w6v2acS1oi6WljaWInHg2LzPxwgcC nVxlPjS3AwjIWHS1xGNli/oD+81k7RJzLIppDse8nEAuUbT0bFKygs1y3Dlbg+fQmbFH J5HQ== X-Gm-Message-State: AIVw111WqLiV0J+bSEHiyCnV6keHrWzyuElqMxPd0xPDry2UfSRTCGK1 Y7BO5wxqvAGNO4UB X-Received: by 10.98.102.78 with SMTP id a75mr7382747pfc.7.1501551510994; Mon, 31 Jul 2017 18:38:30 -0700 (PDT) Received: from ubuntu.members.linode.com ([2400:8902::f03c:91ff:fee7:7cf1]) by smtp.gmail.com with ESMTPSA id o7sm48701171pgf.63.2017.07.31.18.38.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Jul 2017 18:38:30 -0700 (PDT) From: Xinming Hu To: Linux Wireless Cc: Kalle Valo , Brian Norris , Dmitry Torokhov , rajatja@google.com, Zhiyuan Yang , Tim Song , Cathy Luo , Ganapathi Bhat , Xinming Hu Subject: [v2 PATCH 1/2] mwifiex: make addba request command clean Date: Tue, 1 Aug 2017 01:38:23 +0000 Message-Id: <1501551504-8560-1-git-send-email-huxinming820@gmail.com> X-Mailer: git-send-email 2.7.4 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 From: Xinming Hu uninitilized variable, such as .add_req_result might be magic stack value. Initialize the structure to make it clean. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo --- v2: Same as v1 --- drivers/net/wireless/marvell/mwifiex/11n.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/11n.c b/drivers/net/wireless/marvell/mwifiex/11n.c index 16c77c2..7252069 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n.c +++ b/drivers/net/wireless/marvell/mwifiex/11n.c @@ -572,6 +572,8 @@ int mwifiex_send_addba(struct mwifiex_private *priv, int tid, u8 *peer_mac) mwifiex_dbg(priv->adapter, CMD, "cmd: %s: tid %d\n", __func__, tid); + memset(&add_ba_req, 0, sizeof(add_ba_req)); + if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA) && ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info) && priv->adapter->is_hw_11ac_capable &&