intel_pstate: fix PCT_TO_HWP macro
[linux-2.6-block.git] / drivers / staging / ozwpan / ozproto.h
CommitLineData
1619cb6f
CK
1/* -----------------------------------------------------------------------------
2 * Copyright (c) 2011 Ozmo Inc
3 * Released under the GNU General Public License Version 2 (GPLv2).
4 * -----------------------------------------------------------------------------
5 */
6#ifndef _OZPROTO_H
7#define _OZPROTO_H
8
9#include <asm/byteorder.h>
f724b584 10#include "ozdbg.h"
1619cb6f
CK
11#include "ozappif.h"
12
13#define OZ_ALLOCATED_SPACE(__x) (LL_RESERVED_SPACE(__x)+(__x)->needed_tailroom)
14
8fd07007
RG
15/* Quantum in MS */
16#define OZ_QUANTUM 8
1619cb6f
CK
17/* Default timeouts.
18 */
8fd07007 19#define OZ_PRESLEEP_TOUT 11
1619cb6f
CK
20
21/* Maximun sizes of tx frames. */
0472c989 22#define OZ_MAX_TX_SIZE 760
1619cb6f 23
86d03a0f
RG
24/* Maximum number of uncompleted isoc frames that can be pending in network. */
25#define OZ_MAX_SUBMITTED_ISOC 16
26
27/* Maximum number of uncompleted isoc frames that can be pending in Tx Queue. */
28#define OZ_MAX_TX_QUEUE_ISOC 32
29
1619cb6f
CK
30/* Application handler functions.
31 */
1619cb6f 32struct oz_app_if {
348fecd2
CJ
33 int (*init)(void);
34 void (*term)(void);
35 int (*start)(struct oz_pd *pd, int resume);
36 void (*stop)(struct oz_pd *pd, int pause);
37 void (*rx)(struct oz_pd *pd, struct oz_elt *elt);
38 int (*heartbeat)(struct oz_pd *pd);
39 void (*farewell)(struct oz_pd *pd, u8 ep_num, u8 *data, u8 len);
1619cb6f
CK
40};
41
42int oz_protocol_init(char *devs);
43void oz_protocol_term(void);
44int oz_get_pd_list(struct oz_mac_addr *addr, int max_count);
45void oz_app_enable(int app_id, int enable);
dc7f5b35 46struct oz_pd *oz_pd_find(const u8 *mac_addr);
83e4817f
RG
47void oz_binding_add(const char *net_dev);
48void oz_binding_remove(const char *net_dev);
8fd07007 49void oz_timer_add(struct oz_pd *pd, int type, unsigned long due_time);
1619cb6f
CK
50void oz_timer_delete(struct oz_pd *pd, int type);
51void oz_pd_request_heartbeat(struct oz_pd *pd);
8fd07007
RG
52void oz_pd_heartbeat_handler(unsigned long data);
53void oz_pd_timeout_handler(unsigned long data);
54enum hrtimer_restart oz_pd_heartbeat_event(struct hrtimer *timer);
55enum hrtimer_restart oz_pd_timeout_event(struct hrtimer *timer);
56int oz_get_pd_status_list(char *pd_list, int max_count);
57int oz_get_binding_list(char *buf, int max_if);
1619cb6f 58
2b8b61aa 59extern struct kmem_cache *oz_elt_info_cache;
50222db4 60extern struct kmem_cache *oz_tx_frame_cache;
2b8b61aa 61
1619cb6f 62#endif /* _OZPROTO_H */