Searched refs:pframe (Results 1 - 25 of 25) sorted by relevance

/linux-4.1.27/drivers/staging/rtl8188eu/core/
H A Drtw_mlme_ext.c418 u8 *pframe = precv_frame->rx_data; _mgt_dispatcher() local
422 if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) && _mgt_dispatcher()
423 memcmp(GetAddr1Ptr(pframe), bc_addr, ETH_ALEN)) _mgt_dispatcher()
437 u8 *pframe = precv_frame->rx_data; mgt_dispatcher() local
438 struct sta_info *psta = rtw_get_stainfo(&padapter->stapriv, GetAddr2Ptr(pframe)); mgt_dispatcher()
442 GetFrameType(pframe), GetFrameSubType(pframe))); mgt_dispatcher()
444 if (GetFrameType(pframe) != WIFI_MGT_TYPE) { mgt_dispatcher()
445 RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("mgt_dispatcher: type(0x%x) error!\n", GetFrameType(pframe))); mgt_dispatcher()
450 if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN) && mgt_dispatcher()
451 memcmp(GetAddr1Ptr(pframe), bc_addr, ETH_ALEN)) mgt_dispatcher()
456 index = GetFrameSubType(pframe) >> 4; mgt_dispatcher()
465 if (GetRetry(pframe)) { mgt_dispatcher()
478 switch (GetFrameSubType(pframe)) { mgt_dispatcher()
515 u8 *pframe = precv_frame->rx_data; OnProbeReq() local
526 p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _PROBEREQ_IE_OFFSET_, _SSID_IE_, (int *)&ielen, OnProbeReq()
542 issue_probersp(padapter, get_sa(pframe), is_valid_p2p_probereq); OnProbeReq()
567 u8 *pframe = precv_frame->rx_data; OnBeacon() local
578 if (!memcmp(GetAddr3Ptr(pframe), pnetwork->MacAddress, ETH_ALEN)) { OnBeacon()
591 pmlmeinfo->assoc_AP_vendor = check_assoc_AP(pframe+sizeof(struct rtw_ieee80211_hdr_3addr), len-sizeof(struct rtw_ieee80211_hdr_3addr)); OnBeacon()
594 update_TSF(pmlmeext, pframe, len); OnBeacon()
603 psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); OnBeacon()
605 ret = rtw_check_bcn_info(padapter, pframe, len); OnBeacon()
614 update_beacon_info(padapter, pframe, len, psta); OnBeacon()
617 psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); OnBeacon()
622 update_beacon_info(padapter, pframe, len, psta); OnBeacon()
630 if (update_sta_support_rate(padapter, (pframe + WLAN_HDR_A3_LEN + _BEACON_IE_OFFSET_), (len - WLAN_HDR_A3_LEN - _BEACON_IE_OFFSET_), cam_idx) == _FAIL) { OnBeacon()
636 update_TSF(pmlmeext, pframe, len); OnBeacon()
639 report_add_sta_event(padapter, GetAddr2Ptr(pframe), cam_idx); OnBeacon()
663 u8 *pframe = precv_frame->rx_data; OnAuth() local
671 sa = GetAddr2Ptr(pframe); OnAuth()
674 seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + 2)); OnAuth()
675 algorithm = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN)); OnAuth()
765 p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_ , _CHLGETXT_IE_, (int *)&ie_len, OnAuth()
829 u8 *pframe = precv_frame->rx_data; OnAuthClient() local
835 if (memcmp(myid(&(padapter->eeprompriv)), get_da(pframe), ETH_ALEN)) OnAuthClient()
841 offset = (GetPrivacy(pframe)) ? 4 : 0; OnAuthClient()
843 seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 2)); OnAuthClient()
844 status = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 4)); OnAuthClient()
862 p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_, _CHLGETXT_IE_, (int *)&len, OnAuthClient()
916 u8 *pframe = precv_frame->rx_data; OnAssocReq() local
922 frame_type = GetFrameSubType(pframe); OnAssocReq()
938 pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); OnAssocReq()
944 capab_info = get_unaligned_le16(pframe + WLAN_HDR_A3_LEN); OnAssocReq()
947 pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset); OnAssocReq()
978 p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len, OnAssocReq()
998 p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SUPPORTEDRATES_IE_, &ie_len, pkt_len - WLAN_HDR_A3_LEN - ie_offset); OnAssocReq()
1011 p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _EXT_SUPPORTEDRATES_IE_ , &ie_len, OnAssocReq()
1156 p = pframe + WLAN_HDR_A3_LEN + ie_offset; ie_len = 0; OnAssocReq()
1321 issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status); OnAssocReq()
1353 u8 *pframe = precv_frame->rx_data; OnAssocRsp() local
1359 if (memcmp(myid(&(padapter->eeprompriv)), get_da(pframe), ETH_ALEN)) OnAssocRsp()
1371 status = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN + 2)); OnAssocRsp()
1380 pmlmeinfo->capability = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); OnAssocRsp()
1386 pmlmeinfo->aid = (int)(le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN + 4))&0x3fff); OnAssocRsp()
1393 pIE = (struct ndis_802_11_var_ie *)(pframe + i); OnAssocRsp()
1423 rtw_buf_update(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len, pframe, pkt_len); OnAssocRsp()
1439 u8 *pframe = precv_frame->rx_data; OnDeAuth() local
1443 if (memcmp(GetAddr3Ptr(pframe), pnetwork->MacAddress, ETH_ALEN)) OnDeAuth()
1446 reason = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); OnDeAuth()
1456 reason, GetAddr2Ptr(pframe)); OnDeAuth()
1458 psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); OnDeAuth()
1479 reason, GetAddr3Ptr(pframe)); OnDeAuth()
1481 receive_disconnect(padapter, GetAddr3Ptr(pframe) , reason); OnDeAuth()
1493 u8 *pframe = precv_frame->rx_data; OnDisassoc() local
1497 if (memcmp(GetAddr3Ptr(pframe), pnetwork->MacAddress, ETH_ALEN)) OnDisassoc()
1500 reason = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); OnDisassoc()
1510 reason, GetAddr2Ptr(pframe)); OnDisassoc()
1512 psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); OnDisassoc()
1532 reason, GetAddr3Ptr(pframe)); OnDisassoc()
1534 receive_disconnect(padapter, GetAddr3Ptr(pframe), reason); OnDisassoc()
1550 u8 *pframe = precv_frame->rx_data; on_action_spct() local
1551 u8 *frame_body = (u8 *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); on_action_spct()
1557 psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); on_action_spct()
1603 u8 *pframe = precv_frame->rx_data; OnAction_back() local
1606 if (memcmp(myid(&(padapter->eeprompriv)), GetAddr1Ptr(pframe), OnAction_back()
1616 addr = GetAddr2Ptr(pframe); OnAction_back()
1622 frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); OnAction_back()
1706 u8 *pframe = precv_frame->rx_data; on_action_public_p2p() local
1709 frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); on_action_public_p2p()
1722 u8 *pframe = precv_frame->rx_data; on_action_public_vendor() local
1723 u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); on_action_public_vendor()
1734 u8 *pframe = precv_frame->rx_data; on_action_public_default() local
1735 u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); on_action_public_default()
1752 u8 *pframe = precv_frame->rx_data; on_action_public() local
1753 u8 *frame_body = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); on_action_public()
1757 if (memcmp(myid(&(padapter->eeprompriv)), GetAddr1Ptr(pframe), ETH_ALEN)) on_action_public()
1799 u8 *pframe = precv_frame->rx_data; OnAction() local
1801 frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); OnAction()
1977 unsigned char *pframe; issue_beacon() local
2004 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_beacon()
2005 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_beacon()
2017 SetFrameSubType(pframe, WIFI_BEACON); issue_beacon()
2019 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); issue_beacon()
2027 memcpy(pframe, cur_network->IEs, cur_network->IELength); issue_beacon()
2029 pframe+_BEACON_IE_OFFSET_ issue_beacon()
2033 pframe += (cur_network->IELength+len_diff); issue_beacon()
2050 pframe += 8; issue_beacon()
2055 memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); issue_beacon()
2057 pframe += 2; issue_beacon()
2062 memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); issue_beacon()
2064 pframe += 2; issue_beacon()
2068 pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pattrib->pktlen); issue_beacon()
2072 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pattrib->pktlen); issue_beacon()
2075 pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pattrib->pktlen); issue_beacon()
2082 pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen); issue_beacon()
2085 pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen); issue_beacon()
2090 pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen); issue_beacon()
2118 unsigned char *pframe; issue_probersp() local
2145 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_probersp()
2146 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_probersp()
2163 pframe += pattrib->hdrlen; issue_probersp()
2183 memcpy(pframe, cur_network->IEs, wps_offset); issue_probersp()
2184 pframe += wps_offset; issue_probersp()
2189 memcpy(pframe, pmlmepriv->wps_probe_resp_ie, wps_ielen+2); issue_probersp()
2190 pframe += wps_ielen+2; issue_probersp()
2195 memcpy(pframe, premainder_ie, remainder_ielen); issue_probersp()
2196 pframe += remainder_ielen; issue_probersp()
2200 memcpy(pframe, cur_network->IEs, cur_network->IELength); issue_probersp()
2201 pframe += cur_network->IELength; issue_probersp()
2208 pframe += 8; issue_probersp()
2213 memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); issue_probersp()
2215 pframe += 2; issue_probersp()
2220 memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); issue_probersp()
2222 pframe += 2; issue_probersp()
2228 pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pattrib->pktlen); issue_probersp()
2232 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pattrib->pktlen); issue_probersp()
2235 pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pattrib->pktlen); issue_probersp()
2243 pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pattrib->pktlen); issue_probersp()
2246 pframe = rtw_set_ie(pframe, _ERPINFO_IE_, 1, &erpinfo, &pattrib->pktlen); issue_probersp()
2252 pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pattrib->pktlen); issue_probersp()
2268 unsigned char *pframe; _issue_probereq() local
2292 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_probereq()
2293 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; _issue_probereq()
2314 SetFrameSubType(pframe, WIFI_PROBEREQ); _issue_probereq()
2316 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); _issue_probereq()
2320 pframe = rtw_set_ie(pframe, _SSID_IE_, pssid->SsidLength, pssid->Ssid, &(pattrib->pktlen)); _issue_probereq()
2322 pframe = rtw_set_ie(pframe, _SSID_IE_, 0, NULL, &(pattrib->pktlen)); _issue_probereq()
2327 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen)); _issue_probereq()
2328 pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen)); _issue_probereq()
2330 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen)); _issue_probereq()
2335 memcpy(pframe, pmlmepriv->wps_probe_req_ie, pmlmepriv->wps_probe_req_ie_len); _issue_probereq()
2336 pframe += pmlmepriv->wps_probe_req_ie_len; _issue_probereq()
2405 unsigned char *pframe; issue_auth() local
2429 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_auth()
2430 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_auth()
2437 SetFrameSubType(pframe, WIFI_AUTH); issue_auth()
2439 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); issue_auth()
2464 pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&le_val16, &(pattrib->pktlen)); issue_auth()
2469 pframe = rtw_set_fixed_ie(pframe, _AUTH_SEQ_NUM_, (unsigned char *)&le_val16, &(pattrib->pktlen)); issue_auth()
2474 pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&le_val16, &(pattrib->pktlen)); issue_auth()
2478 pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, psta->chg_txt, &(pattrib->pktlen)); issue_auth()
2496 pframe = rtw_set_fixed_ie(pframe, 4, (unsigned char *)&le_tmp32, &(pattrib->pktlen)); issue_auth()
2502 pframe = rtw_set_fixed_ie(pframe, _AUTH_ALGM_NUM_, (unsigned char *)&le_tmp16, &(pattrib->pktlen)); issue_auth()
2507 pframe = rtw_set_fixed_ie(pframe, _AUTH_SEQ_NUM_, (unsigned char *)&le_tmp16, &(pattrib->pktlen)); issue_auth()
2512 pframe = rtw_set_fixed_ie(pframe, _STATUS_CODE_, (unsigned char *)&le_tmp16, &(pattrib->pktlen)); issue_auth()
2516 pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, pmlmeinfo->chg_txt, &(pattrib->pktlen)); issue_auth()
2546 unsigned char *pbuf, *pframe; issue_asocrsp() local
2570 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_asocrsp()
2571 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_asocrsp()
2590 pframe += pattrib->hdrlen; issue_asocrsp()
2595 pframe = rtw_set_fixed_ie(pframe, _CAPABILITY_ , (unsigned char *)&val, &(pattrib->pktlen)); issue_asocrsp()
2598 pframe = rtw_set_fixed_ie(pframe , _STATUS_CODE_ , (unsigned char *)&lestatus, &(pattrib->pktlen)); issue_asocrsp()
2601 pframe = rtw_set_fixed_ie(pframe, _ASOC_ID_ , (unsigned char *)&leval, &(pattrib->pktlen)); issue_asocrsp()
2604 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, pstat->bssratelen, pstat->bssrateset, &(pattrib->pktlen)); issue_asocrsp()
2606 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pstat->bssrateset, &(pattrib->pktlen)); issue_asocrsp()
2607 pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (pstat->bssratelen-8), pstat->bssrateset+8, &(pattrib->pktlen)); issue_asocrsp()
2616 memcpy(pframe, pbuf, ie_len+2); issue_asocrsp()
2617 pframe += (ie_len+2); issue_asocrsp()
2624 memcpy(pframe, pbuf, ie_len+2); issue_asocrsp()
2625 pframe += (ie_len+2); issue_asocrsp()
2638 memcpy(pframe, pbuf, ie_len+2); issue_asocrsp()
2639 pframe += (ie_len+2); issue_asocrsp()
2650 pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 6 , REALTEK_96B_IE, &(pattrib->pktlen)); issue_asocrsp()
2654 memcpy(pframe, pmlmepriv->wps_assoc_resp_ie, pmlmepriv->wps_assoc_resp_ie_len); issue_asocrsp()
2656 pframe += pmlmepriv->wps_assoc_resp_ie_len; issue_asocrsp()
2670 unsigned char *pframe, *p; issue_assocreq() local
2694 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_assocreq()
2695 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_assocreq()
2705 SetFrameSubType(pframe, WIFI_ASSOCREQ); issue_assocreq()
2707 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); issue_assocreq()
2712 memcpy(pframe, rtw_get_capability_from_ie(pmlmeinfo->network.IEs), 2); issue_assocreq()
2714 pframe += 2; issue_assocreq()
2720 memcpy(pframe , (unsigned char *)&le_tmp, 2); issue_assocreq()
2721 pframe += 2; issue_assocreq()
2725 pframe = rtw_set_ie(pframe, _SSID_IE_, pmlmeinfo->network.Ssid.SsidLength, pmlmeinfo->network.Ssid.Ssid, &(pattrib->pktlen)); issue_assocreq()
2773 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , 8, bssrate, &(pattrib->pktlen)); issue_assocreq()
2774 pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_ , (bssrate_len - 8), (bssrate + 8), &(pattrib->pktlen)); issue_assocreq()
2776 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_ , bssrate_len , bssrate, &(pattrib->pktlen)); issue_assocreq()
2782 pframe = rtw_set_ie(pframe, _RSN_IE_2_, ie_len, (p + 2), &(pattrib->pktlen)); issue_assocreq()
2818 pframe = rtw_set_ie(pframe, _HT_CAPABILITY_IE_, ie_len , (u8 *)(&(pmlmeinfo->HT_caps)), &(pattrib->pktlen)); issue_assocreq()
2838 pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, pIE->Length, pIE->data, &(pattrib->pktlen)); issue_assocreq()
2848 pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, 6 , REALTEK_96B_IE, &(pattrib->pktlen)); issue_assocreq()
2870 unsigned char *pframe; _issue_nulldata() local
2897 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_nulldata()
2898 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; _issue_nulldata()
2917 SetFrameSubType(pframe, WIFI_DATA_NULL); _issue_nulldata()
2919 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); _issue_nulldata()
2988 unsigned char *pframe; _issue_qos_nulldata() local
3015 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_qos_nulldata()
3016 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; _issue_qos_nulldata()
3029 qc = (unsigned short *)(pframe + pattrib->hdrlen - 2); _issue_qos_nulldata()
3043 SetFrameSubType(pframe, WIFI_QOS_DATA_NULL); _issue_qos_nulldata()
3045 pframe += sizeof(struct rtw_ieee80211_hdr_3addr_qos); _issue_qos_nulldata()
3111 unsigned char *pframe; _issue_deauth() local
3132 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_deauth()
3133 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; _issue_deauth()
3144 SetFrameSubType(pframe, WIFI_DEAUTH); _issue_deauth()
3146 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); _issue_deauth()
3150 pframe = rtw_set_fixed_ie(pframe, _RSON_CODE_ , (unsigned char *)&le_tmp, &(pattrib->pktlen)); _issue_deauth()
3214 unsigned char *pframe; issue_action_spct_ch_switch() local
3234 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_action_spct_ch_switch()
3235 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_action_spct_ch_switch()
3246 SetFrameSubType(pframe, WIFI_ACTION); issue_action_spct_ch_switch()
3248 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); issue_action_spct_ch_switch()
3257 pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); issue_action_spct_ch_switch()
3258 pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); issue_action_spct_ch_switch()
3261 pframe = rtw_set_ie_ch_switch(pframe, &(pattrib->pktlen), 0, new_ch, 0); issue_action_spct_ch_switch()
3262 pframe = rtw_set_ie_secondary_ch_offset(pframe, &(pattrib->pktlen), issue_action_spct_ch_switch()
3282 u8 *pframe; issue_action_BA() local
3305 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_action_BA()
3306 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_action_BA()
3318 SetFrameSubType(pframe, WIFI_ACTION); issue_action_BA()
3320 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); issue_action_BA()
3323 pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); issue_action_BA()
3324 pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); issue_action_BA()
3332 pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->dialogToken), &(pattrib->pktlen)); issue_action_BA()
3336 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); issue_action_BA()
3340 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); issue_action_BA()
3353 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); issue_action_BA()
3356 pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen)); issue_action_BA()
3357 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen)); issue_action_BA()
3385 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); issue_action_BA()
3386 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(pmlmeinfo->ADDBA_req.BA_timeout_value)), &(pattrib->pktlen)); issue_action_BA()
3391 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); issue_action_BA()
3395 pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); issue_action_BA()
3413 unsigned char *pframe; issue_action_BSSCoexistPacket() local
3449 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_action_BSSCoexistPacket()
3450 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; issue_action_BSSCoexistPacket()
3461 SetFrameSubType(pframe, WIFI_ACTION); issue_action_BSSCoexistPacket()
3463 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); issue_action_BSSCoexistPacket()
3466 pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen)); issue_action_BSSCoexistPacket()
3467 pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen)); issue_action_BSSCoexistPacket()
3476 pframe = rtw_set_ie(pframe, EID_BSSCoexistence, 1, &iedata, &(pattrib->pktlen)); issue_action_BSSCoexistPacket()
3532 pframe = rtw_set_ie(pframe, EID_BSSIntolerantChlReport, k, InfoContent, &(pattrib->pktlen)); issue_action_BSSCoexistPacket()
3732 u8 *pframe = precv_frame->rx_data; collect_bss_info() local
3746 subtype = GetFrameSubType(pframe); collect_bss_info()
3769 memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); collect_bss_info()
3846 memcpy(bssid->MacAddress, GetAddr2Ptr(pframe), ETH_ALEN); collect_bss_info()
3858 memcpy(bssid->MacAddress, GetAddr2Ptr(pframe), ETH_ALEN); collect_bss_info()
3861 memcpy(bssid->MacAddress, GetAddr3Ptr(pframe), ETH_ALEN); collect_bss_info()
H A Drtw_security.c150 u8 *pframe, *payload, *iv; /* wepkey */ rtw_wep_encrypt() local
164 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset; rtw_wep_encrypt()
171 iv = pframe+pattrib->hdrlen; rtw_wep_encrypt()
174 payload = pframe+pattrib->iv_len+pattrib->hdrlen; rtw_wep_encrypt()
191 pframe += pxmitpriv->frag_len; rtw_wep_encrypt()
192 pframe = (u8 *)round_up((size_t)(pframe), 4); rtw_wep_encrypt()
206 u8 *pframe, *payload, *iv, wepkey[16]; rtw_wep_decrypt() local
212 pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data; rtw_wep_decrypt()
216 iv = pframe+prxattrib->hdrlen; rtw_wep_decrypt()
223 payload = pframe+prxattrib->iv_len+prxattrib->hdrlen; rtw_wep_decrypt()
573 u8 *pframe, *payload, *iv, *prwskey; rtw_tkip_encrypt() local
586 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset; rtw_tkip_encrypt()
603 iv = pframe+pattrib->hdrlen; rtw_tkip_encrypt()
604 payload = pframe+pattrib->iv_len+pattrib->hdrlen; rtw_tkip_encrypt()
630 pframe += pxmitpriv->frag_len; rtw_tkip_encrypt()
631 pframe = (u8 *)round_up((size_t)(pframe), 4); rtw_tkip_encrypt()
653 u8 *pframe, *payload, *iv, *prwskey; rtw_tkip_decrypt() local
661 pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data; rtw_tkip_decrypt()
679 iv = pframe+prxattrib->hdrlen; rtw_tkip_decrypt()
680 payload = pframe+prxattrib->iv_len+prxattrib->hdrlen; rtw_tkip_decrypt()
1063 static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) aes_cipher() argument
1079 uint frtype = GetFrameType(pframe); aes_cipher()
1080 uint frsubtype = GetFrameSubType(pframe); aes_cipher()
1109 pn_vector[0] = pframe[hdrlen]; aes_cipher()
1110 pn_vector[1] = pframe[hdrlen+1]; aes_cipher()
1111 pn_vector[2] = pframe[hdrlen+4]; aes_cipher()
1112 pn_vector[3] = pframe[hdrlen+5]; aes_cipher()
1113 pn_vector[4] = pframe[hdrlen+6]; aes_cipher()
1114 pn_vector[5] = pframe[hdrlen+7]; aes_cipher()
1116 construct_mic_iv(mic_iv, qc_exists, a4_exists, pframe, plen, pn_vector); aes_cipher()
1118 construct_mic_header1(mic_header1, hdrlen, pframe); aes_cipher()
1119 construct_mic_header2(mic_header2, pframe, a4_exists, qc_exists); aes_cipher()
1135 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer);/* bitwise_xor(aes_out, &message[payload_index], chain_buffer); */ aes_cipher()
1146 padded_buffer[j] = pframe[payload_index++];/* padded_buffer[j] = message[payload_index++]; */ aes_cipher()
1156 pframe[payload_index+j] = mic[j]; aes_cipher()
1160 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, pn_vector, i+1); aes_cipher()
1162 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_cipher()
1164 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1169 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, pn_vector, num_blocks+1); aes_cipher()
1174 padded_buffer[j] = pframe[payload_index+j]; aes_cipher()
1178 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1181 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, pn_vector, 0); aes_cipher()
1186 padded_buffer[j] = pframe[j+hdrlen+8+plen]; aes_cipher()
1191 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1203 u8 *pframe, *prwskey; /* *payload,*iv */ rtw_aes_encrypt() local
1219 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset; rtw_aes_encrypt()
1239 aes_cipher(prwskey, pattrib->hdrlen, pframe, length); rtw_aes_encrypt()
1243 aes_cipher(prwskey, pattrib->hdrlen, pframe, length); rtw_aes_encrypt()
1244 pframe += pxmitpriv->frag_len; rtw_aes_encrypt()
1245 pframe = (u8 *)round_up((size_t)(pframe), 8); rtw_aes_encrypt()
1259 u8 *pframe, uint plen) aes_decipher()
1278 uint frtype = GetFrameType(pframe); aes_decipher()
1279 uint frsubtype = GetFrameSubType(pframe); aes_decipher()
1296 pn_vector[0] = pframe[hdrlen]; aes_decipher()
1297 pn_vector[1] = pframe[hdrlen+1]; aes_decipher()
1298 pn_vector[2] = pframe[hdrlen+4]; aes_decipher()
1299 pn_vector[3] = pframe[hdrlen+5]; aes_decipher()
1300 pn_vector[4] = pframe[hdrlen+6]; aes_decipher()
1301 pn_vector[5] = pframe[hdrlen+7]; aes_decipher()
1322 /* now, decrypt pframe with hdrlen offset and plen long */ aes_decipher()
1327 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, pn_vector, i+1); aes_decipher()
1330 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_decipher()
1333 pframe[payload_index++] = chain_buffer[j]; aes_decipher()
1338 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, pn_vector, num_blocks+1); aes_decipher()
1343 padded_buffer[j] = pframe[payload_index+j]; aes_decipher()
1347 pframe[payload_index++] = chain_buffer[j]; aes_decipher()
1352 memcpy(message, pframe, (hdrlen + plen+8)); /* 8 is for ext iv len */ aes_decipher()
1354 pn_vector[0] = pframe[hdrlen]; aes_decipher()
1355 pn_vector[1] = pframe[hdrlen+1]; aes_decipher()
1356 pn_vector[2] = pframe[hdrlen+4]; aes_decipher()
1357 pn_vector[3] = pframe[hdrlen+5]; aes_decipher()
1358 pn_vector[4] = pframe[hdrlen+6]; aes_decipher()
1359 pn_vector[5] = pframe[hdrlen+7]; aes_decipher()
1440 if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) { aes_decipher()
1442 ("aes_decipher:mic check error mic[%d]: pframe(%x)!=message(%x)\n", aes_decipher()
1443 i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i])); aes_decipher()
1444 DBG_88E("aes_decipher:mic check error mic[%d]: pframe(%x)!=message(%x)\n", aes_decipher()
1445 i, pframe[hdrlen+8+plen-8+i], message[hdrlen+8+plen-8+i]); aes_decipher()
1456 u8 *pframe, *prwskey; /* *payload,*iv */ rtw_aes_decrypt() local
1461 pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data; rtw_aes_decrypt()
1486 res = aes_decipher(prwskey, prxattrib->hdrlen, pframe, length); rtw_aes_decrypt()
1258 aes_decipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) aes_decipher() argument
H A Drtw_xmit.c630 u8 *pframe, *payload, mic[8]; xmitframe_addmic() local
655 pframe = pxmitframe->buf_addr + hw_hdr_offset; xmitframe_addmic()
672 if (pframe[1]&1) { /* ToDS == 1 */ xmitframe_addmic()
673 rtw_secmicappend(&micdata, &pframe[16], 6); /* DA */ xmitframe_addmic()
674 if (pframe[1]&2) /* From Ds == 1 */ xmitframe_addmic()
675 rtw_secmicappend(&micdata, &pframe[24], 6); xmitframe_addmic()
677 rtw_secmicappend(&micdata, &pframe[10], 6); xmitframe_addmic()
679 rtw_secmicappend(&micdata, &pframe[4], 6); /* DA */ xmitframe_addmic()
680 if (pframe[1]&2) /* From Ds == 1 */ xmitframe_addmic()
681 rtw_secmicappend(&micdata, &pframe[16], 6); xmitframe_addmic()
683 rtw_secmicappend(&micdata, &pframe[10], 6); xmitframe_addmic()
691 payload = pframe; xmitframe_addmic()
696 ("=== curfragnum=%d, pframe = 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n", xmitframe_addmic()
966 5. move frag chunk from pframe to pxmitframe->mem
975 u8 *pframe, *mem_start; rtw_xmitframe_coalesce() local
1019 pframe = mem_start; rtw_xmitframe_coalesce()
1023 pframe += pattrib->hdrlen; rtw_xmitframe_coalesce()
1047 memcpy(pframe, pattrib->iv, pattrib->iv_len); rtw_xmitframe_coalesce()
1050 ("rtw_xmitframe_coalesce: keyid=%d pattrib->iv[3]=%.2x pframe=%.2x %.2x %.2x %.2x\n", rtw_xmitframe_coalesce()
1051 padapter->securitypriv.dot11PrivacyKeyIndex, pattrib->iv[3], *pframe, *(pframe+1), *(pframe+2), *(pframe+3))); rtw_xmitframe_coalesce()
1053 pframe += pattrib->iv_len; rtw_xmitframe_coalesce()
1059 llc_sz = rtw_put_snap(pframe, pattrib->ether_type); rtw_xmitframe_coalesce()
1060 pframe += llc_sz; rtw_xmitframe_coalesce()
1070 mem_sz = _rtw_pktfile_read(&pktfile, pframe, pattrib->pktlen); rtw_xmitframe_coalesce()
1072 mem_sz = _rtw_pktfile_read(&pktfile, pframe, mpdu_len); rtw_xmitframe_coalesce()
1075 pframe += mem_sz; rtw_xmitframe_coalesce()
1078 memcpy(pframe, pattrib->icv, pattrib->icv_len); rtw_xmitframe_coalesce()
1079 pframe += pattrib->icv_len; rtw_xmitframe_coalesce()
1097 addr = (size_t)(pframe); rtw_xmitframe_coalesce()
H A Drtw_wlan_util.c869 int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) rtw_check_bcn_info() argument
882 u8 *pbssid = GetAddr3Ptr(pframe); rtw_check_bcn_info()
910 subtype = GetFrameSubType(pframe) >> 4; rtw_check_bcn_info()
919 memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); rtw_check_bcn_info()
1070 void update_beacon_info(struct adapter *padapter, u8 *pframe, uint pkt_len, struct sta_info *psta) update_beacon_info() argument
1079 pIE = (struct ndis_802_11_var_ie *)(pframe + (_BEACON_IE_OFFSET_ + WLAN_HDR_A3_LEN) + i); update_beacon_info()
1336 unsigned char check_assoc_AP(u8 *pframe, uint len) check_assoc_AP() argument
1346 pIE = (struct ndis_802_11_var_ie *)(pframe + i); check_assoc_AP()
1588 void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len) update_TSF() argument
1593 pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); update_TSF()
H A Drtw_recv.c292 u8 *pframe, *payload, *pframemic; recvframe_chkmic() local
328 pframe = precvframe->rx_data; recvframe_chkmic()
329 payload = pframe+prxattrib->hdrlen+prxattrib->iv_len; recvframe_chkmic()
332 rtw_seccalctkipmic(mickey, pframe, payload, datalen, &miccode[0], recvframe_chkmic()
978 u8 *pframe = precv_frame->rx_data; validate_recv_ctrl_frame() local
980 if (GetFrameType(pframe) != WIFI_CTRL_TYPE) validate_recv_ctrl_frame()
984 if (memcmp(GetAddr1Ptr(pframe), myid(&padapter->eeprompriv), ETH_ALEN)) validate_recv_ctrl_frame()
988 if (GetFrameSubType(pframe) == WIFI_PSPOLL) { validate_recv_ctrl_frame()
993 aid = GetAid(pframe); validate_recv_ctrl_frame()
994 psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe)); validate_recv_ctrl_frame()
/linux-4.1.27/drivers/staging/rtl8723au/core/
H A Drtw_security.c155 u8 *pframe, *payload, *iv; /* wepkey */ rtw_wep_encrypt23a() local
167 pframe = pxmitframe->buf_addr + hw_hdr_offset; rtw_wep_encrypt23a()
178 iv = pframe + pattrib->hdrlen; rtw_wep_encrypt23a()
182 payload = pframe + pattrib->iv_len + pattrib->hdrlen; rtw_wep_encrypt23a()
202 pframe += pxmitpriv->frag_len; rtw_wep_encrypt23a()
203 pframe = PTR_ALIGN(pframe, 4); rtw_wep_encrypt23a()
217 u8 *pframe, *payload, *iv, wepkey[16]; rtw_wep_decrypt23a() local
223 pframe = skb->data; rtw_wep_decrypt23a()
230 iv = pframe + prxattrib->hdrlen; rtw_wep_decrypt23a()
239 payload = pframe + prxattrib->iv_len + prxattrib->hdrlen; rtw_wep_decrypt23a()
610 u8 *pframe, *payload, *iv, *prwskey; rtw_tkip_encrypt23a() local
626 pframe = pxmitframe->buf_addr + hw_hdr_offset; rtw_tkip_encrypt23a()
660 iv = pframe + pattrib->hdrlen; rtw_tkip_encrypt23a()
661 payload = pframe + pattrib->iv_len + pattrib->hdrlen; rtw_tkip_encrypt23a()
699 pframe += pxmitpriv->frag_len; rtw_tkip_encrypt23a()
700 pframe = PTR_ALIGN(pframe, 4); rtw_tkip_encrypt23a()
719 u8 *pframe, *payload, *iv, *prwskey; rtw_tkip_decrypt23a() local
730 pframe = skb->data; rtw_tkip_decrypt23a()
756 iv = pframe + prxattrib->hdrlen; rtw_tkip_decrypt23a()
757 payload = pframe + prxattrib->iv_len + prxattrib->hdrlen; rtw_tkip_decrypt23a()
1138 static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) aes_cipher() argument
1152 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)pframe; aes_cipher()
1189 pn_vector[0] = pframe[hdrlen]; aes_cipher()
1190 pn_vector[1] = pframe[hdrlen + 1]; aes_cipher()
1191 pn_vector[2] = pframe[hdrlen + 4]; aes_cipher()
1192 pn_vector[3] = pframe[hdrlen + 5]; aes_cipher()
1193 pn_vector[4] = pframe[hdrlen + 6]; aes_cipher()
1194 pn_vector[5] = pframe[hdrlen + 7]; aes_cipher()
1196 construct_mic_iv(mic_iv, qc_exists, a4_exists, pframe, plen, pn_vector); aes_cipher()
1198 construct_mic_header1(mic_header1, hdrlen, pframe); aes_cipher()
1199 construct_mic_header2(mic_header2, pframe, a4_exists, qc_exists); aes_cipher()
1215 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_cipher()
1226 padded_buffer[j] = pframe[payload_index++]; aes_cipher()
1236 pframe[payload_index + j] = mic[j]; aes_cipher()
1241 pframe, pn_vector, i + 1); aes_cipher()
1243 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_cipher()
1245 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1252 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, aes_cipher()
1258 padded_buffer[j] = pframe[payload_index + j]; aes_cipher()
1262 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1266 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, aes_cipher()
1272 padded_buffer[j] = pframe[j + hdrlen + 8 + plen]; aes_cipher()
1277 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1288 u8 *pframe, *prwskey; rtw_aes_encrypt23a() local
1301 pframe = pxmitframe->buf_addr + hw_hdr_offset; rtw_aes_encrypt23a()
1343 aes_cipher(prwskey, pattrib->hdrlen, pframe, length); rtw_aes_encrypt23a()
1348 aes_cipher(prwskey, pattrib->hdrlen, pframe, length); rtw_aes_encrypt23a()
1349 pframe += pxmitpriv->frag_len; rtw_aes_encrypt23a()
1350 pframe = PTR_ALIGN(pframe, 4); rtw_aes_encrypt23a()
1357 static int aes_decipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) aes_decipher() argument
1373 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)pframe; aes_decipher()
1390 pn_vector[0] = pframe[hdrlen]; aes_decipher()
1391 pn_vector[1] = pframe[hdrlen + 1]; aes_decipher()
1392 pn_vector[2] = pframe[hdrlen + 4]; aes_decipher()
1393 pn_vector[3] = pframe[hdrlen + 5]; aes_decipher()
1394 pn_vector[4] = pframe[hdrlen + 6]; aes_decipher()
1395 pn_vector[5] = pframe[hdrlen + 7]; aes_decipher()
1424 /* now, decrypt pframe with hdrlen offset and plen long */ aes_decipher()
1430 pframe, pn_vector, i + 1); aes_decipher()
1433 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_decipher()
1436 pframe[payload_index++] = chain_buffer[j]; aes_decipher()
1443 construct_ctr_preload(ctr_preload, a4_exists, qc_exists, pframe, aes_decipher()
1449 padded_buffer[j] = pframe[payload_index + j]; aes_decipher()
1453 pframe[payload_index++] = chain_buffer[j]; aes_decipher()
1458 memcpy(message, pframe, (hdrlen + plen + 8)); /* 8 is for ext iv len */ aes_decipher()
1460 pn_vector[0] = pframe[hdrlen]; aes_decipher()
1461 pn_vector[1] = pframe[hdrlen + 1]; aes_decipher()
1462 pn_vector[2] = pframe[hdrlen + 4]; aes_decipher()
1463 pn_vector[3] = pframe[hdrlen + 5]; aes_decipher()
1464 pn_vector[4] = pframe[hdrlen + 6]; aes_decipher()
1465 pn_vector[5] = pframe[hdrlen + 7]; aes_decipher()
1553 if (pframe[hdrlen + 8 + plen - 8 + i] != message[hdrlen + 8 + plen - 8 + i]) { aes_decipher()
1555 "%s:mic check error mic[%d]: pframe(%x) != message(%x)\n", aes_decipher()
1557 pframe[hdrlen + 8 + plen - 8 + i], aes_decipher()
1559 DBG_8723A("%s:mic check error mic[%d]: pframe(%x) != message(%x)\n", aes_decipher()
1561 pframe[hdrlen + 8 + plen - 8 + i], aes_decipher()
1577 u8 *pframe, *prwskey; rtw_aes_decrypt23a() local
1580 pframe = skb->data; rtw_aes_decrypt23a()
1620 res = aes_decipher(prwskey, prxattrib->hdrlen, pframe, length); rtw_aes_decrypt23a()
H A Drtw_mlme_ext.c921 u8 *pframe; OnAuth23a() local
936 pframe = mgmt->u.auth.variable; OnAuth23a()
1042 p = cfg80211_find_ie(WLAN_EID_CHALLENGE, pframe, len); OnAuth23a()
1341 u8 *pframe = skb->data; OnAssocReq23a() local
1736 rtw_cfg80211_indicate_sta_assoc(padapter, pframe, pkt_len); OnAssocReq23a()
1780 u8 *pframe = skb->data; OnAssocRsp23a() local
1816 pie = pframe + offsetof(struct ieee80211_mgmt, u.assoc_resp.variable); OnAssocRsp23a()
1835 pie = pframe + offsetof(struct ieee80211_mgmt, u.assoc_resp.variable); OnAssocRsp23a()
1839 pie, pframe + pkt_len - pie); OnAssocRsp23a()
1867 memcpy(pmlmepriv->assoc_rsp, pframe, pkt_len); OnAssocRsp23a()
2112 u8 *pframe = skb->data; on_action_public23a() local
2128 if (cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pframe, on_action_public23a()
2361 unsigned char *pframe; issue_beacon23a() local
2392 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_beacon23a()
2393 mgmt = (struct ieee80211_mgmt *)pframe; issue_beacon23a()
2411 pframe = mgmt->u.beacon.variable; issue_beacon23a()
2418 memcpy(pframe, cur_network->IEs, cur_network->IELength); issue_beacon23a()
2419 len_diff = update_hidden_ssid(pframe, cur_network->IELength, issue_beacon23a()
2421 pframe += (cur_network->IELength+len_diff); issue_beacon23a()
2445 pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID, issue_beacon23a()
2451 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, issue_beacon23a()
2456 pframe = rtw_set_ie23a(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *) issue_beacon23a()
2466 pframe = rtw_set_ie23a(pframe, WLAN_EID_IBSS_PARAMS, 2, issue_beacon23a()
2471 pframe = rtw_set_ie23a(pframe, WLAN_EID_ERP_INFO, 1, issue_beacon23a()
2477 pframe = rtw_set_ie23a(pframe, WLAN_EID_EXT_SUPP_RATES, issue_beacon23a()
2511 unsigned char *pframe; issue_probersp() local
2544 pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET; issue_probersp()
2545 mgmt = (struct ieee80211_mgmt *)pframe; issue_probersp()
2569 pframe = mgmt->u.probe_resp.variable; issue_probersp()
2582 memcpy(pframe, cur_network->IEs, cur_network->IELength); issue_probersp()
2583 pframe += cur_network->IELength; issue_probersp()
2590 pframe - mgmt->u.probe_resp.variable); issue_probersp()
2600 remainder_ielen = pframe - remainder_ie; issue_probersp()
2615 pframe += ssid_ielen_diff; issue_probersp()
2622 pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID, issue_probersp()
2629 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, issue_probersp()
2635 pframe = rtw_set_ie23a(pframe, WLAN_EID_DS_PARAMS, 1, issue_probersp()
2645 pframe = rtw_set_ie23a(pframe, WLAN_EID_IBSS_PARAMS, 2, issue_probersp()
2650 pframe = rtw_set_ie23a(pframe, WLAN_EID_ERP_INFO, 1, issue_probersp()
2656 pframe = rtw_set_ie23a(pframe, WLAN_EID_EXT_SUPP_RATES, issue_probersp()
2677 unsigned char *pframe; _issue_probereq() local
2700 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_probereq()
2701 pwlanhdr = (struct ieee80211_hdr *)pframe; _issue_probereq()
2725 pframe += sizeof (struct ieee80211_hdr_3addr); _issue_probereq()
2729 pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID, pssid->ssid_len, _issue_probereq()
2732 pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID, 0, NULL, _issue_probereq()
2738 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, 8, _issue_probereq()
2740 pframe = rtw_set_ie23a(pframe, WLAN_EID_EXT_SUPP_RATES, _issue_probereq()
2744 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, _issue_probereq()
2750 memcpy(pframe, pmlmepriv->wps_probe_req_ie, _issue_probereq()
2752 pframe += pmlmepriv->wps_probe_req_ie_len; _issue_probereq()
2829 unsigned char *pframe; issue_auth() local
2848 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_auth()
2849 mgmt = (struct ieee80211_mgmt *)pframe; issue_auth()
2884 pframe = mgmt->u.auth.variable; issue_auth()
2888 pframe = rtw_set_ie23a(pframe, WLAN_EID_CHALLENGE, 128, issue_auth()
2917 iv_mgmt = (struct ieee80211_mgmt *)(pframe + 4); issue_auth()
2940 pframe = iv_mgmt->u.auth.variable; issue_auth()
2946 pframe = rtw_set_ie23a(pframe, WLAN_EID_CHALLENGE, 128, issue_auth()
2979 unsigned char *pframe; issue_assocrsp() local
3000 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; issue_assocrsp()
3001 mgmt = (struct ieee80211_mgmt *)pframe; issue_assocrsp()
3021 pframe = mgmt->u.assoc_resp.variable; issue_assocrsp()
3024 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, issue_assocrsp()
3028 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, 8, issue_assocrsp()
3030 pframe = rtw_set_ie23a(pframe, WLAN_EID_EXT_SUPP_RATES, issue_assocrsp()
3041 memcpy(pframe, p, p[1] + 2); issue_assocrsp()
3042 pframe += (p[1] + 2); issue_assocrsp()
3051 memcpy(pframe, p, p[1] + 2); issue_assocrsp()
3052 pframe += (p[1] + 2); issue_assocrsp()
3071 memcpy(pframe, p, ie_len + 2); issue_assocrsp()
3072 pframe += (ie_len + 2); issue_assocrsp()
3084 pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, 6, issue_assocrsp()
3099 unsigned char *pframe; issue_assocreq() local
3122 pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET; issue_assocreq()
3123 mgmt = (struct ieee80211_mgmt *)pframe; issue_assocreq()
3141 pframe = mgmt->u.assoc_req.variable; issue_assocreq()
3145 pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID, issue_assocreq()
3207 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, 8, issue_assocreq()
3209 pframe = rtw_set_ie23a(pframe, WLAN_EID_EXT_SUPP_RATES, issue_assocreq()
3213 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, issue_assocreq()
3223 pframe = rtw_set_ie23a(pframe, WLAN_EID_RSN, p[1], p + 2, issue_assocreq()
3290 pframe = rtw_set_ie23a(pframe, WLAN_EID_HT_CAPABILITY, issue_assocreq()
3315 pframe = rtw_set_ie23a(pframe, issue_assocreq()
3330 pframe = rtw_set_ie23a(pframe, WLAN_EID_VENDOR_SPECIFIC, 6, issue_assocreq()
3360 unsigned char *pframe; _issue_nulldata23a() local
3386 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_nulldata23a()
3387 pwlanhdr = (struct ieee80211_hdr *)pframe; _issue_nulldata23a()
3408 pframe += sizeof(struct ieee80211_hdr_3addr); _issue_nulldata23a()
3483 unsigned char *pframe; _issue_qos_nulldata23a() local
3507 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; _issue_qos_nulldata23a()
3508 pwlanhdr = (struct ieee80211_qos_hdr *)pframe; _issue_qos_nulldata23a()
3535 pframe += sizeof(struct ieee80211_qos_hdr); _issue_qos_nulldata23a()
3711 unsigned char *pframe; issue_action_spct_ch_switch23a() local
3744 pframe = mgmt->u.action.u.chan_switch.variable; issue_action_spct_ch_switch23a()
3748 pframe = rtw_set_ie23a_ch_switch (pframe, &pattrib->pktlen, 0, issue_action_spct_ch_switch23a()
3750 pframe = rtw_set_ie23a_secondary_ch_offset(pframe, &pattrib->pktlen, issue_action_spct_ch_switch23a()
H A Drtw_xmit.c396 u8 *pframe = skb->data; set_qos() local
402 ip_hdr = (struct iphdr *)(pframe + ETH_HLEN); set_qos()
456 u8 *pframe = skb->data; update_attrib() local
458 pframe += ETH_HLEN; update_attrib()
460 if ((pframe[21] == 68 && pframe[23] == 67) || update_attrib()
461 (pframe[21] == 67 && pframe[23] == 68)) { update_attrib()
643 u8 *pframe, *payload, mic[8]; xmitframe_addmic() local
676 pframe = pxmitframe->buf_addr + hw_hdr_offset; xmitframe_addmic()
693 if (pframe[1] & 1) { /* ToDS == 1 */ xmitframe_addmic()
695 rtw_secmicappend23a(&micdata, &pframe[16], 6); xmitframe_addmic()
696 if (pframe[1] & 2) /* From Ds == 1 */ xmitframe_addmic()
698 &pframe[24], 6); xmitframe_addmic()
701 &pframe[10], 6); xmitframe_addmic()
704 rtw_secmicappend23a(&micdata, &pframe[4], 6); xmitframe_addmic()
705 if (pframe[1] & 2) /* From Ds == 1 */ xmitframe_addmic()
707 &pframe[16], 6); xmitframe_addmic()
710 &pframe[10], 6); xmitframe_addmic()
719 payload = pframe; xmitframe_addmic()
725 "=== curfragnum =%d, pframe = 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n", xmitframe_addmic()
1060 5. move frag chunk from pframe to pxmitframe->mem
1072 u8 *pframe, *mem_start; rtw_xmitframe_coalesce23a() local
1127 pframe = mem_start; rtw_xmitframe_coalesce23a()
1130 pframe += pattrib->hdrlen; rtw_xmitframe_coalesce23a()
1163 memcpy(pframe, pattrib->iv, pattrib->iv_len); rtw_xmitframe_coalesce23a()
1166 "rtw_xmiaframe_coalesce23a: keyid =%d pattrib->iv[3]=%.2x pframe =%.2x %.2x %.2x %.2x\n", rtw_xmitframe_coalesce23a()
1168 pattrib->iv[3], *pframe, *(pframe+1), rtw_xmitframe_coalesce23a()
1169 *(pframe+2), *(pframe+3)); rtw_xmitframe_coalesce23a()
1170 pframe += pattrib->iv_len; rtw_xmitframe_coalesce23a()
1174 llc_sz = rtw_put_snap(pframe, pattrib->ether_type); rtw_xmitframe_coalesce23a()
1175 pframe += llc_sz; rtw_xmitframe_coalesce23a()
1188 memcpy(pframe, pdata, mem_sz); rtw_xmitframe_coalesce23a()
1190 pframe += mem_sz; rtw_xmitframe_coalesce23a()
1195 memcpy(pframe, pattrib->icv, pattrib->icv_len); rtw_xmitframe_coalesce23a()
1196 pframe += pattrib->icv_len; rtw_xmitframe_coalesce23a()
1221 mem_start = PTR_ALIGN(pframe, 4) + hw_hdr_offset; rtw_xmitframe_coalesce23a()
H A Drtw_recv.c107 struct recv_frame *pframe; rtw_alloc_recvframe23a() local
115 pframe = NULL; rtw_alloc_recvframe23a()
121 pframe = container_of(plist, struct recv_frame, list); rtw_alloc_recvframe23a()
123 list_del_init(&pframe->list); rtw_alloc_recvframe23a()
124 padapter = pframe->adapter; rtw_alloc_recvframe23a()
134 return pframe; rtw_alloc_recvframe23a()
287 u8 *pframe, *payload, *pframemic; recvframe_chkmic() local
332 pframe = precvframe->pkt->data; recvframe_chkmic()
333 payload = pframe + prxattrib->hdrlen + recvframe_chkmic()
341 rtw_seccalctkipmic23a(mickey, pframe, payload, recvframe_chkmic()
H A Drtw_mlme.c2107 unsigned char *pframe; rtw_restructure_ht_ie23a() local
2123 pframe = rtw_set_ie23a(out_ie + out_len, rtw_restructure_ht_ie23a()
2156 pframe = rtw_set_ie23a(out_ie + out_len, WLAN_EID_HT_CAPABILITY, rtw_restructure_ht_ie23a()
2165 pframe = rtw_set_ie23a(out_ie + out_len, rtw_restructure_ht_ie23a()
H A Drtw_wlan_util.c1302 unsigned char check_assoc_AP23a(u8 *pframe, uint len) check_assoc_AP23a() argument
1313 p = pframe + i; check_assoc_AP23a()
/linux-4.1.27/drivers/staging/rtl8712/
H A Drtl871x_security.c172 u8 *pframe, *payload, *iv; /*,*wepkey*/ r8712_wep_encrypt() local
181 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr+TXDESC_OFFSET; r8712_wep_encrypt()
188 iv = pframe+pattrib->hdrlen; r8712_wep_encrypt()
193 payload = pframe+pattrib->iv_len+pattrib->hdrlen; r8712_wep_encrypt()
215 pframe += pxmitpriv->frag_len; r8712_wep_encrypt()
216 pframe = (u8 *)RND4((addr_t)(pframe)); r8712_wep_encrypt()
228 u8 *pframe, *payload, *iv, wepkey[16]; r8712_wep_decrypt() local
234 pframe = (unsigned char *)((union recv_frame *)precvframe)-> r8712_wep_decrypt()
239 iv = pframe + prxattrib->hdrlen; r8712_wep_decrypt()
248 payload = pframe+prxattrib->iv_len+prxattrib->hdrlen; r8712_wep_decrypt()
583 u8 *pframe, *payload, *iv, *prwskey; r8712_tkip_encrypt() local
593 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr+TXDESC_OFFSET; r8712_tkip_encrypt()
605 iv = pframe + pattrib->hdrlen; r8712_tkip_encrypt()
606 payload = pframe+pattrib->iv_len + r8712_tkip_encrypt()
638 pframe += pxmitpriv->frag_len; r8712_tkip_encrypt()
639 pframe = (u8 *)RND4((addr_t)(pframe)); r8712_tkip_encrypt()
658 u8 *pframe, *payload, *iv, *prwskey, idx = 0; r8712_tkip_decrypt() local
665 pframe = (unsigned char *)((union recv_frame *) r8712_tkip_decrypt()
672 iv = pframe+prxattrib->hdrlen; r8712_tkip_decrypt()
673 payload = pframe+prxattrib->iv_len + prxattrib->hdrlen; r8712_tkip_decrypt()
1029 u8 *pframe, uint plen) aes_cipher()
1045 uint frtype = GetFrameType(pframe); aes_cipher()
1046 uint frsubtype = GetFrameSubType(pframe); aes_cipher()
1077 pn_vector[0] = pframe[hdrlen]; aes_cipher()
1078 pn_vector[1] = pframe[hdrlen+1]; aes_cipher()
1079 pn_vector[2] = pframe[hdrlen+4]; aes_cipher()
1080 pn_vector[3] = pframe[hdrlen+5]; aes_cipher()
1081 pn_vector[4] = pframe[hdrlen+6]; aes_cipher()
1082 pn_vector[5] = pframe[hdrlen+7]; aes_cipher()
1083 construct_mic_iv(mic_iv, qc_exists, a4_exists, pframe, plen, pn_vector); aes_cipher()
1084 construct_mic_header1(mic_header1, hdrlen, pframe); aes_cipher()
1085 construct_mic_header2(mic_header2, pframe, a4_exists, qc_exists); aes_cipher()
1097 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_cipher()
1106 padded_buffer[j] = pframe[payload_index++]; aes_cipher()
1114 pframe[payload_index+j] = mic[j]; aes_cipher()
1118 pframe, pn_vector, i + 1); aes_cipher()
1120 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_cipher()
1122 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1127 pframe, pn_vector, num_blocks+1); aes_cipher()
1131 padded_buffer[j] = pframe[payload_index+j]; aes_cipher()
1135 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1139 pframe, pn_vector, 0); aes_cipher()
1143 padded_buffer[j] = pframe[j+hdrlen+8+plen]; aes_cipher()
1147 pframe[payload_index++] = chain_buffer[j]; aes_cipher()
1155 u8 *pframe, *prwskey; r8712_aes_encrypt() local
1164 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + TXDESC_OFFSET; r8712_aes_encrypt()
1182 hdrlen, pframe, length); r8712_aes_encrypt()
1189 hdrlen, pframe, length); r8712_aes_encrypt()
1190 pframe += pxmitpriv->frag_len; r8712_aes_encrypt()
1191 pframe = (u8 *)RND4((addr_t)(pframe)); r8712_aes_encrypt()
1201 u8 *pframe, uint plen) aes_decipher()
1216 uint frtype = GetFrameType(pframe); aes_decipher()
1217 uint frsubtype = GetFrameSubType(pframe); aes_decipher()
1231 pn_vector[0] = pframe[hdrlen]; aes_decipher()
1232 pn_vector[1] = pframe[hdrlen+1]; aes_decipher()
1233 pn_vector[2] = pframe[hdrlen+4]; aes_decipher()
1234 pn_vector[3] = pframe[hdrlen+5]; aes_decipher()
1235 pn_vector[4] = pframe[hdrlen+6]; aes_decipher()
1236 pn_vector[5] = pframe[hdrlen+7]; aes_decipher()
1257 /* now, decrypt pframe with hdrlen offset and plen long */ aes_decipher()
1261 pframe, pn_vector, i + 1); aes_decipher()
1263 bitwise_xor(aes_out, &pframe[payload_index], chain_buffer); aes_decipher()
1265 pframe[payload_index++] = chain_buffer[j]; aes_decipher()
1270 pframe, pn_vector, num_blocks+1); aes_decipher()
1274 padded_buffer[j] = pframe[payload_index + j]; aes_decipher()
1278 pframe[payload_index++] = chain_buffer[j]; aes_decipher()
1281 memcpy((void *)message, pframe, (hdrlen + plen + 8)); aes_decipher()
1282 pn_vector[0] = pframe[hdrlen]; aes_decipher()
1283 pn_vector[1] = pframe[hdrlen+1]; aes_decipher()
1284 pn_vector[2] = pframe[hdrlen+4]; aes_decipher()
1285 pn_vector[3] = pframe[hdrlen+5]; aes_decipher()
1286 pn_vector[4] = pframe[hdrlen+6]; aes_decipher()
1287 pn_vector[5] = pframe[hdrlen+7]; aes_decipher()
1362 u8 *pframe, *prwskey, *iv, idx; r8712_aes_decrypt() local
1368 pframe = (unsigned char *)((union recv_frame *)precvframe)-> r8712_aes_decrypt()
1376 iv = pframe+prxattrib->hdrlen; r8712_aes_decrypt()
1387 aes_decipher(prwskey, prxattrib->hdrlen, pframe, r8712_aes_decrypt()
1028 aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) aes_cipher() argument
1200 aes_decipher(u8 *key, uint hdrlen, u8 *pframe, uint plen) aes_decipher() argument
H A Dwifi.h184 #define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
316 static inline unsigned char *get_da(unsigned char *pframe) get_da() argument
319 unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); get_da()
323 da = GetAddr1Ptr(pframe); get_da()
326 da = GetAddr1Ptr(pframe); get_da()
329 da = GetAddr3Ptr(pframe); get_da()
332 da = GetAddr3Ptr(pframe); get_da()
339 static inline unsigned char *get_sa(unsigned char *pframe) get_sa() argument
342 unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); get_sa()
346 sa = GetAddr2Ptr(pframe); get_sa()
349 sa = GetAddr3Ptr(pframe); get_sa()
352 sa = GetAddr2Ptr(pframe); get_sa()
355 sa = GetAddr4Ptr(pframe); get_sa()
362 static inline unsigned char *get_hdr_bssid(unsigned char *pframe) get_hdr_bssid() argument
365 unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); get_hdr_bssid()
369 sa = GetAddr3Ptr(pframe); get_hdr_bssid()
372 sa = GetAddr2Ptr(pframe); get_hdr_bssid()
375 sa = GetAddr1Ptr(pframe); get_hdr_bssid()
H A Drtl871x_xmit.c349 u8 *pframe, *payload, mic[8]; xmitframe_addmic() local
370 pframe = pxmitframe->buf_addr + TXDESC_OFFSET; xmitframe_addmic()
389 if (pframe[1] & 1) { /* ToDS==1 */ xmitframe_addmic()
391 &pframe[16], 6); /*DA*/ xmitframe_addmic()
392 if (pframe[1]&2) /* From Ds==1 */ xmitframe_addmic()
394 &pframe[24], 6); xmitframe_addmic()
397 &pframe[10], 6); xmitframe_addmic()
400 &pframe[4], 6); /* DA */ xmitframe_addmic()
401 if (pframe[1]&2) /* From Ds==1 */ xmitframe_addmic()
403 &pframe[16], 6); xmitframe_addmic()
406 &pframe[10], 6); xmitframe_addmic()
412 payload = pframe; xmitframe_addmic()
579 * 5. move frag chunk from pframe to pxmitframe->mem
591 u8 *pframe, *mem_start, *ptxdesc; r8712_xmitframe_coalesce() local
625 pframe = mem_start; r8712_xmitframe_coalesce()
627 pframe += pattrib->hdrlen; r8712_xmitframe_coalesce()
660 memcpy(pframe, pattrib->iv, pattrib->iv_len); r8712_xmitframe_coalesce()
661 pframe += pattrib->iv_len; r8712_xmitframe_coalesce()
665 llc_sz = r8712_put_snap(pframe, pattrib->ether_type); r8712_xmitframe_coalesce()
666 pframe += llc_sz; r8712_xmitframe_coalesce()
672 mem_sz = _r8712_pktfile_read(&pktfile, pframe, r8712_xmitframe_coalesce()
675 mem_sz = _r8712_pktfile_read(&pktfile, pframe, r8712_xmitframe_coalesce()
677 pframe += mem_sz; r8712_xmitframe_coalesce()
679 memcpy(pframe, pattrib->icv, pattrib->icv_len); r8712_xmitframe_coalesce()
680 pframe += pattrib->icv_len; r8712_xmitframe_coalesce()
694 addr = (addr_t)(pframe); r8712_xmitframe_coalesce()
H A Drtl871x_recv.c165 u8 *pframe, *payload, *pframemic; r8712_recvframe_chkmic() local
188 pframe = precvframe->u.hdr.rx_data; r8712_recvframe_chkmic()
189 payload = pframe + prxattrib->hdrlen + r8712_recvframe_chkmic()
191 seccalctkipmic(mickey, pframe, payload, datalen, r8712_recvframe_chkmic()
/linux-4.1.27/drivers/staging/rtl8188eu/hal/
H A Drtl8188e_cmd.c246 static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength) ConstructBeacon() argument
256 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ConstructBeacon()
266 SetFrameSubType(pframe, WIFI_BEACON); ConstructBeacon()
268 pframe += sizeof(struct rtw_ieee80211_hdr_3addr); ConstructBeacon()
272 pframe += 8; ConstructBeacon()
276 memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval_from_ie(cur_network->IEs)), 2); ConstructBeacon()
278 pframe += 2; ConstructBeacon()
282 memcpy(pframe, (unsigned char *)(rtw_get_capability_from_ie(cur_network->IEs)), 2); ConstructBeacon()
284 pframe += 2; ConstructBeacon()
289 memcpy(pframe, cur_network->IEs+sizeof(struct ndis_802_11_fixed_ie), pktlen); ConstructBeacon()
297 pframe = rtw_set_ie(pframe, _SSID_IE_, cur_network->Ssid.SsidLength, cur_network->Ssid.Ssid, &pktlen); ConstructBeacon()
301 pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, ((rate_len > 8) ? 8 : rate_len), cur_network->SupportedRates, &pktlen); ConstructBeacon()
304 pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&(cur_network->Configuration.DSConfig), &pktlen); ConstructBeacon()
310 pframe = rtw_set_ie(pframe, _IBSS_PARA_IE_, 2, (unsigned char *)(&ATIMWindow), &pktlen); ConstructBeacon()
317 pframe = rtw_set_ie(pframe, _EXT_SUPPORTEDRATES_IE_, (rate_len - 8), (cur_network->SupportedRates + 8), &pktlen); ConstructBeacon()
331 static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength) ConstructPSPoll() argument
339 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ConstructPSPoll()
345 SetFrameSubType(pframe, WIFI_PSPOLL); ConstructPSPoll()
348 SetDuration(pframe, (pmlmeinfo->aid | 0xc000)); ConstructPSPoll()
359 static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, ConstructNullFunctionData() argument
376 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ConstructNullFunctionData()
409 SetFrameSubType(pframe, WIFI_QOS_DATA_NULL); ConstructNullFunctionData()
411 pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe; ConstructNullFunctionData()
417 SetFrameSubType(pframe, WIFI_DATA_NULL); ConstructNullFunctionData()
425 static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u8 *StaAddr, bool bHideSSID) ConstructProbeRsp() argument
435 pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; ConstructProbeRsp()
450 pframe += pktlen; ConstructProbeRsp()
455 memcpy(pframe, cur_network->IEs, cur_network->IELength); ConstructProbeRsp()
456 pframe += cur_network->IELength; ConstructProbeRsp()
/linux-4.1.27/drivers/staging/rtl8723au/hal/
H A Drtl8723a_cmd.c186 ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength) ConstructBeacon() argument
197 mgmt = (struct ieee80211_mgmt *)pframe; ConstructBeacon()
217 pframe = mgmt->u.beacon.variable; ConstructBeacon()
223 memcpy(pframe, cur_network->IEs, pktlen); ConstructBeacon()
231 pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID, ConstructBeacon()
237 pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES, ((rate_len > 8) ? ConstructBeacon()
241 pframe = rtw_set_ie23a(pframe, WLAN_EID_DS_PARAMS, 1, (unsigned char *) ConstructBeacon()
249 pframe = rtw_set_ie23a(pframe, WLAN_EID_IBSS_PARAMS, 2, ConstructBeacon()
257 pframe = rtw_set_ie23a(pframe, WLAN_EID_EXT_SUPP_RATES, ConstructBeacon()
278 u8 *pframe, u32 *pLength) ConstructPSPoll()
284 pwlanhdr = (struct ieee80211_hdr *)pframe; ConstructPSPoll()
304 ConstructNullFunctionData(struct rtw_adapter *padapter, u8 *pframe, ConstructNullFunctionData() argument
315 pwlanhdr = (struct ieee80211_hdr *)pframe; ConstructNullFunctionData()
353 qoshdr = (struct ieee80211_qos_hdr *)pframe; ConstructNullFunctionData()
375 static void ConstructProbeRsp(struct rtw_adapter *padapter, u8 *pframe, ConstructProbeRsp() argument
387 mgmt = (struct ieee80211_mgmt *)pframe; ConstructProbeRsp()
277 ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength) ConstructPSPoll() argument
/linux-4.1.27/drivers/usb/gadget/udc/
H A Dfsl_qe_udc.c797 struct qe_frame *pframe; ep0_setup_handle() local
801 pframe = ep->rxframe; ep0_setup_handle()
802 if ((frame_get_info(pframe) & PID_SETUP) ep0_setup_handle()
804 fsize = frame_get_length(pframe); ep0_setup_handle()
808 memcpy(cp, pframe->data, fsize); ep0_setup_handle()
821 struct qe_frame *pframe; qe_ep0_rx() local
826 pframe = ep->rxframe; qe_ep0_rx()
845 qe_frame_clean(pframe); qe_ep0_rx()
847 frame_set_data(pframe, (u8 *)vaddr); qe_ep0_rx()
848 frame_set_length(pframe, qe_ep0_rx()
850 frame_set_status(pframe, FRAME_OK); qe_ep0_rx()
853 frame_set_info(pframe, PID_SETUP); qe_ep0_rx()
856 frame_set_info(pframe, PID_DATA1); qe_ep0_rx()
859 frame_set_info(pframe, PID_DATA0); qe_ep0_rx()
893 struct qe_frame *pframe; qe_ep_rxframe_handle() local
899 pframe = ep->rxframe; qe_ep_rxframe_handle()
901 if (frame_get_info(pframe) & PID_DATA1) qe_ep_rxframe_handle()
909 fsize = frame_get_length(pframe); qe_ep_rxframe_handle()
917 memcpy(cp, pframe->data, fsize); qe_ep_rxframe_handle()
940 struct qe_frame *pframe; ep_rx_tasklet() local
957 pframe = ep->rxframe; ep_rx_tasklet()
973 qe_frame_clean(pframe); ep_rx_tasklet()
975 frame_set_data(pframe, (u8 *)vaddr); ep_rx_tasklet()
976 frame_set_length(pframe, ep_rx_tasklet()
978 frame_set_status(pframe, FRAME_OK); ep_rx_tasklet()
981 frame_set_info(pframe, PID_DATA1); ep_rx_tasklet()
984 frame_set_info(pframe, PID_SETUP); ep_rx_tasklet()
987 frame_set_info(pframe, PID_DATA0); ep_rx_tasklet()
1027 struct qe_frame *pframe; qe_ep_rx() local
1032 pframe = ep->rxframe; qe_ep_rx()
1367 struct qe_frame *pframe; qe_ep0_txconf() local
1373 pframe = ep->txframe; qe_ep0_txconf()
1385 frame_set_status(pframe, FRAME_ERROR); qe_ep0_txconf()
1387 pframe->status |= TX_ER_TIMEOUT; qe_ep0_txconf()
1389 pframe->status |= TX_ER_UNDERUN; qe_ep0_txconf()
1423 struct qe_frame *pframe = NULL; qe_ep_txconf() local
1430 pframe = ep->txframe; qe_ep_txconf()
1432 frame_set_status(pframe, FRAME_ERROR); qe_ep_txconf()
1434 pframe->status |= TX_ER_TIMEOUT; qe_ep_txconf()
1436 pframe->status |= TX_ER_UNDERUN; qe_ep_txconf()
1476 struct qe_frame *pframe = NULL; ep_req_rx() local
1488 pframe = ep->rxframe; ep_req_rx()
1499 qe_frame_clean(pframe); ep_req_rx()
1501 frame_set_data(pframe, (u8 *)vaddr); ep_req_rx()
1502 frame_set_length(pframe, (length - USB_CRC_SIZE)); ep_req_rx()
1503 frame_set_status(pframe, FRAME_OK); ep_req_rx()
1506 frame_set_info(pframe, PID_DATA1); break; ep_req_rx()
1508 frame_set_info(pframe, PID_DATA0); break; ep_req_rx()
1512 if (frame_get_info(pframe) & PID_DATA1) ep_req_rx()
1520 fsize = frame_get_length(pframe); ep_req_rx()
1524 memcpy(cp, pframe->data, fsize); ep_req_rx()
/linux-4.1.27/drivers/staging/rtl8188eu/include/
H A Dwifi.h263 #define get_tofr_ds(pframe) ((GetToDs(pframe) << 1) | GetFrDs(pframe))
377 static inline unsigned char *get_da(unsigned char *pframe) get_da() argument
380 unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); get_da()
384 da = GetAddr1Ptr(pframe); get_da()
387 da = GetAddr1Ptr(pframe); get_da()
390 da = GetAddr3Ptr(pframe); get_da()
393 da = GetAddr3Ptr(pframe); get_da()
399 static inline unsigned char *get_sa(unsigned char *pframe) get_sa() argument
402 unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); get_sa()
406 sa = GetAddr2Ptr(pframe); get_sa()
409 sa = GetAddr3Ptr(pframe); get_sa()
412 sa = GetAddr2Ptr(pframe); get_sa()
415 sa = GetAddr4Ptr(pframe); get_sa()
421 static inline unsigned char *get_hdr_bssid(unsigned char *pframe) get_hdr_bssid() argument
424 unsigned int to_fr_ds = (GetToDs(pframe) << 1) | GetFrDs(pframe); get_hdr_bssid()
428 sa = GetAddr3Ptr(pframe); get_hdr_bssid()
431 sa = GetAddr2Ptr(pframe); get_hdr_bssid()
434 sa = GetAddr1Ptr(pframe); get_hdr_bssid()
437 sa = GetAddr1Ptr(pframe); get_hdr_bssid()
446 static inline int IsFrameTypeCtrl(unsigned char *pframe) IsFrameTypeCtrl() argument
448 if (WIFI_CTRL_TYPE == GetFrameType(pframe)) IsFrameTypeCtrl()
H A Drtw_mlme_ext.h505 unsigned char check_assoc_AP(u8 *pframe, uint len);
517 void update_beacon_info(struct adapter *padapter, u8 *pframe, uint len,
519 int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len);
665 void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
/linux-4.1.27/drivers/scsi/
H A Dmvumi.c2065 struct mvumi_msg_frame *pframe; mvumi_build_frame() local
2069 pframe = cmd->frame; mvumi_build_frame()
2070 pframe->device_id = ((unsigned short) scmd->device->id) | mvumi_build_frame()
2072 pframe->cmd_flag = 0; mvumi_build_frame()
2076 pframe->cmd_flag |= CMD_FLAG_NON_DATA; mvumi_build_frame()
2079 pframe->cmd_flag |= CMD_FLAG_DATA_IN; mvumi_build_frame()
2082 pframe->cmd_flag |= CMD_FLAG_DATA_OUT; mvumi_build_frame()
2091 pframe->cdb_length = scmd->cmd_len; mvumi_build_frame()
2092 memcpy(pframe->cdb, scmd->cmnd, pframe->cdb_length); mvumi_build_frame()
2093 pframe->req_function = CL_FUN_SCSI_CMD; mvumi_build_frame()
2095 if (mvumi_make_sgl(mhba, scmd, &pframe->payload[0], mvumi_build_frame()
2096 &pframe->sg_counts)) mvumi_build_frame()
2099 pframe->data_transfer_length = scsi_bufflen(scmd); mvumi_build_frame()
2101 pframe->sg_counts = 0; mvumi_build_frame()
2102 pframe->data_transfer_length = 0; mvumi_build_frame()
/linux-4.1.27/drivers/staging/rtl8723au/os_dep/
H A Dioctl_cfg80211.c2510 unsigned char *pframe; rtw_cfg80211_monitor_if_xmit_entry() local
2539 pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET; rtw_cfg80211_monitor_if_xmit_entry()
2541 memcpy(pframe, skb->data, len); rtw_cfg80211_monitor_if_xmit_entry()
2957 unsigned char *pframe; _cfg80211_rtw_mgmt_tx() local
2995 pframe = (u8 *) (pmgntframe->buf_addr) + TXDESC_OFFSET; _cfg80211_rtw_mgmt_tx()
2997 memcpy(pframe, (void *)buf, len); _cfg80211_rtw_mgmt_tx()
3000 pwlanhdr = (struct ieee80211_hdr *)pframe; _cfg80211_rtw_mgmt_tx()
/linux-4.1.27/drivers/staging/rtl8192u/ieee80211/
H A Dieee80211.h484 #define IsQoSDataFrame(pframe) ((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA))
485 #define Frame_Order(pframe) (*(u16 *)pframe&IEEE80211_FCTL_ORDER)
/linux-4.1.27/drivers/staging/rtl8192e/
H A Drtllib.h602 #define IsQoSDataFrame(pframe) \
603 ((*(u16 *)pframe&(RTLLIB_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
605 #define Frame_Order(pframe) (*(u16 *)pframe&RTLLIB_FCTL_ORDER)
/linux-4.1.27/drivers/staging/rtl8723au/include/
H A Drtw_mlme_ext.h493 unsigned char check_assoc_AP23a(u8 *pframe, uint len);

Completed in 1057 milliseconds