1 /* 2 * Copyright (c) 2017 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _RX_PPDU_START_H_ 20 #define _RX_PPDU_START_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 25 // ################ START SUMMARY ################# 26 // 27 // Dword Fields 28 // 0 phy_ppdu_id[15:0], reserved_15[31:16] 29 // 1 sw_phy_meta_data[31:0] 30 // 2 ppdu_start_timestamp[31:0] 31 // 32 // ################ END SUMMARY ################# 33 34 #define NUM_OF_DWORDS_RX_PPDU_START 3 35 36 struct rx_ppdu_start { 37 uint32_t phy_ppdu_id : 16, //[15:0] 38 reserved_15 : 16; //[31:16] 39 uint32_t sw_phy_meta_data : 32; //[31:0] 40 uint32_t ppdu_start_timestamp : 32; //[31:0] 41 }; 42 43 /* 44 45 phy_ppdu_id 46 47 A ppdu counter value that PHY increments for every PPDU 48 received. The counter value wraps around 49 50 <legal all> 51 52 reserved_15 53 54 Reserved 55 56 <legal 0> 57 58 sw_phy_meta_data 59 60 SW programmed Meta data provided by the PHY. 61 62 63 64 Can be used for SW to indicate the channel the device is 65 on. 66 67 ppdu_start_timestamp 68 69 Timestamp that indicates when the PPDU that contained 70 this MPDU started on the medium. 71 72 73 74 The timestamp is captured by the PHY ????TODO: Is this 75 comment correct ? 76 77 <legal all> 78 */ 79 80 81 /* Description RX_PPDU_START_0_PHY_PPDU_ID 82 83 A ppdu counter value that PHY increments for every PPDU 84 received. The counter value wraps around 85 86 <legal all> 87 */ 88 #define RX_PPDU_START_0_PHY_PPDU_ID_OFFSET 0x00000000 89 #define RX_PPDU_START_0_PHY_PPDU_ID_LSB 0 90 #define RX_PPDU_START_0_PHY_PPDU_ID_MASK 0x0000ffff 91 92 /* Description RX_PPDU_START_0_RESERVED_15 93 94 Reserved 95 96 <legal 0> 97 */ 98 #define RX_PPDU_START_0_RESERVED_15_OFFSET 0x00000000 99 #define RX_PPDU_START_0_RESERVED_15_LSB 16 100 #define RX_PPDU_START_0_RESERVED_15_MASK 0xffff0000 101 102 /* Description RX_PPDU_START_1_SW_PHY_META_DATA 103 104 SW programmed Meta data provided by the PHY. 105 106 107 108 Can be used for SW to indicate the channel the device is 109 on. 110 */ 111 #define RX_PPDU_START_1_SW_PHY_META_DATA_OFFSET 0x00000004 112 #define RX_PPDU_START_1_SW_PHY_META_DATA_LSB 0 113 #define RX_PPDU_START_1_SW_PHY_META_DATA_MASK 0xffffffff 114 115 /* Description RX_PPDU_START_2_PPDU_START_TIMESTAMP 116 117 Timestamp that indicates when the PPDU that contained 118 this MPDU started on the medium. 119 120 121 122 The timestamp is captured by the PHY ????TODO: Is this 123 comment correct ? 124 125 <legal all> 126 */ 127 #define RX_PPDU_START_2_PPDU_START_TIMESTAMP_OFFSET 0x00000008 128 #define RX_PPDU_START_2_PPDU_START_TIMESTAMP_LSB 0 129 #define RX_PPDU_START_2_PPDU_START_TIMESTAMP_MASK 0xffffffff 130 131 132 #endif // _RX_PPDU_START_H_ 133