Lines Matching +full:mode +full:- +full:capable

1 /*-
27 * IEEE 802.11ac-2013 protocol support.
86 ieee80211_note(ni->ni_vap, "%s: called; fc=0x%.2x/0x%.2x", in vht_recv_action_placeholder()
87 __func__, wh->i_fc[0], wh->i_fc[1]); in vht_recv_action_placeholder()
98 ieee80211_note(ni->ni_vap, "%s: called; category=%d, action=%d", in vht_send_action_placeholder()
138 struct ieee80211com *ic = vap->iv_ic; in ieee80211_vht_vattach()
143 vap->iv_vht_cap.vht_cap_info = ic->ic_vht_cap.vht_cap_info; in ieee80211_vht_vattach()
144 vap->iv_vhtextcaps = ic->ic_vhtextcaps; in ieee80211_vht_vattach()
147 vap->iv_vht_flags = in ieee80211_vht_vattach()
151 if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(vap->iv_vht_cap.vht_cap_info)) in ieee80211_vht_vattach()
152 vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT160; in ieee80211_vht_vattach()
153 if (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(vap->iv_vht_cap.vht_cap_info)) in ieee80211_vht_vattach()
154 vap->iv_vht_flags |= IEEE80211_FVHT_USEVHT80P80; in ieee80211_vht_vattach()
156 memcpy(&vap->iv_vht_cap.supp_mcs, &ic->ic_vht_cap.supp_mcs, in ieee80211_vht_vattach()
167 vht_announce(struct ieee80211com *ic, enum ieee80211_phymode mode)
198 (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160MHZ(ic->ic_vht_cap.vht_cap_info)) ? in ieee80211_vht_announce()
200 (IEEE80211_VHTCAP_SUPP_CHAN_WIDTH_IS_160_80P80MHZ(ic->ic_vht_cap.vht_cap_info)) ? in ieee80211_vht_announce()
203 ic_printf(ic, "[VHT] Features: %b\n", ic->ic_vht_cap.vht_cap_info, in ieee80211_vht_announce()
209 tx = (ic->ic_vht_cap.supp_mcs.tx_mcs_map >> (2*i)) & 0x3; in ieee80211_vht_announce()
210 rx = (ic->ic_vht_cap.supp_mcs.rx_mcs_map >> (2*i)) & 0x3; in ieee80211_vht_announce()
222 IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, in ieee80211_vht_node_init()
224 ni->ni_flags |= IEEE80211_NODE_VHT; in ieee80211_vht_node_init()
231 IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, in ieee80211_vht_node_cleanup()
233 ni->ni_flags &= ~IEEE80211_NODE_VHT; in ieee80211_vht_node_cleanup()
234 ni->ni_vhtcap = 0; in ieee80211_vht_node_cleanup()
235 bzero(&ni->ni_vht_mcsinfo, sizeof(struct ieee80211_vht_mcs_info)); in ieee80211_vht_node_cleanup()
245 ni->ni_vht_chanwidth = ie[2]; in ieee80211_parse_vhtopmode()
246 ni->ni_vht_chan1 = ie[3]; in ieee80211_parse_vhtopmode()
247 ni->ni_vht_chan2 = ie[4]; in ieee80211_parse_vhtopmode()
248 ni->ni_vht_basicmcs = le16dec(ie + 5); in ieee80211_parse_vhtopmode()
252 __func__, ni->ni_vht_chan1, ni->ni_vht_chan2, ni->ni_vht_chanwidth, in ieee80211_parse_vhtopmode()
253 ni->ni_vht_basicmcs); in ieee80211_parse_vhtopmode()
265 ni->ni_vhtcap = le32dec(ie + 2); in ieee80211_parse_vhtcap()
268 ni->ni_vht_mcsinfo.rx_mcs_map = le16dec(ie + 6); in ieee80211_parse_vhtcap()
269 ni->ni_vht_mcsinfo.rx_highest = le16dec(ie + 8); in ieee80211_parse_vhtcap()
270 ni->ni_vht_mcsinfo.tx_mcs_map = le16dec(ie + 10); in ieee80211_parse_vhtcap()
271 ni->ni_vht_mcsinfo.tx_highest = le16dec(ie + 12); in ieee80211_parse_vhtcap()
306 IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, in ieee80211_vht_node_join()
314 IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, in ieee80211_vht_node_leave()
322 * current operating mode and intersection of the TX/RX MCS maps.
332 * TODO: ensure I re-read 9.7.11 Rate Selection for VHT STAs.
334 * TODO: investigate what we should negotiate for MU-MIMO beamforming
343 struct ieee80211vap *vap = ni->ni_vap; in ieee80211_vht_get_vhtcap_ie()
344 // struct ieee80211com *ic = vap->iv_ic; in ieee80211_vht_get_vhtcap_ie()
350 * Capabilities - it depends on whether we are a station in ieee80211_vht_get_vhtcap_ie()
356 * Station - use our desired configuration based on in ieee80211_vht_get_vhtcap_ie()
357 * local config, local device bits and the already-learnt in ieee80211_vht_get_vhtcap_ie()
362 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
365 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
372 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
375 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
379 ((vap->iv_vht_flags & IEEE80211_FVHT_USEVHT80P80) == 0)) in ieee80211_vht_get_vhtcap_ie()
382 ((vap->iv_vht_flags & IEEE80211_FVHT_USEVHT160) == 0)) in ieee80211_vht_get_vhtcap_ie()
389 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
392 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
398 /* Short-GI 80 */ in ieee80211_vht_get_vhtcap_ie()
399 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
402 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
408 /* Short-GI 160 */ in ieee80211_vht_get_vhtcap_ie()
409 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
412 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
421 * In non-STA mode, we just announce our capabilities and that in ieee80211_vht_get_vhtcap_ie()
424 * In STA mode, we should calculate our capabilities based on in ieee80211_vht_get_vhtcap_ie()
434 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
437 /* STA mode - enable it only if node RXSTBC is non-zero */ in ieee80211_vht_get_vhtcap_ie()
438 val2 = !! _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
442 if ((vap->iv_vht_flags & IEEE80211_FVHT_STBC_TX) == 0) in ieee80211_vht_get_vhtcap_ie()
447 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
450 /* STA mode - enable it only if node TXSTBC is non-zero */ in ieee80211_vht_get_vhtcap_ie()
451 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
455 if ((vap->iv_vht_flags & IEEE80211_FVHT_STBC_RX) == 0) in ieee80211_vht_get_vhtcap_ie()
460 * Finally - if RXSTBC is 0, then don't enable TXSTBC. in ieee80211_vht_get_vhtcap_ie()
476 /* SU Beamformer capable */ in ieee80211_vht_get_vhtcap_ie()
477 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
480 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
487 /* SU Beamformee capable */ in ieee80211_vht_get_vhtcap_ie()
488 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
491 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
498 /* Beamformee STS capability - only if SU beamformee capable */ in ieee80211_vht_get_vhtcap_ie()
499 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
502 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
511 /* Sounding dimensions - only if SU beamformer capable */ in ieee80211_vht_get_vhtcap_ie()
512 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
515 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
524 * MU Beamformer capable - only if SU BFF capable, MU BFF capable in ieee80211_vht_get_vhtcap_ie()
527 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
530 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
535 if (opmode != 1) /* Only enable for STA mode */ in ieee80211_vht_get_vhtcap_ie()
541 * MU Beamformee capable - only if SU BFE capable, MU BFE capable in ieee80211_vht_get_vhtcap_ie()
544 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
547 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
552 if (opmode != 0) /* Only enable for AP mode */ in ieee80211_vht_get_vhtcap_ie()
558 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
561 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
567 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
570 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
575 /* A-MPDU length max */ in ieee80211_vht_get_vhtcap_ie()
577 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
580 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
587 * Link adaptation is only valid if HTC-VHT capable is 1. in ieee80211_vht_get_vhtcap_ie()
590 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
593 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
607 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
610 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
617 val2 = val1 = _IEEE80211_MASKSHIFT(vap->iv_vht_cap.vht_cap_info, in ieee80211_vht_get_vhtcap_ie()
620 val2 = _IEEE80211_MASKSHIFT(ni->ni_vhtcap, in ieee80211_vht_get_vhtcap_ie()
627 * MCS set - again, we announce what we want to use in ieee80211_vht_get_vhtcap_ie()
629 * already-learnt vhtcap/vhtinfo IE information. in ieee80211_vht_get_vhtcap_ie()
632 /* MCS set - start with whatever the device supports */ in ieee80211_vht_get_vhtcap_ie()
633 vhtcap->supp_mcs.rx_mcs_map = vap->iv_vht_cap.supp_mcs.rx_mcs_map; in ieee80211_vht_get_vhtcap_ie()
634 vhtcap->supp_mcs.rx_highest = 0; in ieee80211_vht_get_vhtcap_ie()
635 vhtcap->supp_mcs.tx_mcs_map = vap->iv_vht_cap.supp_mcs.tx_mcs_map; in ieee80211_vht_get_vhtcap_ie()
636 vhtcap->supp_mcs.tx_highest = 0; in ieee80211_vht_get_vhtcap_ie()
638 vhtcap->vht_cap_info = new_vhtcap; in ieee80211_vht_get_vhtcap_ie()
646 * Note: 0 - MCS0..7; 1 - MCS0..8; 2 - MCS0..9; 3 = not supported. in ieee80211_vht_get_vhtcap_ie()
651 val1 = (vhtcap->supp_mcs.tx_mcs_map >> (i*2)) & 0x3; in ieee80211_vht_get_vhtcap_ie()
652 val2 = (ni->ni_vht_mcsinfo.tx_mcs_map >> (i*2)) & 0x3; in ieee80211_vht_get_vhtcap_ie()
656 vhtcap->supp_mcs.tx_mcs_map &= ~(0x3 << (i*2)); in ieee80211_vht_get_vhtcap_ie()
657 vhtcap->supp_mcs.tx_mcs_map |= (val << (i*2)); in ieee80211_vht_get_vhtcap_ie()
665 * If in station mode, we announce what we would like our
682 /* 32-bit VHT capability */ in ieee80211_add_vhtcap()
695 * Non-associated probe requests. Add VHT capabilities based on
709 /* 32-bit VHT capability */ in ieee80211_add_vhtcap_ch()
710 ADDWORD(frm, vap->iv_vht_cap.vht_cap_info); in ieee80211_add_vhtcap_ch()
713 ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.rx_mcs_map); in ieee80211_add_vhtcap_ch()
714 ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.rx_highest); in ieee80211_add_vhtcap_ch()
715 ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.tx_mcs_map); in ieee80211_add_vhtcap_ch()
716 ADDSHORT(frm, vap->iv_vht_cap.supp_mcs.tx_highest); in ieee80211_add_vhtcap_ch()
742 printf("%s: called on a non-VHT channel (freq=%d, flags=0x%08x\n", in ieee80211_vht_get_chwidth_ie()
743 __func__, (int) c->ic_freq, c->ic_flags); in ieee80211_vht_get_chwidth_ie()
752 * XXX TODO: read 802.11-2013 to determine what to set
767 /* 8-bit chanwidth */ in ieee80211_add_vhtinfo()
768 *frm++ = ieee80211_vht_get_chwidth_ie(ni->ni_chan); in ieee80211_add_vhtinfo()
770 /* 8-bit freq1 */ in ieee80211_add_vhtinfo()
771 *frm++ = ni->ni_chan->ic_vht_ch_freq1; in ieee80211_add_vhtinfo()
773 /* 8-bit freq2 */ in ieee80211_add_vhtinfo()
774 *frm++ = ni->ni_chan->ic_vht_ch_freq2; in ieee80211_add_vhtinfo()
776 /* 16-bit basic MCS set - just MCS0..7 for NSS=1 for now */ in ieee80211_add_vhtinfo()
795 return (ieee80211_find_channel(ic, c->ic_freq, in findvhtchan()
796 (c->ic_flags & ~IEEE80211_CHAN_VHT) | vhtflags)); in findvhtchan()
808 /* First case - handle channel demotion - if VHT isn't set */ in ieee80211_vht_adjust_channel()
812 chan->ic_ieee, chan->ic_flags); in ieee80211_vht_adjust_channel()
814 c = ieee80211_find_channel(ic, chan->ic_freq, in ieee80211_vht_adjust_channel()
815 chan->ic_flags & ~IEEE80211_CHAN_VHT); in ieee80211_vht_adjust_channel()
820 c->ic_ieee, c->ic_flags); in ieee80211_vht_adjust_channel()
826 * We can upgrade to VHT - attempt to do so in ieee80211_vht_adjust_channel()
856 printf("%s: selected %d/0x%08x\n", __func__, c->ic_ieee, c->ic_flags); in ieee80211_vht_adjust_channel()
868 * TODO: ensure I read 10.39.7 - BSS Basic VHT-MCS and NSS set operation.