From fca90482413af327827f8134eec737591029142f Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Wed, 27 Feb 2019 09:28:10 -0600 Subject: [PATCH] rtl8188eu: Fix uninitialized variable in auth seq=2 packet An unintialized value for a temporary little-endian variable can cause some clients to fail to connect to AP. Reported-by: pepa-cz. Signed-off-by: Larry Finger --- core/rtw_mlme_ext.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index dd84fb2..fc2b6eb 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -8176,12 +8176,11 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status /* setting auth algo number */ val16 = (u16)psta->authalg; - if (status != _STATS_SUCCESSFUL_) - le_val16 = 0; - if (val16) { le_val16 = cpu_to_le16(val16); use_shared_key = 1; + } else { + le_val16 = 0; } pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&le_val16, &(pattrib->pktlen));