OSDN Git Service

staging: rtl8723bs: update to the latest driver
[android-x86/kernel.git] / drivers / staging / rtl8723bs / include / osdep_intf.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15
16 #ifndef __OSDEP_INTF_H_
17 #define __OSDEP_INTF_H_
18
19
20 struct intf_priv {
21
22         u8 *intf_dev;
23         u32 max_iosz;   /* USB2.0: 128, USB1.1: 64, SDIO:64 */
24         u32 max_xmitsz; /* USB2.0: unlimited, SDIO:512 */
25         u32 max_recvsz; /* USB2.0: unlimited, SDIO:512 */
26
27         volatile u8 *io_rwmem;
28         volatile u8 *allocated_io_rwmem;
29         u32 io_wsz; /* unit: 4bytes */
30         u32 io_rsz;/* unit: 4bytes */
31         u8 intf_status;
32
33         void (*_bus_io)(u8 *priv);
34
35 /*
36 Under Sync. IRP (SDIO/USB)
37 A protection mechanism is necessary for the io_rwmem(read/write protocol)
38
39 Under Async. IRP (SDIO/USB)
40 The protection mechanism is through the pending queue.
41 */
42
43         _mutex ioctl_mutex;
44 };
45
46
47 #ifdef CONFIG_R871X_TEST
48 int rtw_start_pseudo_adhoc(struct adapter *padapter);
49 int rtw_stop_pseudo_adhoc(struct adapter *padapter);
50 #endif
51
52 struct dvobj_priv *devobj_init(void);
53 void devobj_deinit(struct dvobj_priv *pdvobj);
54
55 u8 rtw_init_drv_sw(struct adapter *padapter);
56 u8 rtw_free_drv_sw(struct adapter *padapter);
57 u8 rtw_reset_drv_sw(struct adapter *padapter);
58 void rtw_dev_unload(struct adapter *padapter);
59
60 u32 rtw_start_drv_threads(struct adapter *padapter);
61 void rtw_stop_drv_threads (struct adapter *padapter);
62 void rtw_cancel_all_timer(struct adapter *padapter);
63
64 int rtw_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
65
66 int rtw_init_netdev_name(struct net_device *pnetdev, const char *ifname);
67 struct net_device *rtw_init_netdev(struct adapter *padapter);
68 void rtw_unregister_netdevs(struct dvobj_priv *dvobj);
69
70 u16 rtw_recv_select_queue(struct sk_buff *skb);
71
72 int rtw_ndev_notifier_register(void);
73 void rtw_ndev_notifier_unregister(void);
74
75 #include "../os_dep/rtw_proc.h"
76
77 void rtw_ips_dev_unload(struct adapter *padapter);
78
79 int rtw_ips_pwr_up(struct adapter *padapter);
80 void rtw_ips_pwr_down(struct adapter *padapter);
81
82 int rtw_drv_register_netdev(struct adapter *padapter);
83 void rtw_ndev_destructor(_nic_hdl ndev);
84
85 int rtw_suspend_common(struct adapter *padapter);
86 int rtw_resume_common(struct adapter *padapter);
87
88 #endif  /* _OSDEP_INTF_H_ */