1 /****************************************************************************** 2 * 3 * Copyright(c) 2019 Realtek Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 *****************************************************************************/ 15 #ifndef _HAL_SOUND_H_ 16 #define _HAL_SOUND_H_ 17 18 #define HAL_NPDA_RU_IDX_START 0 19 #define HAL_NPDA_RU_IDX_END_20MHZ 8 20 #define HAL_NPDA_RU_IDX_END_40MHZ 17 21 #define HAL_NPDA_RU_IDX_END_80MHZ 36 22 #define HAL_NPDA_RU_IDX_END_160MHZ 73 23 24 #define HAL_SND_HE_BFRP_STA_SZ 5 25 #define HAL_SND_HE_NDPA_STA_SZ 4 26 #define HAL_SND_VHT_NDPA_STA_SZ 2 27 28 #define HAL_SND_VHT_NDPA_FRM_CTRL 0x54 29 #define HAL_SND_HE_NDPA_FRM_CTRL 0x54 30 #define HAL_SND_VHT_BFRP_FRM_CTRL 0x44 31 #define HAL_SND_HE_BFRP_FRM_CTRL 0x24 /* Trigger Frame */ 32 33 #define HAL_SND_TRIG_INFO_BFRP 0x1 34 35 enum hal_snd_pkt_sel { 36 HAL_SND_PKT_SEL_UST_NDPA = 0, 37 HAL_SND_PKT_SEL_BST_NDPA =1, 38 HAL_SND_PKT_SEL_LAST_NDP = 2, 39 HAL_SND_PKT_SEL_MID_NDP = 3, 40 HAL_SND_PKT_SEL_MID_BFRP = 4, 41 HAL_SND_PKT_SEL_LAST_BFRP = 5, 42 HAL_SND_PKT_SEL_MAX 43 }; 44 45 enum hal_snd_pkt_ndpa_type { 46 HAL_SND_PKT_NDPA_HT = 1, 47 HAL_SND_PKT_NDPA_VHT = 2, 48 HAL_SND_PKT_NDPA_HE = 3, 49 HAL_SND_PKT_NDPA_MAX 50 }; 51 52 53 struct hal_snd_pkt_xmit_para { 54 enum channel_width bw; 55 enum rtw_data_rate rate; 56 enum rtw_gi_ltf gi_ltf; 57 u8 stbc; 58 u8 ldpc; 59 }; 60 61 struct hal_snd_obj { 62 struct hal_snd_pkt_xmit_para ndpa_xpara; 63 struct hal_snd_pkt_xmit_para bfrp_xpara; 64 }; 65 66 enum rtw_hal_status hal_snd_obj_init(void *hal); 67 enum rtw_hal_status hal_snd_obj_deinit(void *hal); 68 69 #endif 70