Lines Matching refs:pkt_stat
821 struct rtw_rx_pkt_stat *pkt_stat) in query_phy_status_page0() argument
828 pkt_stat->rx_power[RF_PATH_A] = pwdb - 110; in query_phy_status_page0()
829 pkt_stat->rssi = rtw_phy_rf_power_2_rssi(pkt_stat->rx_power, 1); in query_phy_status_page0()
830 pkt_stat->bw = RTW_CHANNEL_WIDTH_20; in query_phy_status_page0()
831 pkt_stat->signal_power = max(pkt_stat->rx_power[RF_PATH_A], in query_phy_status_page0()
833 dm_info->rssi[RF_PATH_A] = pkt_stat->rssi; in query_phy_status_page0()
837 struct rtw_rx_pkt_stat *pkt_stat) in query_phy_status_page1() argument
847 if (pkt_stat->rate > DESC_RATE11M && pkt_stat->rate < DESC_RATEMCS0) in query_phy_status_page1()
861 pkt_stat->rx_power[RF_PATH_A] = GET_PHY_STAT_P1_PWDB_A(phy_status) - 110; in query_phy_status_page1()
862 pkt_stat->rx_power[RF_PATH_B] = GET_PHY_STAT_P1_PWDB_B(phy_status) - 110; in query_phy_status_page1()
863 pkt_stat->rssi = rtw_phy_rf_power_2_rssi(pkt_stat->rx_power, 2); in query_phy_status_page1()
864 pkt_stat->bw = bw; in query_phy_status_page1()
865 pkt_stat->signal_power = max3(pkt_stat->rx_power[RF_PATH_A], in query_phy_status_page1()
866 pkt_stat->rx_power[RF_PATH_B], in query_phy_status_page1()
869 dm_info->curr_rx_rate = pkt_stat->rate; in query_phy_status_page1()
871 pkt_stat->rx_evm[RF_PATH_A] = GET_PHY_STAT_P1_RXEVM_A(phy_status); in query_phy_status_page1()
872 pkt_stat->rx_evm[RF_PATH_B] = GET_PHY_STAT_P1_RXEVM_B(phy_status); in query_phy_status_page1()
874 pkt_stat->rx_snr[RF_PATH_A] = GET_PHY_STAT_P1_RXSNR_A(phy_status); in query_phy_status_page1()
875 pkt_stat->rx_snr[RF_PATH_B] = GET_PHY_STAT_P1_RXSNR_B(phy_status); in query_phy_status_page1()
877 pkt_stat->cfo_tail[RF_PATH_A] = GET_PHY_STAT_P1_CFO_TAIL_A(phy_status); in query_phy_status_page1()
878 pkt_stat->cfo_tail[RF_PATH_B] = GET_PHY_STAT_P1_CFO_TAIL_B(phy_status); in query_phy_status_page1()
881 rssi = rtw_phy_rf_power_2_rssi(&pkt_stat->rx_power[path], 1); in query_phy_status_page1()
883 dm_info->rx_snr[path] = pkt_stat->rx_snr[path] >> 1; in query_phy_status_page1()
884 dm_info->cfo_tail[path] = (pkt_stat->cfo_tail[path] * 5) >> 1; in query_phy_status_page1()
886 rx_evm = pkt_stat->rx_evm[path]; in query_phy_status_page1()
899 struct rtw_rx_pkt_stat *pkt_stat) in query_phy_status() argument
907 query_phy_status_page0(rtwdev, phy_status, pkt_stat); in query_phy_status()
910 query_phy_status_page1(rtwdev, phy_status, pkt_stat); in query_phy_status()
919 struct rtw_rx_pkt_stat *pkt_stat, in rtw8822b_query_rx_desc() argument
926 memset(pkt_stat, 0, sizeof(*pkt_stat)); in rtw8822b_query_rx_desc()
928 pkt_stat->phy_status = GET_RX_DESC_PHYST(rx_desc); in rtw8822b_query_rx_desc()
929 pkt_stat->icv_err = GET_RX_DESC_ICV_ERR(rx_desc); in rtw8822b_query_rx_desc()
930 pkt_stat->crc_err = GET_RX_DESC_CRC32(rx_desc); in rtw8822b_query_rx_desc()
931 pkt_stat->decrypted = !GET_RX_DESC_SWDEC(rx_desc) && in rtw8822b_query_rx_desc()
933 pkt_stat->is_c2h = GET_RX_DESC_C2H(rx_desc); in rtw8822b_query_rx_desc()
934 pkt_stat->pkt_len = GET_RX_DESC_PKT_LEN(rx_desc); in rtw8822b_query_rx_desc()
935 pkt_stat->drv_info_sz = GET_RX_DESC_DRV_INFO_SIZE(rx_desc); in rtw8822b_query_rx_desc()
936 pkt_stat->shift = GET_RX_DESC_SHIFT(rx_desc); in rtw8822b_query_rx_desc()
937 pkt_stat->rate = GET_RX_DESC_RX_RATE(rx_desc); in rtw8822b_query_rx_desc()
938 pkt_stat->cam_id = GET_RX_DESC_MACID(rx_desc); in rtw8822b_query_rx_desc()
939 pkt_stat->ppdu_cnt = GET_RX_DESC_PPDU_CNT(rx_desc); in rtw8822b_query_rx_desc()
940 pkt_stat->tsf_low = GET_RX_DESC_TSFL(rx_desc); in rtw8822b_query_rx_desc()
943 pkt_stat->drv_info_sz *= 8; in rtw8822b_query_rx_desc()
946 if (pkt_stat->is_c2h) in rtw8822b_query_rx_desc()
949 hdr = (struct ieee80211_hdr *)(rx_desc + desc_sz + pkt_stat->shift + in rtw8822b_query_rx_desc()
950 pkt_stat->drv_info_sz); in rtw8822b_query_rx_desc()
951 if (pkt_stat->phy_status) { in rtw8822b_query_rx_desc()
952 phy_status = rx_desc + desc_sz + pkt_stat->shift; in rtw8822b_query_rx_desc()
953 query_phy_status(rtwdev, phy_status, pkt_stat); in rtw8822b_query_rx_desc()
956 rtw_rx_fill_rx_status(rtwdev, pkt_stat, hdr, rx_status, phy_status); in rtw8822b_query_rx_desc()