Deleted Added
full compact
if_ndisvar.h (186507) if_ndisvar.h (189488)
1/*-
2 * Copyright (c) 2003
3 * Bill Paul <wpaul@windriver.com>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*-
2 * Copyright (c) 2003
3 * Bill Paul <wpaul@windriver.com>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/dev/if_ndis/if_ndisvar.h 186507 2008-12-27 08:03:32Z weongyo $
32 * $FreeBSD: head/sys/dev/if_ndis/if_ndisvar.h 189488 2009-03-07 07:26:22Z weongyo $
33 */
34
35#define NDIS_DEFAULT_NODENAME "FreeBSD NDIS node"
36#define NDIS_NODENAME_LEN 32
37
38/* For setting/getting OIDs from userspace. */
39
40struct ndis_oid_data {

--- 67 unchanged lines hidden (view full) ---

108struct ndis_vap {
109 struct ieee80211vap vap;
110
111 int (*newstate)(struct ieee80211vap *,
112 enum ieee80211_state, int);
113};
114#define NDIS_VAP(vap) ((struct ndis_vap *)(vap))
115
33 */
34
35#define NDIS_DEFAULT_NODENAME "FreeBSD NDIS node"
36#define NDIS_NODENAME_LEN 32
37
38/* For setting/getting OIDs from userspace. */
39
40struct ndis_oid_data {

--- 67 unchanged lines hidden (view full) ---

108struct ndis_vap {
109 struct ieee80211vap vap;
110
111 int (*newstate)(struct ieee80211vap *,
112 enum ieee80211_state, int);
113};
114#define NDIS_VAP(vap) ((struct ndis_vap *)(vap))
115
116#define NDISUSB_CONFIG_NO 1
116#define NDISUSB_CONFIG_NO 0
117#define NDISUSB_IFACE_INDEX 0
117#define NDISUSB_IFACE_INDEX 0
118/* XXX at USB2 there's no USBD_NO_TIMEOUT macro anymore */
119#define NDISUSB_NO_TIMEOUT 0
118#define NDISUSB_INTR_TIMEOUT 1000
119#define NDISUSB_TX_TIMEOUT 10000
120#define NDISUSB_INTR_TIMEOUT 1000
121#define NDISUSB_TX_TIMEOUT 10000
122struct ndisusb_xfer;
123struct ndisusb_ep {
124 struct usb2_xfer *ne_xfer[1];
125 list_entry ne_active;
126 list_entry ne_pending;
127 kspin_lock ne_lock;
128 uint8_t ne_dirin;
129};
120struct ndisusb_xfer {
130struct ndisusb_xfer {
121 usbd_xfer_handle nx_xfer;
122 usbd_private_handle nx_priv;
123 usbd_status nx_status;
124 list_entry nx_xferlist;
131 struct ndisusb_ep *nx_ep;
132 void *nx_priv;
133 uint8_t *nx_urbbuf;
134 uint32_t nx_urbactlen;
135 uint32_t nx_urblen;
136 uint8_t nx_shortxfer;
137 list_entry nx_next;
125};
138};
139struct ndisusb_xferdone {
140 struct ndisusb_xfer *nd_xfer;
141 usb2_error_t nd_status;
142 list_entry nd_donelist;
143};
126
127struct ndis_softc {
128 struct ifnet *ifp;
129 struct ifmedia ifmedia; /* media info */
130 u_long ndis_hwassist;
131 uint32_t ndis_v4tx;
132 uint32_t ndis_v4rx;
133 bus_space_handle_t ndis_bhandle;

--- 62 unchanged lines hidden (view full) ---

196 struct task ndis_scantask;
197 struct task ndis_authtask;
198 struct task ndis_assoctask;
199 int (*ndis_newstate)(struct ieee80211com *,
200 enum ieee80211_state, int);
201 int ndis_tx_timer;
202 int ndis_hang_timer;
203
144
145struct ndis_softc {
146 struct ifnet *ifp;
147 struct ifmedia ifmedia; /* media info */
148 u_long ndis_hwassist;
149 uint32_t ndis_v4tx;
150 uint32_t ndis_v4rx;
151 bus_space_handle_t ndis_bhandle;

--- 62 unchanged lines hidden (view full) ---

214 struct task ndis_scantask;
215 struct task ndis_authtask;
216 struct task ndis_assoctask;
217 int (*ndis_newstate)(struct ieee80211com *,
218 enum ieee80211_state, int);
219 int ndis_tx_timer;
220 int ndis_hang_timer;
221
204 io_workitem *ndisusb_xferitem;
205 list_entry ndisusb_xferlist;
206 kspin_lock ndisusb_xferlock;
207#define NDISUSB_ENDPT_BOUT 0
208#define NDISUSB_ENDPT_BIN 1
209#define NDISUSB_ENDPT_IIN 2
210#define NDISUSB_ENDPT_IOUT 3
211#define NDISUSB_ENDPT_MAX 4
212 usbd_pipe_handle ndisusb_ep[NDISUSB_ENDPT_MAX];
213 char *ndisusb_iin_buf;
222 struct usb2_device *ndisusb_dev;
223#define NDISUSB_GET_ENDPT(addr) \
224 ((UE_GET_DIR(addr) >> 7) | (UE_GET_ADDR(addr) << 1))
225#define NDISUSB_ENDPT_MAX ((UE_ADDR + 1) * 2)
226 struct ndisusb_ep ndisusb_ep[NDISUSB_ENDPT_MAX];
227 io_workitem *ndisusb_xferdoneitem;
228 list_entry ndisusb_xferdonelist;
229 kspin_lock ndisusb_xferdonelock;
214 int ndisusb_status;
215#define NDISUSB_STATUS_DETACH 0x1
216};
217
230 int ndisusb_status;
231#define NDISUSB_STATUS_DETACH 0x1
232};
233
218#define NDISMTX_LOCK(_sc) mtx_lock(&(_sc)->ndis_mtx)
219#define NDISMTX_UNLOCK(_sc) mtx_unlock(&(_sc)->ndis_mtx)
220#define NDISUSB_LOCK(_sc) mtx_lock(&Giant)
221#define NDISUSB_UNLOCK(_sc) mtx_unlock(&Giant)
222#define NDIS_LOCK(_sc) do { \
223 if ((_sc)->ndis_iftype == PNPBus) \
224 NDISUSB_LOCK(_sc); \
225 NDISMTX_LOCK(_sc); \
226} while (0)
227#define NDIS_UNLOCK(_sc) do { \
228 if ((_sc)->ndis_iftype == PNPBus) \
229 NDISUSB_UNLOCK(_sc); \
230 NDISMTX_UNLOCK(_sc); \
231} while (0)
234#define NDIS_LOCK(_sc) mtx_lock(&(_sc)->ndis_mtx)
235#define NDIS_UNLOCK(_sc) mtx_unlock(&(_sc)->ndis_mtx)
236#define NDIS_LOCK_ASSERT(_sc, t) mtx_assert(&(_sc)->ndis_mtx, t)