Initial cut of the open ath9k htc firmware.
[open-ath9k-htc-firmware.git] / target_firmware / magpie_fw_dev / build / magpie_1_1 / sboot / fwd / fwd.h
1 #ifndef __FWD_H
2 #define __FWD_H
3
4 #define FWD_TGT_RX_BUFS     5
5
6 typedef void (*jmp_func)(void);
7 /*
8  * XXX Pack 'em
9  */
10 typedef struct {
11   a_uint16_t  more_data;     /* Is there more data? */
12   a_uint16_t len;           /* Len this segment    */
13   a_uint32_t offset;        /* Offset in the file  */
14 } fwd_cmd_t;
15 /*
16  * No enums across platforms
17  */
18 #define FWD_RSP_ACK     0x1
19 #define FWD_RSP_SUCCESS 0x2
20 #define FWD_RSP_FAILED  0x3
21
22 typedef struct {
23     a_uint32_t  rsp;       /* ACK/SUCCESS/FAILURE */ 
24     a_uint32_t  offset;    /* rsp for this ofset  */
25 }fwd_rsp_t;
26
27 typedef struct  {
28     a_uint32_t     addr;
29     hif_handle_t   hif_handle;
30     a_uint8_t      rx_pipe;
31     a_uint8_t      tx_pipe;
32 } fwd_tgt_softc_t;
33
34
35 hif_handle_t fwd_init();
36
37 void
38 fwd_retbuf_handler(VBUF *buf, void *ServiceCtx);
39 void 
40 fwd_hifrecv_handler(VBUF *hdr_buf, VBUF *buf, void *ServiceCtx );
41
42 #endif //__FWD_H