From b546c0f9c3fc8e5a20aff2ac984472a7f33ef9cc Mon Sep 17 00:00:00 2001 From: Ivan Safonov Date: Tue, 27 Oct 2015 22:24:24 +0700 Subject: [PATCH] staging: rtl8188eu: increment placed into for loop header The increment at the end of the cycle, and it can be placed in the loop header. Signed-off-by: Ivan Safonov Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 4e6f1a87d625..d900546b672f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -1181,7 +1181,7 @@ static void issue_assocreq(struct adapter *padapter) } /* vendor specific IE, such as WPA, WMM, WPS */ - for (i = sizeof(struct ndis_802_11_fixed_ie); i < pmlmeinfo->network.IELength;) { + for (i = sizeof(struct ndis_802_11_fixed_ie); i < pmlmeinfo->network.IELength; i += (pIE->Length + 2)) { pIE = (struct ndis_802_11_var_ie *)(pmlmeinfo->network.IEs + i); switch (pIE->ElementID) { @@ -1202,7 +1202,6 @@ static void issue_assocreq(struct adapter *padapter) default: break; } - i += (pIE->Length + 2); } if (pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_REALTEK) -- 2.20.1