Lines Matching refs:datalen
185 if (elem->id == WLAN_EID_EXTENSION && elem->datalen > 1 && in cfg80211_is_element_inherited()
189 if (!non_inherit_elem || non_inherit_elem->datalen < 2) in cfg80211_is_element_inherited()
200 if (non_inherit_elem->datalen < 3 + id_len) in cfg80211_is_element_inherited()
204 if (non_inherit_elem->datalen < 3 + id_len + ext_id_len) in cfg80211_is_element_inherited()
235 elem->data + elem->datalen > ie + ie_len)) in cfg80211_copy_elem_with_frags()
238 if (elem->datalen + 2 > buf + buf_len - *pos) in cfg80211_copy_elem_with_frags()
241 memcpy(*pos, elem, elem->datalen + 2); in cfg80211_copy_elem_with_frags()
242 *pos += elem->datalen + 2; in cfg80211_copy_elem_with_frags()
245 if (elem->datalen != 255) in cfg80211_copy_elem_with_frags()
248 ie_len = ie + ie_len - elem->data - elem->datalen; in cfg80211_copy_elem_with_frags()
249 ie = (const u8 *)elem->data + elem->datalen; in cfg80211_copy_elem_with_frags()
255 if (elem->datalen + 2 > buf + buf_len - *pos) in cfg80211_copy_elem_with_frags()
258 memcpy(*pos, elem, elem->datalen + 2); in cfg80211_copy_elem_with_frags()
259 *pos += elem->datalen + 2; in cfg80211_copy_elem_with_frags()
261 if (elem->datalen != 255) in cfg80211_copy_elem_with_frags()
292 if (parent->datalen < 1) in cfg80211_gen_new_ie()
333 sub->data + sub->datalen, in cfg80211_gen_new_ie()
336 sub->datalen), in cfg80211_gen_new_ie()
353 if (sub->datalen < 1) in cfg80211_gen_new_ie()
399 if (ssid_elem->datalen != ssid_len) in is_bss()
421 ssid_elem->datalen)) { in cfg80211_add_nontrans_list()
523 if (!*elem || (*elem)->datalen > IEEE80211_MAX_SSID_LEN) in cfg80211_calc_short_ssid()
526 *s_ssid = ~crc32_le(~0, (*elem)->data, (*elem)->datalen); in cfg80211_calc_short_ssid()
607 memcpy(&entry->ssid, &ssid_elem->data, ssid_elem->datalen); in cfg80211_parse_ap_info()
608 entry->ssid_len = ssid_elem->datalen; in cfg80211_parse_ap_info()
629 end = rnr->data + rnr->datalen; in cfg80211_iter_rnr()
870 ssid_elem->datalen); in cfg80211_scan_6ghz()
871 entry->ssid_len = ssid_elem->datalen; in cfg80211_scan_6ghz()
1366 if (elem->datalen >= match_offset + match_len && in cfg80211_find_elem_match()
1389 if (!elem || elem->datalen < 4) in cfg80211_find_vendor_elem()
1814 if (elem_new->datalen != elem_old->datalen) in cfg80211_check_stuck_ecsa()
1816 if (elem_new->datalen < sizeof(struct ieee80211_ext_chansw_ie)) in cfg80211_check_stuck_ecsa()
1818 if (memcmp(elem_new->data, elem_old->data, elem_new->datalen)) in cfg80211_check_stuck_ecsa()
2047 if (tmp && tmp->datalen >= sizeof(*he_oper) && in cfg80211_get_ies_channel_number()
2048 tmp->datalen >= ieee80211_he_oper_size(&tmp->data[1])) { in cfg80211_get_ies_channel_number()
2061 if (tmp && tmp->datalen >= sizeof(struct ieee80211_s1g_oper_ie)) { in cfg80211_get_ies_channel_number()
2068 if (tmp && tmp->datalen == 1) in cfg80211_get_ies_channel_number()
2073 tmp->datalen >= sizeof(struct ieee80211_ht_operation)) { in cfg80211_get_ies_channel_number()
2173 if (!tmp || tmp->datalen < sizeof(*he_oper) + 1 || in cfg80211_get_6ghz_power_type()
2174 tmp->datalen < ieee80211_he_oper_size(tmp->data + 1)) in cfg80211_get_6ghz_power_type()
2366 const u8 *mbssid_end = mbssid_elem->data + mbssid_elem->datalen; in cfg80211_get_profile_continuation()
2378 if ((sub_elem->data + sub_elem->datalen < mbssid_end - 1) || in cfg80211_get_profile_continuation()
2384 if (next_mbssid->datalen < 4) in cfg80211_get_profile_continuation()
2389 if (next_mbssid->data + next_mbssid->datalen < in cfg80211_get_profile_continuation()
2390 next_sub->data + next_sub->datalen) in cfg80211_get_profile_continuation()
2393 if (next_sub->id != 0 || next_sub->datalen < 2) in cfg80211_get_profile_continuation()
2409 size_t copied_len = sub_elem->datalen; in cfg80211_merge_profile()
2412 if (sub_elem->datalen > max_copy_len) in cfg80211_merge_profile()
2415 memcpy(merged_ie, sub_elem->data, sub_elem->datalen); in cfg80211_merge_profile()
2422 if (copied_len + next_sub->datalen > max_copy_len) in cfg80211_merge_profile()
2425 next_sub->datalen); in cfg80211_merge_profile()
2426 copied_len += next_sub->datalen; in cfg80211_merge_profile()
2477 if (elem->datalen < 4) in cfg80211_parse_mbssid_data()
2481 for_each_element(sub, elem->data + 1, elem->datalen - 1) { in cfg80211_parse_mbssid_data()
2484 if (sub->id != 0 || sub->datalen < 4) { in cfg80211_parse_mbssid_data()
2569 next = (void *)(elem->data + elem->datalen); in cfg80211_defragment_element()
2570 elem_datalen = elem->datalen; in cfg80211_defragment_element()
2573 copied = elem->datalen - 1; in cfg80211_defragment_element()
2582 copied = elem->datalen; in cfg80211_defragment_element()
2598 elem->data + elem->datalen <= ies + ieslen; in cfg80211_defragment_element()
2601 next = (void *)(elem->data + elem->datalen); in cfg80211_defragment_element()
2606 elem_datalen = elem->datalen; in cfg80211_defragment_element()
2645 if (!mle || !ieee80211_mle_size_ok(mle->data + 1, mle->datalen - 1)) in cfg80211_defrag_mle()
2649 buf_len = mle->datalen - 1; in cfg80211_defrag_mle()
2650 for_each_element(elem, mle->data + mle->datalen, in cfg80211_defrag_mle()
2651 ielen - sizeof(*mle) + mle->datalen) { in cfg80211_defrag_mle()
2655 buf_len += elem->datalen; in cfg80211_defrag_mle()
2679 res->sta_prof_len[idx] = elem->datalen; in cfg80211_defrag_mle()
2831 if (elem && elem->datalen >= 1) { in cfg80211_gen_reporter_rnr()
2882 res->datalen = sizeof(ap_info) + ap_info.tbtt_info_len; in cfg80211_gen_reporter_rnr()
2922 elem->datalen - 1)) in cfg80211_parse_ml_elem_sta_data()
2970 ssid_len = ssid_elem->datalen; in cfg80211_parse_ml_elem_sta_data()
3124 reporter_rnr->datalen > IEEE80211_MAX_DATA_LEN) in cfg80211_parse_ml_elem_sta_data()
3128 sizeof(struct element) + reporter_rnr->datalen); in cfg80211_parse_ml_elem_sta_data()
3130 reporter_rnr->datalen; in cfg80211_parse_ml_elem_sta_data()
3263 if (elem->datalen < sizeof(*compat)) in cfg80211_inform_bss_frame_data()