Lines Matching +full:num +full:- +full:channels

2  * wpa_supplicant - MBO
7 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
32 return -1;
35 if (ieee80211_chan_to_freq(NULL, oper_class, chan) == -1)
36 return -1;
47 if (ie_len < MBO_IE_HEADER - 2)
51 return get_ie(mbo, 2 + ie_len - MBO_IE_HEADER, attr);
86 return get_ie(mbo, end - mbo, attr);
95 bss->beacon_newer);
109 wpa_s->disable_mbo_oce = 0;
117 return; /* STA-CFON is not required to enable PMF */
123 wpa_s->disable_mbo_oce = 1; /* AP uses RSN without PMF */
125 wpa_s->disable_mbo_oce = 1; /* STA uses RSN without PMF */
126 if (wpa_s->disable_mbo_oce)
138 wpabuf_put_u8(mbo, wpa_s->non_pref_chan[start].oper_class);
141 wpabuf_put_u8(mbo, wpa_s->non_pref_chan[i].chan);
143 wpabuf_put_u8(mbo, wpa_s->non_pref_chan[start].preference);
144 wpabuf_put_u8(mbo, wpa_s->non_pref_chan[start].reason);
158 size_t size = end - start + 3;
181 size_t size = end - start + 7;
197 if (!wpa_s->non_pref_chan || !wpa_s->non_pref_chan_num) {
204 start_pref = &wpa_s->non_pref_chan[0];
206 for (i = 1; i <= wpa_s->non_pref_chan_num; i++) {
209 if (i < wpa_s->non_pref_chan_num)
210 non_pref = &wpa_s->non_pref_chan[i];
212 non_pref->oper_class != start_pref->oper_class ||
213 non_pref->reason != start_pref->reason ||
214 non_pref->preference != start_pref->preference) {
239 ((wpa_s->enable_oce & OCE_STA) ? 3 : 0))
243 mbo = wpabuf_alloc(len - MBO_IE_HEADER);
247 /* Add non-preferred channels attribute */
256 wpabuf_put_u8(mbo, wpa_s->conf->mbo_cell_capa);
259 if ((wpa_s->enable_oce & OCE_STA) && add_oce_capa) {
281 * Send WNM-Notification Request frame only in case of a change in
282 * non-preferred channels list during association, if the AP supports
285 if (wpa_s->wpa_state != WPA_COMPLETED || !wpa_s->current_bss ||
286 !wpa_bss_get_vendor_ie(wpa_s->current_bss, MBO_IE_VENDOR_TYPE))
295 wpa_s->mbo_wnm_token++;
296 if (wpa_s->mbo_wnm_token == 0)
297 wpa_s->mbo_wnm_token++;
298 wpabuf_put_u8(buf, wpa_s->mbo_wnm_token);
303 res = wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
304 wpa_s->own_addr, wpa_s->bssid,
308 "Failed to send WNM-Notification Request frame with non-preferred channel list");
333 return a->oper_class == b->oper_class && a->chan == b->chan;
338 * wpa_non_pref_chan_cmp - Compare two channels for sorting
340 * In MBO IE non-preferred channel subelement we can put many channels in an
343 * the IE attributes and WNM Request subelements, save the channels sorted
350 if (a->oper_class != b->oper_class)
351 return (int) a->oper_class - (int) b->oper_class;
352 if (a->reason != b->reason)
353 return (int) a->reason - (int) b->reason;
354 return (int) a->preference - (int) b->preference;
363 size_t num = 0, size = 0;
366 wpa_printf(MSG_DEBUG, "MBO: Update non-preferred channels, non_pref_chan=%s",
370 * The shortest channel configuration is 7 characters - 3 colons and
378 return -1;
388 if (num == size) {
400 chan = &chans[num];
407 wpa_printf(MSG_ERROR, "Invalid non-pref chan input %s",
411 chan->oper_class = _oper_class;
412 chan->chan = _chan;
413 chan->preference = _preference;
414 chan->reason = _reason;
416 if (wpas_mbo_validate_non_pref_chan(chan->oper_class,
417 chan->chan, chan->reason)) {
420 chan->oper_class, chan->chan, chan->reason);
424 for (i = 0; i < num; i++)
427 if (i != num) {
430 chan->oper_class, chan->chan);
434 num++;
440 qsort(chans, num, sizeof(struct wpa_mbo_non_pref_channel),
445 os_free(wpa_s->non_pref_chan);
446 wpa_s->non_pref_chan = chans;
447 wpa_s->non_pref_chan_num = num;
455 return -1;
471 wpabuf_put_u8(ie, wpa_s->conf->mbo_cell_capa);
472 if (wpa_s->enable_oce & OCE_STA) {
477 *len = (u8 *) wpabuf_put(ie, 0) - len - 1;
493 len -= 4;
498 len -= 2;
508 if (wpa_s->conf->mbo_cell_capa ==
519 wpa_s->wnm_mbo_trans_reason_present = 1;
520 wpa_s->wnm_mbo_transition_reason = *pos;
526 if (wpa_s->wnm_mode &
531 } else if (wpa_s->wnm_mode &
559 len -= elen;
566 if (wpa_s->wnm_mbo_trans_reason_present)
568 wpa_s->wnm_mbo_transition_reason);
570 if (disallowed_sec && wpa_s->current_bss)
571 wpa_bss_tmp_disallow(wpa_s, wpa_s->current_bss->bssid,
599 if (wpa_s->conf->mbo_cell_capa == mbo_cell_capa) {
606 wpa_s->conf->mbo_cell_capa = mbo_cell_capa;
629 " does not support MBO - cannot request MBO ANQP elements from it",
630 MAC2STR(bss->bssid));
634 /* Allocate size for the maximum case - all MBO subtypes are set */
668 slen--;