#include "includes.h"
#include <sys/ioctl.h>
#include <linux/if.h>
#include <linux/sockios.h>
#include <linux/if_ether.h>
#include <linux/mii.h>
#include "common.h"
#include "driver.h"
#include "l2_packet/l2_packet.h"
Go to the source code of this file.
Classes | |
struct | wpa_driver_roboswitch_data |
Defines | |
#define | ROBO_ARLCTRL_ADDR_1 0x10 /* Multiport address 1 */ |
#define | ROBO_ARLCTRL_ADDR_2 0x20 /* Multiport address 2 */ |
#define | ROBO_ARLCTRL_CONF 0x00 /* ARL configuration register */ |
#define | ROBO_ARLCTRL_PAGE 0x04 /* ARL control page */ |
#define | ROBO_ARLCTRL_VEC_1 0x16 /* Multiport vector 1 */ |
#define | ROBO_ARLCTRL_VEC_2 0x26 /* Multiport vector 2 */ |
#define | ROBO_MII_ADDR 0x11 /* MII address register */ |
#define | ROBO_MII_ADDR_READ 0x02 /* MII address read op code */ |
#define | ROBO_MII_ADDR_WRITE 0x01 /* MII address write op code */ |
#define | ROBO_MII_DATA_MAX 4 /* Consecutive MII data registers */ |
#define | ROBO_MII_DATA_OFFSET 0x18 /* Start of MII data registers */ |
#define | ROBO_MII_PAGE 0x10 /* MII page register */ |
#define | ROBO_MII_PAGE_ENABLE 0x01 /* MII page op code */ |
#define | ROBO_MII_RETRY_MAX 10 /* Read attempts before giving up */ |
#define | ROBO_PHY_ADDR 0x1e /* RoboSwitch PHY address */ |
#define | ROBO_VLAN_ACCESS 0x08 /* VLAN table access register */ |
#define | ROBO_VLAN_ACCESS_5350 0x06 /* VLAN table access register (5350) */ |
#define | ROBO_VLAN_MAX 0xff /* Maximum number of VLANs */ |
#define | ROBO_VLAN_PAGE 0x34 /* VLAN page */ |
#define | ROBO_VLAN_READ 0x0c /* VLAN read register */ |
Functions | |
static struct mii_ioctl_data * | if_mii (struct ifreq *rq) |
static void | wpa_driver_roboswitch_addr_be16 (const u8 addr[ETH_ALEN], u16 *be) |
static void | wpa_driver_roboswitch_deinit (void *priv) |
static int | wpa_driver_roboswitch_get_bssid (void *priv, u8 *bssid) |
static int | wpa_driver_roboswitch_get_capa (void *priv, struct wpa_driver_capa *capa) |
static const char * | wpa_driver_roboswitch_get_ifname (void *priv) |
static int | wpa_driver_roboswitch_get_ssid (void *priv, u8 *ssid) |
static void * | wpa_driver_roboswitch_init (void *ctx, const char *ifname) |
static int | wpa_driver_roboswitch_join (struct wpa_driver_roboswitch_data *drv, u16 ports, const u8 *addr) |
static int | wpa_driver_roboswitch_leave (struct wpa_driver_roboswitch_data *drv, u16 ports, const u8 *addr) |
static u16 | wpa_driver_roboswitch_mdio_read (struct wpa_driver_roboswitch_data *drv, u8 reg) |
static void | wpa_driver_roboswitch_mdio_write (struct wpa_driver_roboswitch_data *drv, u8 reg, u16 val) |
static int | wpa_driver_roboswitch_read (struct wpa_driver_roboswitch_data *drv, u8 page, u8 reg, u16 *val, int len) |
static void | wpa_driver_roboswitch_receive (void *priv, const u8 *src_addr, const u8 *buf, size_t len) |
static int | wpa_driver_roboswitch_reg (struct wpa_driver_roboswitch_data *drv, u8 page, u8 reg, u8 op) |
static int | wpa_driver_roboswitch_set_param (void *priv, const char *param) |
static int | wpa_driver_roboswitch_write (struct wpa_driver_roboswitch_data *drv, u8 page, u8 reg, u16 *val, int len) |
Variables | |
static const u8 | pae_group_addr [ETH_ALEN] |
struct wpa_driver_ops | wpa_driver_roboswitch_ops |
#define ROBO_ARLCTRL_ADDR_1 0x10 /* Multiport address 1 */ |
Definition at line 45 of file driver_roboswitch.c.
#define ROBO_ARLCTRL_ADDR_2 0x20 /* Multiport address 2 */ |
Definition at line 47 of file driver_roboswitch.c.
#define ROBO_ARLCTRL_CONF 0x00 /* ARL configuration register */ |
Definition at line 44 of file driver_roboswitch.c.
#define ROBO_ARLCTRL_PAGE 0x04 /* ARL control page */ |
Definition at line 40 of file driver_roboswitch.c.
#define ROBO_ARLCTRL_VEC_1 0x16 /* Multiport vector 1 */ |
Definition at line 46 of file driver_roboswitch.c.
#define ROBO_ARLCTRL_VEC_2 0x26 /* Multiport vector 2 */ |
Definition at line 48 of file driver_roboswitch.c.
#define ROBO_MII_ADDR 0x11 /* MII address register */ |
Definition at line 30 of file driver_roboswitch.c.
#define ROBO_MII_ADDR_READ 0x02 /* MII address read op code */ |
Definition at line 35 of file driver_roboswitch.c.
#define ROBO_MII_ADDR_WRITE 0x01 /* MII address write op code */ |
Definition at line 34 of file driver_roboswitch.c.
#define ROBO_MII_DATA_MAX 4 /* Consecutive MII data registers */ |
Definition at line 36 of file driver_roboswitch.c.
#define ROBO_MII_DATA_OFFSET 0x18 /* Start of MII data registers */ |
Definition at line 31 of file driver_roboswitch.c.
#define ROBO_MII_PAGE 0x10 /* MII page register */ |
Definition at line 29 of file driver_roboswitch.c.
#define ROBO_MII_PAGE_ENABLE 0x01 /* MII page op code */ |
Definition at line 33 of file driver_roboswitch.c.
#define ROBO_MII_RETRY_MAX 10 /* Read attempts before giving up */ |
Definition at line 37 of file driver_roboswitch.c.
#define ROBO_PHY_ADDR 0x1e /* RoboSwitch PHY address */ |
Definition at line 26 of file driver_roboswitch.c.
#define ROBO_VLAN_ACCESS 0x08 /* VLAN table access register */ |
Definition at line 51 of file driver_roboswitch.c.
#define ROBO_VLAN_ACCESS_5350 0x06 /* VLAN table access register (5350) */ |
Definition at line 52 of file driver_roboswitch.c.
#define ROBO_VLAN_MAX 0xff /* Maximum number of VLANs */ |
Definition at line 54 of file driver_roboswitch.c.
#define ROBO_VLAN_PAGE 0x34 /* VLAN page */ |
Definition at line 41 of file driver_roboswitch.c.
#define ROBO_VLAN_READ 0x0c /* VLAN read register */ |
Definition at line 53 of file driver_roboswitch.c.
static struct mii_ioctl_data* if_mii | ( | struct ifreq * | rq | ) | [static, read] |
Definition at line 73 of file driver_roboswitch.c.
static void wpa_driver_roboswitch_addr_be16 | ( | const u8 | addr[ETH_ALEN], |
u16 * | be | ||
) | [static] |
Definition at line 83 of file driver_roboswitch.c.
static void wpa_driver_roboswitch_deinit | ( | void * | priv | ) | [static] |
Definition at line 452 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_get_bssid | ( | void * | priv, |
u8 * | bssid | ||
) | [static] |
Definition at line 194 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_get_capa | ( | void * | priv, |
struct wpa_driver_capa * | capa | ||
) | [static] |
Definition at line 202 of file driver_roboswitch.c.
static const char* wpa_driver_roboswitch_get_ifname | ( | void * | priv | ) | [static] |
Definition at line 237 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_get_ssid | ( | void * | priv, |
u8 * | ssid | ||
) | [static] |
Definition at line 187 of file driver_roboswitch.c.
static void* wpa_driver_roboswitch_init | ( | void * | ctx, |
const char * | ifname | ||
) | [static] |
Definition at line 353 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_join | ( | struct wpa_driver_roboswitch_data * | drv, |
u16 | ports, | ||
const u8 * | addr | ||
) | [static] |
Definition at line 244 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_leave | ( | struct wpa_driver_roboswitch_data * | drv, |
u16 | ports, | ||
const u8 * | addr | ||
) | [static] |
Definition at line 290 of file driver_roboswitch.c.
static u16 wpa_driver_roboswitch_mdio_read | ( | struct wpa_driver_roboswitch_data * | drv, |
u8 | reg | ||
) | [static] |
Definition at line 91 of file driver_roboswitch.c.
static void wpa_driver_roboswitch_mdio_write | ( | struct wpa_driver_roboswitch_data * | drv, |
u8 | reg, | ||
u16 | val | ||
) | [static] |
Definition at line 107 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_read | ( | struct wpa_driver_roboswitch_data * | drv, |
u8 | page, | ||
u8 | reg, | ||
u16 * | val, | ||
int | len | ||
) | [static] |
Definition at line 144 of file driver_roboswitch.c.
static void wpa_driver_roboswitch_receive | ( | void * | priv, |
const u8 * | src_addr, | ||
const u8 * | buf, | ||
size_t | len | ||
) | [static] |
Definition at line 176 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_reg | ( | struct wpa_driver_roboswitch_data * | drv, |
u8 | page, | ||
u8 | reg, | ||
u8 | op | ||
) | [static] |
Definition at line 122 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_set_param | ( | void * | priv, |
const char * | param | ||
) | [static] |
Definition at line 211 of file driver_roboswitch.c.
static int wpa_driver_roboswitch_write | ( | struct wpa_driver_roboswitch_data * | drv, |
u8 | page, | ||
u8 | reg, | ||
u16 * | val, | ||
int | len | ||
) | [static] |
Definition at line 162 of file driver_roboswitch.c.
const u8 pae_group_addr[ETH_ALEN] [static] |
{ 0x01, 0x80, 0xc2, 0x00, 0x00, 0x03 }
Definition at line 57 of file driver_roboswitch.c.
{ .name = "roboswitch", .desc = "wpa_supplicant roboswitch driver", .get_ssid = wpa_driver_roboswitch_get_ssid, .get_bssid = wpa_driver_roboswitch_get_bssid, .get_capa = wpa_driver_roboswitch_get_capa, .init = wpa_driver_roboswitch_init, .deinit = wpa_driver_roboswitch_deinit, .set_param = wpa_driver_roboswitch_set_param, .get_ifname = wpa_driver_roboswitch_get_ifname, }
Definition at line 470 of file driver_roboswitch.c.