Skip to contentSkip to conversation

staging:r8188eu: add iv length to frame data offset

PATCH New Ivan Safonov 1 participant 1 message Mar 21, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:r8188eu: add iv length to frame data offset

If this frame contains IV/ICV fields, ether_type field located a little farther.

This bug already fixed here:
https://github.com/lwfinger/rtl8188eu/blob/master/core/rtw_recv.c#L569 .

---
 drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_recv.c +1 -1
index 556be8c..96526fe 100644
@@ -452,7 +452,7 @@ static struct recv_frame *portctrl(struct adapter *adapter,
 
 	if (auth_alg == 2) {
 		/* get ether_type */
-		ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE;
+		ptr = ptr + pfhdr->attrib.hdrlen + LLC_HEADER_SIZE + pfhdr->attrib.iv_len;
 		memcpy(&be_tmp, ptr, 2);
 		ether_type = ntohs(be_tmp);
 
Signature · 1 line
2.10.2