106 lines · c
1/* SPDX-License-Identifier: ISC */2/* Copyright (C) 2020 MediaTek Inc. */3 4#ifndef __MT7915_TESTMODE_H5#define __MT7915_TESTMODE_H6 7struct mt7915_tm_trx {8 u8 type;9 u8 enable;10 u8 band;11 u8 rsv;12};13 14struct mt7915_tm_freq_offset {15 u8 band;16 __le32 freq_offset;17};18 19struct mt7915_tm_slot_time {20 u8 slot_time;21 u8 sifs;22 u8 rifs;23 u8 _rsv;24 __le16 eifs;25 u8 band;26 u8 _rsv1[5];27};28 29struct mt7915_tm_clean_txq {30 bool sta_pause;31 u8 wcid; /* 256 sta */32 u8 band;33 u8 rsv;34};35 36struct mt7915_tm_cmd {37 u8 testmode_en;38 u8 param_idx;39 u8 _rsv[2];40 union {41 __le32 data;42 struct mt7915_tm_trx trx;43 struct mt7915_tm_freq_offset freq;44 struct mt7915_tm_slot_time slot;45 struct mt7915_tm_clean_txq clean;46 u8 test[72];47 } param;48} __packed;49 50enum {51 TM_MAC_TX = 1,52 TM_MAC_RX,53 TM_MAC_TXRX,54 TM_MAC_TXRX_RXV,55 TM_MAC_RXV,56 TM_MAC_RX_RXV,57};58 59struct tm_tx_cont {60 u8 control_ch;61 u8 center_ch;62 u8 bw;63 u8 tx_ant;64 __le16 rateval;65 u8 band;66 u8 txfd_mode;67};68 69struct mt7915_tm_rf_test {70 u8 action;71 u8 icap_len;72 u8 _rsv[2];73 union {74 __le32 op_mode;75 __le32 freq;76 77 struct {78 __le32 func_idx;79 union {80 __le32 func_data;81 __le32 cal_dump;82 83 struct tm_tx_cont tx_cont;84 85 u8 _pad[80];86 } param;87 } rf;88 } op;89} __packed;90 91enum {92 RF_OPER_NORMAL,93 RF_OPER_RF_TEST,94 RF_OPER_ICAP,95 RF_OPER_ICAP_OVERLAP,96 RF_OPER_WIFI_SPECTRUM,97};98 99enum {100 TAM_ARB_OP_MODE_NORMAL = 1,101 TAM_ARB_OP_MODE_TEST,102 TAM_ARB_OP_MODE_FORCE_SU = 5,103};104 105#endif106