Lines Matching refs:rxsts

73 radiotap_encode_multi_rssi(monitor_pkt_rxsts_t* rxsts, ieee80211_radiotap_header_t *hdr);
75 radiotap_encode_bw_signaling(uint16 mask, struct wl_rxsts* rxsts, ieee80211_radiotap_header_t *hdr);
267 wl_radiotap_rx(struct dot11_header *mac_header, wl_rxsts_t *rxsts, bsd_header_rx_t *bsd_header) in wl_radiotap_rx() argument
283 if (CHSPEC_IS2G(rxsts->chanspec)) { in wl_radiotap_rx()
285 channel_frequency = wf_channel2mhz(wf_chspec_ctlchan(rxsts->chanspec), in wl_radiotap_rx()
287 } else if (CHSPEC_IS5G(rxsts->chanspec)) { in wl_radiotap_rx()
289 channel_frequency = wf_channel2mhz(wf_chspec_ctlchan(rxsts->chanspec), in wl_radiotap_rx()
293 channel_frequency = wf_channel2mhz(wf_chspec_ctlchan(rxsts->chanspec), in wl_radiotap_rx()
297 if ((rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_FIRST) || in wl_radiotap_rx()
298 (rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_SUB)) { in wl_radiotap_rx()
305 if (rxsts->preamble == WL_RXS_PREAMBLE_SHORT) in wl_radiotap_rx()
314 if (rxsts->pkterror & WL_RXS_CRC_ERROR) in wl_radiotap_rx()
317 if (rxsts->encoding == WL_RXS_ENCODING_HT) in wl_radiotap_rx()
319 else if (rxsts->encoding == WL_RXS_ENCODING_VHT) in wl_radiotap_rx()
324 if (rxsts->signal == 0) { in wl_radiotap_rx()
330 if (rxsts->noise == 0) { in wl_radiotap_rx()
336 if (rxsts->encoding == WL_RXS_ENCODING_HT || in wl_radiotap_rx()
337 rxsts->encoding == WL_RXS_ENCODING_VHT) { in wl_radiotap_rx()
351 if (rxsts->nfrmtype == WL_RXS_NFRM_AMPDU_FIRST || in wl_radiotap_rx()
352 rxsts->nfrmtype == WL_RXS_NFRM_AMPDU_SUB) { in wl_radiotap_rx()
356 if (rxsts->encoding == WL_RXS_ENCODING_HT) in wl_radiotap_rx()
358 else if (rxsts->encoding == WL_RXS_ENCODING_VHT) in wl_radiotap_rx()
367 rtht->tsft = HTOL64((uint64)rxsts->mactime); in wl_radiotap_rx()
374 if (rxsts->signal != 0) { in wl_radiotap_rx()
375 *cp++ = (int8)rxsts->signal; in wl_radiotap_rx()
378 if (rxsts->noise != 0) { in wl_radiotap_rx()
379 *cp++ = (int8)rxsts->noise; in wl_radiotap_rx()
382 *cp++ = (int8)rxsts->antenna; in wl_radiotap_rx()
387 if (CHSPEC_IS40(rxsts->chanspec)) { in wl_radiotap_rx()
388 if (CHSPEC_SB_UPPER(rxsts->chanspec)) in wl_radiotap_rx()
397 tail->xc.xchannel_channel = wf_chspec_ctlchan(rxsts->chanspec); in wl_radiotap_rx()
405 if (rxsts->encoding == WL_RXS_ENCODING_HT) { in wl_radiotap_rx()
406 tail->u.ht.mcs_index = rxsts->mcs; in wl_radiotap_rx()
414 switch (rxsts->htflags & WL_RXS_HTF_BW_MASK) { in wl_radiotap_rx()
429 if (rxsts->htflags & WL_RXS_HTF_SGI) in wl_radiotap_rx()
431 if (rxsts->preamble & WL_RXS_PREAMBLE_HT_GF) in wl_radiotap_rx()
433 if (rxsts->htflags & WL_RXS_HTF_LDPC) in wl_radiotap_rx()
435 } else if (rxsts->encoding == WL_RXS_ENCODING_VHT) { in wl_radiotap_rx()
446 tail->u.vht.vht_flags = (uint8)HTOL16(rxsts->vhtflags); in wl_radiotap_rx()
448 switch (rxsts->bw) { in wl_radiotap_rx()
487 tail->u.vht.vht_mcs_nss[0] = (rxsts->mcs << 4) | in wl_radiotap_rx()
488 (rxsts->nss & IEEE80211_RADIOTAP_VHT_NSS); in wl_radiotap_rx()
493 tail->u.vht.vht_coding = rxsts->coding; in wl_radiotap_rx()
494 tail->u.vht.vht_group_id = rxsts->gid; in wl_radiotap_rx()
495 tail->u.vht.vht_partial_aid = HTOL16(rxsts->aid); in wl_radiotap_rx()
512 rtl->tsft = HTOL64((uint64)rxsts->mactime); in wl_radiotap_rx()
514 rtl->u.rate = (uint8)rxsts->datarate; in wl_radiotap_rx()
520 if (rxsts->signal != 0) in wl_radiotap_rx()
521 *cp++ = (int8)rxsts->signal; in wl_radiotap_rx()
522 if (rxsts->noise != 0) in wl_radiotap_rx()
523 *cp++ = (int8)rxsts->noise; in wl_radiotap_rx()
524 *cp++ = (int8)rxsts->antenna; in wl_radiotap_rx()
530 wl_radiotap_rx_channel_frequency(wl_rxsts_t *rxsts) in wl_radiotap_rx_channel_frequency() argument
532 if (CHSPEC_IS2G(rxsts->chanspec)) { in wl_radiotap_rx_channel_frequency()
533 return wf_channel2mhz(wf_chspec_ctlchan(rxsts->chanspec), in wl_radiotap_rx_channel_frequency()
535 } else if (CHSPEC_IS5G(rxsts->chanspec)) { in wl_radiotap_rx_channel_frequency()
536 return wf_channel2mhz(wf_chspec_ctlchan(rxsts->chanspec), in wl_radiotap_rx_channel_frequency()
539 return wf_channel2mhz(wf_chspec_ctlchan(rxsts->chanspec), in wl_radiotap_rx_channel_frequency()
545 wl_radiotap_rx_channel_flags(wl_rxsts_t *rxsts) in wl_radiotap_rx_channel_flags() argument
547 if (CHSPEC_IS2G(rxsts->chanspec)) { in wl_radiotap_rx_channel_flags()
549 } else if (CHSPEC_IS5G(rxsts->chanspec)) { in wl_radiotap_rx_channel_flags()
557 wl_radiotap_rx_flags(struct dot11_header *mac_header, wl_rxsts_t *rxsts) in wl_radiotap_rx_flags() argument
566 if (rxsts->preamble == WL_RXS_PREAMBLE_SHORT) in wl_radiotap_rx_flags()
580 wl_rxsts_t *rxsts, ieee80211_radiotap_header_t *rtap_hdr) in wl_radiotap_rx_legacy() argument
592 channel_frequency = (uint16)wl_radiotap_rx_channel_frequency(rxsts); in wl_radiotap_rx_legacy()
593 channel_flags = wl_radiotap_rx_channel_flags(rxsts); in wl_radiotap_rx_legacy()
594 flags = wl_radiotap_rx_flags(mac_header, rxsts); in wl_radiotap_rx_legacy()
596 rtl->basic.tsft_l = HTOL32(rxsts->mactime); in wl_radiotap_rx_legacy()
599 rtl->basic.rate = (uint8)rxsts->datarate; in wl_radiotap_rx_legacy()
602 rtl->basic.signal = (int8)rxsts->signal; in wl_radiotap_rx_legacy()
603 rtl->basic.noise = (int8)rxsts->noise; in wl_radiotap_rx_legacy()
604 rtl->basic.antenna = (int8)rxsts->antenna; in wl_radiotap_rx_legacy()
611 wl_rxsts_t *rxsts, ieee80211_radiotap_header_t *rtap_hdr) in wl_radiotap_rx_ht() argument
625 channel_frequency = (uint16)wl_radiotap_rx_channel_frequency(rxsts); in wl_radiotap_rx_ht()
626 channel_flags = wl_radiotap_rx_channel_flags(rxsts); in wl_radiotap_rx_ht()
627 flags = wl_radiotap_rx_flags(mac_header, rxsts); in wl_radiotap_rx_ht()
629 rtht->basic.tsft_l = HTOL32(rxsts->mactime); in wl_radiotap_rx_ht()
634 rtht->basic.signal = (int8)rxsts->signal; in wl_radiotap_rx_ht()
635 rtht->basic.noise = (int8)rxsts->noise; in wl_radiotap_rx_ht()
636 rtht->basic.antenna = (uint8)rxsts->antenna; in wl_radiotap_rx_ht()
640 if (CHSPEC_IS40(rxsts->chanspec)) { in wl_radiotap_rx_ht()
641 if (CHSPEC_SB_UPPER(rxsts->chanspec)) in wl_radiotap_rx_ht()
652 rtht->xchannel_channel = wf_chspec_ctlchan(rxsts->chanspec); in wl_radiotap_rx_ht()
663 switch (rxsts->htflags & WL_RXS_HTF_BW_MASK) { in wl_radiotap_rx_ht()
677 if (rxsts->htflags & WL_RXS_HTF_SGI) { in wl_radiotap_rx_ht()
680 if (rxsts->preamble & WL_RXS_PREAMBLE_HT_GF) { in wl_radiotap_rx_ht()
683 if (rxsts->htflags & WL_RXS_HTF_LDPC) { in wl_radiotap_rx_ht()
686 rtht->mcs_index = rxsts->mcs; in wl_radiotap_rx_ht()
690 rtht->ampdu_ref_num = rxsts->ampdu_counter; in wl_radiotap_rx_ht()
692 if (!(rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_FIRST) && in wl_radiotap_rx_ht()
693 !(rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_SUB)) { in wl_radiotap_rx_ht()
703 wl_rxsts_t *rxsts, ieee80211_radiotap_header_t *rtap_hdr) in wl_radiotap_rx_vht() argument
716 channel_frequency = (uint16)wl_radiotap_rx_channel_frequency(rxsts); in wl_radiotap_rx_vht()
717 channel_flags = wl_radiotap_rx_channel_flags(rxsts); in wl_radiotap_rx_vht()
718 flags = wl_radiotap_rx_flags(mac_header, rxsts); in wl_radiotap_rx_vht()
720 rtvht->basic.tsft_l = HTOL32(rxsts->mactime); in wl_radiotap_rx_vht()
725 rtvht->basic.signal = (int8)rxsts->signal; in wl_radiotap_rx_vht()
726 rtvht->basic.noise = (int8)rxsts->noise; in wl_radiotap_rx_vht()
727 rtvht->basic.antenna = (uint8)rxsts->antenna; in wl_radiotap_rx_vht()
752 rtvht->vht_flags = (uint8)HTOL16(rxsts->vhtflags); in wl_radiotap_rx_vht()
777 rtvht->vht_bw = rxsts->bw; in wl_radiotap_rx_vht()
779 rtvht->vht_mcs_nss[0] = (rxsts->mcs << 4) | in wl_radiotap_rx_vht()
780 (rxsts->nss & IEEE80211_RADIOTAP_VHT_NSS); in wl_radiotap_rx_vht()
788 rtvht->vht_coding = rxsts->coding; in wl_radiotap_rx_vht()
789 rtvht->vht_group_id = rxsts->gid; in wl_radiotap_rx_vht()
790 rtvht->vht_partial_aid = HTOL16(rxsts->aid); in wl_radiotap_rx_vht()
794 rtvht->ampdu_ref_num = HTOL32(rxsts->ampdu_counter); in wl_radiotap_rx_vht()
795 if (!(rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_FIRST) && in wl_radiotap_rx_vht()
796 !(rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_SUB)) { in wl_radiotap_rx_vht()
807 wl_radiotap_rx_he(struct dot11_header *mac_header, wl_rxsts_t *rxsts, in wl_radiotap_rx_he() argument
820 channel_frequency = (uint16)wl_radiotap_rx_channel_frequency(rxsts); in wl_radiotap_rx_he()
821 channel_flags = wl_radiotap_rx_channel_flags(rxsts); in wl_radiotap_rx_he()
822 flags = wl_radiotap_rx_flags(mac_header, rxsts); in wl_radiotap_rx_he()
824 rthe->basic.tsft_l = HTOL32(rxsts->mactime); in wl_radiotap_rx_he()
829 rthe->basic.signal = (int8)rxsts->signal; in wl_radiotap_rx_he()
830 rthe->basic.noise = (int8)rxsts->noise; in wl_radiotap_rx_he()
831 rthe->basic.antenna = (uint8)rxsts->antenna; in wl_radiotap_rx_he()
835 rthe->ampdu_ref_num = HTOL32(rxsts->ampdu_counter); in wl_radiotap_rx_he()
836 if (!(rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_FIRST) && in wl_radiotap_rx_he()
837 !(rxsts->nfrmtype & WL_RXS_NFRM_AMPDU_SUB)) { in wl_radiotap_rx_he()
843 rthe->data1 = HTOL16(rxsts->data1); in wl_radiotap_rx_he()
844 rthe->data2 = HTOL16(rxsts->data2); in wl_radiotap_rx_he()
845 rthe->data3 = HTOL16(rxsts->data3); in wl_radiotap_rx_he()
846 rthe->data4 = HTOL16(rxsts->data4); in wl_radiotap_rx_he()
847 rthe->data5 = HTOL16(rxsts->data5); in wl_radiotap_rx_he()
848 rthe->data6 = HTOL16(rxsts->data6); in wl_radiotap_rx_he()
855 wl_radiotap_rx_eht(struct dot11_header *mac_header, wl_rxsts_t *rxsts, in wl_radiotap_rx_eht() argument
870 wl_rxsts_t* rxsts; in wl_rxsts_to_rtap() local
873 rxsts = pkt_rxsts->rxsts; in wl_rxsts_to_rtap()
894 if (rxsts->encoding == WL_RXS_ENCODING_EHT) { in wl_rxsts_to_rtap()
895 wl_radiotap_rx_eht(mac_header, rxsts, rtap_hdr); in wl_rxsts_to_rtap()
896 } else if (rxsts->encoding == WL_RXS_ENCODING_HE) { in wl_rxsts_to_rtap()
897 wl_radiotap_rx_he(mac_header, rxsts, rtap_hdr); in wl_rxsts_to_rtap()
898 } else if (rxsts->encoding == WL_RXS_ENCODING_VHT) { in wl_rxsts_to_rtap()
899 wl_radiotap_rx_vht(mac_header, rxsts, rtap_hdr); in wl_rxsts_to_rtap()
900 } else if (rxsts->encoding == WL_RXS_ENCODING_HT) { in wl_rxsts_to_rtap()
901 wl_radiotap_rx_ht(mac_header, rxsts, rtap_hdr); in wl_rxsts_to_rtap()
907 wl_radiotap_rx_legacy(mac_header, rxsts, rtap_hdr); in wl_rxsts_to_rtap()
909 radiotap_encode_bw_signaling(mask, rxsts, rtap_hdr); in wl_rxsts_to_rtap()
931 if (!(rxsts->nfrmtype & WL_RXS_NFRM_AMSDU_FIRST) && in wl_rxsts_to_rtap()
932 !(rxsts->nfrmtype & WL_RXS_NFRM_AMSDU_SUB)) { in wl_rxsts_to_rtap()
945 radiotap_encode_multi_rssi(monitor_pkt_rxsts_t* rxsts, ieee80211_radiotap_header_t *hdr) in radiotap_encode_multi_rssi() argument
948 uint16 len = ROUNDUP(1 + rxsts->corenum * sizeof(monitor_pkt_rssi_t), 4); in radiotap_encode_multi_rssi()
956 vend_p[0] = rxsts->corenum; in radiotap_encode_multi_rssi()
957 for (i = 0; i < rxsts->corenum; i++) { in radiotap_encode_multi_rssi()
958 vend_p[2*i + 1] = rxsts->rxpwr[i].dBm; in radiotap_encode_multi_rssi()
959 vend_p[2*i + 2] = rxsts->rxpwr[i].decidBm; in radiotap_encode_multi_rssi()
989 struct wl_rxsts* rxsts, ieee80211_radiotap_header_t *hdr) in radiotap_encode_bw_signaling() argument
1005 nonht_vht->bw = (uint8)rxsts->bw_nonht; in radiotap_encode_bw_signaling()
1008 if (rxsts->vhtflags & WL_RXS_VHTF_DYN_BW_NONHT) { in radiotap_encode_bw_signaling()