2 * Copyright (c) 2013 Qualcomm Atheros, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted (subject to the limitations in the
7 * disclaimer below) provided that the following conditions are met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the
17 * * Neither the name of Qualcomm Atheros nor the names of its
18 * contributors may be used to endorse or promote products derived
19 * from this software without specific prior written permission.
21 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
22 * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
23 * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
31 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
32 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
33 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 #ifndef __ADF_NET_PVT_H
36 #define __ADF_NET_PVT_H
40 #define ADF_NET_MAX_NAME 64
41 #define ADF_DEF_TX_TIMEOUT 5 /*Seconds I suppose*/
43 #define __ADF_NET_NULL NULL
44 #define __ADF_PCI_BAR0 0x10
48 __adf_net_register_drv(adf_drv_info_t *drv);
51 __adf_net_unregister_drv(a_uint8_t *name);
53 typedef struct __adf_net_mod {
59 typedef struct __adf_softc {
63 static inline a_bool_t
64 __adf_net_carrier_ok(adf_net_handle_t hdl)
70 __adf_net_carrier_off(adf_net_handle_t hdl)
76 __adf_net_carrier_on(adf_net_handle_t hdl)
82 __adf_net_start_queue(adf_net_handle_t hdl)
88 __adf_net_stop_queue(adf_net_handle_t hdl)
94 __adf_net_wake_queue(adf_net_handle_t hdl)
98 static inline a_bool_t
99 __adf_net_queue_stopped(adf_net_handle_t hdl)
104 static inline a_bool_t
105 __adf_net_is_running(adf_net_handle_t hdl)
109 static inline a_bool_t
110 __adf_net_is_up(adf_net_handle_t hdl)
115 static inline adf_net_handle_t __adf_net_dev_create(adf_drv_handle_t hdl, adf_dev_sw_t *op,
116 adf_net_dev_info_t *info)
121 static inline adf_net_handle_t __adf_net_vdev_create(adf_net_handle_t dev_hdl,
122 adf_drv_handle_t hdl, adf_vdev_sw_t *op,
123 adf_net_dev_info_t *info)
128 static inline const a_uint8_t * __adf_net_ifname(adf_net_handle_t hdl)
133 static inline adf_os_handle_t
134 __adf_net_dev_to_os(__adf_os_device_t osdev)
139 static inline adf_os_handle_t
140 __adf_net_hdl_to_os(adf_net_handle_t hdl)