1c164510sam/*
2c164510sam * WPA Supplicant - Windows/NDIS driver interface
3c164510sam * Copyright (c) 2004-2006, Jouni Malinen <j@w1.fi>
4c164510sam *
55e9e13erpaulo * This software may be distributed under the terms of the BSD license.
65e9e13erpaulo * See README for more details.
7c164510sam */
8c164510sam
9c164510sam#ifndef DRIVER_NDIS_H
10c164510sam#define DRIVER_NDIS_H
11c164510sam
12c164510sam#ifdef CONFIG_NDIS_EVENTS_INTEGRATED
13c164510samstruct ndis_events_data;
14c164510samstruct ndis_events_data * ndis_events_init(HANDLE *read_pipe, HANDLE *event,
15c164510sam					   const char *ifname,
16c164510sam					   const char *desc);
17c164510samvoid ndis_events_deinit(struct ndis_events_data *events);
18c164510sam#endif /* CONFIG_NDIS_EVENTS_INTEGRATED */
19c164510sam
20c164510samstruct ndis_pmkid_entry {
21c164510sam	struct ndis_pmkid_entry *next;
22c164510sam	u8 bssid[ETH_ALEN];
23c164510sam	u8 pmkid[16];
24c164510sam};
25c164510sam
26c164510samstruct wpa_driver_ndis_data {
27c164510sam	void *ctx;
28c164510sam	char ifname[100]; /* GUID: {7EE3EFE5-C165-472F-986D-F6FBEDFE8C8D} */
29c164510sam#ifdef _WIN32_WCE
30c164510sam	TCHAR *adapter_name;
31c164510sam	HANDLE event_queue; /* NDISUIO notifier MsgQueue */
32c164510sam	HANDLE connected_event; /* WpaSupplicantConnected event */
33c164510sam#endif /* _WIN32_WCE */
34c164510sam	u8 own_addr[ETH_ALEN];
35c164510sam#ifdef CONFIG_USE_NDISUIO
36c164510sam	HANDLE ndisuio;
37c164510sam#else /* CONFIG_USE_NDISUIO */
38c164510sam	LPADAPTER adapter;
39c164510sam#endif /* CONFIG_USE_NDISUIO */
40c164510sam	u8 bssid[ETH_ALEN];
41c164510sam
42c164510sam	int has_capability;
43c164510sam	int no_of_pmkid;
44c164510sam	int radio_enabled;
45c164510sam	struct wpa_driver_capa capa;
46c164510sam	struct ndis_pmkid_entry *pmkid;
47c164510sam	char *adapter_desc;
48c164510sam	int wired;
494dc7b76rpaulo	int native80211;
50c164510sam	int mode;
51c164510sam	int wzc_disabled;
52c164510sam	int oid_bssid_set;
53c164510sam#ifdef CONFIG_NDIS_EVENTS_INTEGRATED
54c164510sam	HANDLE events_pipe, event_avail;
55c164510sam	struct ndis_events_data *events;
56c164510sam#endif /* CONFIG_NDIS_EVENTS_INTEGRATED */
57c164510sam};
58c164510sam
59c164510sam#endif /* DRIVER_NDIS_H */
60