• Home
  • Raw
  • Download

Lines Matching refs:pos

911 		const u8 *pos = elem->data;  in _ieee802_11_parse_elems_crc()  local
965 crc = crc32_be(crc, pos - 2, elen + 2); in _ieee802_11_parse_elems_crc()
975 elems->lnk_id = (void *)(pos - 2); in _ieee802_11_parse_elems_crc()
982 elems->ch_sw_timing = (void *)pos; in _ieee802_11_parse_elems_crc()
985 elems->ext_capab = pos; in _ieee802_11_parse_elems_crc()
989 elems->ssid = pos; in _ieee802_11_parse_elems_crc()
993 elems->supp_rates = pos; in _ieee802_11_parse_elems_crc()
998 elems->ds_params = pos; in _ieee802_11_parse_elems_crc()
1004 elems->tim = (void *)pos; in _ieee802_11_parse_elems_crc()
1010 if (elen >= 4 && pos[0] == 0x00 && pos[1] == 0x50 && in _ieee802_11_parse_elems_crc()
1011 pos[2] == 0xf2) { in _ieee802_11_parse_elems_crc()
1015 crc = crc32_be(crc, pos - 2, elen + 2); in _ieee802_11_parse_elems_crc()
1017 if (elen >= 5 && pos[3] == 2) { in _ieee802_11_parse_elems_crc()
1019 if (pos[4] == 0) { in _ieee802_11_parse_elems_crc()
1020 elems->wmm_info = pos; in _ieee802_11_parse_elems_crc()
1022 } else if (pos[4] == 1) { in _ieee802_11_parse_elems_crc()
1023 elems->wmm_param = pos; in _ieee802_11_parse_elems_crc()
1030 elems->rsn = pos; in _ieee802_11_parse_elems_crc()
1035 elems->erp_info = pos; in _ieee802_11_parse_elems_crc()
1040 elems->ext_supp_rates = pos; in _ieee802_11_parse_elems_crc()
1045 elems->ht_cap_elem = (void *)pos; in _ieee802_11_parse_elems_crc()
1051 elems->ht_operation = (void *)pos; in _ieee802_11_parse_elems_crc()
1057 elems->vht_cap_elem = (void *)pos; in _ieee802_11_parse_elems_crc()
1063 elems->vht_operation = (void *)pos; in _ieee802_11_parse_elems_crc()
1065 crc = crc32_be(crc, pos - 2, elen + 2); in _ieee802_11_parse_elems_crc()
1072 elems->opmode_notif = pos; in _ieee802_11_parse_elems_crc()
1074 crc = crc32_be(crc, pos - 2, elen + 2); in _ieee802_11_parse_elems_crc()
1080 elems->mesh_id = pos; in _ieee802_11_parse_elems_crc()
1085 elems->mesh_config = (void *)pos; in _ieee802_11_parse_elems_crc()
1090 elems->peering = pos; in _ieee802_11_parse_elems_crc()
1095 elems->awake_window = (void *)pos; in _ieee802_11_parse_elems_crc()
1098 elems->preq = pos; in _ieee802_11_parse_elems_crc()
1102 elems->prep = pos; in _ieee802_11_parse_elems_crc()
1106 elems->perr = pos; in _ieee802_11_parse_elems_crc()
1111 elems->rann = (void *)pos; in _ieee802_11_parse_elems_crc()
1120 elems->ch_switch_ie = (void *)pos; in _ieee802_11_parse_elems_crc()
1127 elems->ext_chansw_ie = (void *)pos; in _ieee802_11_parse_elems_crc()
1134 elems->sec_chan_offs = (void *)pos; in _ieee802_11_parse_elems_crc()
1142 elems->mesh_chansw_params_ie = (void *)pos; in _ieee802_11_parse_elems_crc()
1150 elems->wide_bw_chansw_ie = (void *)pos; in _ieee802_11_parse_elems_crc()
1163 pos, elen); in _ieee802_11_parse_elems_crc()
1173 elems->country_elem = pos; in _ieee802_11_parse_elems_crc()
1181 elems->pwr_constr_elem = pos; in _ieee802_11_parse_elems_crc()
1194 if (pos[0] != 0x00 || pos[1] != 0x40 || in _ieee802_11_parse_elems_crc()
1195 pos[2] != 0x96 || pos[3] != 0x00) in _ieee802_11_parse_elems_crc()
1204 crc = crc32_be(crc, pos - 2, elen + 2); in _ieee802_11_parse_elems_crc()
1206 elems->cisco_dtpc_elem = pos; in _ieee802_11_parse_elems_crc()
1213 elems->addba_ext_ie = (void *)pos; in _ieee802_11_parse_elems_crc()
1217 elems->timeout_int = (void *)pos; in _ieee802_11_parse_elems_crc()
1223 elems->max_idle_period_ie = (void *)pos; in _ieee802_11_parse_elems_crc()
1228 if (pos[0] == WLAN_EID_EXT_HE_MU_EDCA && in _ieee802_11_parse_elems_crc()
1230 elems->mu_edca_param_set = (void *)&pos[1]; in _ieee802_11_parse_elems_crc()
1232 crc = crc32_be(crc, pos - 2, elen + 2); in _ieee802_11_parse_elems_crc()
1233 } else if (pos[0] == WLAN_EID_EXT_HE_CAPABILITY) { in _ieee802_11_parse_elems_crc()
1234 elems->he_cap = (void *)&pos[1]; in _ieee802_11_parse_elems_crc()
1236 } else if (pos[0] == WLAN_EID_EXT_HE_OPERATION && in _ieee802_11_parse_elems_crc()
1238 elen >= ieee80211_he_oper_size(&pos[1])) { in _ieee802_11_parse_elems_crc()
1239 elems->he_operation = (void *)&pos[1]; in _ieee802_11_parse_elems_crc()
1240 } else if (pos[0] == WLAN_EID_EXT_UORA && elen >= 1) { in _ieee802_11_parse_elems_crc()
1241 elems->uora_element = (void *)&pos[1]; in _ieee802_11_parse_elems_crc()
1242 } else if (pos[0] == in _ieee802_11_parse_elems_crc()
1245 elems->max_channel_switch_time = pos + 1; in _ieee802_11_parse_elems_crc()
1246 } else if (pos[0] == in _ieee802_11_parse_elems_crc()
1249 elems->mbssid_config_ie = (void *)&pos[1]; in _ieee802_11_parse_elems_crc()
1250 } else if (pos[0] == WLAN_EID_EXT_HE_SPR && in _ieee802_11_parse_elems_crc()
1252 elen >= ieee80211_he_spr_size(&pos[1])) { in _ieee802_11_parse_elems_crc()
1253 elems->he_spr = (void *)&pos[1]; in _ieee802_11_parse_elems_crc()
1638 static u8 *ieee80211_write_he_6ghz_cap(u8 *pos, __le16 cap, u8 *end) in ieee80211_write_he_6ghz_cap() argument
1640 if ((end - pos) < 5) in ieee80211_write_he_6ghz_cap()
1641 return pos; in ieee80211_write_he_6ghz_cap()
1643 *pos++ = WLAN_EID_EXTENSION; in ieee80211_write_he_6ghz_cap()
1644 *pos++ = 1 + sizeof(cap); in ieee80211_write_he_6ghz_cap()
1645 *pos++ = WLAN_EID_EXT_HE_6GHZ_CAPA; in ieee80211_write_he_6ghz_cap()
1646 memcpy(pos, &cap, sizeof(cap)); in ieee80211_write_he_6ghz_cap()
1648 return pos + 2; in ieee80211_write_he_6ghz_cap()
1662 u8 *pos = buffer, *end = buffer + buffer_len; in ieee80211_build_preq_ies_band() local
1695 if (end - pos < 2 + supp_rates_len) in ieee80211_build_preq_ies_band()
1697 *pos++ = WLAN_EID_SUPP_RATES; in ieee80211_build_preq_ies_band()
1698 *pos++ = supp_rates_len; in ieee80211_build_preq_ies_band()
1699 memcpy(pos, rates, supp_rates_len); in ieee80211_build_preq_ies_band()
1700 pos += supp_rates_len; in ieee80211_build_preq_ies_band()
1713 if (end - pos < noffset - *offset) in ieee80211_build_preq_ies_band()
1715 memcpy(pos, ie + *offset, noffset - *offset); in ieee80211_build_preq_ies_band()
1716 pos += noffset - *offset; in ieee80211_build_preq_ies_band()
1722 if (end - pos < 2 + ext_rates_len) in ieee80211_build_preq_ies_band()
1724 *pos++ = WLAN_EID_EXT_SUPP_RATES; in ieee80211_build_preq_ies_band()
1725 *pos++ = ext_rates_len; in ieee80211_build_preq_ies_band()
1726 memcpy(pos, rates + supp_rates_len, ext_rates_len); in ieee80211_build_preq_ies_band()
1727 pos += ext_rates_len; in ieee80211_build_preq_ies_band()
1731 if (end - pos < 3) in ieee80211_build_preq_ies_band()
1733 *pos++ = WLAN_EID_DS_PARAMS; in ieee80211_build_preq_ies_band()
1734 *pos++ = 1; in ieee80211_build_preq_ies_band()
1735 *pos++ = ieee80211_frequency_to_channel( in ieee80211_build_preq_ies_band()
1755 if (end - pos < noffset - *offset) in ieee80211_build_preq_ies_band()
1757 memcpy(pos, ie + *offset, noffset - *offset); in ieee80211_build_preq_ies_band()
1758 pos += noffset - *offset; in ieee80211_build_preq_ies_band()
1763 if (end - pos < 2 + sizeof(struct ieee80211_ht_cap)) in ieee80211_build_preq_ies_band()
1765 pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap, in ieee80211_build_preq_ies_band()
1787 if (end - pos < noffset - *offset) in ieee80211_build_preq_ies_band()
1789 memcpy(pos, ie + *offset, noffset - *offset); in ieee80211_build_preq_ies_band()
1790 pos += noffset - *offset; in ieee80211_build_preq_ies_band()
1805 if (end - pos < 2 + sizeof(struct ieee80211_vht_cap)) in ieee80211_build_preq_ies_band()
1807 pos = ieee80211_ie_build_vht_cap(pos, &sband->vht_cap, in ieee80211_build_preq_ies_band()
1825 if (end - pos < noffset - *offset) in ieee80211_build_preq_ies_band()
1827 memcpy(pos, ie + *offset, noffset - *offset); in ieee80211_build_preq_ies_band()
1828 pos += noffset - *offset; in ieee80211_build_preq_ies_band()
1834 pos = ieee80211_ie_build_he_cap(pos, he_cap, end); in ieee80211_build_preq_ies_band()
1835 if (!pos) in ieee80211_build_preq_ies_band()
1843 pos = ieee80211_write_he_6ghz_cap(pos, cap, end); in ieee80211_build_preq_ies_band()
1852 return pos - buffer; in ieee80211_build_preq_ies_band()
1856 return pos - buffer; in ieee80211_build_preq_ies_band()
1867 size_t pos = 0, old_pos = 0, custom_ie_offset = 0; in ieee80211_build_preq_ies() local
1874 pos += ieee80211_build_preq_ies_band(sdata, in ieee80211_build_preq_ies()
1875 buffer + pos, in ieee80211_build_preq_ies()
1876 buffer_len - pos, in ieee80211_build_preq_ies()
1883 ie_desc->len[i] = pos - old_pos; in ieee80211_build_preq_ies()
1884 old_pos = pos; in ieee80211_build_preq_ies()
1890 if (WARN_ONCE(buffer_len - pos < ie_len - custom_ie_offset, in ieee80211_build_preq_ies()
1892 return pos; in ieee80211_build_preq_ies()
1893 memcpy(buffer + pos, ie + custom_ie_offset, in ieee80211_build_preq_ies()
1895 ie_desc->common_ies = buffer + pos; in ieee80211_build_preq_ies()
1897 pos += ie_len - custom_ie_offset; in ieee80211_build_preq_ies()
1900 return pos; in ieee80211_build_preq_ies()
2645 size_t pos = offset; in ieee80211_ie_split_vendor() local
2647 while (pos < ielen && ies[pos] != WLAN_EID_VENDOR_SPECIFIC) in ieee80211_ie_split_vendor()
2648 pos += 2 + ies[pos + 1]; in ieee80211_ie_split_vendor()
2650 return pos; in ieee80211_ie_split_vendor()
2693 u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, in ieee80211_ie_build_ht_cap() argument
2698 *pos++ = WLAN_EID_HT_CAPABILITY; in ieee80211_ie_build_ht_cap()
2699 *pos++ = sizeof(struct ieee80211_ht_cap); in ieee80211_ie_build_ht_cap()
2700 memset(pos, 0, sizeof(struct ieee80211_ht_cap)); in ieee80211_ie_build_ht_cap()
2704 memcpy(pos, &tmp, sizeof(u16)); in ieee80211_ie_build_ht_cap()
2705 pos += sizeof(u16); in ieee80211_ie_build_ht_cap()
2708 *pos++ = ht_cap->ampdu_factor | in ieee80211_ie_build_ht_cap()
2713 memcpy(pos, &ht_cap->mcs, sizeof(ht_cap->mcs)); in ieee80211_ie_build_ht_cap()
2714 pos += sizeof(ht_cap->mcs); in ieee80211_ie_build_ht_cap()
2717 pos += sizeof(__le16); in ieee80211_ie_build_ht_cap()
2720 pos += sizeof(__le32); in ieee80211_ie_build_ht_cap()
2723 pos += sizeof(u8); in ieee80211_ie_build_ht_cap()
2725 return pos; in ieee80211_ie_build_ht_cap()
2728 u8 *ieee80211_ie_build_vht_cap(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, in ieee80211_ie_build_vht_cap() argument
2733 *pos++ = WLAN_EID_VHT_CAPABILITY; in ieee80211_ie_build_vht_cap()
2734 *pos++ = sizeof(struct ieee80211_vht_cap); in ieee80211_ie_build_vht_cap()
2735 memset(pos, 0, sizeof(struct ieee80211_vht_cap)); in ieee80211_ie_build_vht_cap()
2739 memcpy(pos, &tmp, sizeof(u32)); in ieee80211_ie_build_vht_cap()
2740 pos += sizeof(u32); in ieee80211_ie_build_vht_cap()
2743 memcpy(pos, &vht_cap->vht_mcs, sizeof(vht_cap->vht_mcs)); in ieee80211_ie_build_vht_cap()
2744 pos += sizeof(vht_cap->vht_mcs); in ieee80211_ie_build_vht_cap()
2746 return pos; in ieee80211_ie_build_vht_cap()
2770 u8 *ieee80211_ie_build_he_cap(u8 *pos, in ieee80211_ie_build_he_cap() argument
2776 u8 *orig_pos = pos; in ieee80211_ie_build_he_cap()
2792 if ((end - pos) < ie_len) in ieee80211_ie_build_he_cap()
2795 *pos++ = WLAN_EID_EXTENSION; in ieee80211_ie_build_he_cap()
2796 pos++; /* We'll set the size later below */ in ieee80211_ie_build_he_cap()
2797 *pos++ = WLAN_EID_EXT_HE_CAPABILITY; in ieee80211_ie_build_he_cap()
2800 memcpy(pos, &he_cap->he_cap_elem, sizeof(he_cap->he_cap_elem)); in ieee80211_ie_build_he_cap()
2801 pos += sizeof(he_cap->he_cap_elem); in ieee80211_ie_build_he_cap()
2803 memcpy(pos, &he_cap->he_mcs_nss_supp, n); in ieee80211_ie_build_he_cap()
2804 pos += n; in ieee80211_ie_build_he_cap()
2828 memcpy(pos, &he_cap->ppe_thres, n); in ieee80211_ie_build_he_cap()
2829 pos += n; in ieee80211_ie_build_he_cap()
2832 orig_pos[1] = (pos - orig_pos) - 2; in ieee80211_ie_build_he_cap()
2833 return pos; in ieee80211_ie_build_he_cap()
2842 u8 *pos; in ieee80211_ie_build_he_6ghz_cap() local
2879 pos = skb_put(skb, 2 + 1 + sizeof(cap)); in ieee80211_ie_build_he_6ghz_cap()
2880 ieee80211_write_he_6ghz_cap(pos, cpu_to_le16(cap), in ieee80211_ie_build_he_6ghz_cap()
2881 pos + 2 + 1 + sizeof(cap)); in ieee80211_ie_build_he_6ghz_cap()
2884 u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap, in ieee80211_ie_build_ht_oper() argument
2890 *pos++ = WLAN_EID_HT_OPERATION; in ieee80211_ie_build_ht_oper()
2891 *pos++ = sizeof(struct ieee80211_ht_operation); in ieee80211_ie_build_ht_oper()
2892 ht_oper = (struct ieee80211_ht_operation *)pos; in ieee80211_ie_build_ht_oper()
2925 return pos + sizeof(struct ieee80211_ht_operation); in ieee80211_ie_build_ht_oper()
2928 void ieee80211_ie_build_wide_bw_cs(u8 *pos, in ieee80211_ie_build_wide_bw_cs() argument
2931 *pos++ = WLAN_EID_WIDE_BW_CHANNEL_SWITCH; /* EID */ in ieee80211_ie_build_wide_bw_cs()
2932 *pos++ = 3; /* IE length */ in ieee80211_ie_build_wide_bw_cs()
2936 *pos++ = IEEE80211_VHT_CHANWIDTH_80MHZ; in ieee80211_ie_build_wide_bw_cs()
2939 *pos++ = IEEE80211_VHT_CHANWIDTH_160MHZ; in ieee80211_ie_build_wide_bw_cs()
2942 *pos++ = IEEE80211_VHT_CHANWIDTH_80P80MHZ; in ieee80211_ie_build_wide_bw_cs()
2945 *pos++ = IEEE80211_VHT_CHANWIDTH_USE_HT; in ieee80211_ie_build_wide_bw_cs()
2949 *pos++ = ieee80211_frequency_to_channel(chandef->center_freq1); in ieee80211_ie_build_wide_bw_cs()
2952 *pos++ = ieee80211_frequency_to_channel(chandef->center_freq2); in ieee80211_ie_build_wide_bw_cs()
2954 *pos++ = 0; in ieee80211_ie_build_wide_bw_cs()
2957 u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap, in ieee80211_ie_build_vht_oper() argument
2962 *pos++ = WLAN_EID_VHT_OPERATION; in ieee80211_ie_build_vht_oper()
2963 *pos++ = sizeof(struct ieee80211_vht_operation); in ieee80211_ie_build_vht_oper()
2964 vht_oper = (struct ieee80211_vht_operation *)pos; in ieee80211_ie_build_vht_oper()
3004 return pos + sizeof(struct ieee80211_vht_operation); in ieee80211_ie_build_vht_oper()
3007 u8 *ieee80211_ie_build_he_oper(u8 *pos) in ieee80211_ie_build_he_oper() argument
3012 *pos++ = WLAN_EID_EXTENSION; in ieee80211_ie_build_he_oper()
3013 *pos++ = 1 + sizeof(struct ieee80211_he_operation); in ieee80211_ie_build_he_oper()
3014 *pos++ = WLAN_EID_EXT_HE_OPERATION; in ieee80211_ie_build_he_oper()
3024 he_oper = (struct ieee80211_he_operation *)pos; in ieee80211_ie_build_he_oper()
3032 return pos + sizeof(struct ieee80211_vht_operation); in ieee80211_ie_build_he_oper()
3182 u8 i, rates, *pos; in ieee80211_add_srates_ie() local
3201 pos = skb_put(skb, rates + 2); in ieee80211_add_srates_ie()
3202 *pos++ = WLAN_EID_SUPP_RATES; in ieee80211_add_srates_ie()
3203 *pos++ = rates; in ieee80211_add_srates_ie()
3213 *pos++ = basic | (u8) rate; in ieee80211_add_srates_ie()
3226 u8 i, exrates, *pos; in ieee80211_add_ext_srates_ie() local
3250 pos = skb_put(skb, exrates + 2); in ieee80211_add_ext_srates_ie()
3251 *pos++ = WLAN_EID_EXT_SUPP_RATES; in ieee80211_add_ext_srates_ie()
3252 *pos++ = exrates; in ieee80211_add_ext_srates_ie()
3262 *pos++ = basic | (u8) rate; in ieee80211_add_ext_srates_ie()
3552 u8 *pos; in ieee80211_send_action_csa() local
3581 pos = skb_put(skb, 5); in ieee80211_send_action_csa()
3582 *pos++ = WLAN_EID_CHANNEL_SWITCH; /* EID */ in ieee80211_send_action_csa()
3583 *pos++ = 3; /* IE length */ in ieee80211_send_action_csa()
3584 *pos++ = csa_settings->block_tx ? 1 : 0; /* CSA mode */ in ieee80211_send_action_csa()
3586 *pos++ = ieee80211_frequency_to_channel(freq); /* channel */ in ieee80211_send_action_csa()
3587 *pos++ = csa_settings->count; /* count */ in ieee80211_send_action_csa()
3593 *pos++ = WLAN_EID_SECONDARY_CHANNEL_OFFSET; /* EID */ in ieee80211_send_action_csa()
3594 *pos++ = 1; /* IE length */ in ieee80211_send_action_csa()
3597 *pos++ = IEEE80211_HT_PARAM_CHA_SEC_ABOVE; in ieee80211_send_action_csa()
3599 *pos++ = IEEE80211_HT_PARAM_CHA_SEC_BELOW; in ieee80211_send_action_csa()
3606 *pos++ = WLAN_EID_CHAN_SWITCH_PARAM; /* EID */ in ieee80211_send_action_csa()
3607 *pos++ = 6; /* IE length */ in ieee80211_send_action_csa()
3608 *pos++ = sdata->u.mesh.mshcfg.dot11MeshTTL; /* Mesh TTL */ in ieee80211_send_action_csa()
3609 *pos = 0x00; /* Mesh Flag: Tx Restrict, Initiator, Reason */ in ieee80211_send_action_csa()
3610 *pos |= WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR; in ieee80211_send_action_csa()
3611 *pos++ |= csa_settings->block_tx ? in ieee80211_send_action_csa()
3613 put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); /* Reason Cd */ in ieee80211_send_action_csa()
3614 pos += 2; in ieee80211_send_action_csa()
3615 put_unaligned_le16(ifmsh->pre_value, pos);/* Precedence Value */ in ieee80211_send_action_csa()
3616 pos += 2; in ieee80211_send_action_csa()
3623 ieee80211_ie_build_wide_bw_cs(pos, &csa_settings->chandef); in ieee80211_send_action_csa()