Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits) dp83640: free packet queues on remove dp83640: use proper function to free transmit time stamping packets ipv6: Do not use routes from locally generated RAs |PATCH net-next] tg3: add tx_dropped counter be2net: don't create multiple RX/TX rings in multi channel mode be2net: don't create multiple TXQs in BE2 be2net: refactor VF setup/teardown code into be_vf_setup/clear() be2net: add vlan/rx-mode/flow-control config to be_setup() net_sched: cls_flow: use skb_header_pointer() ipv4: avoid useless call of the function check_peer_pmtu TCP: remove TCP_DEBUG net: Fix driver name for mdio-gpio.c ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces ipv4: fix ipsec forward performance regression jme: fix irq storm after suspend/resume route: fix ICMP redirect validation net: hold sock reference while processing tx timestamps tcp: md5: add more const attributes Add ethtool -g support to virtio_net ... Fix up conflicts in: - drivers/net/Kconfig: The split-up generated a trivial conflict with removal of a stale reference to Documentation/networking/net-modules.txt. Remove it from the new location instead. - fs/sysfs/dir.c: Fairly nasty conflicts with the sysfs rb-tree usage, conflicting with Eric Biederman's changes for tagged directories.
This commit is contained in:
commit
8a9ea3237e
2121 changed files with 200383 additions and 104486 deletions
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
/*
|
||||
* AppleTalk networking structures
|
||||
|
|
@ -28,7 +29,7 @@ struct atalk_addr {
|
|||
};
|
||||
|
||||
struct sockaddr_at {
|
||||
sa_family_t sat_family;
|
||||
__kernel_sa_family_t sat_family;
|
||||
__u8 sat_port;
|
||||
struct atalk_addr sat_addr;
|
||||
char sat_zero[8];
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ typedef struct {
|
|||
} ax25_address;
|
||||
|
||||
struct sockaddr_ax25 {
|
||||
sa_family_t sax25_family;
|
||||
__kernel_sa_family_t sax25_family;
|
||||
ax25_address sax25_call;
|
||||
int sax25_ndigis;
|
||||
/* Digipeater ax25_address sets follow */
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <linux/bcma/bcma_driver_chipcommon.h>
|
||||
#include <linux/bcma/bcma_driver_pci.h>
|
||||
#include <linux/bcma/bcma_driver_mips.h>
|
||||
#include <linux/ssb/ssb.h> /* SPROM sharing */
|
||||
|
||||
#include "bcma_regs.h"
|
||||
|
|
@ -14,9 +15,9 @@ struct bcma_device;
|
|||
struct bcma_bus;
|
||||
|
||||
enum bcma_hosttype {
|
||||
BCMA_HOSTTYPE_NONE,
|
||||
BCMA_HOSTTYPE_PCI,
|
||||
BCMA_HOSTTYPE_SDIO,
|
||||
BCMA_HOSTTYPE_SOC,
|
||||
};
|
||||
|
||||
struct bcma_chipinfo {
|
||||
|
|
@ -130,6 +131,7 @@ struct bcma_device {
|
|||
|
||||
struct device dev;
|
||||
struct device *dma_dev;
|
||||
|
||||
unsigned int irq;
|
||||
bool dev_registered;
|
||||
|
||||
|
|
@ -138,6 +140,9 @@ struct bcma_device {
|
|||
u32 addr;
|
||||
u32 wrap;
|
||||
|
||||
void __iomem *io_addr;
|
||||
void __iomem *io_wrap;
|
||||
|
||||
void *drvdata;
|
||||
struct list_head list;
|
||||
};
|
||||
|
|
@ -190,9 +195,11 @@ struct bcma_bus {
|
|||
struct bcma_device *mapped_core;
|
||||
struct list_head cores;
|
||||
u8 nr_cores;
|
||||
u8 init_done:1;
|
||||
|
||||
struct bcma_drv_cc drv_cc;
|
||||
struct bcma_drv_pci drv_pci;
|
||||
struct bcma_drv_mips drv_mips;
|
||||
|
||||
/* We decided to share SPROM struct with SSB as long as we do not need
|
||||
* any hacks for BCMA. This simplifies drivers code. */
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */
|
||||
#define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */
|
||||
#define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */
|
||||
#define BCMA_CC_FLASHT_NFLASH 0x00000200
|
||||
#define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */
|
||||
#define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */
|
||||
#define BCMA_PLLTYPE_NONE 0x00000000
|
||||
|
|
@ -178,6 +179,7 @@
|
|||
#define BCMA_CC_PROG_CFG 0x0120
|
||||
#define BCMA_CC_PROG_WAITCNT 0x0124
|
||||
#define BCMA_CC_FLASH_CFG 0x0128
|
||||
#define BCMA_CC_FLASH_CFG_DS 0x0010 /* Data size, 0=8bit, 1=16bit */
|
||||
#define BCMA_CC_FLASH_WAITCNT 0x012C
|
||||
/* 0x1E0 is defined as shared BCMA_CLKCTLST */
|
||||
#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */
|
||||
|
|
@ -239,6 +241,64 @@
|
|||
#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
|
||||
#define BCMA_CC_SPROM_PCIE6 0x0830 /* SPROM beginning on PCIe rev >= 6 */
|
||||
|
||||
/* Divider allocation in 4716/47162/5356 */
|
||||
#define BCMA_CC_PMU5_MAINPLL_CPU 1
|
||||
#define BCMA_CC_PMU5_MAINPLL_MEM 2
|
||||
#define BCMA_CC_PMU5_MAINPLL_SSB 3
|
||||
|
||||
/* PLL usage in 4716/47162 */
|
||||
#define BCMA_CC_PMU4716_MAINPLL_PLL0 12
|
||||
|
||||
/* PLL usage in 5356/5357 */
|
||||
#define BCMA_CC_PMU5356_MAINPLL_PLL0 0
|
||||
#define BCMA_CC_PMU5357_MAINPLL_PLL0 0
|
||||
|
||||
/* 4706 PMU */
|
||||
#define BCMA_CC_PMU4706_MAINPLL_PLL0 0
|
||||
|
||||
/* ALP clock on pre-PMU chips */
|
||||
#define BCMA_CC_PMU_ALP_CLOCK 20000000
|
||||
/* HT clock for systems with PMU-enabled chipcommon */
|
||||
#define BCMA_CC_PMU_HT_CLOCK 80000000
|
||||
|
||||
/* PMU rev 5 (& 6) */
|
||||
#define BCMA_CC_PPL_P1P2_OFF 0
|
||||
#define BCMA_CC_PPL_P1_MASK 0x0f000000
|
||||
#define BCMA_CC_PPL_P1_SHIFT 24
|
||||
#define BCMA_CC_PPL_P2_MASK 0x00f00000
|
||||
#define BCMA_CC_PPL_P2_SHIFT 20
|
||||
#define BCMA_CC_PPL_M14_OFF 1
|
||||
#define BCMA_CC_PPL_MDIV_MASK 0x000000ff
|
||||
#define BCMA_CC_PPL_MDIV_WIDTH 8
|
||||
#define BCMA_CC_PPL_NM5_OFF 2
|
||||
#define BCMA_CC_PPL_NDIV_MASK 0xfff00000
|
||||
#define BCMA_CC_PPL_NDIV_SHIFT 20
|
||||
#define BCMA_CC_PPL_FMAB_OFF 3
|
||||
#define BCMA_CC_PPL_MRAT_MASK 0xf0000000
|
||||
#define BCMA_CC_PPL_MRAT_SHIFT 28
|
||||
#define BCMA_CC_PPL_ABRAT_MASK 0x08000000
|
||||
#define BCMA_CC_PPL_ABRAT_SHIFT 27
|
||||
#define BCMA_CC_PPL_FDIV_MASK 0x07ffffff
|
||||
#define BCMA_CC_PPL_PLLCTL_OFF 4
|
||||
#define BCMA_CC_PPL_PCHI_OFF 5
|
||||
#define BCMA_CC_PPL_PCHI_MASK 0x0000003f
|
||||
|
||||
/* BCM4331 ChipControl numbers. */
|
||||
#define BCMA_CHIPCTL_4331_BT_COEXIST BIT(0) /* 0 disable */
|
||||
#define BCMA_CHIPCTL_4331_SECI BIT(1) /* 0 SECI is disabled (JATG functional) */
|
||||
#define BCMA_CHIPCTL_4331_EXT_LNA BIT(2) /* 0 disable */
|
||||
#define BCMA_CHIPCTL_4331_SPROM_GPIO13_15 BIT(3) /* sprom/gpio13-15 mux */
|
||||
#define BCMA_CHIPCTL_4331_EXTPA_EN BIT(4) /* 0 ext pa disable, 1 ext pa enabled */
|
||||
#define BCMA_CHIPCTL_4331_GPIOCLK_ON_SPROMCS BIT(5) /* set drive out GPIO_CLK on sprom_cs pin */
|
||||
#define BCMA_CHIPCTL_4331_PCIE_MDIO_ON_SPROMCS BIT(6) /* use sprom_cs pin as PCIE mdio interface */
|
||||
#define BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5 BIT(7) /* aband extpa will be at gpio2/5 and sprom_dout */
|
||||
#define BCMA_CHIPCTL_4331_OVR_PIPEAUXCLKEN BIT(8) /* override core control on pipe_AuxClkEnable */
|
||||
#define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN BIT(9) /* override core control on pipe_AuxPowerDown */
|
||||
#define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN BIT(10) /* pcie_auxclkenable */
|
||||
#define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN BIT(11) /* pcie_pipe_pllpowerdown */
|
||||
#define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4 BIT(16) /* enable bt_shd0 at gpio4 */
|
||||
#define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5 BIT(17) /* enable bt_shd1 at gpio5 */
|
||||
|
||||
/* Data for the PMU, if available.
|
||||
* Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
|
||||
*/
|
||||
|
|
@ -247,14 +307,37 @@ struct bcma_chipcommon_pmu {
|
|||
u32 crystalfreq; /* The active crystal frequency (in kHz) */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BCMA_DRIVER_MIPS
|
||||
struct bcma_pflash {
|
||||
u8 buswidth;
|
||||
u32 window;
|
||||
u32 window_size;
|
||||
};
|
||||
|
||||
struct bcma_serial_port {
|
||||
void *regs;
|
||||
unsigned long clockspeed;
|
||||
unsigned int irq;
|
||||
unsigned int baud_base;
|
||||
unsigned int reg_shift;
|
||||
};
|
||||
#endif /* CONFIG_BCMA_DRIVER_MIPS */
|
||||
|
||||
struct bcma_drv_cc {
|
||||
struct bcma_device *core;
|
||||
u32 status;
|
||||
u32 capabilities;
|
||||
u32 capabilities_ext;
|
||||
u8 setup_done:1;
|
||||
/* Fast Powerup Delay constant */
|
||||
u16 fast_pwrup_delay;
|
||||
struct bcma_chipcommon_pmu pmu;
|
||||
#ifdef CONFIG_BCMA_DRIVER_MIPS
|
||||
struct bcma_pflash pflash;
|
||||
|
||||
int nr_serial_ports;
|
||||
struct bcma_serial_port serial_ports[4];
|
||||
#endif /* CONFIG_BCMA_DRIVER_MIPS */
|
||||
};
|
||||
|
||||
/* Register access */
|
||||
|
|
@ -275,6 +358,8 @@ extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
|
|||
extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);
|
||||
extern void bcma_chipco_resume(struct bcma_drv_cc *cc);
|
||||
|
||||
void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
|
||||
|
||||
extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc,
|
||||
u32 ticks);
|
||||
|
||||
|
|
@ -293,4 +378,13 @@ u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value);
|
|||
/* PMU support */
|
||||
extern void bcma_pmu_init(struct bcma_drv_cc *cc);
|
||||
|
||||
extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset,
|
||||
u32 value);
|
||||
extern void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset,
|
||||
u32 mask, u32 set);
|
||||
extern void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc,
|
||||
u32 offset, u32 mask, u32 set);
|
||||
extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc,
|
||||
u32 offset, u32 mask, u32 set);
|
||||
|
||||
#endif /* LINUX_BCMA_DRIVER_CC_H_ */
|
||||
|
|
|
|||
51
include/linux/bcma/bcma_driver_mips.h
Normal file
51
include/linux/bcma/bcma_driver_mips.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
#ifndef LINUX_BCMA_DRIVER_MIPS_H_
|
||||
#define LINUX_BCMA_DRIVER_MIPS_H_
|
||||
|
||||
#define BCMA_MIPS_IPSFLAG 0x0F08
|
||||
/* which sbflags get routed to mips interrupt 1 */
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ1 0x0000003F
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ1_SHIFT 0
|
||||
/* which sbflags get routed to mips interrupt 2 */
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ2 0x00003F00
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ2_SHIFT 8
|
||||
/* which sbflags get routed to mips interrupt 3 */
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ3 0x003F0000
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ3_SHIFT 16
|
||||
/* which sbflags get routed to mips interrupt 4 */
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ4 0x3F000000
|
||||
#define BCMA_MIPS_IPSFLAG_IRQ4_SHIFT 24
|
||||
|
||||
/* MIPS 74K core registers */
|
||||
#define BCMA_MIPS_MIPS74K_CORECTL 0x0000
|
||||
#define BCMA_MIPS_MIPS74K_EXCEPTBASE 0x0004
|
||||
#define BCMA_MIPS_MIPS74K_BIST 0x000C
|
||||
#define BCMA_MIPS_MIPS74K_INTMASK_INT0 0x0014
|
||||
#define BCMA_MIPS_MIPS74K_INTMASK(int) \
|
||||
((int) * 4 + BCMA_MIPS_MIPS74K_INTMASK_INT0)
|
||||
#define BCMA_MIPS_MIPS74K_NMIMASK 0x002C
|
||||
#define BCMA_MIPS_MIPS74K_GPIOSEL 0x0040
|
||||
#define BCMA_MIPS_MIPS74K_GPIOOUT 0x0044
|
||||
#define BCMA_MIPS_MIPS74K_GPIOEN 0x0048
|
||||
#define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0
|
||||
|
||||
#define BCMA_MIPS_OOBSELOUTA30 0x100
|
||||
|
||||
struct bcma_device;
|
||||
|
||||
struct bcma_drv_mips {
|
||||
struct bcma_device *core;
|
||||
u8 setup_done:1;
|
||||
unsigned int assigned_irqs;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_BCMA_DRIVER_MIPS
|
||||
extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
|
||||
#else
|
||||
static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
|
||||
#endif
|
||||
|
||||
extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
|
||||
|
||||
extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
|
||||
|
||||
#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */
|
||||
16
include/linux/bcma/bcma_soc.h
Normal file
16
include/linux/bcma/bcma_soc.h
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#ifndef LINUX_BCMA_SOC_H_
|
||||
#define LINUX_BCMA_SOC_H_
|
||||
|
||||
#include <linux/bcma/bcma.h>
|
||||
|
||||
struct bcma_soc {
|
||||
struct bcma_bus bus;
|
||||
struct bcma_device core_cc;
|
||||
struct bcma_device core_mips;
|
||||
};
|
||||
|
||||
int __init bcma_host_soc_register(struct bcma_soc *soc);
|
||||
|
||||
int bcma_bus_register(struct bcma_bus *bus);
|
||||
|
||||
#endif /* LINUX_BCMA_SOC_H_ */
|
||||
|
|
@ -9,12 +9,7 @@
|
|||
#define _LINUX_CAIF_SOCKET_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/socket.h>
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* enum caif_link_selector - Physical Link Selection.
|
||||
|
|
@ -144,7 +139,7 @@ enum caif_debug_service {
|
|||
* CAIF Channel. It defines the service to connect to on the modem.
|
||||
*/
|
||||
struct sockaddr_caif {
|
||||
sa_family_t family;
|
||||
__kernel_sa_family_t family;
|
||||
union {
|
||||
struct {
|
||||
__u8 type; /* type: enum caif_at_type */
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_H
|
||||
|
|
@ -78,7 +76,7 @@ struct can_frame {
|
|||
* @can_addr: protocol specific address information
|
||||
*/
|
||||
struct sockaddr_can {
|
||||
sa_family_t can_family;
|
||||
__kernel_sa_family_t can_family;
|
||||
int can_ifindex;
|
||||
union {
|
||||
/* transport protocol class address information (e.g. ISOTP) */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
header-y += raw.h
|
||||
header-y += bcm.h
|
||||
header-y += gw.h
|
||||
header-y += error.h
|
||||
header-y += netlink.h
|
||||
|
|
|
|||
|
|
@ -7,14 +7,13 @@
|
|||
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_BCM_H
|
||||
#define CAN_BCM_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/can.h>
|
||||
|
||||
/**
|
||||
* struct bcm_msg_head - head of messages to/from the broadcast manager
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_CORE_H
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
*
|
||||
* Copyright (C) 2008 Wolfgang Grandegger <wg@grandegger.com>
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*/
|
||||
|
||||
#ifndef CAN_DEV_H
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_ERROR_H
|
||||
|
|
|
|||
162
include/linux/can/gw.h
Normal file
162
include/linux/can/gw.h
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* linux/can/gw.h
|
||||
*
|
||||
* Definitions for CAN frame Gateway/Router/Bridge
|
||||
*
|
||||
* Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
|
||||
* Copyright (c) 2011 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_GW_H
|
||||
#define CAN_GW_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/can.h>
|
||||
|
||||
struct rtcanmsg {
|
||||
__u8 can_family;
|
||||
__u8 gwtype;
|
||||
__u16 flags;
|
||||
};
|
||||
|
||||
/* CAN gateway types */
|
||||
enum {
|
||||
CGW_TYPE_UNSPEC,
|
||||
CGW_TYPE_CAN_CAN, /* CAN->CAN routing */
|
||||
__CGW_TYPE_MAX
|
||||
};
|
||||
|
||||
#define CGW_TYPE_MAX (__CGW_TYPE_MAX - 1)
|
||||
|
||||
/* CAN rtnetlink attribute definitions */
|
||||
enum {
|
||||
CGW_UNSPEC,
|
||||
CGW_MOD_AND, /* CAN frame modification binary AND */
|
||||
CGW_MOD_OR, /* CAN frame modification binary OR */
|
||||
CGW_MOD_XOR, /* CAN frame modification binary XOR */
|
||||
CGW_MOD_SET, /* CAN frame modification set alternate values */
|
||||
CGW_CS_XOR, /* set data[] XOR checksum into data[index] */
|
||||
CGW_CS_CRC8, /* set data[] CRC8 checksum into data[index] */
|
||||
CGW_HANDLED, /* number of handled CAN frames */
|
||||
CGW_DROPPED, /* number of dropped CAN frames */
|
||||
CGW_SRC_IF, /* ifindex of source network interface */
|
||||
CGW_DST_IF, /* ifindex of destination network interface */
|
||||
CGW_FILTER, /* specify struct can_filter on source CAN device */
|
||||
__CGW_MAX
|
||||
};
|
||||
|
||||
#define CGW_MAX (__CGW_MAX - 1)
|
||||
|
||||
#define CGW_FLAGS_CAN_ECHO 0x01
|
||||
#define CGW_FLAGS_CAN_SRC_TSTAMP 0x02
|
||||
|
||||
#define CGW_MOD_FUNCS 4 /* AND OR XOR SET */
|
||||
|
||||
/* CAN frame elements that are affected by curr. 3 CAN frame modifications */
|
||||
#define CGW_MOD_ID 0x01
|
||||
#define CGW_MOD_DLC 0x02
|
||||
#define CGW_MOD_DATA 0x04
|
||||
|
||||
#define CGW_FRAME_MODS 3 /* ID DLC DATA */
|
||||
|
||||
#define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS)
|
||||
|
||||
struct cgw_frame_mod {
|
||||
struct can_frame cf;
|
||||
__u8 modtype;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod)
|
||||
|
||||
struct cgw_csum_xor {
|
||||
__s8 from_idx;
|
||||
__s8 to_idx;
|
||||
__s8 result_idx;
|
||||
__u8 init_xor_val;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct cgw_csum_crc8 {
|
||||
__s8 from_idx;
|
||||
__s8 to_idx;
|
||||
__s8 result_idx;
|
||||
__u8 init_crc_val;
|
||||
__u8 final_xor_val;
|
||||
__u8 crctab[256];
|
||||
__u8 profile;
|
||||
__u8 profile_data[20];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* length of checksum operation parameters. idx = index in CAN frame data[] */
|
||||
#define CGW_CS_XOR_LEN sizeof(struct cgw_csum_xor)
|
||||
#define CGW_CS_CRC8_LEN sizeof(struct cgw_csum_crc8)
|
||||
|
||||
/* CRC8 profiles (compute CRC for additional data elements - see below) */
|
||||
enum {
|
||||
CGW_CRC8PRF_UNSPEC,
|
||||
CGW_CRC8PRF_1U8, /* compute one additional u8 value */
|
||||
CGW_CRC8PRF_16U8, /* u8 value table indexed by data[1] & 0xF */
|
||||
CGW_CRC8PRF_SFFID_XOR, /* (can_id & 0xFF) ^ (can_id >> 8 & 0xFF) */
|
||||
__CGW_CRC8PRF_MAX
|
||||
};
|
||||
|
||||
#define CGW_CRC8PRF_MAX (__CGW_CRC8PRF_MAX - 1)
|
||||
|
||||
/*
|
||||
* CAN rtnetlink attribute contents in detail
|
||||
*
|
||||
* CGW_XXX_IF (length 4 bytes):
|
||||
* Sets an interface index for source/destination network interfaces.
|
||||
* For the CAN->CAN gwtype the indices of _two_ CAN interfaces are mandatory.
|
||||
*
|
||||
* CGW_FILTER (length 8 bytes):
|
||||
* Sets a CAN receive filter for the gateway job specified by the
|
||||
* struct can_filter described in include/linux/can.h
|
||||
*
|
||||
* CGW_MOD_XXX (length 17 bytes):
|
||||
* Specifies a modification that's done to a received CAN frame before it is
|
||||
* send out to the destination interface.
|
||||
*
|
||||
* <struct can_frame> data used as operator
|
||||
* <u8> affected CAN frame elements
|
||||
*
|
||||
* CGW_CS_XOR (length 4 bytes):
|
||||
* Set a simple XOR checksum starting with an initial value into
|
||||
* data[result-idx] using data[start-idx] .. data[end-idx]
|
||||
*
|
||||
* The XOR checksum is calculated like this:
|
||||
*
|
||||
* xor = init_xor_val
|
||||
*
|
||||
* for (i = from_idx .. to_idx)
|
||||
* xor ^= can_frame.data[i]
|
||||
*
|
||||
* can_frame.data[ result_idx ] = xor
|
||||
*
|
||||
* CGW_CS_CRC8 (length 282 bytes):
|
||||
* Set a CRC8 value into data[result-idx] using a given 256 byte CRC8 table,
|
||||
* a given initial value and a defined input data[start-idx] .. data[end-idx].
|
||||
* Finally the result value is XOR'ed with the final_xor_val.
|
||||
*
|
||||
* The CRC8 checksum is calculated like this:
|
||||
*
|
||||
* crc = init_crc_val
|
||||
*
|
||||
* for (i = from_idx .. to_idx)
|
||||
* crc = crctab[ crc ^ can_frame.data[i] ]
|
||||
*
|
||||
* can_frame.data[ result_idx ] = crc ^ final_xor_val
|
||||
*
|
||||
* The calculated CRC may contain additional source data elements that can be
|
||||
* defined in the handling of 'checksum profiles' e.g. shown in AUTOSAR specs
|
||||
* like http://www.autosar.org/download/R4.0/AUTOSAR_SWS_E2ELibrary.pdf
|
||||
* E.g. the profile_data[] may contain additional u8 values (called DATA_IDs)
|
||||
* that are used depending on counter values inside the CAN frame data[].
|
||||
* So far only three profiles have been implemented for illustration.
|
||||
*
|
||||
* Remark: In general the attribute data is a linear buffer.
|
||||
* Beware of sending unpacked or aligned structs!
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
@ -5,8 +5,6 @@
|
|||
*
|
||||
* Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com>
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_NETLINK_H
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
|
||||
* All rights reserved.
|
||||
*
|
||||
* Send feedback to <socketcan-users@lists.berlios.de>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CAN_RAW_H
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ struct cpu_vfs_cap_data {
|
|||
/* Allow modification of routing tables */
|
||||
/* Allow setting arbitrary process / process group ownership on
|
||||
sockets */
|
||||
/* Allow binding to any address for transparent proxying */
|
||||
/* Allow binding to any address for transparent proxying (also via NET_RAW) */
|
||||
/* Allow setting TOS (type of service) */
|
||||
/* Allow setting promiscuous mode */
|
||||
/* Allow clearing driver statistics */
|
||||
|
|
@ -210,6 +210,7 @@ struct cpu_vfs_cap_data {
|
|||
|
||||
/* Allow use of RAW sockets */
|
||||
/* Allow use of PACKET sockets */
|
||||
/* Allow binding to any address for transparent proxying (also via NET_ADMIN) */
|
||||
|
||||
#define CAP_NET_RAW 13
|
||||
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ struct proc_event {
|
|||
PROC_EVENT_GID = 0x00000040,
|
||||
PROC_EVENT_SID = 0x00000080,
|
||||
PROC_EVENT_PTRACE = 0x00000100,
|
||||
PROC_EVENT_COMM = 0x00000200,
|
||||
/* "next" should be 0x00000400 */
|
||||
/* "last" is the last process event: exit */
|
||||
PROC_EVENT_EXIT = 0x80000000
|
||||
|
|
@ -103,6 +104,12 @@ struct proc_event {
|
|||
__kernel_pid_t tracer_tgid;
|
||||
} ptrace;
|
||||
|
||||
struct comm_proc_event {
|
||||
__kernel_pid_t process_pid;
|
||||
__kernel_pid_t process_tgid;
|
||||
char comm[16];
|
||||
} comm;
|
||||
|
||||
struct exit_proc_event {
|
||||
__kernel_pid_t process_pid;
|
||||
__kernel_pid_t process_tgid;
|
||||
|
|
@ -118,6 +125,7 @@ void proc_exec_connector(struct task_struct *task);
|
|||
void proc_id_connector(struct task_struct *task, int which_id);
|
||||
void proc_sid_connector(struct task_struct *task);
|
||||
void proc_ptrace_connector(struct task_struct *task, int which_id);
|
||||
void proc_comm_connector(struct task_struct *task);
|
||||
void proc_exit_connector(struct task_struct *task);
|
||||
#else
|
||||
static inline void proc_fork_connector(struct task_struct *task)
|
||||
|
|
@ -133,6 +141,9 @@ static inline void proc_id_connector(struct task_struct *task,
|
|||
static inline void proc_sid_connector(struct task_struct *task)
|
||||
{}
|
||||
|
||||
static inline void proc_comm_connector(struct task_struct *task)
|
||||
{}
|
||||
|
||||
static inline void proc_ptrace_connector(struct task_struct *task,
|
||||
int ptrace_id)
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,8 @@ struct class_attribute {
|
|||
char *buf);
|
||||
ssize_t (*store)(struct class *class, struct class_attribute *attr,
|
||||
const char *buf, size_t count);
|
||||
const void *(*namespace)(struct class *class,
|
||||
const struct class_attribute *attr);
|
||||
};
|
||||
|
||||
#define CLASS_ATTR(_name, _mode, _show, _store) \
|
||||
|
|
|
|||
|
|
@ -117,99 +117,101 @@ struct ethtool_eeprom {
|
|||
__u8 data[0];
|
||||
};
|
||||
|
||||
/* for configuring coalescing parameters of chip */
|
||||
/**
|
||||
* struct ethtool_coalesce - coalescing parameters for IRQs and stats updates
|
||||
* @cmd: ETHTOOL_{G,S}COALESCE
|
||||
* @rx_coalesce_usecs: How many usecs to delay an RX interrupt after
|
||||
* a packet arrives.
|
||||
* @rx_max_coalesced_frames: Maximum number of packets to receive
|
||||
* before an RX interrupt.
|
||||
* @rx_coalesce_usecs_irq: Same as @rx_coalesce_usecs, except that
|
||||
* this value applies while an IRQ is being serviced by the host.
|
||||
* @rx_max_coalesced_frames_irq: Same as @rx_max_coalesced_frames,
|
||||
* except that this value applies while an IRQ is being serviced
|
||||
* by the host.
|
||||
* @tx_coalesce_usecs: How many usecs to delay a TX interrupt after
|
||||
* a packet is sent.
|
||||
* @tx_max_coalesced_frames: Maximum number of packets to be sent
|
||||
* before a TX interrupt.
|
||||
* @tx_coalesce_usecs_irq: Same as @tx_coalesce_usecs, except that
|
||||
* this value applies while an IRQ is being serviced by the host.
|
||||
* @tx_max_coalesced_frames_irq: Same as @tx_max_coalesced_frames,
|
||||
* except that this value applies while an IRQ is being serviced
|
||||
* by the host.
|
||||
* @stats_block_coalesce_usecs: How many usecs to delay in-memory
|
||||
* statistics block updates. Some drivers do not have an
|
||||
* in-memory statistic block, and in such cases this value is
|
||||
* ignored. This value must not be zero.
|
||||
* @use_adaptive_rx_coalesce: Enable adaptive RX coalescing.
|
||||
* @use_adaptive_tx_coalesce: Enable adaptive TX coalescing.
|
||||
* @pkt_rate_low: Threshold for low packet rate (packets per second).
|
||||
* @rx_coalesce_usecs_low: How many usecs to delay an RX interrupt after
|
||||
* a packet arrives, when the packet rate is below @pkt_rate_low.
|
||||
* @rx_max_coalesced_frames_low: Maximum number of packets to be received
|
||||
* before an RX interrupt, when the packet rate is below @pkt_rate_low.
|
||||
* @tx_coalesce_usecs_low: How many usecs to delay a TX interrupt after
|
||||
* a packet is sent, when the packet rate is below @pkt_rate_low.
|
||||
* @tx_max_coalesced_frames_low: Maximum nuumber of packets to be sent before
|
||||
* a TX interrupt, when the packet rate is below @pkt_rate_low.
|
||||
* @pkt_rate_high: Threshold for high packet rate (packets per second).
|
||||
* @rx_coalesce_usecs_high: How many usecs to delay an RX interrupt after
|
||||
* a packet arrives, when the packet rate is above @pkt_rate_high.
|
||||
* @rx_max_coalesced_frames_high: Maximum number of packets to be received
|
||||
* before an RX interrupt, when the packet rate is above @pkt_rate_high.
|
||||
* @tx_coalesce_usecs_high: How many usecs to delay a TX interrupt after
|
||||
* a packet is sent, when the packet rate is above @pkt_rate_high.
|
||||
* @tx_max_coalesced_frames_high: Maximum number of packets to be sent before
|
||||
* a TX interrupt, when the packet rate is above @pkt_rate_high.
|
||||
* @rate_sample_interval: How often to do adaptive coalescing packet rate
|
||||
* sampling, measured in seconds. Must not be zero.
|
||||
*
|
||||
* Each pair of (usecs, max_frames) fields specifies this exit
|
||||
* condition for interrupt coalescing:
|
||||
* (usecs > 0 && time_since_first_completion >= usecs) ||
|
||||
* (max_frames > 0 && completed_frames >= max_frames)
|
||||
* It is illegal to set both usecs and max_frames to zero as this
|
||||
* would cause interrupts to never be generated. To disable
|
||||
* coalescing, set usecs = 0 and max_frames = 1.
|
||||
*
|
||||
* Some implementations ignore the value of max_frames and use the
|
||||
* condition:
|
||||
* time_since_first_completion >= usecs
|
||||
* This is deprecated. Drivers for hardware that does not support
|
||||
* counting completions should validate that max_frames == !rx_usecs.
|
||||
*
|
||||
* Adaptive RX/TX coalescing is an algorithm implemented by some
|
||||
* drivers to improve latency under low packet rates and improve
|
||||
* throughput under high packet rates. Some drivers only implement
|
||||
* one of RX or TX adaptive coalescing. Anything not implemented by
|
||||
* the driver causes these values to be silently ignored.
|
||||
*
|
||||
* When the packet rate is below @pkt_rate_high but above
|
||||
* @pkt_rate_low (both measured in packets per second) the
|
||||
* normal {rx,tx}_* coalescing parameters are used.
|
||||
*/
|
||||
struct ethtool_coalesce {
|
||||
__u32 cmd; /* ETHTOOL_{G,S}COALESCE */
|
||||
|
||||
/* How many usecs to delay an RX interrupt after
|
||||
* a packet arrives. If 0, only rx_max_coalesced_frames
|
||||
* is used.
|
||||
*/
|
||||
__u32 cmd;
|
||||
__u32 rx_coalesce_usecs;
|
||||
|
||||
/* How many packets to delay an RX interrupt after
|
||||
* a packet arrives. If 0, only rx_coalesce_usecs is
|
||||
* used. It is illegal to set both usecs and max frames
|
||||
* to zero as this would cause RX interrupts to never be
|
||||
* generated.
|
||||
*/
|
||||
__u32 rx_max_coalesced_frames;
|
||||
|
||||
/* Same as above two parameters, except that these values
|
||||
* apply while an IRQ is being serviced by the host. Not
|
||||
* all cards support this feature and the values are ignored
|
||||
* in that case.
|
||||
*/
|
||||
__u32 rx_coalesce_usecs_irq;
|
||||
__u32 rx_max_coalesced_frames_irq;
|
||||
|
||||
/* How many usecs to delay a TX interrupt after
|
||||
* a packet is sent. If 0, only tx_max_coalesced_frames
|
||||
* is used.
|
||||
*/
|
||||
__u32 tx_coalesce_usecs;
|
||||
|
||||
/* How many packets to delay a TX interrupt after
|
||||
* a packet is sent. If 0, only tx_coalesce_usecs is
|
||||
* used. It is illegal to set both usecs and max frames
|
||||
* to zero as this would cause TX interrupts to never be
|
||||
* generated.
|
||||
*/
|
||||
__u32 tx_max_coalesced_frames;
|
||||
|
||||
/* Same as above two parameters, except that these values
|
||||
* apply while an IRQ is being serviced by the host. Not
|
||||
* all cards support this feature and the values are ignored
|
||||
* in that case.
|
||||
*/
|
||||
__u32 tx_coalesce_usecs_irq;
|
||||
__u32 tx_max_coalesced_frames_irq;
|
||||
|
||||
/* How many usecs to delay in-memory statistics
|
||||
* block updates. Some drivers do not have an in-memory
|
||||
* statistic block, and in such cases this value is ignored.
|
||||
* This value must not be zero.
|
||||
*/
|
||||
__u32 stats_block_coalesce_usecs;
|
||||
|
||||
/* Adaptive RX/TX coalescing is an algorithm implemented by
|
||||
* some drivers to improve latency under low packet rates and
|
||||
* improve throughput under high packet rates. Some drivers
|
||||
* only implement one of RX or TX adaptive coalescing. Anything
|
||||
* not implemented by the driver causes these values to be
|
||||
* silently ignored.
|
||||
*/
|
||||
__u32 use_adaptive_rx_coalesce;
|
||||
__u32 use_adaptive_tx_coalesce;
|
||||
|
||||
/* When the packet rate (measured in packets per second)
|
||||
* is below pkt_rate_low, the {rx,tx}_*_low parameters are
|
||||
* used.
|
||||
*/
|
||||
__u32 pkt_rate_low;
|
||||
__u32 rx_coalesce_usecs_low;
|
||||
__u32 rx_max_coalesced_frames_low;
|
||||
__u32 tx_coalesce_usecs_low;
|
||||
__u32 tx_max_coalesced_frames_low;
|
||||
|
||||
/* When the packet rate is below pkt_rate_high but above
|
||||
* pkt_rate_low (both measured in packets per second) the
|
||||
* normal {rx,tx}_* coalescing parameters are used.
|
||||
*/
|
||||
|
||||
/* When the packet rate is (measured in packets per second)
|
||||
* is above pkt_rate_high, the {rx,tx}_*_high parameters are
|
||||
* used.
|
||||
*/
|
||||
__u32 pkt_rate_high;
|
||||
__u32 rx_coalesce_usecs_high;
|
||||
__u32 rx_max_coalesced_frames_high;
|
||||
__u32 tx_coalesce_usecs_high;
|
||||
__u32 tx_max_coalesced_frames_high;
|
||||
|
||||
/* How often to do adaptive coalescing packet rate sampling,
|
||||
* measured in seconds. Must not be zero.
|
||||
*/
|
||||
__u32 rate_sample_interval;
|
||||
};
|
||||
|
||||
|
|
@ -444,7 +446,7 @@ struct ethtool_flow_ext {
|
|||
};
|
||||
|
||||
/**
|
||||
* struct ethtool_rx_flow_spec - specification for RX flow filter
|
||||
* struct ethtool_rx_flow_spec - classification rule for RX flows
|
||||
* @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW
|
||||
* @h_u: Flow fields to match (dependent on @flow_type)
|
||||
* @h_ext: Additional fields to match
|
||||
|
|
@ -454,7 +456,9 @@ struct ethtool_flow_ext {
|
|||
* includes the %FLOW_EXT flag.
|
||||
* @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
|
||||
* if packets should be discarded
|
||||
* @location: Index of filter in hardware table
|
||||
* @location: Location of rule in the table. Locations must be
|
||||
* numbered such that a flow matching multiple rules will be
|
||||
* classified according to the first (lowest numbered) rule.
|
||||
*/
|
||||
struct ethtool_rx_flow_spec {
|
||||
__u32 flow_type;
|
||||
|
|
@ -473,9 +477,9 @@ struct ethtool_rx_flow_spec {
|
|||
* %ETHTOOL_GRXCLSRLALL, %ETHTOOL_SRXCLSRLDEL or %ETHTOOL_SRXCLSRLINS
|
||||
* @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW
|
||||
* @data: Command-dependent value
|
||||
* @fs: Flow filter specification
|
||||
* @fs: Flow classification rule
|
||||
* @rule_cnt: Number of rules to be affected
|
||||
* @rule_locs: Array of valid rule indices
|
||||
* @rule_locs: Array of used rule locations
|
||||
*
|
||||
* For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating
|
||||
* the fields included in the flow hash, e.g. %RXH_IP_SRC. The following
|
||||
|
|
@ -487,23 +491,20 @@ struct ethtool_rx_flow_spec {
|
|||
* For %ETHTOOL_GRXCLSRLCNT, @rule_cnt is set to the number of defined
|
||||
* rules on return.
|
||||
*
|
||||
* For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the index of an
|
||||
* existing filter rule on entry and @fs contains the rule on return.
|
||||
* For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an
|
||||
* existing rule on entry and @fs contains the rule on return.
|
||||
*
|
||||
* For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the
|
||||
* user buffer for @rule_locs on entry. On return, @data is the size
|
||||
* of the filter table and @rule_locs contains the indices of the
|
||||
* defined rules.
|
||||
* of the rule table, @rule_cnt is the number of defined rules, and
|
||||
* @rule_locs contains the locations of the defined rules. Drivers
|
||||
* must use the second parameter to get_rxnfc() instead of @rule_locs.
|
||||
*
|
||||
* For %ETHTOOL_SRXCLSRLINS, @fs specifies the filter rule to add or
|
||||
* update. @fs.@location specifies the index to use and must not be
|
||||
* ignored.
|
||||
* For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update.
|
||||
* @fs.@location specifies the location to use and must not be ignored.
|
||||
*
|
||||
* For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the index of an
|
||||
* existing filter rule on entry.
|
||||
*
|
||||
* Implementation of indexed classification rules generally requires a
|
||||
* TCAM.
|
||||
* For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an
|
||||
* existing rule on entry.
|
||||
*/
|
||||
struct ethtool_rxnfc {
|
||||
__u32 cmd;
|
||||
|
|
@ -726,6 +727,9 @@ enum ethtool_sfeatures_retval_bits {
|
|||
/* needed by dev_disable_lro() */
|
||||
extern int __ethtool_set_flags(struct net_device *dev, u32 flags);
|
||||
|
||||
extern int __ethtool_get_settings(struct net_device *dev,
|
||||
struct ethtool_cmd *cmd);
|
||||
|
||||
/**
|
||||
* enum ethtool_phys_id_state - indicator state for physical identification
|
||||
* @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated
|
||||
|
|
@ -936,7 +940,7 @@ struct ethtool_ops {
|
|||
int (*set_priv_flags)(struct net_device *, u32);
|
||||
int (*get_sset_count)(struct net_device *, int);
|
||||
int (*get_rxnfc)(struct net_device *,
|
||||
struct ethtool_rxnfc *, void *);
|
||||
struct ethtool_rxnfc *, u32 *rule_locs);
|
||||
int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
|
||||
int (*flash_device)(struct net_device *, struct ethtool_flash *);
|
||||
int (*reset)(struct net_device *, u32 *);
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb,
|
|||
const struct sock_filter *filter);
|
||||
extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
|
||||
extern int sk_detach_filter(struct sock *sk);
|
||||
extern int sk_chk_filter(struct sock_filter *filter, int flen);
|
||||
extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
|
||||
|
||||
#ifdef CONFIG_BPF_JIT
|
||||
extern void bpf_jit_compile(struct sk_filter *fp);
|
||||
|
|
|
|||
|
|
@ -130,6 +130,8 @@
|
|||
#define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060
|
||||
/* A-MSDU 802.11n */
|
||||
#define IEEE80211_QOS_CTL_A_MSDU_PRESENT 0x0080
|
||||
/* Mesh Control 802.11s */
|
||||
#define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100
|
||||
|
||||
/* U-APSD queue for WMM IEs sent by AP */
|
||||
#define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7)
|
||||
|
|
@ -629,9 +631,14 @@ struct ieee80211_rann_ie {
|
|||
u8 rann_ttl;
|
||||
u8 rann_addr[6];
|
||||
u32 rann_seq;
|
||||
u32 rann_interval;
|
||||
u32 rann_metric;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
enum ieee80211_rann_flags {
|
||||
RANN_FLAG_IS_GATE = 1 << 0,
|
||||
};
|
||||
|
||||
#define WLAN_SA_QUERY_TR_ID_LEN 2
|
||||
|
||||
struct ieee80211_mgmt {
|
||||
|
|
@ -736,19 +743,10 @@ struct ieee80211_mgmt {
|
|||
__le16 params;
|
||||
__le16 reason_code;
|
||||
} __attribute__((packed)) delba;
|
||||
struct{
|
||||
struct {
|
||||
u8 action_code;
|
||||
/* capab_info for open and confirm,
|
||||
* reason for close
|
||||
*/
|
||||
__le16 aux;
|
||||
/* Followed in plink_confirm by status
|
||||
* code, AID and supported rates,
|
||||
* and directly by supported rates in
|
||||
* plink_open and plink_close
|
||||
*/
|
||||
u8 variable[0];
|
||||
} __attribute__((packed)) plink_action;
|
||||
} __attribute__((packed)) self_prot;
|
||||
struct{
|
||||
u8 action_code;
|
||||
u8 variable[0];
|
||||
|
|
@ -761,6 +759,12 @@ struct ieee80211_mgmt {
|
|||
u8 action;
|
||||
u8 smps_control;
|
||||
} __attribute__ ((packed)) ht_smps;
|
||||
struct {
|
||||
u8 action_code;
|
||||
u8 dialog_token;
|
||||
__le16 capability;
|
||||
u8 variable[0];
|
||||
} __packed tdls_discover_resp;
|
||||
} u;
|
||||
} __attribute__ ((packed)) action;
|
||||
} u;
|
||||
|
|
@ -779,6 +783,13 @@ struct ieee80211_mmie {
|
|||
u8 mic[8];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct ieee80211_vendor_ie {
|
||||
u8 element_id;
|
||||
u8 len;
|
||||
u8 oui[3];
|
||||
u8 oui_type;
|
||||
} __packed;
|
||||
|
||||
/* Control frames */
|
||||
struct ieee80211_rts {
|
||||
__le16 frame_control;
|
||||
|
|
@ -800,6 +811,52 @@ struct ieee80211_pspoll {
|
|||
u8 ta[6];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* TDLS */
|
||||
|
||||
/* Link-id information element */
|
||||
struct ieee80211_tdls_lnkie {
|
||||
u8 ie_type; /* Link Identifier IE */
|
||||
u8 ie_len;
|
||||
u8 bssid[6];
|
||||
u8 init_sta[6];
|
||||
u8 resp_sta[6];
|
||||
} __packed;
|
||||
|
||||
struct ieee80211_tdls_data {
|
||||
u8 da[6];
|
||||
u8 sa[6];
|
||||
__be16 ether_type;
|
||||
u8 payload_type;
|
||||
u8 category;
|
||||
u8 action_code;
|
||||
union {
|
||||
struct {
|
||||
u8 dialog_token;
|
||||
__le16 capability;
|
||||
u8 variable[0];
|
||||
} __packed setup_req;
|
||||
struct {
|
||||
__le16 status_code;
|
||||
u8 dialog_token;
|
||||
__le16 capability;
|
||||
u8 variable[0];
|
||||
} __packed setup_resp;
|
||||
struct {
|
||||
__le16 status_code;
|
||||
u8 dialog_token;
|
||||
u8 variable[0];
|
||||
} __packed setup_cfm;
|
||||
struct {
|
||||
__le16 reason_code;
|
||||
u8 variable[0];
|
||||
} __packed teardown;
|
||||
struct {
|
||||
u8 dialog_token;
|
||||
u8 variable[0];
|
||||
} __packed discover_req;
|
||||
} u;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct ieee80211_bar - HT Block Ack Request
|
||||
*
|
||||
|
|
@ -816,9 +873,11 @@ struct ieee80211_bar {
|
|||
} __attribute__((packed));
|
||||
|
||||
/* 802.11 BAR control masks */
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
|
||||
|
||||
#define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000
|
||||
#define IEEE80211_BAR_CTRL_MULTI_TID 0x0002
|
||||
#define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004
|
||||
#define IEEE80211_BAR_CTRL_TID_INFO_MASK 0xf000
|
||||
#define IEEE80211_BAR_CTRL_TID_INFO_SHIFT 12
|
||||
|
||||
#define IEEE80211_HT_MCS_MASK_LEN 10
|
||||
|
||||
|
|
@ -1189,16 +1248,13 @@ enum ieee80211_eid {
|
|||
WLAN_EID_TS_DELAY = 43,
|
||||
WLAN_EID_TCLAS_PROCESSING = 44,
|
||||
WLAN_EID_QOS_CAPA = 46,
|
||||
/* 802.11z */
|
||||
WLAN_EID_LINK_ID = 101,
|
||||
/* 802.11s */
|
||||
WLAN_EID_MESH_CONFIG = 113,
|
||||
WLAN_EID_MESH_ID = 114,
|
||||
WLAN_EID_LINK_METRIC_REPORT = 115,
|
||||
WLAN_EID_CONGESTION_NOTIFICATION = 116,
|
||||
/* Note that the Peer Link IE has been replaced with the similar
|
||||
* Peer Management IE. We will keep the former definition until mesh
|
||||
* code is changed to comply with latest 802.11s drafts.
|
||||
*/
|
||||
WLAN_EID_PEER_LINK = 55, /* no longer in 802.11s drafts */
|
||||
WLAN_EID_PEER_MGMT = 117,
|
||||
WLAN_EID_CHAN_SWITCH_PARAM = 118,
|
||||
WLAN_EID_MESH_AWAKE_WINDOW = 119,
|
||||
|
|
@ -1277,13 +1333,11 @@ enum ieee80211_category {
|
|||
WLAN_CATEGORY_HT = 7,
|
||||
WLAN_CATEGORY_SA_QUERY = 8,
|
||||
WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,
|
||||
WLAN_CATEGORY_TDLS = 12,
|
||||
WLAN_CATEGORY_MESH_ACTION = 13,
|
||||
WLAN_CATEGORY_MULTIHOP_ACTION = 14,
|
||||
WLAN_CATEGORY_SELF_PROTECTED = 15,
|
||||
WLAN_CATEGORY_WMM = 17,
|
||||
/* TODO: remove MESH_PATH_SEL after mesh is updated
|
||||
* to current 802.11s draft */
|
||||
WLAN_CATEGORY_MESH_PATH_SEL = 32,
|
||||
WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126,
|
||||
WLAN_CATEGORY_VENDOR_SPECIFIC = 127,
|
||||
};
|
||||
|
|
@ -1309,6 +1363,31 @@ enum ieee80211_ht_actioncode {
|
|||
WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7,
|
||||
};
|
||||
|
||||
/* Self Protected Action codes */
|
||||
enum ieee80211_self_protected_actioncode {
|
||||
WLAN_SP_RESERVED = 0,
|
||||
WLAN_SP_MESH_PEERING_OPEN = 1,
|
||||
WLAN_SP_MESH_PEERING_CONFIRM = 2,
|
||||
WLAN_SP_MESH_PEERING_CLOSE = 3,
|
||||
WLAN_SP_MGK_INFORM = 4,
|
||||
WLAN_SP_MGK_ACK = 5,
|
||||
};
|
||||
|
||||
/* Mesh action codes */
|
||||
enum ieee80211_mesh_actioncode {
|
||||
WLAN_MESH_ACTION_LINK_METRIC_REPORT,
|
||||
WLAN_MESH_ACTION_HWMP_PATH_SELECTION,
|
||||
WLAN_MESH_ACTION_GATE_ANNOUNCEMENT,
|
||||
WLAN_MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION,
|
||||
WLAN_MESH_ACTION_MCCA_SETUP_REQUEST,
|
||||
WLAN_MESH_ACTION_MCCA_SETUP_REPLY,
|
||||
WLAN_MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST,
|
||||
WLAN_MESH_ACTION_MCCA_ADVERTISEMENT,
|
||||
WLAN_MESH_ACTION_MCCA_TEARDOWN,
|
||||
WLAN_MESH_ACTION_TBTT_ADJUSTMENT_REQUEST,
|
||||
WLAN_MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE,
|
||||
};
|
||||
|
||||
/* Security key length */
|
||||
enum ieee80211_key_len {
|
||||
WLAN_KEY_LEN_WEP40 = 5,
|
||||
|
|
@ -1318,6 +1397,36 @@ enum ieee80211_key_len {
|
|||
WLAN_KEY_LEN_AES_CMAC = 16,
|
||||
};
|
||||
|
||||
/* Public action codes */
|
||||
enum ieee80211_pub_actioncode {
|
||||
WLAN_PUB_ACTION_TDLS_DISCOVER_RES = 14,
|
||||
};
|
||||
|
||||
/* TDLS action codes */
|
||||
enum ieee80211_tdls_actioncode {
|
||||
WLAN_TDLS_SETUP_REQUEST = 0,
|
||||
WLAN_TDLS_SETUP_RESPONSE = 1,
|
||||
WLAN_TDLS_SETUP_CONFIRM = 2,
|
||||
WLAN_TDLS_TEARDOWN = 3,
|
||||
WLAN_TDLS_PEER_TRAFFIC_INDICATION = 4,
|
||||
WLAN_TDLS_CHANNEL_SWITCH_REQUEST = 5,
|
||||
WLAN_TDLS_CHANNEL_SWITCH_RESPONSE = 6,
|
||||
WLAN_TDLS_PEER_PSM_REQUEST = 7,
|
||||
WLAN_TDLS_PEER_PSM_RESPONSE = 8,
|
||||
WLAN_TDLS_PEER_TRAFFIC_RESPONSE = 9,
|
||||
WLAN_TDLS_DISCOVERY_REQUEST = 10,
|
||||
};
|
||||
|
||||
/*
|
||||
* TDLS capabililites to be enabled in the 5th byte of the
|
||||
* @WLAN_EID_EXT_CAPABILITY information element
|
||||
*/
|
||||
#define WLAN_EXT_CAPA5_TDLS_ENABLED BIT(5)
|
||||
#define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6)
|
||||
|
||||
/* TDLS specific payload type in the LLC/SNAP header */
|
||||
#define WLAN_TDLS_SNAP_RFTYPE 0x2
|
||||
|
||||
/**
|
||||
* enum - mesh path selection protocol identifier
|
||||
*
|
||||
|
|
@ -1453,6 +1562,9 @@ enum ieee80211_sa_query_action {
|
|||
|
||||
#define WLAN_PMKID_LEN 16
|
||||
|
||||
#define WLAN_OUI_WFA 0x506f9a
|
||||
#define WLAN_OUI_TYPE_WFA_P2P 9
|
||||
|
||||
/*
|
||||
* WMM/802.11e Tspec Element
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@
|
|||
* datapath port */
|
||||
#define IFF_TX_SKB_SHARING 0x10000 /* The interface supports sharing
|
||||
* skbs on transmit */
|
||||
#define IFF_UNICAST_FLT 0x20000 /* Supports unicast filtering */
|
||||
|
||||
#define IF_GET_IFACE 0x0001 /* for querying only */
|
||||
#define IF_GET_PROTO 0x0002
|
||||
|
|
|
|||
|
|
@ -83,11 +83,13 @@
|
|||
#define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */
|
||||
#define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */
|
||||
#define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */
|
||||
#define ETH_P_TDLS 0x890D /* TDLS */
|
||||
#define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */
|
||||
#define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
|
||||
#define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
|
||||
#define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
|
||||
#define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
|
||||
#define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
|
||||
|
||||
/*
|
||||
* Non DIX types. Won't clash for 1500 types.
|
||||
|
|
|
|||
|
|
@ -279,6 +279,7 @@ enum {
|
|||
IFLA_VF_MAC, /* Hardware queue specific attributes */
|
||||
IFLA_VF_VLAN,
|
||||
IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
|
||||
IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */
|
||||
__IFLA_VF_MAX,
|
||||
};
|
||||
|
||||
|
|
@ -300,13 +301,22 @@ struct ifla_vf_tx_rate {
|
|||
__u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
|
||||
};
|
||||
|
||||
struct ifla_vf_spoofchk {
|
||||
__u32 vf;
|
||||
__u32 setting;
|
||||
};
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* We don't want this structure exposed to user space */
|
||||
struct ifla_vf_info {
|
||||
__u32 vf;
|
||||
__u8 mac[32];
|
||||
__u32 vlan;
|
||||
__u32 qos;
|
||||
__u32 tx_rate;
|
||||
__u32 spoofchk;
|
||||
};
|
||||
#endif
|
||||
|
||||
/* VF ports management section
|
||||
*
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ struct macvlan_dev {
|
|||
int (*forward)(struct net_device *dev, struct sk_buff *skb);
|
||||
struct macvtap_queue *taps[MAX_MACVTAP_QUEUES];
|
||||
int numvtaps;
|
||||
int minor;
|
||||
};
|
||||
|
||||
static inline void macvlan_count_rx(const struct macvlan_dev *vlan,
|
||||
|
|
|
|||
|
|
@ -61,6 +61,17 @@ struct tpacket_stats {
|
|||
unsigned int tp_drops;
|
||||
};
|
||||
|
||||
struct tpacket_stats_v3 {
|
||||
unsigned int tp_packets;
|
||||
unsigned int tp_drops;
|
||||
unsigned int tp_freeze_q_cnt;
|
||||
};
|
||||
|
||||
union tpacket_stats_u {
|
||||
struct tpacket_stats stats1;
|
||||
struct tpacket_stats_v3 stats3;
|
||||
};
|
||||
|
||||
struct tpacket_auxdata {
|
||||
__u32 tp_status;
|
||||
__u32 tp_len;
|
||||
|
|
@ -78,6 +89,7 @@ struct tpacket_auxdata {
|
|||
#define TP_STATUS_LOSING 0x4
|
||||
#define TP_STATUS_CSUMNOTREADY 0x8
|
||||
#define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */
|
||||
#define TP_STATUS_BLK_TMO 0x20
|
||||
|
||||
/* Tx ring - header status */
|
||||
#define TP_STATUS_AVAILABLE 0x0
|
||||
|
|
@ -85,6 +97,9 @@ struct tpacket_auxdata {
|
|||
#define TP_STATUS_SENDING 0x2
|
||||
#define TP_STATUS_WRONG_FORMAT 0x4
|
||||
|
||||
/* Rx ring - feature request bits */
|
||||
#define TP_FT_REQ_FILL_RXHASH 0x1
|
||||
|
||||
struct tpacket_hdr {
|
||||
unsigned long tp_status;
|
||||
unsigned int tp_len;
|
||||
|
|
@ -111,11 +126,100 @@ struct tpacket2_hdr {
|
|||
__u16 tp_padding;
|
||||
};
|
||||
|
||||
struct tpacket_hdr_variant1 {
|
||||
__u32 tp_rxhash;
|
||||
__u32 tp_vlan_tci;
|
||||
};
|
||||
|
||||
struct tpacket3_hdr {
|
||||
__u32 tp_next_offset;
|
||||
__u32 tp_sec;
|
||||
__u32 tp_nsec;
|
||||
__u32 tp_snaplen;
|
||||
__u32 tp_len;
|
||||
__u32 tp_status;
|
||||
__u16 tp_mac;
|
||||
__u16 tp_net;
|
||||
/* pkt_hdr variants */
|
||||
union {
|
||||
struct tpacket_hdr_variant1 hv1;
|
||||
};
|
||||
};
|
||||
|
||||
struct tpacket_bd_ts {
|
||||
unsigned int ts_sec;
|
||||
union {
|
||||
unsigned int ts_usec;
|
||||
unsigned int ts_nsec;
|
||||
};
|
||||
};
|
||||
|
||||
struct tpacket_hdr_v1 {
|
||||
__u32 block_status;
|
||||
__u32 num_pkts;
|
||||
__u32 offset_to_first_pkt;
|
||||
|
||||
/* Number of valid bytes (including padding)
|
||||
* blk_len <= tp_block_size
|
||||
*/
|
||||
__u32 blk_len;
|
||||
|
||||
/*
|
||||
* Quite a few uses of sequence number:
|
||||
* 1. Make sure cache flush etc worked.
|
||||
* Well, one can argue - why not use the increasing ts below?
|
||||
* But look at 2. below first.
|
||||
* 2. When you pass around blocks to other user space decoders,
|
||||
* you can see which blk[s] is[are] outstanding etc.
|
||||
* 3. Validate kernel code.
|
||||
*/
|
||||
__aligned_u64 seq_num;
|
||||
|
||||
/*
|
||||
* ts_last_pkt:
|
||||
*
|
||||
* Case 1. Block has 'N'(N >=1) packets and TMO'd(timed out)
|
||||
* ts_last_pkt == 'time-stamp of last packet' and NOT the
|
||||
* time when the timer fired and the block was closed.
|
||||
* By providing the ts of the last packet we can absolutely
|
||||
* guarantee that time-stamp wise, the first packet in the
|
||||
* next block will never precede the last packet of the
|
||||
* previous block.
|
||||
* Case 2. Block has zero packets and TMO'd
|
||||
* ts_last_pkt = time when the timer fired and the block
|
||||
* was closed.
|
||||
* Case 3. Block has 'N' packets and NO TMO.
|
||||
* ts_last_pkt = time-stamp of the last pkt in the block.
|
||||
*
|
||||
* ts_first_pkt:
|
||||
* Is always the time-stamp when the block was opened.
|
||||
* Case a) ZERO packets
|
||||
* No packets to deal with but atleast you know the
|
||||
* time-interval of this block.
|
||||
* Case b) Non-zero packets
|
||||
* Use the ts of the first packet in the block.
|
||||
*
|
||||
*/
|
||||
struct tpacket_bd_ts ts_first_pkt, ts_last_pkt;
|
||||
};
|
||||
|
||||
union tpacket_bd_header_u {
|
||||
struct tpacket_hdr_v1 bh1;
|
||||
};
|
||||
|
||||
struct tpacket_block_desc {
|
||||
__u32 version;
|
||||
__u32 offset_to_priv;
|
||||
union tpacket_bd_header_u hdr;
|
||||
};
|
||||
|
||||
#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
|
||||
#define TPACKET3_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll))
|
||||
|
||||
enum tpacket_versions {
|
||||
TPACKET_V1,
|
||||
TPACKET_V2,
|
||||
TPACKET_V3
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -138,6 +242,21 @@ struct tpacket_req {
|
|||
unsigned int tp_frame_nr; /* Total number of frames */
|
||||
};
|
||||
|
||||
struct tpacket_req3 {
|
||||
unsigned int tp_block_size; /* Minimal size of contiguous block */
|
||||
unsigned int tp_block_nr; /* Number of blocks */
|
||||
unsigned int tp_frame_size; /* Size of frame */
|
||||
unsigned int tp_frame_nr; /* Total number of frames */
|
||||
unsigned int tp_retire_blk_tov; /* timeout in msecs */
|
||||
unsigned int tp_sizeof_priv; /* offset to private data area */
|
||||
unsigned int tp_feature_req_word;
|
||||
};
|
||||
|
||||
union tpacket_req_u {
|
||||
struct tpacket_req req;
|
||||
struct tpacket_req3 req3;
|
||||
};
|
||||
|
||||
struct packet_mreq {
|
||||
int mr_ifindex;
|
||||
unsigned short mr_type;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct pppol2tp_addr {
|
|||
* bits. So we need a different sockaddr structure.
|
||||
*/
|
||||
struct pppol2tpv3_addr {
|
||||
pid_t pid; /* pid that owns the fd.
|
||||
__kernel_pid_t pid; /* pid that owns the fd.
|
||||
* 0 => current */
|
||||
int fd; /* FD of UDP or IP socket to use */
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,9 @@
|
|||
#include <linux/types.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/socket.h>
|
||||
#include <linux/if_ether.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/if.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/ppp_channel.h>
|
||||
|
|
@ -63,7 +64,7 @@ struct pptp_addr {
|
|||
#define PX_MAX_PROTO 3
|
||||
|
||||
struct sockaddr_pppox {
|
||||
sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
__kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
unsigned int sa_protocol; /* protocol identifier */
|
||||
union {
|
||||
struct pppoe_addr pppoe;
|
||||
|
|
@ -77,7 +78,7 @@ struct sockaddr_pppox {
|
|||
* type instead.
|
||||
*/
|
||||
struct sockaddr_pppol2tp {
|
||||
sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
__kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
unsigned int sa_protocol; /* protocol identifier */
|
||||
struct pppol2tp_addr pppol2tp;
|
||||
} __attribute__((packed));
|
||||
|
|
@ -86,7 +87,7 @@ struct sockaddr_pppol2tp {
|
|||
* bits. So we need a different sockaddr structure.
|
||||
*/
|
||||
struct sockaddr_pppol2tpv3 {
|
||||
sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
__kernel_sa_family_t sa_family; /* address family, AF_PPPOX */
|
||||
unsigned int sa_protocol; /* protocol identifier */
|
||||
struct pppol2tpv3_addr pppol2tp;
|
||||
} __attribute__((packed));
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ struct in_pktinfo {
|
|||
/* Structure describing an Internet (IP) socket address. */
|
||||
#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
|
||||
struct sockaddr_in {
|
||||
sa_family_t sin_family; /* Address family */
|
||||
__kernel_sa_family_t sin_family; /* Address family */
|
||||
__be16 sin_port; /* Port number */
|
||||
struct in_addr sin_addr; /* Internet address */
|
||||
|
||||
|
|
|
|||
|
|
@ -97,9 +97,10 @@ enum {
|
|||
INET_DIAG_INFO,
|
||||
INET_DIAG_VEGASINFO,
|
||||
INET_DIAG_CONG,
|
||||
INET_DIAG_TOS,
|
||||
};
|
||||
|
||||
#define INET_DIAG_MAX INET_DIAG_CONG
|
||||
#define INET_DIAG_MAX INET_DIAG_TOS
|
||||
|
||||
|
||||
/* INET_DIAG_MEM */
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
#define IP6_TNL_F_MIP6_DEV 0x8
|
||||
/* copy DSCP from the outer packet */
|
||||
#define IP6_TNL_F_RCV_DSCP_COPY 0x10
|
||||
/* copy fwmark from inner packet */
|
||||
#define IP6_TNL_F_USE_ORIG_FWMARK 0x20
|
||||
|
||||
struct ip6_tnl_parm {
|
||||
char name[IFNAMSIZ]; /* name of tunnel device */
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#define IPX_MTU 576
|
||||
|
||||
struct sockaddr_ipx {
|
||||
sa_family_t sipx_family;
|
||||
__kernel_sa_family_t sipx_family;
|
||||
__be16 sipx_port;
|
||||
__be32 sipx_network;
|
||||
unsigned char sipx_node[IPX_NODE_LEN];
|
||||
|
|
|
|||
|
|
@ -26,12 +26,9 @@
|
|||
#define KERNEL_IRDA_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
/* Please do *not* add any #include in this file, this file is
|
||||
* included as-is in user space.
|
||||
* Please fix the calling file to properly included needed files before
|
||||
* this one, or preferably to include <net/irda/irda.h> instead.
|
||||
* Jean II */
|
||||
/* Note that this file is shared with user space. */
|
||||
|
||||
/* Hint bit positions for first hint byte */
|
||||
#define HINT_PNP 0x01
|
||||
|
|
@ -125,7 +122,7 @@ enum {
|
|||
#define LSAP_ANY 0xff
|
||||
|
||||
struct sockaddr_irda {
|
||||
sa_family_t sir_family; /* AF_IRDA */
|
||||
__kernel_sa_family_t sir_family; /* AF_IRDA */
|
||||
__u8 sir_lsap_sel; /* LSAP selector */
|
||||
__u32 sir_addr; /* Device address */
|
||||
char sir_name[25]; /* Usually <service>:IrDA:TinyTP */
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#define _LINUX_L2TP_H_
|
||||
|
||||
#include <linux/types.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/socket.h>
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/in.h>
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
|
|
@ -26,14 +26,15 @@
|
|||
#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
|
||||
struct sockaddr_l2tpip {
|
||||
/* The first fields must match struct sockaddr_in */
|
||||
sa_family_t l2tp_family; /* AF_INET */
|
||||
__kernel_sa_family_t l2tp_family; /* AF_INET */
|
||||
__be16 l2tp_unused; /* INET port number (unused) */
|
||||
struct in_addr l2tp_addr; /* Internet address */
|
||||
|
||||
__u32 l2tp_conn_id; /* Connection ID of tunnel */
|
||||
|
||||
/* Pad to size of `struct sockaddr'. */
|
||||
unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) -
|
||||
unsigned char __pad[sizeof(struct sockaddr) -
|
||||
sizeof(__kernel_sa_family_t) -
|
||||
sizeof(__be16) - sizeof(struct in_addr) -
|
||||
sizeof(__u32)];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ struct lapb_parms_struct {
|
|||
unsigned int mode;
|
||||
};
|
||||
|
||||
extern int lapb_register(struct net_device *dev, struct lapb_register_struct *callbacks);
|
||||
extern int lapb_register(struct net_device *dev,
|
||||
const struct lapb_register_struct *callbacks);
|
||||
extern int lapb_unregister(struct net_device *dev);
|
||||
extern int lapb_getparms(struct net_device *dev, struct lapb_parms_struct *parms);
|
||||
extern int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms);
|
||||
|
|
|
|||
|
|
@ -12,16 +12,20 @@
|
|||
*
|
||||
* See the GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <linux/socket.h>
|
||||
|
||||
#define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */
|
||||
struct sockaddr_llc {
|
||||
sa_family_t sllc_family; /* AF_LLC */
|
||||
sa_family_t sllc_arphrd; /* ARPHRD_ETHER */
|
||||
__kernel_sa_family_t sllc_family; /* AF_LLC */
|
||||
__kernel_sa_family_t sllc_arphrd; /* ARPHRD_ETHER */
|
||||
unsigned char sllc_test;
|
||||
unsigned char sllc_xid;
|
||||
unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */
|
||||
unsigned char sllc_sap;
|
||||
unsigned char sllc_mac[IFHWADDRLEN];
|
||||
unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(sa_family_t) * 2 -
|
||||
unsigned char __pad[__LLC_SOCK_SIZE__ -
|
||||
sizeof(__kernel_sa_family_t) * 2 -
|
||||
sizeof(unsigned char) * 4 - IFHWADDRLEN];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,131 +11,130 @@
|
|||
#include <linux/types.h>
|
||||
|
||||
/* Generic MII registers. */
|
||||
|
||||
#define MII_BMCR 0x00 /* Basic mode control register */
|
||||
#define MII_BMSR 0x01 /* Basic mode status register */
|
||||
#define MII_PHYSID1 0x02 /* PHYS ID 1 */
|
||||
#define MII_PHYSID2 0x03 /* PHYS ID 2 */
|
||||
#define MII_ADVERTISE 0x04 /* Advertisement control reg */
|
||||
#define MII_LPA 0x05 /* Link partner ability reg */
|
||||
#define MII_EXPANSION 0x06 /* Expansion register */
|
||||
#define MII_CTRL1000 0x09 /* 1000BASE-T control */
|
||||
#define MII_STAT1000 0x0a /* 1000BASE-T status */
|
||||
#define MII_ESTATUS 0x0f /* Extended Status */
|
||||
#define MII_DCOUNTER 0x12 /* Disconnect counter */
|
||||
#define MII_FCSCOUNTER 0x13 /* False carrier counter */
|
||||
#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */
|
||||
#define MII_RERRCOUNTER 0x15 /* Receive error counter */
|
||||
#define MII_SREVISION 0x16 /* Silicon revision */
|
||||
#define MII_RESV1 0x17 /* Reserved... */
|
||||
#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */
|
||||
#define MII_PHYADDR 0x19 /* PHY address */
|
||||
#define MII_RESV2 0x1a /* Reserved... */
|
||||
#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */
|
||||
#define MII_NCONFIG 0x1c /* Network interface config */
|
||||
#define MII_BMCR 0x00 /* Basic mode control register */
|
||||
#define MII_BMSR 0x01 /* Basic mode status register */
|
||||
#define MII_PHYSID1 0x02 /* PHYS ID 1 */
|
||||
#define MII_PHYSID2 0x03 /* PHYS ID 2 */
|
||||
#define MII_ADVERTISE 0x04 /* Advertisement control reg */
|
||||
#define MII_LPA 0x05 /* Link partner ability reg */
|
||||
#define MII_EXPANSION 0x06 /* Expansion register */
|
||||
#define MII_CTRL1000 0x09 /* 1000BASE-T control */
|
||||
#define MII_STAT1000 0x0a /* 1000BASE-T status */
|
||||
#define MII_ESTATUS 0x0f /* Extended Status */
|
||||
#define MII_DCOUNTER 0x12 /* Disconnect counter */
|
||||
#define MII_FCSCOUNTER 0x13 /* False carrier counter */
|
||||
#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */
|
||||
#define MII_RERRCOUNTER 0x15 /* Receive error counter */
|
||||
#define MII_SREVISION 0x16 /* Silicon revision */
|
||||
#define MII_RESV1 0x17 /* Reserved... */
|
||||
#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */
|
||||
#define MII_PHYADDR 0x19 /* PHY address */
|
||||
#define MII_RESV2 0x1a /* Reserved... */
|
||||
#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */
|
||||
#define MII_NCONFIG 0x1c /* Network interface config */
|
||||
|
||||
/* Basic mode control register. */
|
||||
#define BMCR_RESV 0x003f /* Unused... */
|
||||
#define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */
|
||||
#define BMCR_CTST 0x0080 /* Collision test */
|
||||
#define BMCR_FULLDPLX 0x0100 /* Full duplex */
|
||||
#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */
|
||||
#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */
|
||||
#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */
|
||||
#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */
|
||||
#define BMCR_SPEED100 0x2000 /* Select 100Mbps */
|
||||
#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */
|
||||
#define BMCR_RESET 0x8000 /* Reset the DP83840 */
|
||||
#define BMCR_RESV 0x003f /* Unused... */
|
||||
#define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */
|
||||
#define BMCR_CTST 0x0080 /* Collision test */
|
||||
#define BMCR_FULLDPLX 0x0100 /* Full duplex */
|
||||
#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */
|
||||
#define BMCR_ISOLATE 0x0400 /* Isolate data paths from MII */
|
||||
#define BMCR_PDOWN 0x0800 /* Enable low power state */
|
||||
#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */
|
||||
#define BMCR_SPEED100 0x2000 /* Select 100Mbps */
|
||||
#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */
|
||||
#define BMCR_RESET 0x8000 /* Reset to default state */
|
||||
|
||||
/* Basic mode status register. */
|
||||
#define BMSR_ERCAP 0x0001 /* Ext-reg capability */
|
||||
#define BMSR_JCD 0x0002 /* Jabber detected */
|
||||
#define BMSR_LSTATUS 0x0004 /* Link status */
|
||||
#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */
|
||||
#define BMSR_RFAULT 0x0010 /* Remote fault detected */
|
||||
#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */
|
||||
#define BMSR_RESV 0x00c0 /* Unused... */
|
||||
#define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */
|
||||
#define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */
|
||||
#define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */
|
||||
#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */
|
||||
#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */
|
||||
#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */
|
||||
#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */
|
||||
#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */
|
||||
#define BMSR_ERCAP 0x0001 /* Ext-reg capability */
|
||||
#define BMSR_JCD 0x0002 /* Jabber detected */
|
||||
#define BMSR_LSTATUS 0x0004 /* Link status */
|
||||
#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */
|
||||
#define BMSR_RFAULT 0x0010 /* Remote fault detected */
|
||||
#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */
|
||||
#define BMSR_RESV 0x00c0 /* Unused... */
|
||||
#define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */
|
||||
#define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */
|
||||
#define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */
|
||||
#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */
|
||||
#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */
|
||||
#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */
|
||||
#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */
|
||||
#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */
|
||||
|
||||
/* Advertisement control register. */
|
||||
#define ADVERTISE_SLCT 0x001f /* Selector bits */
|
||||
#define ADVERTISE_CSMA 0x0001 /* Only selector supported */
|
||||
#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */
|
||||
#define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */
|
||||
#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */
|
||||
#define ADVERTISE_1000XHALF 0x0040 /* Try for 1000BASE-X half-duplex */
|
||||
#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */
|
||||
#define ADVERTISE_1000XPAUSE 0x0080 /* Try for 1000BASE-X pause */
|
||||
#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */
|
||||
#define ADVERTISE_1000XPSE_ASYM 0x0100 /* Try for 1000BASE-X asym pause */
|
||||
#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */
|
||||
#define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */
|
||||
#define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */
|
||||
#define ADVERTISE_RESV 0x1000 /* Unused... */
|
||||
#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */
|
||||
#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */
|
||||
#define ADVERTISE_NPAGE 0x8000 /* Next page bit */
|
||||
#define ADVERTISE_SLCT 0x001f /* Selector bits */
|
||||
#define ADVERTISE_CSMA 0x0001 /* Only selector supported */
|
||||
#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */
|
||||
#define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */
|
||||
#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */
|
||||
#define ADVERTISE_1000XHALF 0x0040 /* Try for 1000BASE-X half-duplex */
|
||||
#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */
|
||||
#define ADVERTISE_1000XPAUSE 0x0080 /* Try for 1000BASE-X pause */
|
||||
#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */
|
||||
#define ADVERTISE_1000XPSE_ASYM 0x0100 /* Try for 1000BASE-X asym pause */
|
||||
#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */
|
||||
#define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */
|
||||
#define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */
|
||||
#define ADVERTISE_RESV 0x1000 /* Unused... */
|
||||
#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */
|
||||
#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */
|
||||
#define ADVERTISE_NPAGE 0x8000 /* Next page bit */
|
||||
|
||||
#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \
|
||||
ADVERTISE_CSMA)
|
||||
#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \
|
||||
ADVERTISE_100HALF | ADVERTISE_100FULL)
|
||||
#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \
|
||||
ADVERTISE_CSMA)
|
||||
#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \
|
||||
ADVERTISE_100HALF | ADVERTISE_100FULL)
|
||||
|
||||
/* Link partner ability register. */
|
||||
#define LPA_SLCT 0x001f /* Same as advertise selector */
|
||||
#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */
|
||||
#define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */
|
||||
#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */
|
||||
#define LPA_1000XHALF 0x0040 /* Can do 1000BASE-X half-duplex */
|
||||
#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */
|
||||
#define LPA_1000XPAUSE 0x0080 /* Can do 1000BASE-X pause */
|
||||
#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */
|
||||
#define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/
|
||||
#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */
|
||||
#define LPA_PAUSE_CAP 0x0400 /* Can pause */
|
||||
#define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */
|
||||
#define LPA_RESV 0x1000 /* Unused... */
|
||||
#define LPA_RFAULT 0x2000 /* Link partner faulted */
|
||||
#define LPA_LPACK 0x4000 /* Link partner acked us */
|
||||
#define LPA_NPAGE 0x8000 /* Next page bit */
|
||||
#define LPA_SLCT 0x001f /* Same as advertise selector */
|
||||
#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */
|
||||
#define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */
|
||||
#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */
|
||||
#define LPA_1000XHALF 0x0040 /* Can do 1000BASE-X half-duplex */
|
||||
#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */
|
||||
#define LPA_1000XPAUSE 0x0080 /* Can do 1000BASE-X pause */
|
||||
#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */
|
||||
#define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/
|
||||
#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */
|
||||
#define LPA_PAUSE_CAP 0x0400 /* Can pause */
|
||||
#define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */
|
||||
#define LPA_RESV 0x1000 /* Unused... */
|
||||
#define LPA_RFAULT 0x2000 /* Link partner faulted */
|
||||
#define LPA_LPACK 0x4000 /* Link partner acked us */
|
||||
#define LPA_NPAGE 0x8000 /* Next page bit */
|
||||
|
||||
#define LPA_DUPLEX (LPA_10FULL | LPA_100FULL)
|
||||
#define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4)
|
||||
|
||||
/* Expansion register for auto-negotiation. */
|
||||
#define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */
|
||||
#define EXPANSION_LCWP 0x0002 /* Got new RX page code word */
|
||||
#define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */
|
||||
#define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */
|
||||
#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */
|
||||
#define EXPANSION_RESV 0xffe0 /* Unused... */
|
||||
#define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */
|
||||
#define EXPANSION_LCWP 0x0002 /* Got new RX page code word */
|
||||
#define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */
|
||||
#define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */
|
||||
#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */
|
||||
#define EXPANSION_RESV 0xffe0 /* Unused... */
|
||||
|
||||
#define ESTATUS_1000_TFULL 0x2000 /* Can do 1000BT Full */
|
||||
#define ESTATUS_1000_THALF 0x1000 /* Can do 1000BT Half */
|
||||
#define ESTATUS_1000_TFULL 0x2000 /* Can do 1000BT Full */
|
||||
#define ESTATUS_1000_THALF 0x1000 /* Can do 1000BT Half */
|
||||
|
||||
/* N-way test register. */
|
||||
#define NWAYTEST_RESV1 0x00ff /* Unused... */
|
||||
#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */
|
||||
#define NWAYTEST_RESV2 0xfe00 /* Unused... */
|
||||
#define NWAYTEST_RESV1 0x00ff /* Unused... */
|
||||
#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */
|
||||
#define NWAYTEST_RESV2 0xfe00 /* Unused... */
|
||||
|
||||
/* 1000BASE-T Control register */
|
||||
#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */
|
||||
#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */
|
||||
#define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */
|
||||
#define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */
|
||||
#define CTL1000_AS_MASTER 0x0800
|
||||
#define CTL1000_ENABLE_MASTER 0x1000
|
||||
|
||||
/* 1000BASE-T Status register */
|
||||
#define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */
|
||||
#define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */
|
||||
#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */
|
||||
#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
|
||||
#define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */
|
||||
#define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */
|
||||
#define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */
|
||||
#define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */
|
||||
|
||||
/* Flow control flags */
|
||||
#define FLOW_CTRL_TX 0x01
|
||||
|
|
@ -149,7 +148,7 @@ struct mii_ioctl_data {
|
|||
__u16 val_out;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/if.h>
|
||||
|
||||
|
|
@ -180,7 +179,7 @@ extern unsigned int mii_check_media (struct mii_if_info *mii,
|
|||
unsigned int ok_to_print,
|
||||
unsigned int init_media);
|
||||
extern int generic_mii_ioctl(struct mii_if_info *mii_if,
|
||||
struct mii_ioctl_data *mii_data, int cmd,
|
||||
struct mii_ioctl_data *mii_data, int cmd,
|
||||
unsigned int *duplex_changed);
|
||||
|
||||
|
||||
|
|
@ -189,7 +188,6 @@ static inline struct mii_ioctl_data *if_mii(struct ifreq *rq)
|
|||
return (struct mii_ioctl_data *) &rq->ifr_ifru;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* mii_nway_result
|
||||
* @negotiated: value of MII ANAR and'd with ANLPAR
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ enum {
|
|||
MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21,
|
||||
MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30,
|
||||
MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32,
|
||||
MLX4_DEV_CAP_FLAG_FCS_KEEP = 1LL << 34,
|
||||
MLX4_DEV_CAP_FLAG_WOL = 1LL << 38,
|
||||
MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40,
|
||||
MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41,
|
||||
|
|
|
|||
|
|
@ -135,6 +135,17 @@ struct page {
|
|||
#endif
|
||||
;
|
||||
|
||||
struct page_frag {
|
||||
struct page *page;
|
||||
#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
|
||||
__u32 offset;
|
||||
__u32 size;
|
||||
#else
|
||||
__u16 offset;
|
||||
__u16 size;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef unsigned long __nocast vm_flags_t;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ struct hwtstamp_config {
|
|||
};
|
||||
|
||||
/* possible values for hwtstamp_config->tx_type */
|
||||
enum {
|
||||
enum hwtstamp_tx_types {
|
||||
/*
|
||||
* No outgoing packet will need hardware time stamping;
|
||||
* should a packet arrive which asks for it, no hardware
|
||||
|
|
@ -60,10 +60,19 @@ enum {
|
|||
* before sending the packet.
|
||||
*/
|
||||
HWTSTAMP_TX_ON,
|
||||
|
||||
/*
|
||||
* Enables time stamping for outgoing packets just as
|
||||
* HWTSTAMP_TX_ON does, but also enables time stamp insertion
|
||||
* directly into Sync packets. In this case, transmitted Sync
|
||||
* packets will not received a time stamp via the socket error
|
||||
* queue.
|
||||
*/
|
||||
HWTSTAMP_TX_ONESTEP_SYNC,
|
||||
};
|
||||
|
||||
/* possible values for hwtstamp_config->rx_filter */
|
||||
enum {
|
||||
enum hwtstamp_rx_filters {
|
||||
/* time stamp no incoming packet at all */
|
||||
HWTSTAMP_FILTER_NONE,
|
||||
|
||||
|
|
|
|||
|
|
@ -723,9 +723,8 @@ struct netdev_tc_txq {
|
|||
*
|
||||
* void (*ndo_set_rx_mode)(struct net_device *dev);
|
||||
* This function is called device changes address list filtering.
|
||||
*
|
||||
* void (*ndo_set_multicast_list)(struct net_device *dev);
|
||||
* This function is called when the multicast address list changes.
|
||||
* If driver handles unicast address filtering, it should set
|
||||
* IFF_UNICAST_FLT to its priv_flags.
|
||||
*
|
||||
* int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
|
||||
* This function is called when the Media Access Control address
|
||||
|
|
@ -782,6 +781,7 @@ struct netdev_tc_txq {
|
|||
* int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
|
||||
* int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos);
|
||||
* int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate);
|
||||
* int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
|
||||
* int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
* int vf, struct ifla_vf_info *ivf);
|
||||
* int (*ndo_set_vf_port)(struct net_device *dev, int vf,
|
||||
|
|
@ -868,7 +868,6 @@ struct net_device_ops {
|
|||
void (*ndo_change_rx_flags)(struct net_device *dev,
|
||||
int flags);
|
||||
void (*ndo_set_rx_mode)(struct net_device *dev);
|
||||
void (*ndo_set_multicast_list)(struct net_device *dev);
|
||||
int (*ndo_set_mac_address)(struct net_device *dev,
|
||||
void *addr);
|
||||
int (*ndo_validate_addr)(struct net_device *dev);
|
||||
|
|
@ -902,6 +901,8 @@ struct net_device_ops {
|
|||
int queue, u16 vlan, u8 qos);
|
||||
int (*ndo_set_vf_tx_rate)(struct net_device *dev,
|
||||
int vf, int rate);
|
||||
int (*ndo_set_vf_spoofchk)(struct net_device *dev,
|
||||
int vf, bool setting);
|
||||
int (*ndo_get_vf_config)(struct net_device *dev,
|
||||
int vf,
|
||||
struct ifla_vf_info *ivf);
|
||||
|
|
@ -924,11 +925,15 @@ struct net_device_ops {
|
|||
u16 xid,
|
||||
struct scatterlist *sgl,
|
||||
unsigned int sgc);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE)
|
||||
#define NETDEV_FCOE_WWNN 0
|
||||
#define NETDEV_FCOE_WWPN 1
|
||||
int (*ndo_fcoe_get_wwn)(struct net_device *dev,
|
||||
u64 *wwn, int type);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RFS_ACCEL
|
||||
int (*ndo_rx_flow_steer)(struct net_device *dev,
|
||||
const struct sk_buff *skb,
|
||||
|
|
@ -2587,9 +2592,6 @@ static inline int netif_is_bond_slave(struct net_device *dev)
|
|||
|
||||
extern struct pernet_operations __net_initdata loopback_net_ops;
|
||||
|
||||
int dev_ethtool_get_settings(struct net_device *dev,
|
||||
struct ethtool_cmd *cmd);
|
||||
|
||||
static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev)
|
||||
{
|
||||
if (dev->features & NETIF_F_RXCSUM)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _XT_CONNLIMIT_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/netfilter.h>
|
||||
|
||||
struct xt_connlimit_data;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#define _XT_CONNTRACK_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/netfilter.h>
|
||||
#include <linux/netfilter/nf_conntrack_tuple_common.h>
|
||||
|
||||
#define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define _LINUX_NETFILTER_XT_IPRANGE_H 1
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/netfilter.h>
|
||||
|
||||
enum {
|
||||
IPRANGE_SRC = 1 << 0, /* match source IP address */
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ struct arpt_arp {
|
|||
struct in_addr smsk, tmsk;
|
||||
|
||||
/* Device hw address length, src+target device addresses */
|
||||
u_int8_t arhln, arhln_mask;
|
||||
__u8 arhln, arhln_mask;
|
||||
struct arpt_devaddr_info src_devaddr;
|
||||
struct arpt_devaddr_info tgt_devaddr;
|
||||
|
||||
|
|
@ -71,9 +71,9 @@ struct arpt_arp {
|
|||
unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
|
||||
|
||||
/* Flags word */
|
||||
u_int8_t flags;
|
||||
__u8 flags;
|
||||
/* Inverse flags */
|
||||
u_int16_t invflags;
|
||||
__u16 invflags;
|
||||
};
|
||||
|
||||
/* Values for "flag" field in struct arpt_ip (general arp structure).
|
||||
|
|
@ -102,9 +102,9 @@ struct arpt_entry
|
|||
struct arpt_arp arp;
|
||||
|
||||
/* Size of arpt_entry + matches */
|
||||
u_int16_t target_offset;
|
||||
__u16 target_offset;
|
||||
/* Size of arpt_entry + matches + target */
|
||||
u_int16_t next_offset;
|
||||
__u16 next_offset;
|
||||
|
||||
/* Back pointer */
|
||||
unsigned int comefrom;
|
||||
|
|
@ -260,8 +260,8 @@ extern unsigned int arpt_do_table(struct sk_buff *skb,
|
|||
|
||||
struct compat_arpt_entry {
|
||||
struct arpt_arp arp;
|
||||
u_int16_t target_offset;
|
||||
u_int16_t next_offset;
|
||||
__u16 target_offset;
|
||||
__u16 next_offset;
|
||||
compat_uint_t comefrom;
|
||||
struct compat_xt_counters counters;
|
||||
unsigned char elems[0];
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
/* only for userspace compatibility */
|
||||
#ifndef __KERNEL__
|
||||
|
||||
#include <limits.h> /* for INT_MIN, INT_MAX */
|
||||
|
||||
/* IP Cache bits. */
|
||||
/* Src IP address. */
|
||||
#define NFC_DN_SRC 0x0001
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
|
||||
/* only for userspace compatibility */
|
||||
#ifndef __KERNEL__
|
||||
|
||||
#include <limits.h> /* for INT_MIN, INT_MAX */
|
||||
|
||||
/* IP Cache bits. */
|
||||
/* Src IP address. */
|
||||
#define NFC_IP_SRC 0x0001
|
||||
|
|
|
|||
|
|
@ -81,12 +81,12 @@ struct ipt_ip {
|
|||
unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
|
||||
|
||||
/* Protocol, 0 = ANY */
|
||||
u_int16_t proto;
|
||||
__u16 proto;
|
||||
|
||||
/* Flags word */
|
||||
u_int8_t flags;
|
||||
__u8 flags;
|
||||
/* Inverse flags */
|
||||
u_int8_t invflags;
|
||||
__u8 invflags;
|
||||
};
|
||||
|
||||
/* Values for "flag" field in struct ipt_ip (general ip structure). */
|
||||
|
|
@ -114,9 +114,9 @@ struct ipt_entry {
|
|||
unsigned int nfcache;
|
||||
|
||||
/* Size of ipt_entry + matches */
|
||||
u_int16_t target_offset;
|
||||
__u16 target_offset;
|
||||
/* Size of ipt_entry + matches + target */
|
||||
u_int16_t next_offset;
|
||||
__u16 next_offset;
|
||||
|
||||
/* Back pointer */
|
||||
unsigned int comefrom;
|
||||
|
|
@ -149,9 +149,9 @@ struct ipt_entry {
|
|||
|
||||
/* ICMP matching stuff */
|
||||
struct ipt_icmp {
|
||||
u_int8_t type; /* type to match */
|
||||
u_int8_t code[2]; /* range of code */
|
||||
u_int8_t invflags; /* Inverse flags */
|
||||
__u8 type; /* type to match */
|
||||
__u8 code[2]; /* range of code */
|
||||
__u8 invflags; /* Inverse flags */
|
||||
};
|
||||
|
||||
/* Values for "inv" field for struct ipt_icmp. */
|
||||
|
|
@ -288,8 +288,8 @@ extern unsigned int ipt_do_table(struct sk_buff *skb,
|
|||
struct compat_ipt_entry {
|
||||
struct ipt_ip ip;
|
||||
compat_uint_t nfcache;
|
||||
u_int16_t target_offset;
|
||||
u_int16_t next_offset;
|
||||
__u16 target_offset;
|
||||
__u16 next_offset;
|
||||
compat_uint_t comefrom;
|
||||
struct compat_xt_counters counters;
|
||||
unsigned char elems[0];
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
|
||||
/* only for userspace compatibility */
|
||||
#ifndef __KERNEL__
|
||||
|
||||
#include <limits.h> /* for INT_MIN, INT_MAX */
|
||||
|
||||
/* IP Cache bits. */
|
||||
/* Src IP address. */
|
||||
#define NFC_IP6_SRC 0x0001
|
||||
|
|
|
|||
|
|
@ -81,14 +81,14 @@ struct ip6t_ip6 {
|
|||
* MH do not match any packets.
|
||||
* - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol.
|
||||
*/
|
||||
u_int16_t proto;
|
||||
__u16 proto;
|
||||
/* TOS to match iff flags & IP6T_F_TOS */
|
||||
u_int8_t tos;
|
||||
__u8 tos;
|
||||
|
||||
/* Flags word */
|
||||
u_int8_t flags;
|
||||
__u8 flags;
|
||||
/* Inverse flags */
|
||||
u_int8_t invflags;
|
||||
__u8 invflags;
|
||||
};
|
||||
|
||||
/* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
|
||||
|
|
@ -118,9 +118,9 @@ struct ip6t_entry {
|
|||
unsigned int nfcache;
|
||||
|
||||
/* Size of ipt_entry + matches */
|
||||
u_int16_t target_offset;
|
||||
__u16 target_offset;
|
||||
/* Size of ipt_entry + matches + target */
|
||||
u_int16_t next_offset;
|
||||
__u16 next_offset;
|
||||
|
||||
/* Back pointer */
|
||||
unsigned int comefrom;
|
||||
|
|
@ -186,9 +186,9 @@ struct ip6t_error {
|
|||
|
||||
/* ICMP matching stuff */
|
||||
struct ip6t_icmp {
|
||||
u_int8_t type; /* type to match */
|
||||
u_int8_t code[2]; /* range of code */
|
||||
u_int8_t invflags; /* Inverse flags */
|
||||
__u8 type; /* type to match */
|
||||
__u8 code[2]; /* range of code */
|
||||
__u8 invflags; /* Inverse flags */
|
||||
};
|
||||
|
||||
/* Values for "inv" field for struct ipt_icmp. */
|
||||
|
|
@ -298,8 +298,8 @@ extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
|
|||
struct compat_ip6t_entry {
|
||||
struct ip6t_ip6 ipv6;
|
||||
compat_uint_t nfcache;
|
||||
u_int16_t target_offset;
|
||||
u_int16_t next_offset;
|
||||
__u16 target_offset;
|
||||
__u16 next_offset;
|
||||
compat_uint_t comefrom;
|
||||
struct compat_xt_counters counters;
|
||||
unsigned char elems[0];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef __LINUX_NETLINK_H
|
||||
#define __LINUX_NETLINK_H
|
||||
|
||||
#include <linux/socket.h> /* for sa_family_t */
|
||||
#include <linux/socket.h> /* for __kernel_sa_family_t */
|
||||
#include <linux/types.h>
|
||||
|
||||
#define NETLINK_ROUTE 0 /* Routing/device hook */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#ifndef NETROM_KERNEL_H
|
||||
#define NETROM_KERNEL_H
|
||||
|
||||
#include <linux/ax25.h>
|
||||
|
||||
#define NETROM_MTU 236
|
||||
|
||||
#define NETROM_T1 1
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@
|
|||
*
|
||||
* @NFC_CMD_GET_DEVICE: request information about a device (requires
|
||||
* %NFC_ATTR_DEVICE_INDEX) or dump request to get a list of all nfc devices
|
||||
* @NFC_CMD_DEV_UP: turn on the nfc device
|
||||
* (requires %NFC_ATTR_DEVICE_INDEX)
|
||||
* @NFC_CMD_DEV_DOWN: turn off the nfc device
|
||||
* (requires %NFC_ATTR_DEVICE_INDEX)
|
||||
* @NFC_CMD_START_POLL: start polling for targets using the given protocols
|
||||
* (requires %NFC_ATTR_DEVICE_INDEX and %NFC_ATTR_PROTOCOLS)
|
||||
* @NFC_CMD_STOP_POLL: stop polling for targets (requires
|
||||
|
|
@ -56,6 +60,8 @@
|
|||
enum nfc_commands {
|
||||
NFC_CMD_UNSPEC,
|
||||
NFC_CMD_GET_DEVICE,
|
||||
NFC_CMD_DEV_UP,
|
||||
NFC_CMD_DEV_DOWN,
|
||||
NFC_CMD_START_POLL,
|
||||
NFC_CMD_STOP_POLL,
|
||||
NFC_CMD_GET_TARGET,
|
||||
|
|
@ -123,4 +129,6 @@ struct sockaddr_nfc {
|
|||
#define NFC_SOCKPROTO_RAW 0
|
||||
#define NFC_SOCKPROTO_MAX 1
|
||||
|
||||
#define NFC_HEADER_SIZE 1
|
||||
|
||||
#endif /*__LINUX_NFC_H */
|
||||
|
|
|
|||
|
|
@ -161,6 +161,13 @@
|
|||
* @NL80211_CMD_SET_BEACON: set the beacon on an access point interface
|
||||
* using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD,
|
||||
* %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes.
|
||||
* Following attributes are provided for drivers that generate full Beacon
|
||||
* and Probe Response frames internally: %NL80211_ATTR_SSID,
|
||||
* %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
|
||||
* %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
|
||||
* %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
|
||||
* %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP,
|
||||
* %NL80211_ATTR_IE_ASSOC_RESP.
|
||||
* @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface,
|
||||
* parameters are like for %NL80211_CMD_SET_BEACON.
|
||||
* @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it
|
||||
|
|
@ -231,6 +238,8 @@
|
|||
*
|
||||
* @NL80211_CMD_GET_SCAN: get scan results
|
||||
* @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
|
||||
* %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
|
||||
* probe requests at CCK rate or not.
|
||||
* @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
|
||||
* NL80211_CMD_GET_SCAN and on the "scan" multicast group)
|
||||
* @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
|
||||
|
|
@ -425,6 +434,8 @@
|
|||
* specified using %NL80211_ATTR_DURATION. When called, this operation
|
||||
* returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
|
||||
* TX status event pertaining to the TX request.
|
||||
* %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
|
||||
* management frames at CCK rate or not in 2GHz band.
|
||||
* @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
|
||||
* command may be used with the corresponding cookie to cancel the wait
|
||||
* time if it is known that it is no longer necessary.
|
||||
|
|
@ -492,6 +503,12 @@
|
|||
* this command may also be sent by the driver as an MLME event to
|
||||
* inform userspace of the new replay counter.
|
||||
*
|
||||
* @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace
|
||||
* of PMKSA caching dandidates.
|
||||
*
|
||||
* @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup).
|
||||
* @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame.
|
||||
*
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
|
|
@ -616,6 +633,11 @@ enum nl80211_commands {
|
|||
|
||||
NL80211_CMD_SET_REKEY_OFFLOAD,
|
||||
|
||||
NL80211_CMD_PMKSA_CANDIDATE,
|
||||
|
||||
NL80211_CMD_TDLS_OPER,
|
||||
NL80211_CMD_TDLS_MGMT,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
|
|
@ -762,6 +784,8 @@ enum nl80211_commands {
|
|||
* that can be added to a scan request
|
||||
* @NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN: maximum length of information
|
||||
* elements that can be added to a scheduled scan request
|
||||
* @NL80211_ATTR_MAX_MATCH_SETS: maximum number of sets that can be
|
||||
* used with @NL80211_ATTR_SCHED_SCAN_MATCH, a wiphy attribute.
|
||||
*
|
||||
* @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz)
|
||||
* @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
|
||||
|
|
@ -842,18 +866,20 @@ enum nl80211_commands {
|
|||
* @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT
|
||||
* event (u16)
|
||||
* @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating
|
||||
* that protected APs should be used.
|
||||
* that protected APs should be used. This is also used with NEW_BEACON to
|
||||
* indicate that the BSS is to use protection.
|
||||
*
|
||||
* @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to
|
||||
* indicate which unicast key ciphers will be used with the connection
|
||||
* @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT, ASSOCIATE, and NEW_BEACON
|
||||
* to indicate which unicast key ciphers will be used with the connection
|
||||
* (an array of u32).
|
||||
* @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate
|
||||
* which group key cipher will be used with the connection (a u32).
|
||||
* @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate
|
||||
* which WPA version(s) the AP we want to associate with is using
|
||||
* @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
|
||||
* indicate which group key cipher will be used with the connection (a
|
||||
* u32).
|
||||
* @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
|
||||
* indicate which WPA version(s) the AP we want to associate with is using
|
||||
* (a u32 with flags from &enum nl80211_wpa_versions).
|
||||
* @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate
|
||||
* which key management algorithm(s) to use (an array of u32).
|
||||
* @NL80211_ATTR_AKM_SUITES: Used with CONNECT, ASSOCIATE, and NEW_BEACON to
|
||||
* indicate which key management algorithm(s) to use (an array of u32).
|
||||
*
|
||||
* @NL80211_ATTR_REQ_IE: (Re)association request information elements as
|
||||
* sent out by the card, for ROAM and successful CONNECT events.
|
||||
|
|
@ -1002,6 +1028,24 @@ enum nl80211_commands {
|
|||
|
||||
* @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan
|
||||
* cycles, in msecs.
|
||||
|
||||
* @NL80211_ATTR_SCHED_SCAN_MATCH: Nested attribute with one or more
|
||||
* sets of attributes to match during scheduled scans. Only BSSs
|
||||
* that match any of the sets will be reported. These are
|
||||
* pass-thru filter rules.
|
||||
* For a match to succeed, the BSS must match all attributes of a
|
||||
* set. Since not every hardware supports matching all types of
|
||||
* attributes, there is no guarantee that the reported BSSs are
|
||||
* fully complying with the match sets and userspace needs to be
|
||||
* able to ignore them by itself.
|
||||
* Thus, the implementation is somewhat hardware-dependent, but
|
||||
* this is only an optimization and the userspace application
|
||||
* needs to handle all the non-filtered results anyway.
|
||||
* If the match attributes don't make sense when combined with
|
||||
* the values passed in @NL80211_ATTR_SCAN_SSIDS (eg. if an SSID
|
||||
* is included in the probe request, but the match attributes
|
||||
* will never let it go through), -EINVAL may be returned.
|
||||
* If ommited, no filtering is done.
|
||||
*
|
||||
* @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported
|
||||
* interface combinations. In each nested item, it contains attributes
|
||||
|
|
@ -1019,6 +1063,52 @@ enum nl80211_commands {
|
|||
* being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but
|
||||
* without the length restriction (at most %NL80211_MAX_SUPP_RATES).
|
||||
*
|
||||
* @NL80211_ATTR_HIDDEN_SSID: indicates whether SSID is to be hidden from Beacon
|
||||
* and Probe Response (when response to wildcard Probe Request); see
|
||||
* &enum nl80211_hidden_ssid, represented as a u32
|
||||
*
|
||||
* @NL80211_ATTR_IE_PROBE_RESP: Information element(s) for Probe Response frame.
|
||||
* This is used with %NL80211_CMD_NEW_BEACON and %NL80211_CMD_SET_BEACON to
|
||||
* provide extra IEs (e.g., WPS/P2P IE) into Probe Response frames when the
|
||||
* driver (or firmware) replies to Probe Request frames.
|
||||
* @NL80211_ATTR_IE_ASSOC_RESP: Information element(s) for (Re)Association
|
||||
* Response frames. This is used with %NL80211_CMD_NEW_BEACON and
|
||||
* %NL80211_CMD_SET_BEACON to provide extra IEs (e.g., WPS/P2P IE) into
|
||||
* (Re)Association Response frames when the driver (or firmware) replies to
|
||||
* (Re)Association Request frames.
|
||||
*
|
||||
* @NL80211_ATTR_STA_WME: Nested attribute containing the wme configuration
|
||||
* of the station, see &enum nl80211_sta_wme_attr.
|
||||
* @NL80211_ATTR_SUPPORT_AP_UAPSD: the device supports uapsd when working
|
||||
* as AP.
|
||||
*
|
||||
* @NL80211_ATTR_ROAM_SUPPORT: Indicates whether the firmware is capable of
|
||||
* roaming to another AP in the same ESS if the signal lever is low.
|
||||
*
|
||||
* @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching
|
||||
* candidate information, see &enum nl80211_pmksa_candidate_attr.
|
||||
*
|
||||
* @NL80211_ATTR_TX_NO_CCK_RATE: Indicates whether to use CCK rate or not
|
||||
* for management frames transmission. In order to avoid p2p probe/action
|
||||
* frames are being transmitted at CCK rate in 2GHz band, the user space
|
||||
* applications use this attribute.
|
||||
* This attribute is used with %NL80211_CMD_TRIGGER_SCAN and
|
||||
* %NL80211_CMD_FRAME commands.
|
||||
*
|
||||
* @NL80211_ATTR_TDLS_ACTION: Low level TDLS action code (e.g. link setup
|
||||
* request, link setup confirm, link teardown, etc.). Values are
|
||||
* described in the TDLS (802.11z) specification.
|
||||
* @NL80211_ATTR_TDLS_DIALOG_TOKEN: Non-zero token for uniquely identifying a
|
||||
* TDLS conversation between two devices.
|
||||
* @NL80211_ATTR_TDLS_OPERATION: High level TDLS operation; see
|
||||
* &enum nl80211_tdls_operation, represented as a u8.
|
||||
* @NL80211_ATTR_TDLS_SUPPORT: A flag indicating the device can operate
|
||||
* as a TDLS peer sta.
|
||||
* @NL80211_ATTR_TDLS_EXTERNAL_SETUP: The TDLS discovery/setup and teardown
|
||||
* procedures should be performed by sending TDLS packets via
|
||||
* %NL80211_CMD_TDLS_MGMT. Otherwise %NL80211_CMD_TDLS_OPER should be
|
||||
* used for asking the driver to perform a TDLS operation.
|
||||
*
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
*/
|
||||
|
|
@ -1224,6 +1314,29 @@ enum nl80211_attrs {
|
|||
|
||||
NL80211_ATTR_SCAN_SUPP_RATES,
|
||||
|
||||
NL80211_ATTR_HIDDEN_SSID,
|
||||
|
||||
NL80211_ATTR_IE_PROBE_RESP,
|
||||
NL80211_ATTR_IE_ASSOC_RESP,
|
||||
|
||||
NL80211_ATTR_STA_WME,
|
||||
NL80211_ATTR_SUPPORT_AP_UAPSD,
|
||||
|
||||
NL80211_ATTR_ROAM_SUPPORT,
|
||||
|
||||
NL80211_ATTR_SCHED_SCAN_MATCH,
|
||||
NL80211_ATTR_MAX_MATCH_SETS,
|
||||
|
||||
NL80211_ATTR_PMKSA_CANDIDATE,
|
||||
|
||||
NL80211_ATTR_TX_NO_CCK_RATE,
|
||||
|
||||
NL80211_ATTR_TDLS_ACTION,
|
||||
NL80211_ATTR_TDLS_DIALOG_TOKEN,
|
||||
NL80211_ATTR_TDLS_OPERATION,
|
||||
NL80211_ATTR_TDLS_SUPPORT,
|
||||
NL80211_ATTR_TDLS_EXTERNAL_SETUP,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
|
|
@ -1321,6 +1434,7 @@ enum nl80211_iftype {
|
|||
* @NL80211_STA_FLAG_WME: station is WME/QoS capable
|
||||
* @NL80211_STA_FLAG_MFP: station uses management frame protection
|
||||
* @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
|
||||
* @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer
|
||||
* @NL80211_STA_FLAG_MAX: highest station flag number currently defined
|
||||
* @__NL80211_STA_FLAG_AFTER_LAST: internal use
|
||||
*/
|
||||
|
|
@ -1331,6 +1445,7 @@ enum nl80211_sta_flags {
|
|||
NL80211_STA_FLAG_WME,
|
||||
NL80211_STA_FLAG_MFP,
|
||||
NL80211_STA_FLAG_AUTHENTICATED,
|
||||
NL80211_STA_FLAG_TDLS_PEER,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_FLAG_AFTER_LAST,
|
||||
|
|
@ -1433,6 +1548,7 @@ enum nl80211_sta_bss_param {
|
|||
* @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute
|
||||
* containing info as possible, see &enum nl80211_sta_bss_param
|
||||
* @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
|
||||
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
|
||||
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
||||
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
||||
*/
|
||||
|
|
@ -1454,6 +1570,7 @@ enum nl80211_sta_info {
|
|||
NL80211_STA_INFO_RX_BITRATE,
|
||||
NL80211_STA_INFO_BSS_PARAM,
|
||||
NL80211_STA_INFO_CONNECTED_TIME,
|
||||
NL80211_STA_INFO_STA_FLAGS,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_INFO_AFTER_LAST,
|
||||
|
|
@ -1682,6 +1799,26 @@ enum nl80211_reg_rule_attr {
|
|||
NL80211_REG_RULE_ATTR_MAX = __NL80211_REG_RULE_ATTR_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sched_scan_match_attr - scheduled scan match attributes
|
||||
* @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved
|
||||
* @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching,
|
||||
* only report BSS with matching SSID.
|
||||
* @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
|
||||
* attribute number currently defined
|
||||
* @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
|
||||
*/
|
||||
enum nl80211_sched_scan_match_attr {
|
||||
__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID,
|
||||
|
||||
NL80211_ATTR_SCHED_SCAN_MATCH_SSID,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
|
||||
NL80211_SCHED_SCAN_MATCH_ATTR_MAX =
|
||||
__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_reg_rule_flags - regulatory rule flags
|
||||
*
|
||||
|
|
@ -1833,6 +1970,13 @@ enum nl80211_mntr_flags {
|
|||
* @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a
|
||||
* source mesh point for path selection elements.
|
||||
*
|
||||
* @NL80211_MESHCONF_HWMP_RANN_INTERVAL: The interval of time (in TUs) between
|
||||
* root announcements are transmitted.
|
||||
*
|
||||
* @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has
|
||||
* access to a broader network beyond the MBSS. This is done via Root
|
||||
* Announcement frames.
|
||||
*
|
||||
* @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
|
||||
*
|
||||
* @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
|
||||
|
|
@ -1854,6 +1998,8 @@ enum nl80211_meshconf_params {
|
|||
NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
|
||||
NL80211_MESHCONF_HWMP_ROOTMODE,
|
||||
NL80211_MESHCONF_ELEMENT_TTL,
|
||||
NL80211_MESHCONF_HWMP_RANN_INTERVAL,
|
||||
NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_MESHCONF_ATTR_AFTER_LAST,
|
||||
|
|
@ -2430,4 +2576,78 @@ enum nl80211_rekey_data {
|
|||
MAX_NL80211_REKEY_DATA = NUM_NL80211_REKEY_DATA - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_hidden_ssid - values for %NL80211_ATTR_HIDDEN_SSID
|
||||
* @NL80211_HIDDEN_SSID_NOT_IN_USE: do not hide SSID (i.e., broadcast it in
|
||||
* Beacon frames)
|
||||
* @NL80211_HIDDEN_SSID_ZERO_LEN: hide SSID by using zero-length SSID element
|
||||
* in Beacon frames
|
||||
* @NL80211_HIDDEN_SSID_ZERO_CONTENTS: hide SSID by using correct length of SSID
|
||||
* element in Beacon frames but zero out each byte in the SSID
|
||||
*/
|
||||
enum nl80211_hidden_ssid {
|
||||
NL80211_HIDDEN_SSID_NOT_IN_USE,
|
||||
NL80211_HIDDEN_SSID_ZERO_LEN,
|
||||
NL80211_HIDDEN_SSID_ZERO_CONTENTS
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_sta_wme_attr - station WME attributes
|
||||
* @__NL80211_STA_WME_INVALID: invalid number for nested attribute
|
||||
* @NL80211_STA_WME_UAPSD_QUEUES: bitmap of uapsd queues. the format
|
||||
* is the same as the AC bitmap in the QoS info field.
|
||||
* @NL80211_STA_WME_MAX_SP: max service period. the format is the same
|
||||
* as the MAX_SP field in the QoS info field (but already shifted down).
|
||||
* @__NL80211_STA_WME_AFTER_LAST: internal
|
||||
* @NL80211_STA_WME_MAX: highest station WME attribute
|
||||
*/
|
||||
enum nl80211_sta_wme_attr {
|
||||
__NL80211_STA_WME_INVALID,
|
||||
NL80211_STA_WME_UAPSD_QUEUES,
|
||||
NL80211_STA_WME_MAX_SP,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_WME_AFTER_LAST,
|
||||
NL80211_STA_WME_MAX = __NL80211_STA_WME_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_pmksa_candidate_attr - attributes for PMKSA caching candidates
|
||||
* @__NL80211_PMKSA_CANDIDATE_INVALID: invalid number for nested attributes
|
||||
* @NL80211_PMKSA_CANDIDATE_INDEX: candidate index (u32; the smaller, the higher
|
||||
* priority)
|
||||
* @NL80211_PMKSA_CANDIDATE_BSSID: candidate BSSID (6 octets)
|
||||
* @NL80211_PMKSA_CANDIDATE_PREAUTH: RSN pre-authentication supported (flag)
|
||||
* @NUM_NL80211_PMKSA_CANDIDATE: number of PMKSA caching candidate attributes
|
||||
* (internal)
|
||||
* @MAX_NL80211_PMKSA_CANDIDATE: highest PMKSA caching candidate attribute
|
||||
* (internal)
|
||||
*/
|
||||
enum nl80211_pmksa_candidate_attr {
|
||||
__NL80211_PMKSA_CANDIDATE_INVALID,
|
||||
NL80211_PMKSA_CANDIDATE_INDEX,
|
||||
NL80211_PMKSA_CANDIDATE_BSSID,
|
||||
NL80211_PMKSA_CANDIDATE_PREAUTH,
|
||||
|
||||
/* keep last */
|
||||
NUM_NL80211_PMKSA_CANDIDATE,
|
||||
MAX_NL80211_PMKSA_CANDIDATE = NUM_NL80211_PMKSA_CANDIDATE - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_tdls_operation - values for %NL80211_ATTR_TDLS_OPERATION
|
||||
* @NL80211_TDLS_DISCOVERY_REQ: Send a TDLS discovery request
|
||||
* @NL80211_TDLS_SETUP: Setup TDLS link
|
||||
* @NL80211_TDLS_TEARDOWN: Teardown a TDLS link which is already established
|
||||
* @NL80211_TDLS_ENABLE_LINK: Enable TDLS link
|
||||
* @NL80211_TDLS_DISABLE_LINK: Disable TDLS link
|
||||
*/
|
||||
enum nl80211_tdls_operation {
|
||||
NL80211_TDLS_DISCOVERY_REQ,
|
||||
NL80211_TDLS_SETUP,
|
||||
NL80211_TDLS_TEARDOWN,
|
||||
NL80211_TDLS_ENABLE_LINK,
|
||||
NL80211_TDLS_DISABLE_LINK,
|
||||
};
|
||||
|
||||
#endif /* __LINUX_NL80211_H */
|
||||
|
|
|
|||
|
|
@ -174,6 +174,8 @@ enum pci_dev_flags {
|
|||
PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1,
|
||||
/* Device configuration is irrevocably lost if disabled into D3 */
|
||||
PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
|
||||
/* Provide indication device is assigned by a Virtual Machine Manager */
|
||||
PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4,
|
||||
};
|
||||
|
||||
enum pci_irq_reroute_variant {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#define LINUX_PHONET_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
/* Automatic protocol selection */
|
||||
#define PN_PROTO_TRANSPORT 0
|
||||
|
|
@ -96,11 +97,11 @@ struct phonetmsg {
|
|||
|
||||
/* Phonet socket address structure */
|
||||
struct sockaddr_pn {
|
||||
sa_family_t spn_family;
|
||||
__kernel_sa_family_t spn_family;
|
||||
__u8 spn_obj;
|
||||
__u8 spn_dev;
|
||||
__u8 spn_resource;
|
||||
__u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3];
|
||||
__u8 spn_zero[sizeof(struct sockaddr) - sizeof(__kernel_sa_family_t) - 3];
|
||||
} __attribute__((packed));
|
||||
|
||||
/* Well known address */
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ struct phy_driver {
|
|||
|
||||
/*
|
||||
* Requests a Tx timestamp for 'skb'. The phy driver promises
|
||||
* to deliver it to the socket's error queue as soon as a
|
||||
* to deliver it using skb_complete_tx_timestamp() as soon as a
|
||||
* timestamp becomes available. One of the PTP_CLASS_ values
|
||||
* is passed in 'type'.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
* @reset_gpio: GPIO which is used for reseting rfkill switch
|
||||
* @shutdown_gpio: GPIO which is used for shutdown of rfkill switch
|
||||
* @power_clk_name: [optional] name of clk to turn off while blocked
|
||||
* @gpio_runtime_close: clean up platform specific gpio configuration
|
||||
* @gpio_runtime_setup: set up platform specific gpio configuration
|
||||
*/
|
||||
|
||||
struct rfkill_gpio_platform_data {
|
||||
|
|
@ -38,6 +40,8 @@ struct rfkill_gpio_platform_data {
|
|||
int shutdown_gpio;
|
||||
const char *power_clk_name;
|
||||
enum rfkill_type type;
|
||||
void (*gpio_runtime_close)(struct platform_device *);
|
||||
int (*gpio_runtime_setup)(struct platform_device *);
|
||||
};
|
||||
|
||||
#endif /* __RFKILL_GPIO_H */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
#ifndef ROSE_KERNEL_H
|
||||
#define ROSE_KERNEL_H
|
||||
|
||||
#include <linux/socket.h>
|
||||
#include <linux/ax25.h>
|
||||
|
||||
#define ROSE_MTU 251
|
||||
|
||||
#define ROSE_MAX_DIGIS 6
|
||||
|
|
@ -44,7 +47,7 @@ typedef struct {
|
|||
} rose_address;
|
||||
|
||||
struct sockaddr_rose {
|
||||
sa_family_t srose_family;
|
||||
__kernel_sa_family_t srose_family;
|
||||
rose_address srose_addr;
|
||||
ax25_address srose_call;
|
||||
int srose_ndigis;
|
||||
|
|
@ -52,7 +55,7 @@ struct sockaddr_rose {
|
|||
};
|
||||
|
||||
struct full_sockaddr_rose {
|
||||
sa_family_t srose_family;
|
||||
__kernel_sa_family_t srose_family;
|
||||
rose_address srose_addr;
|
||||
ax25_address srose_call;
|
||||
unsigned int srose_ndigis;
|
||||
|
|
|
|||
25
include/linux/sh_eth.h
Normal file
25
include/linux/sh_eth.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef __ASM_SH_ETH_H__
|
||||
#define __ASM_SH_ETH_H__
|
||||
|
||||
#include <linux/phy.h>
|
||||
|
||||
enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN};
|
||||
enum {
|
||||
SH_ETH_REG_GIGABIT,
|
||||
SH_ETH_REG_FAST_SH4,
|
||||
SH_ETH_REG_FAST_SH3_SH2
|
||||
};
|
||||
|
||||
struct sh_eth_plat_data {
|
||||
int phy;
|
||||
int edmac_endian;
|
||||
int register_type;
|
||||
phy_interface_t phy_interface;
|
||||
void (*set_mdio_gate)(void *addr);
|
||||
|
||||
unsigned char mac_addr[6];
|
||||
unsigned no_ether_link:1;
|
||||
unsigned ether_link_active_low:1;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
#include <linux/rcupdate.h>
|
||||
#include <linux/dmaengine.h>
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
/* Don't change this without changing skb_csum_unnecessary! */
|
||||
#define CHECKSUM_NONE 0
|
||||
|
|
@ -45,6 +46,11 @@
|
|||
#define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0))
|
||||
#define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2))
|
||||
|
||||
/* return minimum truesize of one skb containing X bytes of data */
|
||||
#define SKB_TRUESIZE(X) ((X) + \
|
||||
SKB_DATA_ALIGN(sizeof(struct sk_buff)) + \
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
|
||||
|
||||
/* A. Checksumming of received packets by device.
|
||||
*
|
||||
* NONE: device failed to checksum this packet.
|
||||
|
|
@ -134,7 +140,9 @@ struct sk_buff;
|
|||
typedef struct skb_frag_struct skb_frag_t;
|
||||
|
||||
struct skb_frag_struct {
|
||||
struct page *page;
|
||||
struct {
|
||||
struct page *p;
|
||||
} page;
|
||||
#if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536)
|
||||
__u32 page_offset;
|
||||
__u32 size;
|
||||
|
|
@ -144,6 +152,26 @@ struct skb_frag_struct {
|
|||
#endif
|
||||
};
|
||||
|
||||
static inline unsigned int skb_frag_size(const skb_frag_t *frag)
|
||||
{
|
||||
return frag->size;
|
||||
}
|
||||
|
||||
static inline void skb_frag_size_set(skb_frag_t *frag, unsigned int size)
|
||||
{
|
||||
frag->size = size;
|
||||
}
|
||||
|
||||
static inline void skb_frag_size_add(skb_frag_t *frag, int delta)
|
||||
{
|
||||
frag->size += delta;
|
||||
}
|
||||
|
||||
static inline void skb_frag_size_sub(skb_frag_t *frag, int delta)
|
||||
{
|
||||
frag->size -= delta;
|
||||
}
|
||||
|
||||
#define HAVE_HW_TIME_STAMP
|
||||
|
||||
/**
|
||||
|
|
@ -322,6 +350,8 @@ typedef unsigned char *sk_buff_data_t;
|
|||
* @queue_mapping: Queue mapping for multiqueue devices
|
||||
* @ndisc_nodetype: router type (from link layer)
|
||||
* @ooo_okay: allow the mapping of a socket to a queue to be changed
|
||||
* @l4_rxhash: indicate rxhash is a canonical 4-tuple hash over transport
|
||||
* ports.
|
||||
* @dma_cookie: a cookie to one of several possible DMA operations
|
||||
* done by skb DMA functions
|
||||
* @secmark: security marking
|
||||
|
|
@ -414,6 +444,7 @@ struct sk_buff {
|
|||
__u8 ndisc_nodetype:2;
|
||||
#endif
|
||||
__u8 ooo_okay:1;
|
||||
__u8 l4_rxhash:1;
|
||||
kmemcheck_bitfield_end(flags2);
|
||||
|
||||
/* 0/13 bit hole */
|
||||
|
|
@ -521,6 +552,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size,
|
|||
return __alloc_skb(size, priority, 1, NUMA_NO_NODE);
|
||||
}
|
||||
|
||||
extern void skb_recycle(struct sk_buff *skb);
|
||||
extern bool skb_recycle_check(struct sk_buff *skb, int skb_size);
|
||||
|
||||
extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src);
|
||||
|
|
@ -573,11 +605,11 @@ extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
|
|||
unsigned int to, struct ts_config *config,
|
||||
struct ts_state *state);
|
||||
|
||||
extern __u32 __skb_get_rxhash(struct sk_buff *skb);
|
||||
extern void __skb_get_rxhash(struct sk_buff *skb);
|
||||
static inline __u32 skb_get_rxhash(struct sk_buff *skb)
|
||||
{
|
||||
if (!skb->rxhash)
|
||||
skb->rxhash = __skb_get_rxhash(skb);
|
||||
__skb_get_rxhash(skb);
|
||||
|
||||
return skb->rxhash;
|
||||
}
|
||||
|
|
@ -823,9 +855,9 @@ static inline struct sk_buff *skb_unshare(struct sk_buff *skb,
|
|||
* The reference count is not incremented and the reference is therefore
|
||||
* volatile. Use with caution.
|
||||
*/
|
||||
static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
|
||||
static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_)
|
||||
{
|
||||
struct sk_buff *list = ((struct sk_buff *)list_)->next;
|
||||
struct sk_buff *list = ((const struct sk_buff *)list_)->next;
|
||||
if (list == (struct sk_buff *)list_)
|
||||
list = NULL;
|
||||
return list;
|
||||
|
|
@ -844,9 +876,9 @@ static inline struct sk_buff *skb_peek(struct sk_buff_head *list_)
|
|||
* The reference count is not incremented and the reference is therefore
|
||||
* volatile. Use with caution.
|
||||
*/
|
||||
static inline struct sk_buff *skb_peek_tail(struct sk_buff_head *list_)
|
||||
static inline struct sk_buff *skb_peek_tail(const struct sk_buff_head *list_)
|
||||
{
|
||||
struct sk_buff *list = ((struct sk_buff *)list_)->prev;
|
||||
struct sk_buff *list = ((const struct sk_buff *)list_)->prev;
|
||||
if (list == (struct sk_buff *)list_)
|
||||
list = NULL;
|
||||
return list;
|
||||
|
|
@ -1123,18 +1155,51 @@ static inline int skb_pagelen(const struct sk_buff *skb)
|
|||
int i, len = 0;
|
||||
|
||||
for (i = (int)skb_shinfo(skb)->nr_frags - 1; i >= 0; i--)
|
||||
len += skb_shinfo(skb)->frags[i].size;
|
||||
len += skb_frag_size(&skb_shinfo(skb)->frags[i]);
|
||||
return len + skb_headlen(skb);
|
||||
}
|
||||
|
||||
static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
|
||||
struct page *page, int off, int size)
|
||||
/**
|
||||
* __skb_fill_page_desc - initialise a paged fragment in an skb
|
||||
* @skb: buffer containing fragment to be initialised
|
||||
* @i: paged fragment index to initialise
|
||||
* @page: the page to use for this fragment
|
||||
* @off: the offset to the data with @page
|
||||
* @size: the length of the data
|
||||
*
|
||||
* Initialises the @i'th fragment of @skb to point to &size bytes at
|
||||
* offset @off within @page.
|
||||
*
|
||||
* Does not take any additional reference on the fragment.
|
||||
*/
|
||||
static inline void __skb_fill_page_desc(struct sk_buff *skb, int i,
|
||||
struct page *page, int off, int size)
|
||||
{
|
||||
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
|
||||
|
||||
frag->page = page;
|
||||
frag->page.p = page;
|
||||
frag->page_offset = off;
|
||||
frag->size = size;
|
||||
skb_frag_size_set(frag, size);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_fill_page_desc - initialise a paged fragment in an skb
|
||||
* @skb: buffer containing fragment to be initialised
|
||||
* @i: paged fragment index to initialise
|
||||
* @page: the page to use for this fragment
|
||||
* @off: the offset to the data with @page
|
||||
* @size: the length of the data
|
||||
*
|
||||
* As per __skb_fill_page_desc() -- initialises the @i'th fragment of
|
||||
* @skb to point to &size bytes at offset @off within @page. In
|
||||
* addition updates @skb such that @i is the last fragment.
|
||||
*
|
||||
* Does not take any additional reference on the fragment.
|
||||
*/
|
||||
static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
|
||||
struct page *page, int off, int size)
|
||||
{
|
||||
__skb_fill_page_desc(skb, i, page, off, size);
|
||||
skb_shinfo(skb)->nr_frags = i + 1;
|
||||
}
|
||||
|
||||
|
|
@ -1628,6 +1693,137 @@ static inline void netdev_free_page(struct net_device *dev, struct page *page)
|
|||
__free_page(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_page - retrieve the page refered to by a paged fragment
|
||||
* @frag: the paged fragment
|
||||
*
|
||||
* Returns the &struct page associated with @frag.
|
||||
*/
|
||||
static inline struct page *skb_frag_page(const skb_frag_t *frag)
|
||||
{
|
||||
return frag->page.p;
|
||||
}
|
||||
|
||||
/**
|
||||
* __skb_frag_ref - take an addition reference on a paged fragment.
|
||||
* @frag: the paged fragment
|
||||
*
|
||||
* Takes an additional reference on the paged fragment @frag.
|
||||
*/
|
||||
static inline void __skb_frag_ref(skb_frag_t *frag)
|
||||
{
|
||||
get_page(skb_frag_page(frag));
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_ref - take an addition reference on a paged fragment of an skb.
|
||||
* @skb: the buffer
|
||||
* @f: the fragment offset.
|
||||
*
|
||||
* Takes an additional reference on the @f'th paged fragment of @skb.
|
||||
*/
|
||||
static inline void skb_frag_ref(struct sk_buff *skb, int f)
|
||||
{
|
||||
__skb_frag_ref(&skb_shinfo(skb)->frags[f]);
|
||||
}
|
||||
|
||||
/**
|
||||
* __skb_frag_unref - release a reference on a paged fragment.
|
||||
* @frag: the paged fragment
|
||||
*
|
||||
* Releases a reference on the paged fragment @frag.
|
||||
*/
|
||||
static inline void __skb_frag_unref(skb_frag_t *frag)
|
||||
{
|
||||
put_page(skb_frag_page(frag));
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_unref - release a reference on a paged fragment of an skb.
|
||||
* @skb: the buffer
|
||||
* @f: the fragment offset
|
||||
*
|
||||
* Releases a reference on the @f'th paged fragment of @skb.
|
||||
*/
|
||||
static inline void skb_frag_unref(struct sk_buff *skb, int f)
|
||||
{
|
||||
__skb_frag_unref(&skb_shinfo(skb)->frags[f]);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_address - gets the address of the data contained in a paged fragment
|
||||
* @frag: the paged fragment buffer
|
||||
*
|
||||
* Returns the address of the data within @frag. The page must already
|
||||
* be mapped.
|
||||
*/
|
||||
static inline void *skb_frag_address(const skb_frag_t *frag)
|
||||
{
|
||||
return page_address(skb_frag_page(frag)) + frag->page_offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_address_safe - gets the address of the data contained in a paged fragment
|
||||
* @frag: the paged fragment buffer
|
||||
*
|
||||
* Returns the address of the data within @frag. Checks that the page
|
||||
* is mapped and returns %NULL otherwise.
|
||||
*/
|
||||
static inline void *skb_frag_address_safe(const skb_frag_t *frag)
|
||||
{
|
||||
void *ptr = page_address(skb_frag_page(frag));
|
||||
if (unlikely(!ptr))
|
||||
return NULL;
|
||||
|
||||
return ptr + frag->page_offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* __skb_frag_set_page - sets the page contained in a paged fragment
|
||||
* @frag: the paged fragment
|
||||
* @page: the page to set
|
||||
*
|
||||
* Sets the fragment @frag to contain @page.
|
||||
*/
|
||||
static inline void __skb_frag_set_page(skb_frag_t *frag, struct page *page)
|
||||
{
|
||||
frag->page.p = page;
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_set_page - sets the page contained in a paged fragment of an skb
|
||||
* @skb: the buffer
|
||||
* @f: the fragment offset
|
||||
* @page: the page to set
|
||||
*
|
||||
* Sets the @f'th fragment of @skb to contain @page.
|
||||
*/
|
||||
static inline void skb_frag_set_page(struct sk_buff *skb, int f,
|
||||
struct page *page)
|
||||
{
|
||||
__skb_frag_set_page(&skb_shinfo(skb)->frags[f], page);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_frag_dma_map - maps a paged fragment via the DMA API
|
||||
* @device: the device to map the fragment to
|
||||
* @frag: the paged fragment to map
|
||||
* @offset: the offset within the fragment (starting at the
|
||||
* fragment's own offset)
|
||||
* @size: the number of bytes to map
|
||||
* @direction: the direction of the mapping (%PCI_DMA_*)
|
||||
*
|
||||
* Maps the page associated with @frag to @device.
|
||||
*/
|
||||
static inline dma_addr_t skb_frag_dma_map(struct device *dev,
|
||||
const skb_frag_t *frag,
|
||||
size_t offset, size_t size,
|
||||
enum dma_data_direction dir)
|
||||
{
|
||||
return dma_map_page(dev, skb_frag_page(frag),
|
||||
frag->page_offset + offset, size, dir);
|
||||
}
|
||||
|
||||
/**
|
||||
* skb_clone_writable - is the header of a clone writable
|
||||
* @skb: buffer to check
|
||||
|
|
@ -1636,7 +1832,7 @@ static inline void netdev_free_page(struct net_device *dev, struct page *page)
|
|||
* Returns true if modifying the header part of the cloned buffer
|
||||
* does not requires the data to be copied.
|
||||
*/
|
||||
static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len)
|
||||
static inline int skb_clone_writable(const struct sk_buff *skb, unsigned int len)
|
||||
{
|
||||
return !skb_header_cloned(skb) &&
|
||||
skb_headroom(skb) + len <= skb->hdr_len;
|
||||
|
|
@ -1730,13 +1926,13 @@ static inline int skb_add_data(struct sk_buff *skb,
|
|||
}
|
||||
|
||||
static inline int skb_can_coalesce(struct sk_buff *skb, int i,
|
||||
struct page *page, int off)
|
||||
const struct page *page, int off)
|
||||
{
|
||||
if (i) {
|
||||
struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1];
|
||||
const struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1];
|
||||
|
||||
return page == frag->page &&
|
||||
off == frag->page_offset + frag->size;
|
||||
return page == skb_frag_page(frag) &&
|
||||
off == frag->page_offset + skb_frag_size(frag);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2020,8 +2216,13 @@ static inline bool skb_defer_rx_timestamp(struct sk_buff *skb)
|
|||
/**
|
||||
* skb_complete_tx_timestamp() - deliver cloned skb with tx timestamps
|
||||
*
|
||||
* PHY drivers may accept clones of transmitted packets for
|
||||
* timestamping via their phy_driver.txtstamp method. These drivers
|
||||
* must call this function to return the skb back to the stack, with
|
||||
* or without a timestamp.
|
||||
*
|
||||
* @skb: clone of the the original outgoing packet
|
||||
* @hwtstamps: hardware time stamps
|
||||
* @hwtstamps: hardware time stamps, may be NULL if not available
|
||||
*
|
||||
*/
|
||||
void skb_complete_tx_timestamp(struct sk_buff *skb,
|
||||
|
|
@ -2257,7 +2458,8 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb)
|
|||
{
|
||||
/* LRO sets gso_size but not gso_type, whereas if GSO is really
|
||||
* wanted then gso_type will be set. */
|
||||
struct skb_shared_info *shinfo = skb_shinfo(skb);
|
||||
const struct skb_shared_info *shinfo = skb_shinfo(skb);
|
||||
|
||||
if (skb_is_nonlinear(skb) && shinfo->gso_size != 0 &&
|
||||
unlikely(shinfo->gso_type == 0)) {
|
||||
__skb_warn_lro_forwarding(skb);
|
||||
|
|
@ -2281,7 +2483,7 @@ static inline void skb_forward_csum(struct sk_buff *skb)
|
|||
* Instead of forcing ip_summed to CHECKSUM_NONE, we can
|
||||
* use this helper, to document places where we make this assertion.
|
||||
*/
|
||||
static inline void skb_checksum_none_assert(struct sk_buff *skb)
|
||||
static inline void skb_checksum_none_assert(const struct sk_buff *skb)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
BUG_ON(skb->ip_summed != CHECKSUM_NONE);
|
||||
|
|
@ -2290,5 +2492,25 @@ static inline void skb_checksum_none_assert(struct sk_buff *skb)
|
|||
|
||||
bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off);
|
||||
|
||||
static inline bool skb_is_recycleable(const struct sk_buff *skb, int skb_size)
|
||||
{
|
||||
if (irqs_disabled())
|
||||
return false;
|
||||
|
||||
if (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY)
|
||||
return false;
|
||||
|
||||
if (skb_is_nonlinear(skb) || skb->fclone != SKB_FCLONE_UNAVAILABLE)
|
||||
return false;
|
||||
|
||||
skb_size = SKB_DATA_ALIGN(skb_size + NET_SKB_PAD);
|
||||
if (skb_end_pointer(skb) - skb->head < skb_size)
|
||||
return false;
|
||||
|
||||
if (skb_shared(skb) || skb_cloned(skb))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_SKBUFF_H */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ struct ssb_sprom {
|
|||
u8 et1phyaddr; /* MII address for enet1 */
|
||||
u8 et0mdcport; /* MDIO for enet0 */
|
||||
u8 et1mdcport; /* MDIO for enet1 */
|
||||
u8 board_rev; /* Board revision number from SPROM. */
|
||||
u16 board_rev; /* Board revision number from SPROM. */
|
||||
u8 country_code; /* Country Code */
|
||||
u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */
|
||||
u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */
|
||||
|
|
|
|||
|
|
@ -462,6 +462,46 @@
|
|||
#define SSB_SPROM8_OFDM5GLPO 0x014A /* 5.2GHz OFDM power offset */
|
||||
#define SSB_SPROM8_OFDM5GHPO 0x014E /* 5.8GHz OFDM power offset */
|
||||
|
||||
/* Values for boardflags_lo read from SPROM */
|
||||
#define SSB_BFL_BTCOEXIST 0x0001 /* implements Bluetooth coexistance */
|
||||
#define SSB_BFL_PACTRL 0x0002 /* GPIO 9 controlling the PA */
|
||||
#define SSB_BFL_AIRLINEMODE 0x0004 /* implements GPIO 13 radio disable indication */
|
||||
#define SSB_BFL_RSSI 0x0008 /* software calculates nrssi slope. */
|
||||
#define SSB_BFL_ENETSPI 0x0010 /* has ephy roboswitch spi */
|
||||
#define SSB_BFL_XTAL_NOSLOW 0x0020 /* no slow clock available */
|
||||
#define SSB_BFL_CCKHIPWR 0x0040 /* can do high power CCK transmission */
|
||||
#define SSB_BFL_ENETADM 0x0080 /* has ADMtek switch */
|
||||
#define SSB_BFL_ENETVLAN 0x0100 /* can do vlan */
|
||||
#define SSB_BFL_AFTERBURNER 0x0200 /* supports Afterburner mode */
|
||||
#define SSB_BFL_NOPCI 0x0400 /* board leaves PCI floating */
|
||||
#define SSB_BFL_FEM 0x0800 /* supports the Front End Module */
|
||||
#define SSB_BFL_EXTLNA 0x1000 /* has an external LNA */
|
||||
#define SSB_BFL_HGPA 0x2000 /* had high gain PA */
|
||||
#define SSB_BFL_BTCMOD 0x4000 /* BFL_BTCOEXIST is given in alternate GPIOs */
|
||||
#define SSB_BFL_ALTIQ 0x8000 /* alternate I/Q settings */
|
||||
|
||||
/* Values for boardflags_hi read from SPROM */
|
||||
#define SSB_BFH_NOPA 0x0001 /* has no PA */
|
||||
#define SSB_BFH_RSSIINV 0x0002 /* RSSI uses positive slope (not TSSI) */
|
||||
#define SSB_BFH_PAREF 0x0004 /* uses the PARef LDO */
|
||||
#define SSB_BFH_3TSWITCH 0x0008 /* uses a triple throw switch shared with bluetooth */
|
||||
#define SSB_BFH_PHASESHIFT 0x0010 /* can support phase shifter */
|
||||
#define SSB_BFH_BUCKBOOST 0x0020 /* has buck/booster */
|
||||
#define SSB_BFH_FEM_BT 0x0040 /* has FEM and switch to share antenna with bluetooth */
|
||||
|
||||
/* Values for boardflags2_lo read from SPROM */
|
||||
#define SSB_BFL2_RXBB_INT_REG_DIS 0x0001 /* external RX BB regulator present */
|
||||
#define SSB_BFL2_APLL_WAR 0x0002 /* alternative A-band PLL settings implemented */
|
||||
#define SSB_BFL2_TXPWRCTRL_EN 0x0004 /* permits enabling TX Power Control */
|
||||
#define SSB_BFL2_2X4_DIV 0x0008 /* 2x4 diversity switch */
|
||||
#define SSB_BFL2_5G_PWRGAIN 0x0010 /* supports 5G band power gain */
|
||||
#define SSB_BFL2_PCIEWAR_OVR 0x0020 /* overrides ASPM and Clkreq settings */
|
||||
#define SSB_BFL2_CAESERS_BRD 0x0040 /* is Caesers board (unused) */
|
||||
#define SSB_BFL2_BTC3WIRE 0x0080 /* used 3-wire bluetooth coexist */
|
||||
#define SSB_BFL2_SKWRKFEM_BRD 0x0100 /* 4321mcm93 uses Skyworks FEM */
|
||||
#define SSB_BFL2_SPUR_WAR 0x0200 /* has a workaround for clock-harmonic spurs */
|
||||
#define SSB_BFL2_GPLL_WAR 0x0400 /* altenative G-band PLL settings implemented */
|
||||
|
||||
/* Values for SSB_SPROM1_BINF_CCODE */
|
||||
enum {
|
||||
SSB_SPROM1CCODE_WORLD = 0,
|
||||
|
|
|
|||
132
include/linux/sungem_phy.h
Normal file
132
include/linux/sungem_phy.h
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
#ifndef __SUNGEM_PHY_H__
|
||||
#define __SUNGEM_PHY_H__
|
||||
|
||||
struct mii_phy;
|
||||
|
||||
/* Operations supported by any kind of PHY */
|
||||
struct mii_phy_ops
|
||||
{
|
||||
int (*init)(struct mii_phy *phy);
|
||||
int (*suspend)(struct mii_phy *phy);
|
||||
int (*setup_aneg)(struct mii_phy *phy, u32 advertise);
|
||||
int (*setup_forced)(struct mii_phy *phy, int speed, int fd);
|
||||
int (*poll_link)(struct mii_phy *phy);
|
||||
int (*read_link)(struct mii_phy *phy);
|
||||
int (*enable_fiber)(struct mii_phy *phy, int autoneg);
|
||||
};
|
||||
|
||||
/* Structure used to statically define an mii/gii based PHY */
|
||||
struct mii_phy_def
|
||||
{
|
||||
u32 phy_id; /* Concatenated ID1 << 16 | ID2 */
|
||||
u32 phy_id_mask; /* Significant bits */
|
||||
u32 features; /* Ethtool SUPPORTED_* defines */
|
||||
int magic_aneg; /* Autoneg does all speed test for us */
|
||||
const char* name;
|
||||
const struct mii_phy_ops* ops;
|
||||
};
|
||||
|
||||
enum {
|
||||
BCM54XX_COPPER,
|
||||
BCM54XX_FIBER,
|
||||
BCM54XX_GBIC,
|
||||
BCM54XX_SGMII,
|
||||
BCM54XX_UNKNOWN,
|
||||
};
|
||||
|
||||
/* An instance of a PHY, partially borrowed from mii_if_info */
|
||||
struct mii_phy
|
||||
{
|
||||
struct mii_phy_def* def;
|
||||
u32 advertising;
|
||||
int mii_id;
|
||||
|
||||
/* 1: autoneg enabled, 0: disabled */
|
||||
int autoneg;
|
||||
|
||||
/* forced speed & duplex (no autoneg)
|
||||
* partner speed & duplex & pause (autoneg)
|
||||
*/
|
||||
int speed;
|
||||
int duplex;
|
||||
int pause;
|
||||
|
||||
/* Provided by host chip */
|
||||
struct net_device *dev;
|
||||
int (*mdio_read) (struct net_device *dev, int mii_id, int reg);
|
||||
void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val);
|
||||
void *platform_data;
|
||||
};
|
||||
|
||||
/* Pass in a struct mii_phy with dev, mdio_read and mdio_write
|
||||
* filled, the remaining fields will be filled on return
|
||||
*/
|
||||
extern int sungem_phy_probe(struct mii_phy *phy, int mii_id);
|
||||
|
||||
|
||||
/* MII definitions missing from mii.h */
|
||||
|
||||
#define BMCR_SPD2 0x0040 /* Gigabit enable (bcm54xx) */
|
||||
#define LPA_PAUSE 0x0400
|
||||
|
||||
/* More PHY registers (model specific) */
|
||||
|
||||
/* MII BCM5201 MULTIPHY interrupt register */
|
||||
#define MII_BCM5201_INTERRUPT 0x1A
|
||||
#define MII_BCM5201_INTERRUPT_INTENABLE 0x4000
|
||||
|
||||
#define MII_BCM5201_AUXMODE2 0x1B
|
||||
#define MII_BCM5201_AUXMODE2_LOWPOWER 0x0008
|
||||
|
||||
#define MII_BCM5201_MULTIPHY 0x1E
|
||||
|
||||
/* MII BCM5201 MULTIPHY register bits */
|
||||
#define MII_BCM5201_MULTIPHY_SERIALMODE 0x0002
|
||||
#define MII_BCM5201_MULTIPHY_SUPERISOLATE 0x0008
|
||||
|
||||
/* MII BCM5221 Additional registers */
|
||||
#define MII_BCM5221_TEST 0x1f
|
||||
#define MII_BCM5221_TEST_ENABLE_SHADOWS 0x0080
|
||||
#define MII_BCM5221_SHDOW_AUX_STAT2 0x1b
|
||||
#define MII_BCM5221_SHDOW_AUX_STAT2_APD 0x0020
|
||||
#define MII_BCM5221_SHDOW_AUX_MODE4 0x1a
|
||||
#define MII_BCM5221_SHDOW_AUX_MODE4_IDDQMODE 0x0001
|
||||
#define MII_BCM5221_SHDOW_AUX_MODE4_CLKLOPWR 0x0004
|
||||
|
||||
/* MII BCM5241 Additional registers */
|
||||
#define MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR 0x0008
|
||||
|
||||
/* MII BCM5400 1000-BASET Control register */
|
||||
#define MII_BCM5400_GB_CONTROL 0x09
|
||||
#define MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP 0x0200
|
||||
|
||||
/* MII BCM5400 AUXCONTROL register */
|
||||
#define MII_BCM5400_AUXCONTROL 0x18
|
||||
#define MII_BCM5400_AUXCONTROL_PWR10BASET 0x0004
|
||||
|
||||
/* MII BCM5400 AUXSTATUS register */
|
||||
#define MII_BCM5400_AUXSTATUS 0x19
|
||||
#define MII_BCM5400_AUXSTATUS_LINKMODE_MASK 0x0700
|
||||
#define MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT 8
|
||||
|
||||
/* 1000BT control (Marvell & BCM54xx at least) */
|
||||
#define MII_1000BASETCONTROL 0x09
|
||||
#define MII_1000BASETCONTROL_FULLDUPLEXCAP 0x0200
|
||||
#define MII_1000BASETCONTROL_HALFDUPLEXCAP 0x0100
|
||||
|
||||
/* Marvell 88E1011 PHY control */
|
||||
#define MII_M1011_PHY_SPEC_CONTROL 0x10
|
||||
#define MII_M1011_PHY_SPEC_CONTROL_MANUAL_MDIX 0x20
|
||||
#define MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX 0x40
|
||||
|
||||
/* Marvell 88E1011 PHY status */
|
||||
#define MII_M1011_PHY_SPEC_STATUS 0x11
|
||||
#define MII_M1011_PHY_SPEC_STATUS_1000 0x8000
|
||||
#define MII_M1011_PHY_SPEC_STATUS_100 0x4000
|
||||
#define MII_M1011_PHY_SPEC_STATUS_SPD_MASK 0xc000
|
||||
#define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX 0x2000
|
||||
#define MII_M1011_PHY_SPEC_STATUS_RESOLVED 0x0800
|
||||
#define MII_M1011_PHY_SPEC_STATUS_TX_PAUSE 0x0008
|
||||
#define MII_M1011_PHY_SPEC_STATUS_RX_PAUSE 0x0004
|
||||
|
||||
#endif /* __SUNGEM_PHY_H__ */
|
||||
|
|
@ -435,7 +435,7 @@ enum {
|
|||
NET_IPV4_ROUTE_MAX_SIZE=5,
|
||||
NET_IPV4_ROUTE_GC_MIN_INTERVAL=6,
|
||||
NET_IPV4_ROUTE_GC_TIMEOUT=7,
|
||||
NET_IPV4_ROUTE_GC_INTERVAL=8,
|
||||
NET_IPV4_ROUTE_GC_INTERVAL=8, /* obsolete since 2.6.38 */
|
||||
NET_IPV4_ROUTE_REDIRECT_LOAD=9,
|
||||
NET_IPV4_ROUTE_REDIRECT_NUMBER=10,
|
||||
NET_IPV4_ROUTE_REDIRECT_SILENCE=11,
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ struct bin_attribute {
|
|||
struct sysfs_ops {
|
||||
ssize_t (*show)(struct kobject *, struct attribute *,char *);
|
||||
ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
|
||||
const void *(*namespace)(struct kobject *, const struct attribute *);
|
||||
};
|
||||
|
||||
struct sysfs_dirent;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ enum {
|
|||
#define TCPI_OPT_TIMESTAMPS 1
|
||||
#define TCPI_OPT_SACK 2
|
||||
#define TCPI_OPT_WSCALE 4
|
||||
#define TCPI_OPT_ECN 8
|
||||
#define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */
|
||||
#define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */
|
||||
|
||||
enum tcp_ca_state {
|
||||
TCP_CA_Open = 0,
|
||||
|
|
@ -379,6 +380,10 @@ struct tcp_sock {
|
|||
u32 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
|
||||
u32 snd_cwnd_used;
|
||||
u32 snd_cwnd_stamp;
|
||||
u32 prior_cwnd; /* Congestion window at start of Recovery. */
|
||||
u32 prr_delivered; /* Number of newly delivered packets to
|
||||
* receiver in Recovery. */
|
||||
u32 prr_out; /* Total number of pkts sent during Recovery. */
|
||||
|
||||
u32 rcv_wnd; /* Current receiver window */
|
||||
u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@
|
|||
#include <linux/string.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#ifndef __KERNEL__
|
||||
#include <arpa/inet.h> /* for ntohs etc. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Configuration
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
#ifndef _LINUX_UN_H
|
||||
#define _LINUX_UN_H
|
||||
|
||||
#include <linux/socket.h>
|
||||
|
||||
#define UNIX_PATH_MAX 108
|
||||
|
||||
struct sockaddr_un {
|
||||
sa_family_t sun_family; /* AF_UNIX */
|
||||
__kernel_sa_family_t sun_family; /* AF_UNIX */
|
||||
char sun_path[UNIX_PATH_MAX]; /* pathname */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ struct virtqueue {
|
|||
* virtqueue_detach_unused_buf: detach first unused buffer
|
||||
* vq: the struct virtqueue we're talking about.
|
||||
* Returns NULL or the "data" token handed to add_buf
|
||||
* virtqueue_get_vring_size: return the size of the virtqueue's vring
|
||||
* vq: the struct virtqueue containing the vring of interest.
|
||||
* Returns the size of the vring.
|
||||
*
|
||||
* Locking rules are straightforward: the driver is responsible for
|
||||
* locking. No two operations may be invoked simultaneously, with the exception
|
||||
|
|
@ -97,6 +100,8 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *vq);
|
|||
|
||||
void *virtqueue_detach_unused_buf(struct virtqueue *vq);
|
||||
|
||||
unsigned int virtqueue_get_vring_size(struct virtqueue *vq);
|
||||
|
||||
/**
|
||||
* virtio_device - representation of a device using virtio
|
||||
* @index: unique position on the virtio bus
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#define X25_KERNEL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/socket.h>
|
||||
|
||||
#define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0)
|
||||
#define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1)
|
||||
|
|
@ -57,7 +58,7 @@ struct x25_address {
|
|||
* Linux X.25 Address structure, used for bind, and connect mostly.
|
||||
*/
|
||||
struct sockaddr_x25 {
|
||||
sa_family_t sx25_family; /* Must be AF_X25 */
|
||||
__kernel_sa_family_t sx25_family; /* Must be AF_X25 */
|
||||
struct x25_address sx25_addr; /* X.121 Address */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue