From: Jes Sorensen Date: Tue, 15 Apr 2014 17:44:21 +0000 (+0200) Subject: staging: rtl8723au: OnAssocReq23a(): use ieee80211_mgmt to calculate offset X-Git-Tag: next-20140428~14^2~350 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=07d2c3b8411a3674866a7e5b64a248db5ff3dc10;p=karo-tx-linux.git staging: rtl8723au: OnAssocReq23a(): use ieee80211_mgmt to calculate offset Signed-off-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 8c48ca4a4905..0277ee63db0e 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -1304,11 +1304,11 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) if (ieee80211_is_assoc_req(mgmt->frame_control)) { reassoc = 0; pos = mgmt->u.assoc_req.variable; - left -= _ASOCREQ_IE_OFFSET_; + left -= offsetof(struct ieee80211_mgmt, u.assoc_req.variable); } else { /* WIFI_REASSOCREQ */ reassoc = 1; pos = mgmt->u.reassoc_req.variable; - left -= _REASOCREQ_IE_OFFSET_; + left -= offsetof(struct ieee80211_mgmt, u.reassoc_req.variable); } if (left < 0) {