diff mbox series

[v7,08/12] wifi: mwifiex: fixed the way to handle assoc timeout.

Message ID 20231128083115.613235-9-yu-hao.lin@nxp.com
State New
Headers show
Series wifi: mwifiex: added code to support host mlme. | expand

Commit Message

David Lin Nov. 28, 2023, 8:31 a.m. UTC
Without this patch, if there is no association response from AP with host
mlme enabled, kernel oops will occur.

Signed-off-by: David Lin <yu-hao.lin@nxp.com>
---
 drivers/net/wireless/marvell/mwifiex/join.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Francesco Dolcini Dec. 1, 2023, 10:37 a.m. UTC | #1
On Tue, Nov 28, 2023 at 04:31:11PM +0800, David Lin wrote:
> Without this patch, if there is no association response from AP with host
> mlme enabled, kernel oops will occur.

As commented on previous patches this should be done in the commit that
introduce the host mlme feature in the first place
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/join.c b/drivers/net/wireless/marvell/mwifiex/join.c
index ef7cc40c3ba4..00720c6840ef 100644
--- a/drivers/net/wireless/marvell/mwifiex/join.c
+++ b/drivers/net/wireless/marvell/mwifiex/join.c
@@ -723,6 +723,9 @@  int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
 				mwifiex_dbg(priv->adapter, ERROR,
 					    "ASSOC_RESP: UNSPECIFIED failure\n");
 			}
+
+			if (priv->adapter->host_mlme)
+				priv->assoc_rsp_size = 0;
 		} else {
 			ret = status_code;
 		}