hc
2024-03-22 a0752693d998599af469473b8dc239ef973a012f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/******************************************************************************
 *
 * Copyright(c) 2019 Realtek Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 *****************************************************************************/
#define _RTW_TRX_USB_C_
#include <drv_types.h>        /* struct dvobj_priv and etc. */
 
 
/********************************xmit section*******************************/
#ifdef CONFIG_USB_TX_AGGREGATION
#define IDEA_CONDITION 1    /* check all packets before enqueue */
static s32 usb_xmitframe_process(_adapter *padapter,
       struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
{    
   return _TRUE;
}
 
#else /* CONFIG_USB_TX_AGGREGATION */
 
static s32 usb_xmitframe_process(_adapter *padapter,
       struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
{
   return _TRUE;
 
}
#endif
 
 
static void usb_xmit_tasklet(_adapter *padapter)
{
#ifdef CONFIG_TX_AMSDU_SW_MODE
   core_tx_amsdu_tasklet(padapter);
#endif
}
 
s32 usb_init_xmit_priv(_adapter *adapter)
{
   s32 ret = _SUCCESS;
   struct xmit_priv *pxmitpriv = &adapter->xmitpriv;
   struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
 
   rtw_tasklet_init(&pxmitpriv->xmit_tasklet,
            (void(*)(unsigned long))usb_xmit_tasklet,
            (unsigned long)adapter);
 
   return _SUCCESS;
}
 
void usb_free_xmit_priv(_adapter *adapter)
{
}
 
#if 0 /*def CONFIG_XMIT_THREAD_MODE*/
/*
 * Description
 *    Transmit xmitbuf to hardware tx fifo
 *
 * Return
 *    _SUCCESS    ok
 *    _FAIL        something error
 */
s32 usb_xmit_buf_handler(_adapter *adapter)
{
   return _SUCCESS;
}
#endif /* CONFIG_XMIT_THREAD_MODE */
 
s32 usb_xmitframe_enqueue(_adapter *adapter, struct xmit_frame *pxmitframe)
{
   return _SUCCESS;
}
 
/******************************** recv section*******************************/
int usb_init_recv_priv(struct dvobj_priv *dvobj)
{
   int res = _SUCCESS;
 
   return res;
}
 
void usb_free_recv_priv(struct dvobj_priv *dvobj)
{
 
}
 
struct rtw_intf_ops usb_ops = {
   .init_xmit_priv = usb_init_xmit_priv,
   .free_xmit_priv = usb_free_xmit_priv,
   .xmitframe_enqueue = usb_xmitframe_enqueue,
   #if 0 /*def CONFIG_XMIT_THREAD_MODE*/
   .xmit_buf_handler = usb_xmit_buf_handler,
   #endif
 
   .init_recv_priv = usb_init_recv_priv,
   .free_recv_priv = usb_free_recv_priv,
 
};