]>
Commit | Line | Data |
---|---|---|
d64dabee JM |
1 | /* |
2 | * hostapd / Driver interface for RADIUS server only (no driver) | |
3 | * Copyright (c) 2008, Atheros Communications | |
4 | * | |
5 | * This program is free software; you can redistribute it and/or modify | |
6 | * it under the terms of the GNU General Public License version 2 as | |
7 | * published by the Free Software Foundation. | |
8 | * | |
9 | * Alternatively, this software may be distributed under the terms of BSD | |
10 | * license. | |
11 | * | |
12 | * See README and COPYING for more details. | |
13 | */ | |
14 | ||
15 | #include "includes.h" | |
16 | ||
c5121837 | 17 | #include "../hostapd/hostapd.h" |
d64dabee JM |
18 | #include "driver.h" |
19 | ||
20 | ||
21 | struct none_driver_data { | |
22 | struct hostapd_data *hapd; | |
23 | }; | |
24 | ||
25 | ||
26 | static void * none_driver_init(struct hostapd_data *hapd) | |
27 | { | |
28 | struct none_driver_data *drv; | |
29 | ||
30 | drv = os_zalloc(sizeof(struct none_driver_data)); | |
31 | if (drv == NULL) { | |
32 | wpa_printf(MSG_ERROR, "Could not allocate memory for none " | |
33 | "driver data"); | |
34 | return NULL; | |
35 | } | |
36 | drv->hapd = hapd; | |
37 | ||
38 | return drv; | |
39 | } | |
40 | ||
41 | ||
42 | static void none_driver_deinit(void *priv) | |
43 | { | |
44 | struct none_driver_data *drv = priv; | |
45 | ||
46 | os_free(drv); | |
47 | } | |
48 | ||
49 | ||
50 | static int none_driver_send_ether(void *priv, const u8 *dst, const u8 *src, | |
51 | u16 proto, const u8 *data, size_t data_len) | |
52 | { | |
53 | return 0; | |
54 | } | |
55 | ||
56 | ||
c5121837 | 57 | const struct wpa_driver_ops wpa_driver_none_ops = { |
d64dabee | 58 | .name = "none", |
c5121837 JM |
59 | .hapd_init = none_driver_init, |
60 | .hapd_deinit = none_driver_deinit, | |
d64dabee JM |
61 | .send_ether = none_driver_send_ether, |
62 | }; |