diff mbox

[v2,1/2] mwifiex: make addba request command clean

Message ID 1501551504-8560-1-git-send-email-huxinming820@gmail.com (mailing list archive)
State Accepted
Commit e37f6483dc282267ebf12cb94c40e8a0c8823722
Delegated to: Kalle Valo
Headers show

Commit Message

Xinming Hu Aug. 1, 2017, 1:38 a.m. UTC
From: Xinming Hu <huxm@marvell.com>

uninitilized variable, such as .add_req_result might be magic stack
value. Initialize the structure to make it clean.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
---
v2: Same as v1
---
 drivers/net/wireless/marvell/mwifiex/11n.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kalle Valo Aug. 3, 2017, 10:12 a.m. UTC | #1
Xinming Hu <huxinming820@gmail.com> wrote:

> From: Xinming Hu <huxm@marvell.com>
> 
> uninitilized variable, such as .add_req_result might be magic stack
> value. Initialize the structure to make it clean.
> 
> Signed-off-by: Xinming Hu <huxm@marvell.com>
> Signed-off-by: Cathy Luo <cluo@marvell.com>

2 patches applied to wireless-drivers-next.git, thanks.

e37f6483dc28 mwifiex: make addba request command clean
e7ece050113d mwifiex: pcie: compatible with wifi-only image while extract wifi-part fw
diff mbox

Patch

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 &&