From 54ed666a16dd7783ecaee77570b4d5ee72fd0b14 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Mon, 11 Nov 2019 02:36:13 +0100 Subject: [PATCH] Fix radiotap header for 8814au chipset --- 88XXau.mod | 2 ++ core/rtw_recv.c | 25 +++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 88XXau.mod diff --git a/88XXau.mod b/88XXau.mod new file mode 100644 index 0000000..cfef948 --- /dev/null +++ b/88XXau.mod @@ -0,0 +1,2 @@ +/root/Desktop/rtl8812au/core/rtw_cmd.o /root/Desktop/rtl8812au/core/rtw_security.o /root/Desktop/rtl8812au/core/rtw_debug.o /root/Desktop/rtl8812au/core/rtw_io.o /root/Desktop/rtl8812au/core/rtw_ioctl_query.o /root/Desktop/rtl8812au/core/rtw_ioctl_set.o /root/Desktop/rtl8812au/core/rtw_ieee80211.o /root/Desktop/rtl8812au/core/rtw_mlme.o /root/Desktop/rtl8812au/core/rtw_mlme_ext.o /root/Desktop/rtl8812au/core/rtw_mi.o /root/Desktop/rtl8812au/core/rtw_wlan_util.o /root/Desktop/rtl8812au/core/rtw_vht.o /root/Desktop/rtl8812au/core/rtw_pwrctrl.o /root/Desktop/rtl8812au/core/rtw_rf.o /root/Desktop/rtl8812au/core/rtw_chplan.o /root/Desktop/rtl8812au/core/rtw_recv.o /root/Desktop/rtl8812au/core/rtw_sta_mgt.o /root/Desktop/rtl8812au/core/rtw_ap.o /root/Desktop/rtl8812au/core/mesh/rtw_mesh.o /root/Desktop/rtl8812au/core/mesh/rtw_mesh_pathtbl.o /root/Desktop/rtl8812au/core/mesh/rtw_mesh_hwmp.o /root/Desktop/rtl8812au/core/rtw_xmit.o /root/Desktop/rtl8812au/core/rtw_p2p.o /root/Desktop/rtl8812au/core/rtw_rson.o /root/Desktop/rtl8812au/core/rtw_tdls.o /root/Desktop/rtl8812au/core/rtw_br_ext.o /root/Desktop/rtl8812au/core/rtw_iol.o /root/Desktop/rtl8812au/core/rtw_sreset.o /root/Desktop/rtl8812au/core/rtw_btcoex_wifionly.o /root/Desktop/rtl8812au/core/rtw_btcoex.o /root/Desktop/rtl8812au/core/rtw_beamforming.o /root/Desktop/rtl8812au/core/rtw_odm.o /root/Desktop/rtl8812au/core/rtw_rm.o /root/Desktop/rtl8812au/core/rtw_rm_fsm.o /root/Desktop/rtl8812au/core/efuse/rtw_efuse.o /root/Desktop/rtl8812au/os_dep/osdep_service.o /root/Desktop/rtl8812au/os_dep/linux/os_intfs.o /root/Desktop/rtl8812au/os_dep/linux/usb_intf.o /root/Desktop/rtl8812au/os_dep/linux/usb_ops_linux.o /root/Desktop/rtl8812au/os_dep/linux/ioctl_linux.o /root/Desktop/rtl8812au/os_dep/linux/xmit_linux.o /root/Desktop/rtl8812au/os_dep/linux/mlme_linux.o /root/Desktop/rtl8812au/os_dep/linux/recv_linux.o /root/Desktop/rtl8812au/os_dep/linux/ioctl_cfg80211.o /root/Desktop/rtl8812au/os_dep/linux/rtw_cfgvendor.o /root/Desktop/rtl8812au/os_dep/linux/wifi_regd.o /root/Desktop/rtl8812au/os_dep/linux/rtw_android.o /root/Desktop/rtl8812au/os_dep/linux/rtw_proc.o /root/Desktop/rtl8812au/os_dep/linux/rtw_rhashtable.o /root/Desktop/rtl8812au/os_dep/linux/ioctl_mp.o /root/Desktop/rtl8812au/hal/hal_intf.o /root/Desktop/rtl8812au/hal/hal_com.o /root/Desktop/rtl8812au/hal/hal_com_phycfg.o /root/Desktop/rtl8812au/hal/hal_phy.o /root/Desktop/rtl8812au/hal/hal_dm.o /root/Desktop/rtl8812au/hal/hal_dm_acs.o /root/Desktop/rtl8812au/hal/hal_btcoex_wifionly.o /root/Desktop/rtl8812au/hal/hal_btcoex.o /root/Desktop/rtl8812au/hal/hal_mp.o /root/Desktop/rtl8812au/hal/hal_mcc.o /root/Desktop/rtl8812au/hal/hal_hci/hal_usb.o /root/Desktop/rtl8812au/hal/led/hal_led.o /root/Desktop/rtl8812au/hal/led/hal_usb_led.o /root/Desktop/rtl8812au/hal/HalPwrSeqCmd.o /root/Desktop/rtl8812au/hal/rtl8812a/Hal8812PwrSeq.o /root/Desktop/rtl8812au/hal/rtl8812a/Hal8821APwrSeq.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_xmit.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_sreset.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_hal_init.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_phycfg.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_rf6052.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_dm.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_rxdesc.o /root/Desktop/rtl8812au/hal/rtl8812a/rtl8812a_cmd.o /root/Desktop/rtl8812au/hal/rtl8812a/usb/usb_halinit.o /root/Desktop/rtl8812au/hal/rtl8812a/usb/rtl8812au_led.o /root/Desktop/rtl8812au/hal/rtl8812a/usb/rtl8812au_xmit.o /root/Desktop/rtl8812au/hal/rtl8812a/usb/rtl8812au_recv.o /root/Desktop/rtl8812au/hal/rtl8812a/usb/usb_ops_linux.o /root/Desktop/rtl8812au/hal/efuse/rtl8812a/HalEfuseMask8812A_USB.o /root/Desktop/rtl8812au/hal/efuse/rtl8812a/HalEfuseMask8821A_USB.o /root/Desktop/rtl8812au/hal/rtl8812a/hal8812a_fw.o /root/Desktop/rtl8812au/hal/rtl8812a/hal8821a_fw.o /root/Desktop/rtl8812au/hal/HalPwrSeqCmd.o /root/Desktop/rtl8812au/hal/rtl8814a/Hal8814PwrSeq.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_xmit.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_sreset.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_hal_init.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_phycfg.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_rf6052.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_dm.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_rxdesc.o /root/Desktop/rtl8812au/hal/rtl8814a/rtl8814a_cmd.o /root/Desktop/rtl8812au/hal/rtl8814a/hal8814a_fw.o /root/Desktop/rtl8812au/hal/rtl8814a/usb/usb_halinit.o /root/Desktop/rtl8812au/hal/rtl8814a/usb/rtl8814au_led.o /root/Desktop/rtl8812au/hal/rtl8814a/usb/rtl8814au_xmit.o /root/Desktop/rtl8812au/hal/rtl8814a/usb/rtl8814au_recv.o /root/Desktop/rtl8812au/hal/rtl8814a/usb/usb_ops_linux.o /root/Desktop/rtl8812au/hal/efuse/rtl8814a/HalEfuseMask8814A_USB.o /root/Desktop/rtl8812au/hal/phydm/phydm_debug.o /root/Desktop/rtl8812au/hal/phydm/phydm_antdiv.o /root/Desktop/rtl8812au/hal/phydm/phydm_soml.o /root/Desktop/rtl8812au/hal/phydm/phydm_smt_ant.o /root/Desktop/rtl8812au/hal/phydm/phydm_antdect.o /root/Desktop/rtl8812au/hal/phydm/phydm_interface.o /root/Desktop/rtl8812au/hal/phydm/phydm_phystatus.o /root/Desktop/rtl8812au/hal/phydm/phydm_hwconfig.o /root/Desktop/rtl8812au/hal/phydm/phydm.o /root/Desktop/rtl8812au/hal/phydm/phydm_dig.o /root/Desktop/rtl8812au/hal/phydm/phydm_pathdiv.o /root/Desktop/rtl8812au/hal/phydm/phydm_rainfo.o /root/Desktop/rtl8812au/hal/phydm/phydm_dynamictxpower.o /root/Desktop/rtl8812au/hal/phydm/phydm_adaptivity.o /root/Desktop/rtl8812au/hal/phydm/phydm_cfotracking.o /root/Desktop/rtl8812au/hal/phydm/phydm_noisemonitor.o /root/Desktop/rtl8812au/hal/phydm/phydm_beamforming.o /root/Desktop/rtl8812au/hal/phydm/phydm_dfs.o /root/Desktop/rtl8812au/hal/phydm/txbf/halcomtxbf.o /root/Desktop/rtl8812au/hal/phydm/txbf/haltxbfinterface.o /root/Desktop/rtl8812au/hal/phydm/txbf/phydm_hal_txbf_api.o /root/Desktop/rtl8812au/hal/phydm/phydm_adc_sampling.o /root/Desktop/rtl8812au/hal/phydm/phydm_ccx.o /root/Desktop/rtl8812au/hal/phydm/phydm_psd.o /root/Desktop/rtl8812au/hal/phydm/phydm_primary_cca.o /root/Desktop/rtl8812au/hal/phydm/phydm_cck_pd.o /root/Desktop/rtl8812au/hal/phydm/phydm_rssi_monitor.o /root/Desktop/rtl8812au/hal/phydm/phydm_auto_dbg.o /root/Desktop/rtl8812au/hal/phydm/phydm_math_lib.o /root/Desktop/rtl8812au/hal/phydm/phydm_api.o /root/Desktop/rtl8812au/hal/phydm/phydm_pow_train.o /root/Desktop/rtl8812au/hal/phydm/phydm_lna_sat.o /root/Desktop/rtl8812au/hal/phydm/phydm_pmac_tx_setting.o /root/Desktop/rtl8812au/hal/phydm/phydm_mp.o /root/Desktop/rtl8812au/hal/phydm/halrf/halrf.o /root/Desktop/rtl8812au/hal/phydm/halrf/halrf_debug.o /root/Desktop/rtl8812au/hal/phydm/halrf/halphyrf_ce.o /root/Desktop/rtl8812au/hal/phydm/halrf/halrf_powertracking_ce.o /root/Desktop/rtl8812au/hal/phydm/halrf/halrf_powertracking.o /root/Desktop/rtl8812au/hal/phydm/halrf/halrf_kfree.o /root/Desktop/rtl8812au/hal/phydm/rtl8812a/halhwimg8812a_mac.o /root/Desktop/rtl8812au/hal/phydm/rtl8812a/halhwimg8812a_bb.o /root/Desktop/rtl8812au/hal/phydm/rtl8812a/halhwimg8812a_rf.o /root/Desktop/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.o /root/Desktop/rtl8812au/hal/phydm/rtl8812a/phydm_regconfig8812a.o /root/Desktop/rtl8812au/hal/phydm/rtl8812a/phydm_rtl8812a.o /root/Desktop/rtl8812au/hal/phydm/txbf/haltxbfjaguar.o /root/Desktop/rtl8812au/hal/phydm/rtl8821a/halhwimg8821a_mac.o /root/Desktop/rtl8812au/hal/phydm/rtl8821a/halhwimg8821a_bb.o /root/Desktop/rtl8812au/hal/phydm/rtl8821a/halhwimg8821a_rf.o /root/Desktop/rtl8812au/hal/phydm/halrf/rtl8812a/halrf_8812a_ce.o /root/Desktop/rtl8812au/hal/phydm/halrf/rtl8821a/halrf_8821a_ce.o /root/Desktop/rtl8812au/hal/phydm/rtl8821a/phydm_regconfig8821a.o /root/Desktop/rtl8812au/hal/phydm/rtl8821a/phydm_rtl8821a.o /root/Desktop/rtl8812au/hal/phydm/halrf/rtl8821a/halrf_iqk_8821a_ce.o /root/Desktop/rtl8812au/hal/phydm/txbf/haltxbfjaguar.o /root/Desktop/rtl8812au/hal/phydm/rtl8814a/halhwimg8814a_bb.o /root/Desktop/rtl8812au/hal/phydm/rtl8814a/halhwimg8814a_mac.o /root/Desktop/rtl8812au/hal/phydm/rtl8814a/halhwimg8814a_rf.o /root/Desktop/rtl8812au/hal/phydm/halrf/rtl8814a/halrf_iqk_8814a.o /root/Desktop/rtl8812au/hal/phydm/rtl8814a/phydm_regconfig8814a.o /root/Desktop/rtl8812au/hal/phydm/halrf/rtl8814a/halrf_8814a_ce.o /root/Desktop/rtl8812au/hal/phydm/rtl8814a/phydm_rtl8814a.o /root/Desktop/rtl8812au/hal/phydm/txbf/haltxbf8814a.o /root/Desktop/rtl8812au/platform/platform_ops.o /root/Desktop/rtl8812au/core/rtw_mp.o + diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 4b6f152..b8a21a7 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -4018,6 +4018,12 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe, rtap_hdr = (struct ieee80211_radiotap_header *)&hdr_buf[0]; rtap_hdr->it_version = PKTHDR_RADIOTAP_VERSION; +#ifdef CONFIG_RTL8814A + /* RTL8814AU rx descriptor has no bandwidth, ldpc, stbc and sgi info */ + /* fixup bandwidth */ + pattrib->bw = pattrib->phy_info.band_width & 0x03; +#endif + /* tsft */ if (pattrib->tsfl) { u64 tmp_64bit; @@ -4140,13 +4146,15 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe, hdr_buf[rt_len + 1] |= (pattrib->bw & 0x03); /* guard interval */ +#ifndef CONFIG_RTL8814A hdr_buf[rt_len] |= BIT2; hdr_buf[rt_len + 1] |= (pattrib->sgi & 0x01) << 2; - +#endif /* STBC */ +#ifndef CONFIG_RTL8814A hdr_buf[rt_len] |= BIT5; hdr_buf[rt_len + 1] |= (pattrib->stbc & 0x03) << 5; - +#endif rt_len += 2; /* MCS rate index */ @@ -4179,7 +4187,9 @@ static sint fill_radiotap_hdr(_adapter *padapter, union recv_frame *precvframe, hdr_buf[rt_len + 2] |= (pattrib->sgi & 0x01) << 2; /* LDPC extra OFDM symbol */ +#ifndef CONFIG_RTL8814A tmp_16bit |= BIT4; +#endif hdr_buf[rt_len + 2] |= (pattrib->ldpc & 0x01) << 4; memcpy(&hdr_buf[rt_len], &tmp_16bit, 2); @@ -4516,29 +4526,23 @@ exit: return ret; } - s32 rtw_recv_entry(union recv_frame *precvframe) { _adapter *padapter; struct recv_priv *precvpriv; s32 ret = _SUCCESS; - - padapter = precvframe->u.hdr.adapter; precvpriv = &padapter->recvpriv; - ret = recv_func(padapter, precvframe); if (ret == _FAIL) { goto _recv_entry_drop; } - precvpriv->rx_pkts++; - return ret; _recv_entry_drop: @@ -4548,8 +4552,6 @@ _recv_entry_drop: padapter->mppriv.rx_pktloss = precvpriv->rx_drop; #endif - - return ret; } @@ -4884,7 +4886,7 @@ void rx_query_phy_status( precvframe->u.hdr.psta = psta; rx_process_phy_info(padapter, precvframe); } - } else + } else #endif { if (psta) @@ -5087,4 +5089,3 @@ void dump_rx_bh_tk(void *sel, struct recv_priv *recv) ); } #endif /* DBG_RX_BH_TRACKING */ -