rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /*! |
| 2 | * @file ufpm_struct.h |
| 3 | * @author Bo-Kai Huang <bo-kai.haung@mediatek.com> |
| 4 | * @version 1.0 |
| 5 | * @section LICENSE |
| 6 | * |
| 7 | * This software is protected by Copyright and the information contained |
| 8 | * herein is confidential. The software may not be copied and the information |
| 9 | * contained herein may not be used or disclosed except with the written |
| 10 | * permission of MediaTek Inc. (C) 2005 |
| 11 | * |
| 12 | * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| 13 | * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| 14 | * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| 15 | * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| 16 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| 17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| 18 | * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| 19 | * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| 20 | * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| 21 | * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| 22 | * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| 23 | * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| 24 | * |
| 25 | * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| 26 | * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| 27 | * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| 28 | * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| 29 | * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| 30 | * |
| 31 | * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| 32 | * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| 33 | * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| 34 | * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| 35 | * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| 36 | * |
| 37 | * @section DESCRIPTION |
| 38 | * This file provides main definitions of usbcore |
| 39 | */ |
| 40 | |
| 41 | #ifndef _UFPM_USB_STRUCT_H |
| 42 | #define _UFPM_USB_STRUCT_H |
| 43 | |
| 44 | #include "hif_mw_msgid.h" |
| 45 | #include "kal_public_api.h" |
| 46 | #include "ipc_msgsvc_msgid.h" |
| 47 | #include "mw_sap.h" |
| 48 | #include "ufpm_enum.h" |
| 49 | |
| 50 | /************************************************** |
| 51 | * Tehtering RNDIS Data Structure |
| 52 | **************************************************/ |
| 53 | typedef struct _tethering_net_stats_s { |
| 54 | kal_uint64 rx_packets; // Total packets received |
| 55 | kal_uint64 tx_packets; // Total packets transmitted |
| 56 | kal_uint64 rx_errors; // Bad packets received |
| 57 | kal_uint64 tx_errors; // Packet transmit problems |
| 58 | kal_uint64 rx_dropped; // No space in Linux buffers |
| 59 | kal_uint64 tx_dropped; // No space available in Linux |
| 60 | kal_uint64 rx_frame_errors; // Recv'd frame alignment error |
| 61 | } tethering_net_stats_t; |
| 62 | |
| 63 | typedef struct _tethering_activate_meta_info { |
| 64 | kal_uint32 init_msg_max_transfer_size; |
| 65 | kal_uint32 init_cmplt_max_packets_per_transfer; |
| 66 | kal_uint32 init_cmplt_max_transfer_size; |
| 67 | kal_uint32 init_cmplt_packet_alignment_factor; |
| 68 | kal_uint8 host_mac_addr[6]; |
| 69 | kal_uint8 reserved1[2]; |
| 70 | kal_uint8 device_mac_addr[6]; |
| 71 | kal_uint8 reserved2[2]; |
| 72 | tethering_net_stats_t net_stats; |
| 73 | } tethering_activate_meta_info_t; |
| 74 | |
| 75 | typedef struct _tethering_deactivate_meta_info_t { |
| 76 | tethering_net_stats_t net_stats; |
| 77 | } tethering_deactivate_meta_info_t; |
| 78 | |
| 79 | /************************************************** |
| 80 | * Logging ACM Data Structure |
| 81 | **************************************************/ |
| 82 | |
| 83 | typedef struct _logging_activate_meta_info { |
| 84 | kal_uint8 reserved1[8]; |
| 85 | } logging_activate_meta_info_t; |
| 86 | |
| 87 | typedef struct _logging_deactivate_meta_info_t { |
| 88 | kal_uint8 reserved1[8]; |
| 89 | } logging_deactivate_meta_info_t; |
| 90 | |
| 91 | |
| 92 | /*************************************************** |
| 93 | * UFPM Function Common Data Structure |
| 94 | ***************************************************/ |
| 95 | #if 0 |
| 96 | /* under construction !*/ |
| 97 | /* under construction !*/ |
| 98 | /* under construction !*/ |
| 99 | /* under construction !*/ |
| 100 | /* under construction !*/ |
| 101 | #endif |
| 102 | |
| 103 | #define EP0_MSG_DATA_BUF_SIZE 1024 |
| 104 | #define EP0_MSG_INTR_BUF_SIZE 64 |
| 105 | typedef struct _ufpm_send_ap_ep0_msg { |
| 106 | LOCAL_PARA_HDR |
| 107 | kal_uint8 mode; |
| 108 | kal_uint8 reserved[3]; |
| 109 | kal_uint32 ep0_data_len; |
| 110 | kal_uint8 ep0Buffer[EP0_MSG_DATA_BUF_SIZE]; |
| 111 | kal_uint32 int_data_len; |
| 112 | kal_uint8 intBuffer[EP0_MSG_INTR_BUF_SIZE]; |
| 113 | } ufpm_send_ap_ep0_msg_t; |
| 114 | |
| 115 | typedef struct _ufpm_usb_mapping { |
| 116 | kal_uint8 type; |
| 117 | kal_uint8 map; |
| 118 | kal_uint16 maxPktSize; // Max packet size of the endpoint |
| 119 | kal_uint32 queue_config; // QMU queue configuration for MD USB driver |
| 120 | kal_uint8 fifo_n; |
| 121 | } ufpm_usb_mapping_t; |
| 122 | |
| 123 | #endif // _UFPM_USB_H |
| 124 | |