2008-10-01 13:07:55 +02:00
|
|
|
/*
|
|
|
|
* hostapd / Driver interface for RADIUS server only (no driver)
|
|
|
|
* Copyright (c) 2008, Atheros Communications
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of BSD
|
|
|
|
* license.
|
|
|
|
*
|
|
|
|
* See README and COPYING for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "includes.h"
|
|
|
|
|
2009-04-09 12:40:12 +02:00
|
|
|
#include "../hostapd/hostapd.h"
|
2008-10-01 13:07:55 +02:00
|
|
|
#include "driver.h"
|
|
|
|
|
|
|
|
|
|
|
|
struct none_driver_data {
|
|
|
|
struct hostapd_data *hapd;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-04-09 22:28:21 +02:00
|
|
|
static void * none_driver_init(struct hostapd_data *hapd,
|
|
|
|
struct wpa_init_params *params)
|
2008-10-01 13:07:55 +02:00
|
|
|
{
|
|
|
|
struct none_driver_data *drv;
|
|
|
|
|
|
|
|
drv = os_zalloc(sizeof(struct none_driver_data));
|
|
|
|
if (drv == NULL) {
|
|
|
|
wpa_printf(MSG_ERROR, "Could not allocate memory for none "
|
|
|
|
"driver data");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
drv->hapd = hapd;
|
|
|
|
|
|
|
|
return drv;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void none_driver_deinit(void *priv)
|
|
|
|
{
|
|
|
|
struct none_driver_data *drv = priv;
|
|
|
|
|
|
|
|
os_free(drv);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int none_driver_send_ether(void *priv, const u8 *dst, const u8 *src,
|
|
|
|
u16 proto, const u8 *data, size_t data_len)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-04-09 12:40:12 +02:00
|
|
|
const struct wpa_driver_ops wpa_driver_none_ops = {
|
2008-10-01 13:07:55 +02:00
|
|
|
.name = "none",
|
2009-04-09 12:40:12 +02:00
|
|
|
.hapd_init = none_driver_init,
|
|
|
|
.hapd_deinit = none_driver_deinit,
|
2008-10-01 13:07:55 +02:00
|
|
|
.send_ether = none_driver_send_ether,
|
|
|
|
};
|