Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: r8188eu: replace rtw_ieee80211_hdr_3addr with ieee80211_hdr_3addr

rtw_ieee80211_hdr_3addr is duplicate of ieee80211_hdr_3addr.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ivan Safonov and committed by
Greg Kroah-Hartman
bbfe286b d87f574d

+38 -47
+31 -31
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
··· 361 361 /* pmlmeext->mgnt_seq++; */ 362 362 SetFrameSubType(pframe, WIFI_BEACON); 363 363 364 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 365 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 364 + pframe += sizeof(struct ieee80211_hdr_3addr); 365 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 366 366 367 367 if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) { 368 368 int len_diff; ··· 377 377 ); 378 378 pframe += (cur_network->IELength+len_diff); 379 379 pattrib->pktlen += (cur_network->IELength+len_diff); 380 - wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr+TXDESC_OFFSET+sizeof(struct rtw_ieee80211_hdr_3addr)+_BEACON_IE_OFFSET_, 381 - pattrib->pktlen-sizeof(struct rtw_ieee80211_hdr_3addr)-_BEACON_IE_OFFSET_, NULL, &wps_ielen); 380 + wps_ie = rtw_get_wps_ie(pmgntframe->buf_addr+TXDESC_OFFSET+sizeof(struct ieee80211_hdr_3addr)+_BEACON_IE_OFFSET_, 381 + pattrib->pktlen-sizeof(struct ieee80211_hdr_3addr)-_BEACON_IE_OFFSET_, NULL, &wps_ielen); 382 382 if (wps_ie && wps_ielen > 0) 383 383 rtw_get_wps_attr_content(wps_ie, wps_ielen, WPS_ATTR_SELECTED_REGISTRAR, (u8 *)(&sr), NULL); 384 384 if (sr != 0) ··· 503 503 pmlmeext->mgnt_seq++; 504 504 SetFrameSubType(fctrl, WIFI_PROBERSP); 505 505 506 - pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); 506 + pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr); 507 507 pattrib->pktlen = pattrib->hdrlen; 508 508 pframe += pattrib->hdrlen; 509 509 ··· 656 656 pmlmeext->mgnt_seq++; 657 657 SetFrameSubType(pframe, WIFI_PROBEREQ); 658 658 659 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 660 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 659 + pframe += sizeof(struct ieee80211_hdr_3addr); 660 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 661 661 662 662 if (pssid) 663 663 pframe = rtw_set_ie(pframe, _SSID_IE_, pssid->SsidLength, pssid->Ssid, &(pattrib->pktlen)); ··· 778 778 pmlmeext->mgnt_seq++; 779 779 SetFrameSubType(pframe, WIFI_AUTH); 780 780 781 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 782 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 781 + pframe += sizeof(struct ieee80211_hdr_3addr); 782 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 783 783 784 784 785 785 if (psta) {/* for AP mode */ ··· 866 866 867 867 SetPrivacy(fctrl); 868 868 869 - pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); 869 + pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr); 870 870 871 871 pattrib->encrypt = _WEP40_; 872 872 ··· 933 933 else 934 934 return; 935 935 936 - pattrib->hdrlen = sizeof(struct rtw_ieee80211_hdr_3addr); 936 + pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr); 937 937 pattrib->pktlen += pattrib->hdrlen; 938 938 pframe += pattrib->hdrlen; 939 939 ··· 1052 1052 pmlmeext->mgnt_seq++; 1053 1053 SetFrameSubType(pframe, WIFI_ASSOCREQ); 1054 1054 1055 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 1056 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 1055 + pframe += sizeof(struct ieee80211_hdr_3addr); 1056 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 1057 1057 1058 1058 /* caps */ 1059 1059 ··· 1260 1260 pmlmeext->mgnt_seq++; 1261 1261 SetFrameSubType(pframe, WIFI_DATA_NULL); 1262 1262 1263 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 1264 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 1263 + pframe += sizeof(struct ieee80211_hdr_3addr); 1264 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 1265 1265 1266 1266 pattrib->last_txcmdsz = pattrib->pktlen; 1267 1267 ··· 1491 1491 pmlmeext->mgnt_seq++; 1492 1492 SetFrameSubType(pframe, WIFI_DEAUTH); 1493 1493 1494 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 1495 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 1494 + pframe += sizeof(struct ieee80211_hdr_3addr); 1495 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 1496 1496 1497 1497 le_tmp = cpu_to_le16(reason); 1498 1498 pframe = rtw_set_fixed_ie(pframe, _RSON_CODE_, &le_tmp, ··· 1609 1609 pmlmeext->mgnt_seq++; 1610 1610 SetFrameSubType(pframe, WIFI_ACTION); 1611 1611 1612 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 1613 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 1612 + pframe += sizeof(struct ieee80211_hdr_3addr); 1613 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 1614 1614 1615 1615 pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); 1616 1616 pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); ··· 1768 1768 pmlmeext->mgnt_seq++; 1769 1769 SetFrameSubType(pframe, WIFI_ACTION); 1770 1770 1771 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 1772 - pattrib->pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 1771 + pframe += sizeof(struct ieee80211_hdr_3addr); 1772 + pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); 1773 1773 1774 1774 pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); 1775 1775 pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); ··· 2052 2052 struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; 2053 2053 struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); 2054 2054 2055 - len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); 2055 + len = packet_len - sizeof(struct ieee80211_hdr_3addr); 2056 2056 2057 2057 if (len > MAX_IE_SZ) 2058 2058 return _FAIL; ··· 2082 2082 2083 2083 /* below is to copy the information element */ 2084 2084 bssid->IELength = len; 2085 - memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); 2085 + memcpy(bssid->IEs, (pframe + sizeof(struct ieee80211_hdr_3addr)), bssid->IELength); 2086 2086 2087 2087 /* get the signal strength in dBM.raw data */ 2088 2088 bssid->Rssi = precv_frame->attrib.phy_info.recvpower; ··· 2624 2624 } 2625 2625 2626 2626 /* check the vendor of the assoc AP */ 2627 - pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pframe+sizeof(struct rtw_ieee80211_hdr_3addr), len-sizeof(struct rtw_ieee80211_hdr_3addr)); 2627 + pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pframe+sizeof(struct ieee80211_hdr_3addr), len-sizeof(struct ieee80211_hdr_3addr)); 2628 2628 2629 2629 /* update TSF Value */ 2630 2630 update_TSF(pmlmeext, pframe, len); ··· 3581 3581 struct sta_info *psta = NULL; 3582 3582 struct sta_priv *pstapriv = &padapter->stapriv; 3583 3583 u8 *pframe = precv_frame->rx_data; 3584 - u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); 3584 + u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); 3585 3585 u8 category; 3586 3586 u8 action; 3587 3587 ··· 3655 3655 if (psta == NULL) 3656 3656 return _SUCCESS; 3657 3657 3658 - frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); 3658 + frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); 3659 3659 3660 3660 category = frame_body[0]; 3661 3661 if (category == RTW_WLAN_CATEGORY_BACK) { /* representing Block Ack */ ··· 3742 3742 u8 *pframe = precv_frame->rx_data; 3743 3743 u8 *frame_body; 3744 3744 u8 dialogToken = 0; 3745 - frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); 3745 + frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); 3746 3746 3747 3747 dialogToken = frame_body[7]; 3748 3748 ··· 3756 3756 { 3757 3757 unsigned int ret = _FAIL; 3758 3758 u8 *pframe = precv_frame->rx_data; 3759 - u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); 3759 + u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); 3760 3760 3761 3761 if (!memcmp(frame_body + 2, P2P_OUI, 4)) 3762 3762 ret = on_action_public_p2p(precv_frame); ··· 3768 3768 { 3769 3769 unsigned int ret = _FAIL; 3770 3770 u8 *pframe = precv_frame->rx_data; 3771 - u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); 3771 + u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); 3772 3772 u8 token; 3773 3773 3774 3774 token = frame_body[2]; ··· 3787 3787 { 3788 3788 unsigned int ret = _FAIL; 3789 3789 u8 *pframe = precv_frame->rx_data; 3790 - u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); 3790 + u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr); 3791 3791 u8 category, action; 3792 3792 3793 3793 /* check RA matches or not */ ··· 3859 3859 unsigned char *frame_body; 3860 3860 u8 *pframe = precv_frame->rx_data; 3861 3861 3862 - frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); 3862 + frame_body = (unsigned char *)(pframe + sizeof(struct ieee80211_hdr_3addr)); 3863 3863 3864 3864 category = frame_body[0]; 3865 3865
+3 -3
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
··· 881 881 if (is_client_associated_to_ap(Adapter) == false) 882 882 return true; 883 883 884 - len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); 884 + len = packet_len - sizeof(struct ieee80211_hdr_3addr); 885 885 886 886 if (len > MAX_IE_SZ) { 887 887 DBG_88E("%s IE too long for survey event\n", __func__); ··· 907 907 908 908 /* below is to copy the information element */ 909 909 bssid->IELength = len; 910 - memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); 910 + memcpy(bssid->IEs, (pframe + sizeof(struct ieee80211_hdr_3addr)), bssid->IELength); 911 911 912 912 /* check bw and channel offset */ 913 913 /* parsing HT_CAP_IE */ ··· 1587 1587 u8 *pIE; 1588 1588 __le32 *pbuf; 1589 1589 1590 - pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); 1590 + pIE = pframe + sizeof(struct ieee80211_hdr_3addr); 1591 1591 pbuf = (__le32 *)pIE; 1592 1592 1593 1593 pmlmeext->TSFValue = le32_to_cpu(*(pbuf+1));
+4 -4
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
··· 239 239 SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); 240 240 SetFrameSubType(pframe, WIFI_BEACON); 241 241 242 - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); 243 - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 242 + pframe += sizeof(struct ieee80211_hdr_3addr); 243 + pktlen = sizeof(struct ieee80211_hdr_3addr); 244 244 245 245 /* timestamp will be inserted by hardware */ 246 246 pframe += 8; ··· 390 390 } else { 391 391 SetFrameSubType(pframe, WIFI_DATA_NULL); 392 392 393 - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 393 + pktlen = sizeof(struct ieee80211_hdr_3addr); 394 394 } 395 395 396 396 *pLength = pktlen; ··· 420 420 SetSeqNum(pwlanhdr, 0); 421 421 SetFrameSubType(fctrl, WIFI_PROBERSP); 422 422 423 - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); 423 + pktlen = sizeof(struct ieee80211_hdr_3addr); 424 424 pframe += pktlen; 425 425 426 426 if (cur_network->IELength > MAX_IE_SZ)
-9
drivers/staging/rtl8188eu/include/ieee80211.h
··· 291 291 /* this is stolen from ipw2200 driver */ 292 292 #define IEEE_IBSS_MAC_HASH_SIZE 31 293 293 294 - struct rtw_ieee80211_hdr_3addr { 295 - __le16 frame_ctl; 296 - __le16 duration_id; 297 - u8 addr1[ETH_ALEN]; 298 - u8 addr2[ETH_ALEN]; 299 - u8 addr3[ETH_ALEN]; 300 - u16 seq_ctl; 301 - } __packed; 302 - 303 294 struct rtw_ieee80211_hdr_3addr_qos { 304 295 __le16 frame_ctl; 305 296 __le16 duration_id;