Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: chromeos/drivers/ath6kl/include/aggr_recv_api.h

Issue 646055: Atheros AR600x driver + build glue (Closed)
Patch Set: Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/drivers/ath6kl/include/a_types.h ('k') | chromeos/drivers/ath6kl/include/ar3kconfig.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 *
3 * Copyright (c) 2004-2007 Atheros Communications Inc.
4 * All rights reserved.
5 *
6 *
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2 as
9 // published by the Free Software Foundation;
10 //
11 // Software distributed under the License is distributed on an "AS
12 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
13 // implied. See the License for the specific language governing
14 // rights and limitations under the License.
15 //
16 //
17 *
18 */
19
20 #ifndef __AGGR_RECV_API_H__
21 #define __AGGR_RECV_API_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 typedef void (* RX_CALLBACK)(void * dev, void *osbuf);
28
29 typedef void (* ALLOC_NETBUFS)(A_NETBUF_QUEUE_T *q, A_UINT16 num);
30
31 /*
32 * aggr_init:
33 * Initialises the data structures, allocates data queues and
34 * os buffers. Netbuf allocator is the input param, used by the
35 * aggr module for allocation of NETBUFs from driver context.
36 * These NETBUFs are used for AMSDU processing.
37 * Returns the context for the aggr module.
38 */
39 void *
40 aggr_init(ALLOC_NETBUFS netbuf_allocator);
41
42
43 /*
44 * aggr_register_rx_dispatcher:
45 * Registers OS call back function to deliver the
46 * frames to OS. This is generally the topmost layer of
47 * the driver context, after which the frames go to
48 * IP stack via the call back function.
49 * This dispatcher is active only when aggregation is ON.
50 */
51 void
52 aggr_register_rx_dispatcher(void *cntxt, void * dev, RX_CALLBACK fn);
53
54
55 /*
56 * aggr_process_bar:
57 * When target receives BAR, it communicates to host driver
58 * for modifying window parameters. Target indicates this via the
59 * event: WMI_ADDBA_REQ_EVENTID. Host will dequeue all frames
60 * up to the indicated sequence number.
61 */
62 void
63 aggr_process_bar(void *cntxt, A_UINT8 tid, A_UINT16 seq_no);
64
65
66 /*
67 * aggr_recv_addba_req_evt:
68 * This event is to initiate/modify the receive side window.
69 * Target will send WMI_ADDBA_REQ_EVENTID event to host - to setup
70 * recv re-ordering queues. Target will negotiate ADDBA with peer,
71 * and indicate via this event after succesfully completing the
72 * negotiation. This happens in two situations:
73 * 1. Initial setup of aggregation
74 * 2. Renegotiation of current recv window.
75 * Window size for re-ordering is limited by target buffer
76 * space, which is reflected in win_sz.
77 * (Re)Start the periodic timer to deliver long standing frames,
78 * in hold_q to OS.
79 */
80 void
81 aggr_recv_addba_req_evt(void * cntxt, A_UINT8 tid, A_UINT16 seq_no, A_UINT8 win_ sz);
82
83
84 /*
85 * aggr_recv_delba_req_evt:
86 * Target indicates deletion of a BA window for a tid via the
87 * WMI_DELBA_EVENTID. Host would deliver all the frames in the
88 * hold_q, reset tid config and disable the periodic timer, if
89 * aggr is not enabled on any tid.
90 */
91 void
92 aggr_recv_delba_req_evt(void * cntxt, A_UINT8 tid);
93
94
95
96 /*
97 * aggr_process_recv_frm:
98 * Called only for data frames. When aggr is ON for a tid, the buffer
99 * is always consumed, and osbuf would be NULL. For a non-aggr case,
100 * osbuf is not modified.
101 * AMSDU frames are consumed and are later freed. They are sliced and
102 * diced to individual frames and dispatched to stack.
103 * After consuming a osbuf(when aggr is ON), a previously registered
104 * callback may be called to deliver frames in order.
105 */
106 void
107 aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu , void **osbuf);
108
109
110 /*
111 * aggr_module_destroy:
112 * Frees up all the queues and frames in them. Releases the cntxt to OS.
113 */
114 void
115 aggr_module_destroy(void *cntxt);
116
117 /*
118 * Dumps the aggregation stats
119 */
120 void
121 aggr_dump_stats(void *cntxt, PACKET_LOG **log_buf);
122
123 /*
124 * aggr_reset_state -- Called when it is deemed necessary to clear the aggregate
125 * hold Q state. Examples include when a Connect event or disconnect event is
126 * received.
127 */
128 void
129 aggr_reset_state(void *cntxt);
130
131
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif /*__AGGR_RECV_API_H__ */
OLDNEW
« no previous file with comments | « chromeos/drivers/ath6kl/include/a_types.h ('k') | chromeos/drivers/ath6kl/include/ar3kconfig.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698