diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 07:25:22 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-25 07:25:22 -0400 |
| commit | 8a9ea3237e7eb5c25f09e429ad242ae5a3d5ea22 (patch) | |
| tree | a0a63398a9983667d52cbbbf4e2405b4f22b1d83 /include/linux | |
| parent | 1be025d3cb40cd295123af2c394f7229ef9b30ca (diff) | |
| parent | 8b3408f8ee994973869d8ba32c5bf482bc4ddca4 (diff) | |
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.
Diffstat (limited to 'include/linux')
72 files changed, 1634 insertions, 339 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index d34c187432ed..f57c36881c48 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
| 6 | #include <linux/socket.h> | ||
| 6 | 7 | ||
| 7 | /* | 8 | /* |
| 8 | * AppleTalk networking structures | 9 | * AppleTalk networking structures |
| @@ -28,7 +29,7 @@ struct atalk_addr { | |||
| 28 | }; | 29 | }; |
| 29 | 30 | ||
| 30 | struct sockaddr_at { | 31 | struct sockaddr_at { |
| 31 | sa_family_t sat_family; | 32 | __kernel_sa_family_t sat_family; |
| 32 | __u8 sat_port; | 33 | __u8 sat_port; |
| 33 | struct atalk_addr sat_addr; | 34 | struct atalk_addr sat_addr; |
| 34 | char sat_zero[8]; | 35 | char sat_zero[8]; |
diff --git a/include/linux/ax25.h b/include/linux/ax25.h index 56c11f0dbd80..74c89a41732d 100644 --- a/include/linux/ax25.h +++ b/include/linux/ax25.h | |||
| @@ -47,7 +47,7 @@ typedef struct { | |||
| 47 | } ax25_address; | 47 | } ax25_address; |
| 48 | 48 | ||
| 49 | struct sockaddr_ax25 { | 49 | struct sockaddr_ax25 { |
| 50 | sa_family_t sax25_family; | 50 | __kernel_sa_family_t sax25_family; |
| 51 | ax25_address sax25_call; | 51 | ax25_address sax25_call; |
| 52 | int sax25_ndigis; | 52 | int sax25_ndigis; |
| 53 | /* Digipeater ax25_address sets follow */ | 53 | /* Digipeater ax25_address sets follow */ |
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 8c96654bef16..5dbd7055cb86 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/bcma/bcma_driver_chipcommon.h> | 7 | #include <linux/bcma/bcma_driver_chipcommon.h> |
| 8 | #include <linux/bcma/bcma_driver_pci.h> | 8 | #include <linux/bcma/bcma_driver_pci.h> |
| 9 | #include <linux/bcma/bcma_driver_mips.h> | ||
| 9 | #include <linux/ssb/ssb.h> /* SPROM sharing */ | 10 | #include <linux/ssb/ssb.h> /* SPROM sharing */ |
| 10 | 11 | ||
| 11 | #include "bcma_regs.h" | 12 | #include "bcma_regs.h" |
| @@ -14,9 +15,9 @@ struct bcma_device; | |||
| 14 | struct bcma_bus; | 15 | struct bcma_bus; |
| 15 | 16 | ||
| 16 | enum bcma_hosttype { | 17 | enum bcma_hosttype { |
| 17 | BCMA_HOSTTYPE_NONE, | ||
| 18 | BCMA_HOSTTYPE_PCI, | 18 | BCMA_HOSTTYPE_PCI, |
| 19 | BCMA_HOSTTYPE_SDIO, | 19 | BCMA_HOSTTYPE_SDIO, |
| 20 | BCMA_HOSTTYPE_SOC, | ||
| 20 | }; | 21 | }; |
| 21 | 22 | ||
| 22 | struct bcma_chipinfo { | 23 | struct bcma_chipinfo { |
| @@ -130,6 +131,7 @@ struct bcma_device { | |||
| 130 | 131 | ||
| 131 | struct device dev; | 132 | struct device dev; |
| 132 | struct device *dma_dev; | 133 | struct device *dma_dev; |
| 134 | |||
| 133 | unsigned int irq; | 135 | unsigned int irq; |
| 134 | bool dev_registered; | 136 | bool dev_registered; |
| 135 | 137 | ||
| @@ -138,6 +140,9 @@ struct bcma_device { | |||
| 138 | u32 addr; | 140 | u32 addr; |
| 139 | u32 wrap; | 141 | u32 wrap; |
| 140 | 142 | ||
| 143 | void __iomem *io_addr; | ||
| 144 | void __iomem *io_wrap; | ||
| 145 | |||
| 141 | void *drvdata; | 146 | void *drvdata; |
| 142 | struct list_head list; | 147 | struct list_head list; |
| 143 | }; | 148 | }; |
| @@ -190,9 +195,11 @@ struct bcma_bus { | |||
| 190 | struct bcma_device *mapped_core; | 195 | struct bcma_device *mapped_core; |
| 191 | struct list_head cores; | 196 | struct list_head cores; |
| 192 | u8 nr_cores; | 197 | u8 nr_cores; |
| 198 | u8 init_done:1; | ||
| 193 | 199 | ||
| 194 | struct bcma_drv_cc drv_cc; | 200 | struct bcma_drv_cc drv_cc; |
| 195 | struct bcma_drv_pci drv_pci; | 201 | struct bcma_drv_pci drv_pci; |
| 202 | struct bcma_drv_mips drv_mips; | ||
| 196 | 203 | ||
| 197 | /* We decided to share SPROM struct with SSB as long as we do not need | 204 | /* We decided to share SPROM struct with SSB as long as we do not need |
| 198 | * any hacks for BCMA. This simplifies drivers code. */ | 205 | * any hacks for BCMA. This simplifies drivers code. */ |
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index a0f684615ae5..1526d965ed06 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ | 24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ |
| 25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ | 25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ |
| 26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ | 26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ |
| 27 | #define BCMA_CC_FLASHT_NFLASH 0x00000200 | ||
| 27 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ | 28 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ |
| 28 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ | 29 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ |
| 29 | #define BCMA_PLLTYPE_NONE 0x00000000 | 30 | #define BCMA_PLLTYPE_NONE 0x00000000 |
| @@ -178,6 +179,7 @@ | |||
| 178 | #define BCMA_CC_PROG_CFG 0x0120 | 179 | #define BCMA_CC_PROG_CFG 0x0120 |
| 179 | #define BCMA_CC_PROG_WAITCNT 0x0124 | 180 | #define BCMA_CC_PROG_WAITCNT 0x0124 |
| 180 | #define BCMA_CC_FLASH_CFG 0x0128 | 181 | #define BCMA_CC_FLASH_CFG 0x0128 |
| 182 | #define BCMA_CC_FLASH_CFG_DS 0x0010 /* Data size, 0=8bit, 1=16bit */ | ||
| 181 | #define BCMA_CC_FLASH_WAITCNT 0x012C | 183 | #define BCMA_CC_FLASH_WAITCNT 0x012C |
| 182 | /* 0x1E0 is defined as shared BCMA_CLKCTLST */ | 184 | /* 0x1E0 is defined as shared BCMA_CLKCTLST */ |
| 183 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | 185 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ |
| @@ -239,6 +241,64 @@ | |||
| 239 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ | 241 | #define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ |
| 240 | #define BCMA_CC_SPROM_PCIE6 0x0830 /* SPROM beginning on PCIe rev >= 6 */ | 242 | #define BCMA_CC_SPROM_PCIE6 0x0830 /* SPROM beginning on PCIe rev >= 6 */ |
| 241 | 243 | ||
| 244 | /* Divider allocation in 4716/47162/5356 */ | ||
| 245 | #define BCMA_CC_PMU5_MAINPLL_CPU 1 | ||
| 246 | #define BCMA_CC_PMU5_MAINPLL_MEM 2 | ||
| 247 | #define BCMA_CC_PMU5_MAINPLL_SSB 3 | ||
| 248 | |||
| 249 | /* PLL usage in 4716/47162 */ | ||
| 250 | #define BCMA_CC_PMU4716_MAINPLL_PLL0 12 | ||
| 251 | |||
| 252 | /* PLL usage in 5356/5357 */ | ||
| 253 | #define BCMA_CC_PMU5356_MAINPLL_PLL0 0 | ||
| 254 | #define BCMA_CC_PMU5357_MAINPLL_PLL0 0 | ||
| 255 | |||
| 256 | /* 4706 PMU */ | ||
| 257 | #define BCMA_CC_PMU4706_MAINPLL_PLL0 0 | ||
| 258 | |||
| 259 | /* ALP clock on pre-PMU chips */ | ||
| 260 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 | ||
| 261 | /* HT clock for systems with PMU-enabled chipcommon */ | ||
| 262 | #define BCMA_CC_PMU_HT_CLOCK 80000000 | ||
| 263 | |||
| 264 | /* PMU rev 5 (& 6) */ | ||
| 265 | #define BCMA_CC_PPL_P1P2_OFF 0 | ||
| 266 | #define BCMA_CC_PPL_P1_MASK 0x0f000000 | ||
| 267 | #define BCMA_CC_PPL_P1_SHIFT 24 | ||
| 268 | #define BCMA_CC_PPL_P2_MASK 0x00f00000 | ||
| 269 | #define BCMA_CC_PPL_P2_SHIFT 20 | ||
| 270 | #define BCMA_CC_PPL_M14_OFF 1 | ||
| 271 | #define BCMA_CC_PPL_MDIV_MASK 0x000000ff | ||
| 272 | #define BCMA_CC_PPL_MDIV_WIDTH 8 | ||
| 273 | #define BCMA_CC_PPL_NM5_OFF 2 | ||
| 274 | #define BCMA_CC_PPL_NDIV_MASK 0xfff00000 | ||
| 275 | #define BCMA_CC_PPL_NDIV_SHIFT 20 | ||
| 276 | #define BCMA_CC_PPL_FMAB_OFF 3 | ||
| 277 | #define BCMA_CC_PPL_MRAT_MASK 0xf0000000 | ||
| 278 | #define BCMA_CC_PPL_MRAT_SHIFT 28 | ||
| 279 | #define BCMA_CC_PPL_ABRAT_MASK 0x08000000 | ||
| 280 | #define BCMA_CC_PPL_ABRAT_SHIFT 27 | ||
| 281 | #define BCMA_CC_PPL_FDIV_MASK 0x07ffffff | ||
| 282 | #define BCMA_CC_PPL_PLLCTL_OFF 4 | ||
| 283 | #define BCMA_CC_PPL_PCHI_OFF 5 | ||
| 284 | #define BCMA_CC_PPL_PCHI_MASK 0x0000003f | ||
| 285 | |||
| 286 | /* BCM4331 ChipControl numbers. */ | ||
| 287 | #define BCMA_CHIPCTL_4331_BT_COEXIST BIT(0) /* 0 disable */ | ||
| 288 | #define BCMA_CHIPCTL_4331_SECI BIT(1) /* 0 SECI is disabled (JATG functional) */ | ||
| 289 | #define BCMA_CHIPCTL_4331_EXT_LNA BIT(2) /* 0 disable */ | ||
| 290 | #define BCMA_CHIPCTL_4331_SPROM_GPIO13_15 BIT(3) /* sprom/gpio13-15 mux */ | ||
| 291 | #define BCMA_CHIPCTL_4331_EXTPA_EN BIT(4) /* 0 ext pa disable, 1 ext pa enabled */ | ||
| 292 | #define BCMA_CHIPCTL_4331_GPIOCLK_ON_SPROMCS BIT(5) /* set drive out GPIO_CLK on sprom_cs pin */ | ||
| 293 | #define BCMA_CHIPCTL_4331_PCIE_MDIO_ON_SPROMCS BIT(6) /* use sprom_cs pin as PCIE mdio interface */ | ||
| 294 | #define BCMA_CHIPCTL_4331_EXTPA_ON_GPIO2_5 BIT(7) /* aband extpa will be at gpio2/5 and sprom_dout */ | ||
| 295 | #define BCMA_CHIPCTL_4331_OVR_PIPEAUXCLKEN BIT(8) /* override core control on pipe_AuxClkEnable */ | ||
| 296 | #define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN BIT(9) /* override core control on pipe_AuxPowerDown */ | ||
| 297 | #define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN BIT(10) /* pcie_auxclkenable */ | ||
| 298 | #define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN BIT(11) /* pcie_pipe_pllpowerdown */ | ||
| 299 | #define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4 BIT(16) /* enable bt_shd0 at gpio4 */ | ||
| 300 | #define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5 BIT(17) /* enable bt_shd1 at gpio5 */ | ||
| 301 | |||
| 242 | /* Data for the PMU, if available. | 302 | /* Data for the PMU, if available. |
| 243 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 303 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |
| 244 | */ | 304 | */ |
| @@ -247,14 +307,37 @@ struct bcma_chipcommon_pmu { | |||
| 247 | u32 crystalfreq; /* The active crystal frequency (in kHz) */ | 307 | u32 crystalfreq; /* The active crystal frequency (in kHz) */ |
| 248 | }; | 308 | }; |
| 249 | 309 | ||
| 310 | #ifdef CONFIG_BCMA_DRIVER_MIPS | ||
| 311 | struct bcma_pflash { | ||
| 312 | u8 buswidth; | ||
| 313 | u32 window; | ||
| 314 | u32 window_size; | ||
| 315 | }; | ||
| 316 | |||
| 317 | struct bcma_serial_port { | ||
| 318 | void *regs; | ||
| 319 | unsigned long clockspeed; | ||
| 320 | unsigned int irq; | ||
| 321 | unsigned int baud_base; | ||
| 322 | unsigned int reg_shift; | ||
| 323 | }; | ||
| 324 | #endif /* CONFIG_BCMA_DRIVER_MIPS */ | ||
| 325 | |||
| 250 | struct bcma_drv_cc { | 326 | struct bcma_drv_cc { |
| 251 | struct bcma_device *core; | 327 | struct bcma_device *core; |
| 252 | u32 status; | 328 | u32 status; |
| 253 | u32 capabilities; | 329 | u32 capabilities; |
| 254 | u32 capabilities_ext; | 330 | u32 capabilities_ext; |
| 331 | u8 setup_done:1; | ||
| 255 | /* Fast Powerup Delay constant */ | 332 | /* Fast Powerup Delay constant */ |
| 256 | u16 fast_pwrup_delay; | 333 | u16 fast_pwrup_delay; |
| 257 | struct bcma_chipcommon_pmu pmu; | 334 | struct bcma_chipcommon_pmu pmu; |
| 335 | #ifdef CONFIG_BCMA_DRIVER_MIPS | ||
| 336 | struct bcma_pflash pflash; | ||
| 337 | |||
| 338 | int nr_serial_ports; | ||
| 339 | struct bcma_serial_port serial_ports[4]; | ||
| 340 | #endif /* CONFIG_BCMA_DRIVER_MIPS */ | ||
| 258 | }; | 341 | }; |
| 259 | 342 | ||
| 260 | /* Register access */ | 343 | /* Register access */ |
| @@ -275,6 +358,8 @@ extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); | |||
| 275 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); | 358 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); |
| 276 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); | 359 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); |
| 277 | 360 | ||
| 361 | void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable); | ||
| 362 | |||
| 278 | extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, | 363 | extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, |
| 279 | u32 ticks); | 364 | u32 ticks); |
| 280 | 365 | ||
| @@ -293,4 +378,13 @@ u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); | |||
| 293 | /* PMU support */ | 378 | /* PMU support */ |
| 294 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); | 379 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); |
| 295 | 380 | ||
| 381 | extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, | ||
| 382 | u32 value); | ||
| 383 | extern void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset, | ||
| 384 | u32 mask, u32 set); | ||
| 385 | extern void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc, | ||
| 386 | u32 offset, u32 mask, u32 set); | ||
| 387 | extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, | ||
| 388 | u32 offset, u32 mask, u32 set); | ||
| 389 | |||
| 296 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ | 390 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ |
diff --git a/include/linux/bcma/bcma_driver_mips.h b/include/linux/bcma/bcma_driver_mips.h new file mode 100644 index 000000000000..c0043645cdcb --- /dev/null +++ b/include/linux/bcma/bcma_driver_mips.h | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | #ifndef LINUX_BCMA_DRIVER_MIPS_H_ | ||
| 2 | #define LINUX_BCMA_DRIVER_MIPS_H_ | ||
| 3 | |||
| 4 | #define BCMA_MIPS_IPSFLAG 0x0F08 | ||
| 5 | /* which sbflags get routed to mips interrupt 1 */ | ||
| 6 | #define BCMA_MIPS_IPSFLAG_IRQ1 0x0000003F | ||
| 7 | #define BCMA_MIPS_IPSFLAG_IRQ1_SHIFT 0 | ||
| 8 | /* which sbflags get routed to mips interrupt 2 */ | ||
| 9 | #define BCMA_MIPS_IPSFLAG_IRQ2 0x00003F00 | ||
| 10 | #define BCMA_MIPS_IPSFLAG_IRQ2_SHIFT 8 | ||
| 11 | /* which sbflags get routed to mips interrupt 3 */ | ||
| 12 | #define BCMA_MIPS_IPSFLAG_IRQ3 0x003F0000 | ||
| 13 | #define BCMA_MIPS_IPSFLAG_IRQ3_SHIFT 16 | ||
| 14 | /* which sbflags get routed to mips interrupt 4 */ | ||
| 15 | #define BCMA_MIPS_IPSFLAG_IRQ4 0x3F000000 | ||
| 16 | #define BCMA_MIPS_IPSFLAG_IRQ4_SHIFT 24 | ||
| 17 | |||
| 18 | /* MIPS 74K core registers */ | ||
| 19 | #define BCMA_MIPS_MIPS74K_CORECTL 0x0000 | ||
| 20 | #define BCMA_MIPS_MIPS74K_EXCEPTBASE 0x0004 | ||
| 21 | #define BCMA_MIPS_MIPS74K_BIST 0x000C | ||
| 22 | #define BCMA_MIPS_MIPS74K_INTMASK_INT0 0x0014 | ||
| 23 | #define BCMA_MIPS_MIPS74K_INTMASK(int) \ | ||
| 24 | ((int) * 4 + BCMA_MIPS_MIPS74K_INTMASK_INT0) | ||
| 25 | #define BCMA_MIPS_MIPS74K_NMIMASK 0x002C | ||
| 26 | #define BCMA_MIPS_MIPS74K_GPIOSEL 0x0040 | ||
| 27 | #define BCMA_MIPS_MIPS74K_GPIOOUT 0x0044 | ||
| 28 | #define BCMA_MIPS_MIPS74K_GPIOEN 0x0048 | ||
| 29 | #define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0 | ||
| 30 | |||
| 31 | #define BCMA_MIPS_OOBSELOUTA30 0x100 | ||
| 32 | |||
| 33 | struct bcma_device; | ||
| 34 | |||
| 35 | struct bcma_drv_mips { | ||
| 36 | struct bcma_device *core; | ||
| 37 | u8 setup_done:1; | ||
| 38 | unsigned int assigned_irqs; | ||
| 39 | }; | ||
| 40 | |||
| 41 | #ifdef CONFIG_BCMA_DRIVER_MIPS | ||
| 42 | extern void bcma_core_mips_init(struct bcma_drv_mips *mcore); | ||
| 43 | #else | ||
| 44 | static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { } | ||
| 45 | #endif | ||
| 46 | |||
| 47 | extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore); | ||
| 48 | |||
| 49 | extern unsigned int bcma_core_mips_irq(struct bcma_device *dev); | ||
| 50 | |||
| 51 | #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */ | ||
diff --git a/include/linux/bcma/bcma_soc.h b/include/linux/bcma/bcma_soc.h new file mode 100644 index 000000000000..4203c5593b9f --- /dev/null +++ b/include/linux/bcma/bcma_soc.h | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #ifndef LINUX_BCMA_SOC_H_ | ||
| 2 | #define LINUX_BCMA_SOC_H_ | ||
| 3 | |||
| 4 | #include <linux/bcma/bcma.h> | ||
| 5 | |||
| 6 | struct bcma_soc { | ||
| 7 | struct bcma_bus bus; | ||
| 8 | struct bcma_device core_cc; | ||
| 9 | struct bcma_device core_mips; | ||
| 10 | }; | ||
| 11 | |||
| 12 | int __init bcma_host_soc_register(struct bcma_soc *soc); | ||
| 13 | |||
| 14 | int bcma_bus_register(struct bcma_bus *bus); | ||
| 15 | |||
| 16 | #endif /* LINUX_BCMA_SOC_H_ */ | ||
diff --git a/include/linux/caif/caif_socket.h b/include/linux/caif/caif_socket.h index d9cb19b7cff7..3f3bac6af7bc 100644 --- a/include/linux/caif/caif_socket.h +++ b/include/linux/caif/caif_socket.h | |||
| @@ -9,12 +9,7 @@ | |||
| 9 | #define _LINUX_CAIF_SOCKET_H | 9 | #define _LINUX_CAIF_SOCKET_H |
| 10 | 10 | ||
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | |||
| 13 | #ifdef __KERNEL__ | ||
| 14 | #include <linux/socket.h> | 12 | #include <linux/socket.h> |
| 15 | #else | ||
| 16 | #include <sys/socket.h> | ||
| 17 | #endif | ||
| 18 | 13 | ||
| 19 | /** | 14 | /** |
| 20 | * enum caif_link_selector - Physical Link Selection. | 15 | * enum caif_link_selector - Physical Link Selection. |
| @@ -144,7 +139,7 @@ enum caif_debug_service { | |||
| 144 | * CAIF Channel. It defines the service to connect to on the modem. | 139 | * CAIF Channel. It defines the service to connect to on the modem. |
| 145 | */ | 140 | */ |
| 146 | struct sockaddr_caif { | 141 | struct sockaddr_caif { |
| 147 | sa_family_t family; | 142 | __kernel_sa_family_t family; |
| 148 | union { | 143 | union { |
| 149 | struct { | 144 | struct { |
| 150 | __u8 type; /* type: enum caif_at_type */ | 145 | __u8 type; /* type: enum caif_at_type */ |
diff --git a/include/linux/can.h b/include/linux/can.h index d18333302cbd..9a19bcb3eeaf 100644 --- a/include/linux/can.h +++ b/include/linux/can.h | |||
| @@ -8,8 +8,6 @@ | |||
| 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 12 | * | ||
| 13 | */ | 11 | */ |
| 14 | 12 | ||
| 15 | #ifndef CAN_H | 13 | #ifndef CAN_H |
| @@ -78,7 +76,7 @@ struct can_frame { | |||
| 78 | * @can_addr: protocol specific address information | 76 | * @can_addr: protocol specific address information |
| 79 | */ | 77 | */ |
| 80 | struct sockaddr_can { | 78 | struct sockaddr_can { |
| 81 | sa_family_t can_family; | 79 | __kernel_sa_family_t can_family; |
| 82 | int can_ifindex; | 80 | int can_ifindex; |
| 83 | union { | 81 | union { |
| 84 | /* transport protocol class address information (e.g. ISOTP) */ | 82 | /* transport protocol class address information (e.g. ISOTP) */ |
diff --git a/include/linux/can/Kbuild b/include/linux/can/Kbuild index 8cb05aae661c..c62b7f1728f9 100644 --- a/include/linux/can/Kbuild +++ b/include/linux/can/Kbuild | |||
| @@ -1,4 +1,5 @@ | |||
| 1 | header-y += raw.h | 1 | header-y += raw.h |
| 2 | header-y += bcm.h | 2 | header-y += bcm.h |
| 3 | header-y += gw.h | ||
| 3 | header-y += error.h | 4 | header-y += error.h |
| 4 | header-y += netlink.h | 5 | header-y += netlink.h |
diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h index 1432b278c52d..3ebe387fea4d 100644 --- a/include/linux/can/bcm.h +++ b/include/linux/can/bcm.h | |||
| @@ -7,14 +7,13 @@ | |||
| 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 8 | * All rights reserved. | 8 | * All rights reserved. |
| 9 | * | 9 | * |
| 10 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 11 | * | ||
| 12 | */ | 10 | */ |
| 13 | 11 | ||
| 14 | #ifndef CAN_BCM_H | 12 | #ifndef CAN_BCM_H |
| 15 | #define CAN_BCM_H | 13 | #define CAN_BCM_H |
| 16 | 14 | ||
| 17 | #include <linux/types.h> | 15 | #include <linux/types.h> |
| 16 | #include <linux/can.h> | ||
| 18 | 17 | ||
| 19 | /** | 18 | /** |
| 20 | * struct bcm_msg_head - head of messages to/from the broadcast manager | 19 | * struct bcm_msg_head - head of messages to/from the broadcast manager |
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 5ce6b5d62ecc..0ccc1cd28b95 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
| @@ -8,8 +8,6 @@ | |||
| 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 12 | * | ||
| 13 | */ | 11 | */ |
| 14 | 12 | ||
| 15 | #ifndef CAN_CORE_H | 13 | #ifndef CAN_CORE_H |
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index cc0bb4961669..a0969fcb72b9 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | * | 8 | * |
| 9 | * Copyright (C) 2008 Wolfgang Grandegger <wg@grandegger.com> | 9 | * Copyright (C) 2008 Wolfgang Grandegger <wg@grandegger.com> |
| 10 | * | 10 | * |
| 11 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 12 | */ | 11 | */ |
| 13 | 12 | ||
| 14 | #ifndef CAN_DEV_H | 13 | #ifndef CAN_DEV_H |
diff --git a/include/linux/can/error.h b/include/linux/can/error.h index 5958074302a4..63e855ea6b84 100644 --- a/include/linux/can/error.h +++ b/include/linux/can/error.h | |||
| @@ -7,8 +7,6 @@ | |||
| 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 8 | * All rights reserved. | 8 | * All rights reserved. |
| 9 | * | 9 | * |
| 10 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 11 | * | ||
| 12 | */ | 10 | */ |
| 13 | 11 | ||
| 14 | #ifndef CAN_ERROR_H | 12 | #ifndef CAN_ERROR_H |
diff --git a/include/linux/can/gw.h b/include/linux/can/gw.h new file mode 100644 index 000000000000..8e1db18c3cb6 --- /dev/null +++ b/include/linux/can/gw.h | |||
| @@ -0,0 +1,162 @@ | |||
| 1 | /* | ||
| 2 | * linux/can/gw.h | ||
| 3 | * | ||
| 4 | * Definitions for CAN frame Gateway/Router/Bridge | ||
| 5 | * | ||
| 6 | * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> | ||
| 7 | * Copyright (c) 2011 Volkswagen Group Electronic Research | ||
| 8 | * All rights reserved. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef CAN_GW_H | ||
| 13 | #define CAN_GW_H | ||
| 14 | |||
| 15 | #include <linux/types.h> | ||
| 16 | #include <linux/can.h> | ||
| 17 | |||
| 18 | struct rtcanmsg { | ||
| 19 | __u8 can_family; | ||
| 20 | __u8 gwtype; | ||
| 21 | __u16 flags; | ||
| 22 | }; | ||
| 23 | |||
| 24 | /* CAN gateway types */ | ||
| 25 | enum { | ||
| 26 | CGW_TYPE_UNSPEC, | ||
| 27 | CGW_TYPE_CAN_CAN, /* CAN->CAN routing */ | ||
| 28 | __CGW_TYPE_MAX | ||
| 29 | }; | ||
| 30 | |||
| 31 | #define CGW_TYPE_MAX (__CGW_TYPE_MAX - 1) | ||
| 32 | |||
| 33 | /* CAN rtnetlink attribute definitions */ | ||
| 34 | enum { | ||
| 35 | CGW_UNSPEC, | ||
| 36 | CGW_MOD_AND, /* CAN frame modification binary AND */ | ||
| 37 | CGW_MOD_OR, /* CAN frame modification binary OR */ | ||
| 38 | CGW_MOD_XOR, /* CAN frame modification binary XOR */ | ||
| 39 | CGW_MOD_SET, /* CAN frame modification set alternate values */ | ||
| 40 | CGW_CS_XOR, /* set data[] XOR checksum into data[index] */ | ||
| 41 | CGW_CS_CRC8, /* set data[] CRC8 checksum into data[index] */ | ||
| 42 | CGW_HANDLED, /* number of handled CAN frames */ | ||
| 43 | CGW_DROPPED, /* number of dropped CAN frames */ | ||
| 44 | CGW_SRC_IF, /* ifindex of source network interface */ | ||
| 45 | CGW_DST_IF, /* ifindex of destination network interface */ | ||
| 46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ | ||
| 47 | __CGW_MAX | ||
| 48 | }; | ||
| 49 | |||
| 50 | #define CGW_MAX (__CGW_MAX - 1) | ||
| 51 | |||
| 52 | #define CGW_FLAGS_CAN_ECHO 0x01 | ||
| 53 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 | ||
| 54 | |||
| 55 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ | ||
| 56 | |||
| 57 | /* CAN frame elements that are affected by curr. 3 CAN frame modifications */ | ||
| 58 | #define CGW_MOD_ID 0x01 | ||
| 59 | #define CGW_MOD_DLC 0x02 | ||
| 60 | #define CGW_MOD_DATA 0x04 | ||
| 61 | |||
| 62 | #define CGW_FRAME_MODS 3 /* ID DLC DATA */ | ||
| 63 | |||
| 64 | #define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS) | ||
| 65 | |||
| 66 | struct cgw_frame_mod { | ||
| 67 | struct can_frame cf; | ||
| 68 | __u8 modtype; | ||
| 69 | } __attribute__((packed)); | ||
| 70 | |||
| 71 | #define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod) | ||
| 72 | |||
| 73 | struct cgw_csum_xor { | ||
| 74 | __s8 from_idx; | ||
| 75 | __s8 to_idx; | ||
| 76 | __s8 result_idx; | ||
| 77 | __u8 init_xor_val; | ||
| 78 | } __attribute__((packed)); | ||
| 79 | |||
| 80 | struct cgw_csum_crc8 { | ||
| 81 | __s8 from_idx; | ||
| 82 | __s8 to_idx; | ||
| 83 | __s8 result_idx; | ||
| 84 | __u8 init_crc_val; | ||
| 85 | __u8 final_xor_val; | ||
| 86 | __u8 crctab[256]; | ||
| 87 | __u8 profile; | ||
| 88 | __u8 profile_data[20]; | ||
| 89 | } __attribute__((packed)); | ||
| 90 | |||
| 91 | /* length of checksum operation parameters. idx = index in CAN frame data[] */ | ||
| 92 | #define CGW_CS_XOR_LEN sizeof(struct cgw_csum_xor) | ||
| 93 | #define CGW_CS_CRC8_LEN sizeof(struct cgw_csum_crc8) | ||
| 94 | |||
| 95 | /* CRC8 profiles (compute CRC for additional data elements - see below) */ | ||
| 96 | enum { | ||
| 97 | CGW_CRC8PRF_UNSPEC, | ||
| 98 | CGW_CRC8PRF_1U8, /* compute one additional u8 value */ | ||
| 99 | CGW_CRC8PRF_16U8, /* u8 value table indexed by data[1] & 0xF */ | ||
| 100 | CGW_CRC8PRF_SFFID_XOR, /* (can_id & 0xFF) ^ (can_id >> 8 & 0xFF) */ | ||
| 101 | __CGW_CRC8PRF_MAX | ||
| 102 | }; | ||
| 103 | |||
| 104 | #define CGW_CRC8PRF_MAX (__CGW_CRC8PRF_MAX - 1) | ||
| 105 | |||
| 106 | /* | ||
| 107 | * CAN rtnetlink attribute contents in detail | ||
| 108 | * | ||
| 109 | * CGW_XXX_IF (length 4 bytes): | ||
| 110 | * Sets an interface index for source/destination network interfaces. | ||
| 111 | * For the CAN->CAN gwtype the indices of _two_ CAN interfaces are mandatory. | ||
| 112 | * | ||
| 113 | * CGW_FILTER (length 8 bytes): | ||
| 114 | * Sets a CAN receive filter for the gateway job specified by the | ||
| 115 | * struct can_filter described in include/linux/can.h | ||
| 116 | * | ||
| 117 | * CGW_MOD_XXX (length 17 bytes): | ||
| 118 | * Specifies a modification that's done to a received CAN frame before it is | ||
| 119 | * send out to the destination interface. | ||
| 120 | * | ||
| 121 | * <struct can_frame> data used as operator | ||
| 122 | * <u8> affected CAN frame elements | ||
| 123 | * | ||
| 124 | * CGW_CS_XOR (length 4 bytes): | ||
| 125 | * Set a simple XOR checksum starting with an initial value into | ||
| 126 | * data[result-idx] using data[start-idx] .. data[end-idx] | ||
| 127 | * | ||
| 128 | * The XOR checksum is calculated like this: | ||
| 129 | * | ||
| 130 | * xor = init_xor_val | ||
| 131 | * | ||
| 132 | * for (i = from_idx .. to_idx) | ||
| 133 | * xor ^= can_frame.data[i] | ||
| 134 | * | ||
| 135 | * can_frame.data[ result_idx ] = xor | ||
| 136 | * | ||
| 137 | * CGW_CS_CRC8 (length 282 bytes): | ||
| 138 | * Set a CRC8 value into data[result-idx] using a given 256 byte CRC8 table, | ||
| 139 | * a given initial value and a defined input data[start-idx] .. data[end-idx]. | ||
| 140 | * Finally the result value is XOR'ed with the final_xor_val. | ||
| 141 | * | ||
| 142 | * The CRC8 checksum is calculated like this: | ||
| 143 | * | ||
| 144 | * crc = init_crc_val | ||
| 145 | * | ||
| 146 | * for (i = from_idx .. to_idx) | ||
| 147 | * crc = crctab[ crc ^ can_frame.data[i] ] | ||
| 148 | * | ||
| 149 | * can_frame.data[ result_idx ] = crc ^ final_xor_val | ||
| 150 | * | ||
| 151 | * The calculated CRC may contain additional source data elements that can be | ||
| 152 | * defined in the handling of 'checksum profiles' e.g. shown in AUTOSAR specs | ||
| 153 | * like http://www.autosar.org/download/R4.0/AUTOSAR_SWS_E2ELibrary.pdf | ||
| 154 | * E.g. the profile_data[] may contain additional u8 values (called DATA_IDs) | ||
| 155 | * that are used depending on counter values inside the CAN frame data[]. | ||
| 156 | * So far only three profiles have been implemented for illustration. | ||
| 157 | * | ||
| 158 | * Remark: In general the attribute data is a linear buffer. | ||
| 159 | * Beware of sending unpacked or aligned structs! | ||
| 160 | */ | ||
| 161 | |||
| 162 | #endif | ||
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h index 34542d374dd8..14966ddb7df1 100644 --- a/include/linux/can/netlink.h +++ b/include/linux/can/netlink.h | |||
| @@ -5,8 +5,6 @@ | |||
| 5 | * | 5 | * |
| 6 | * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> | 6 | * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> |
| 7 | * | 7 | * |
| 8 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 9 | * | ||
| 10 | */ | 8 | */ |
| 11 | 9 | ||
| 12 | #ifndef CAN_NETLINK_H | 10 | #ifndef CAN_NETLINK_H |
diff --git a/include/linux/can/raw.h b/include/linux/can/raw.h index b2a0f87492c5..781f3a3701be 100644 --- a/include/linux/can/raw.h +++ b/include/linux/can/raw.h | |||
| @@ -8,8 +8,6 @@ | |||
| 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Send feedback to <socketcan-users@lists.berlios.de> | ||
| 12 | * | ||
| 13 | */ | 11 | */ |
| 14 | 12 | ||
| 15 | #ifndef CAN_RAW_H | 13 | #ifndef CAN_RAW_H |
diff --git a/include/linux/capability.h b/include/linux/capability.h index c42112350003..a63d13d84ad8 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
| @@ -198,7 +198,7 @@ struct cpu_vfs_cap_data { | |||
| 198 | /* Allow modification of routing tables */ | 198 | /* Allow modification of routing tables */ |
| 199 | /* Allow setting arbitrary process / process group ownership on | 199 | /* Allow setting arbitrary process / process group ownership on |
| 200 | sockets */ | 200 | sockets */ |
| 201 | /* Allow binding to any address for transparent proxying */ | 201 | /* Allow binding to any address for transparent proxying (also via NET_RAW) */ |
| 202 | /* Allow setting TOS (type of service) */ | 202 | /* Allow setting TOS (type of service) */ |
| 203 | /* Allow setting promiscuous mode */ | 203 | /* Allow setting promiscuous mode */ |
| 204 | /* Allow clearing driver statistics */ | 204 | /* Allow clearing driver statistics */ |
| @@ -210,6 +210,7 @@ struct cpu_vfs_cap_data { | |||
| 210 | 210 | ||
| 211 | /* Allow use of RAW sockets */ | 211 | /* Allow use of RAW sockets */ |
| 212 | /* Allow use of PACKET sockets */ | 212 | /* Allow use of PACKET sockets */ |
| 213 | /* Allow binding to any address for transparent proxying (also via NET_ADMIN) */ | ||
| 213 | 214 | ||
| 214 | #define CAP_NET_RAW 13 | 215 | #define CAP_NET_RAW 13 |
| 215 | 216 | ||
diff --git a/include/linux/cn_proc.h b/include/linux/cn_proc.h index 12c517b51ca2..d03612b196e1 100644 --- a/include/linux/cn_proc.h +++ b/include/linux/cn_proc.h | |||
| @@ -54,6 +54,7 @@ struct proc_event { | |||
| 54 | PROC_EVENT_GID = 0x00000040, | 54 | PROC_EVENT_GID = 0x00000040, |
| 55 | PROC_EVENT_SID = 0x00000080, | 55 | PROC_EVENT_SID = 0x00000080, |
| 56 | PROC_EVENT_PTRACE = 0x00000100, | 56 | PROC_EVENT_PTRACE = 0x00000100, |
| 57 | PROC_EVENT_COMM = 0x00000200, | ||
| 57 | /* "next" should be 0x00000400 */ | 58 | /* "next" should be 0x00000400 */ |
| 58 | /* "last" is the last process event: exit */ | 59 | /* "last" is the last process event: exit */ |
| 59 | PROC_EVENT_EXIT = 0x80000000 | 60 | PROC_EVENT_EXIT = 0x80000000 |
| @@ -103,6 +104,12 @@ struct proc_event { | |||
| 103 | __kernel_pid_t tracer_tgid; | 104 | __kernel_pid_t tracer_tgid; |
| 104 | } ptrace; | 105 | } ptrace; |
| 105 | 106 | ||
| 107 | struct comm_proc_event { | ||
| 108 | __kernel_pid_t process_pid; | ||
| 109 | __kernel_pid_t process_tgid; | ||
| 110 | char comm[16]; | ||
| 111 | } comm; | ||
| 112 | |||
| 106 | struct exit_proc_event { | 113 | struct exit_proc_event { |
| 107 | __kernel_pid_t process_pid; | 114 | __kernel_pid_t process_pid; |
| 108 | __kernel_pid_t process_tgid; | 115 | __kernel_pid_t process_tgid; |
| @@ -118,6 +125,7 @@ void proc_exec_connector(struct task_struct *task); | |||
| 118 | void proc_id_connector(struct task_struct *task, int which_id); | 125 | void proc_id_connector(struct task_struct *task, int which_id); |
| 119 | void proc_sid_connector(struct task_struct *task); | 126 | void proc_sid_connector(struct task_struct *task); |
| 120 | void proc_ptrace_connector(struct task_struct *task, int which_id); | 127 | void proc_ptrace_connector(struct task_struct *task, int which_id); |
| 128 | void proc_comm_connector(struct task_struct *task); | ||
| 121 | void proc_exit_connector(struct task_struct *task); | 129 | void proc_exit_connector(struct task_struct *task); |
| 122 | #else | 130 | #else |
| 123 | static inline void proc_fork_connector(struct task_struct *task) | 131 | static inline void proc_fork_connector(struct task_struct *task) |
| @@ -133,6 +141,9 @@ static inline void proc_id_connector(struct task_struct *task, | |||
| 133 | static inline void proc_sid_connector(struct task_struct *task) | 141 | static inline void proc_sid_connector(struct task_struct *task) |
| 134 | {} | 142 | {} |
| 135 | 143 | ||
| 144 | static inline void proc_comm_connector(struct task_struct *task) | ||
| 145 | {} | ||
| 146 | |||
| 136 | static inline void proc_ptrace_connector(struct task_struct *task, | 147 | static inline void proc_ptrace_connector(struct task_struct *task, |
| 137 | int ptrace_id) | 148 | int ptrace_id) |
| 138 | {} | 149 | {} |
diff --git a/include/linux/device.h b/include/linux/device.h index 4639419522da..46751bdb71da 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -350,6 +350,8 @@ struct class_attribute { | |||
| 350 | char *buf); | 350 | char *buf); |
| 351 | ssize_t (*store)(struct class *class, struct class_attribute *attr, | 351 | ssize_t (*store)(struct class *class, struct class_attribute *attr, |
| 352 | const char *buf, size_t count); | 352 | const char *buf, size_t count); |
| 353 | const void *(*namespace)(struct class *class, | ||
| 354 | const struct class_attribute *attr); | ||
| 353 | }; | 355 | }; |
| 354 | 356 | ||
| 355 | #define CLASS_ATTR(_name, _mode, _show, _store) \ | 357 | #define CLASS_ATTR(_name, _mode, _show, _store) \ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c6e427ab65fe..45f00b61c096 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -117,99 +117,101 @@ struct ethtool_eeprom { | |||
| 117 | __u8 data[0]; | 117 | __u8 data[0]; |
| 118 | }; | 118 | }; |
| 119 | 119 | ||
| 120 | /* for configuring coalescing parameters of chip */ | 120 | /** |
| 121 | * struct ethtool_coalesce - coalescing parameters for IRQs and stats updates | ||
| 122 | * @cmd: ETHTOOL_{G,S}COALESCE | ||
| 123 | * @rx_coalesce_usecs: How many usecs to delay an RX interrupt after | ||
| 124 | * a packet arrives. | ||
| 125 | * @rx_max_coalesced_frames: Maximum number of packets to receive | ||
| 126 | * before an RX interrupt. | ||
| 127 | * @rx_coalesce_usecs_irq: Same as @rx_coalesce_usecs, except that | ||
| 128 | * this value applies while an IRQ is being serviced by the host. | ||
| 129 | * @rx_max_coalesced_frames_irq: Same as @rx_max_coalesced_frames, | ||
| 130 | * except that this value applies while an IRQ is being serviced | ||
| 131 | * by the host. | ||
| 132 | * @tx_coalesce_usecs: How many usecs to delay a TX interrupt after | ||
| 133 | * a packet is sent. | ||
| 134 | * @tx_max_coalesced_frames: Maximum number of packets to be sent | ||
| 135 | * before a TX interrupt. | ||
| 136 | * @tx_coalesce_usecs_irq: Same as @tx_coalesce_usecs, except that | ||
| 137 | * this value applies while an IRQ is being serviced by the host. | ||
| 138 | * @tx_max_coalesced_frames_irq: Same as @tx_max_coalesced_frames, | ||
| 139 | * except that this value applies while an IRQ is being serviced | ||
| 140 | * by the host. | ||
| 141 | * @stats_block_coalesce_usecs: How many usecs to delay in-memory | ||
| 142 | * statistics block updates. Some drivers do not have an | ||
| 143 | * in-memory statistic block, and in such cases this value is | ||
| 144 | * ignored. This value must not be zero. | ||
| 145 | * @use_adaptive_rx_coalesce: Enable adaptive RX coalescing. | ||
| 146 | * @use_adaptive_tx_coalesce: Enable adaptive TX coalescing. | ||
| 147 | * @pkt_rate_low: Threshold for low packet rate (packets per second). | ||
| 148 | * @rx_coalesce_usecs_low: How many usecs to delay an RX interrupt after | ||
| 149 | * a packet arrives, when the packet rate is below @pkt_rate_low. | ||
| 150 | * @rx_max_coalesced_frames_low: Maximum number of packets to be received | ||
| 151 | * before an RX interrupt, when the packet rate is below @pkt_rate_low. | ||
| 152 | * @tx_coalesce_usecs_low: How many usecs to delay a TX interrupt after | ||
| 153 | * a packet is sent, when the packet rate is below @pkt_rate_low. | ||
| 154 | * @tx_max_coalesced_frames_low: Maximum nuumber of packets to be sent before | ||
| 155 | * a TX interrupt, when the packet rate is below @pkt_rate_low. | ||
| 156 | * @pkt_rate_high: Threshold for high packet rate (packets per second). | ||
| 157 | * @rx_coalesce_usecs_high: How many usecs to delay an RX interrupt after | ||
| 158 | * a packet arrives, when the packet rate is above @pkt_rate_high. | ||
| 159 | * @rx_max_coalesced_frames_high: Maximum number of packets to be received | ||
| 160 | * before an RX interrupt, when the packet rate is above @pkt_rate_high. | ||
| 161 | * @tx_coalesce_usecs_high: How many usecs to delay a TX interrupt after | ||
| 162 | * a packet is sent, when the packet rate is above @pkt_rate_high. | ||
| 163 | * @tx_max_coalesced_frames_high: Maximum number of packets to be sent before | ||
| 164 | * a TX interrupt, when the packet rate is above @pkt_rate_high. | ||
| 165 | * @rate_sample_interval: How often to do adaptive coalescing packet rate | ||
| 166 | * sampling, measured in seconds. Must not be zero. | ||
| 167 | * | ||
| 168 | * Each pair of (usecs, max_frames) fields specifies this exit | ||
| 169 | * condition for interrupt coalescing: | ||
| 170 | * (usecs > 0 && time_since_first_completion >= usecs) || | ||
| 171 | * (max_frames > 0 && completed_frames >= max_frames) | ||
| 172 | * It is illegal to set both usecs and max_frames to zero as this | ||
| 173 | * would cause interrupts to never be generated. To disable | ||
| 174 | * coalescing, set usecs = 0 and max_frames = 1. | ||
| 175 | * | ||
| 176 | * Some implementations ignore the value of max_frames and use the | ||
| 177 | * condition: | ||
| 178 | * time_since_first_completion >= usecs | ||
| 179 | * This is deprecated. Drivers for hardware that does not support | ||
| 180 | * counting completions should validate that max_frames == !rx_usecs. | ||
| 181 | * | ||
| 182 | * Adaptive RX/TX coalescing is an algorithm implemented by some | ||
| 183 | * drivers to improve latency under low packet rates and improve | ||
| 184 | * throughput under high packet rates. Some drivers only implement | ||
| 185 | * one of RX or TX adaptive coalescing. Anything not implemented by | ||
| 186 | * the driver causes these values to be silently ignored. | ||
| 187 | * | ||
| 188 | * When the packet rate is below @pkt_rate_high but above | ||
| 189 | * @pkt_rate_low (both measured in packets per second) the | ||
| 190 | * normal {rx,tx}_* coalescing parameters are used. | ||
| 191 | */ | ||
| 121 | struct ethtool_coalesce { | 192 | struct ethtool_coalesce { |
| 122 | __u32 cmd; /* ETHTOOL_{G,S}COALESCE */ | 193 | __u32 cmd; |
| 123 | |||
| 124 | /* How many usecs to delay an RX interrupt after | ||
| 125 | * a packet arrives. If 0, only rx_max_coalesced_frames | ||
| 126 | * is used. | ||
| 127 | */ | ||
| 128 | __u32 rx_coalesce_usecs; | 194 | __u32 rx_coalesce_usecs; |
| 129 | |||
| 130 | /* How many packets to delay an RX interrupt after | ||
| 131 | * a packet arrives. If 0, only rx_coalesce_usecs is | ||
| 132 | * used. It is illegal to set both usecs and max frames | ||
| 133 | * to zero as this would cause RX interrupts to never be | ||
| 134 | * generated. | ||
| 135 | */ | ||
| 136 | __u32 rx_max_coalesced_frames; | 195 | __u32 rx_max_coalesced_frames; |
| 137 | |||
| 138 | /* Same as above two parameters, except that these values | ||
| 139 | * apply while an IRQ is being serviced by the host. Not | ||
| 140 | * all cards support this feature and the values are ignored | ||
| 141 | * in that case. | ||
| 142 | */ | ||
| 143 | __u32 rx_coalesce_usecs_irq; | 196 | __u32 rx_coalesce_usecs_irq; |
| 144 | __u32 rx_max_coalesced_frames_irq; | 197 | __u32 rx_max_coalesced_frames_irq; |
| 145 | |||
| 146 | /* How many usecs to delay a TX interrupt after | ||
| 147 | * a packet is sent. If 0, only tx_max_coalesced_frames | ||
| 148 | * is used. | ||
| 149 | */ | ||
| 150 | __u32 tx_coalesce_usecs; | 198 | __u32 tx_coalesce_usecs; |
| 151 | |||
| 152 | /* How many packets to delay a TX interrupt after | ||
| 153 | * a packet is sent. If 0, only tx_coalesce_usecs is | ||
| 154 | * used. It is illegal to set both usecs and max frames | ||
| 155 | * to zero as this would cause TX interrupts to never be | ||
| 156 | * generated. | ||
| 157 | */ | ||
| 158 | __u32 tx_max_coalesced_frames; | 199 | __u32 tx_max_coalesced_frames; |
| 159 | |||
| 160 | /* Same as above two parameters, except that these values | ||
| 161 | * apply while an IRQ is being serviced by the host. Not | ||
| 162 | * all cards support this feature and the values are ignored | ||
| 163 | * in that case. | ||
| 164 | */ | ||
| 165 | __u32 tx_coalesce_usecs_irq; | 200 | __u32 tx_coalesce_usecs_irq; |
| 166 | __u32 tx_max_coalesced_frames_irq; | 201 | __u32 tx_max_coalesced_frames_irq; |
| 167 | |||
| 168 | /* How many usecs to delay in-memory statistics | ||
| 169 | * block updates. Some drivers do not have an in-memory | ||
| 170 | * statistic block, and in such cases this value is ignored. | ||
| 171 | * This value must not be zero. | ||
| 172 | */ | ||
| 173 | __u32 stats_block_coalesce_usecs; | 202 | __u32 stats_block_coalesce_usecs; |
| 174 | |||
| 175 | /* Adaptive RX/TX coalescing is an algorithm implemented by | ||
| 176 | * some drivers to improve latency under low packet rates and | ||
| 177 | * improve throughput under high packet rates. Some drivers | ||
| 178 | * only implement one of RX or TX adaptive coalescing. Anything | ||
| 179 | * not implemented by the driver causes these values to be | ||
| 180 | * silently ignored. | ||
| 181 | */ | ||
| 182 | __u32 use_adaptive_rx_coalesce; | 203 | __u32 use_adaptive_rx_coalesce; |
| 183 | __u32 use_adaptive_tx_coalesce; | 204 | __u32 use_adaptive_tx_coalesce; |
| 184 | |||
| 185 | /* When the packet rate (measured in packets per second) | ||
| 186 | * is below pkt_rate_low, the {rx,tx}_*_low parameters are | ||
| 187 | * used. | ||
| 188 | */ | ||
| 189 | __u32 pkt_rate_low; | 205 | __u32 pkt_rate_low; |
| 190 | __u32 rx_coalesce_usecs_low; | 206 | __u32 rx_coalesce_usecs_low; |
| 191 | __u32 rx_max_coalesced_frames_low; | 207 | __u32 rx_max_coalesced_frames_low; |
| 192 | __u32 tx_coalesce_usecs_low; | 208 | __u32 tx_coalesce_usecs_low; |
| 193 | __u32 tx_max_coalesced_frames_low; | 209 | __u32 tx_max_coalesced_frames_low; |
| 194 | |||
| 195 | /* When the packet rate is below pkt_rate_high but above | ||
| 196 | * pkt_rate_low (both measured in packets per second) the | ||
| 197 | * normal {rx,tx}_* coalescing parameters are used. | ||
| 198 | */ | ||
| 199 | |||
| 200 | /* When the packet rate is (measured in packets per second) | ||
| 201 | * is above pkt_rate_high, the {rx,tx}_*_high parameters are | ||
| 202 | * used. | ||
| 203 | */ | ||
| 204 | __u32 pkt_rate_high; | 210 | __u32 pkt_rate_high; |
| 205 | __u32 rx_coalesce_usecs_high; | 211 | __u32 rx_coalesce_usecs_high; |
| 206 | __u32 rx_max_coalesced_frames_high; | 212 | __u32 rx_max_coalesced_frames_high; |
| 207 | __u32 tx_coalesce_usecs_high; | 213 | __u32 tx_coalesce_usecs_high; |
| 208 | __u32 tx_max_coalesced_frames_high; | 214 | __u32 tx_max_coalesced_frames_high; |
| 209 | |||
| 210 | /* How often to do adaptive coalescing packet rate sampling, | ||
| 211 | * measured in seconds. Must not be zero. | ||
| 212 | */ | ||
| 213 | __u32 rate_sample_interval; | 215 | __u32 rate_sample_interval; |
| 214 | }; | 216 | }; |
| 215 | 217 | ||
| @@ -444,7 +446,7 @@ struct ethtool_flow_ext { | |||
| 444 | }; | 446 | }; |
| 445 | 447 | ||
| 446 | /** | 448 | /** |
| 447 | * struct ethtool_rx_flow_spec - specification for RX flow filter | 449 | * struct ethtool_rx_flow_spec - classification rule for RX flows |
| 448 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW | 450 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW |
| 449 | * @h_u: Flow fields to match (dependent on @flow_type) | 451 | * @h_u: Flow fields to match (dependent on @flow_type) |
| 450 | * @h_ext: Additional fields to match | 452 | * @h_ext: Additional fields to match |
| @@ -454,7 +456,9 @@ struct ethtool_flow_ext { | |||
| 454 | * includes the %FLOW_EXT flag. | 456 | * includes the %FLOW_EXT flag. |
| 455 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC | 457 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC |
| 456 | * if packets should be discarded | 458 | * if packets should be discarded |
| 457 | * @location: Index of filter in hardware table | 459 | * @location: Location of rule in the table. Locations must be |
| 460 | * numbered such that a flow matching multiple rules will be | ||
| 461 | * classified according to the first (lowest numbered) rule. | ||
| 458 | */ | 462 | */ |
| 459 | struct ethtool_rx_flow_spec { | 463 | struct ethtool_rx_flow_spec { |
| 460 | __u32 flow_type; | 464 | __u32 flow_type; |
| @@ -473,9 +477,9 @@ struct ethtool_rx_flow_spec { | |||
| 473 | * %ETHTOOL_GRXCLSRLALL, %ETHTOOL_SRXCLSRLDEL or %ETHTOOL_SRXCLSRLINS | 477 | * %ETHTOOL_GRXCLSRLALL, %ETHTOOL_SRXCLSRLDEL or %ETHTOOL_SRXCLSRLINS |
| 474 | * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW | 478 | * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW |
| 475 | * @data: Command-dependent value | 479 | * @data: Command-dependent value |
| 476 | * @fs: Flow filter specification | 480 | * @fs: Flow classification rule |
| 477 | * @rule_cnt: Number of rules to be affected | 481 | * @rule_cnt: Number of rules to be affected |
| 478 | * @rule_locs: Array of valid rule indices | 482 | * @rule_locs: Array of used rule locations |
| 479 | * | 483 | * |
| 480 | * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating | 484 | * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating |
| 481 | * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following | 485 | * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following |
| @@ -487,23 +491,20 @@ struct ethtool_rx_flow_spec { | |||
| 487 | * For %ETHTOOL_GRXCLSRLCNT, @rule_cnt is set to the number of defined | 491 | * For %ETHTOOL_GRXCLSRLCNT, @rule_cnt is set to the number of defined |
| 488 | * rules on return. | 492 | * rules on return. |
| 489 | * | 493 | * |
| 490 | * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the index of an | 494 | * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the location of an |
| 491 | * existing filter rule on entry and @fs contains the rule on return. | 495 | * existing rule on entry and @fs contains the rule on return. |
| 492 | * | 496 | * |
| 493 | * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the | 497 | * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the |
| 494 | * user buffer for @rule_locs on entry. On return, @data is the size | 498 | * user buffer for @rule_locs on entry. On return, @data is the size |
| 495 | * of the filter table and @rule_locs contains the indices of the | 499 | * of the rule table, @rule_cnt is the number of defined rules, and |
| 496 | * defined rules. | 500 | * @rule_locs contains the locations of the defined rules. Drivers |
| 501 | * must use the second parameter to get_rxnfc() instead of @rule_locs. | ||
| 497 | * | 502 | * |
| 498 | * For %ETHTOOL_SRXCLSRLINS, @fs specifies the filter rule to add or | 503 | * For %ETHTOOL_SRXCLSRLINS, @fs specifies the rule to add or update. |
| 499 | * update. @fs.@location specifies the index to use and must not be | 504 | * @fs.@location specifies the location to use and must not be ignored. |
| 500 | * ignored. | ||
| 501 | * | 505 | * |
| 502 | * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the index of an | 506 | * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an |
| 503 | * existing filter rule on entry. | 507 | * existing rule on entry. |
| 504 | * | ||
| 505 | * Implementation of indexed classification rules generally requires a | ||
| 506 | * TCAM. | ||
| 507 | */ | 508 | */ |
| 508 | struct ethtool_rxnfc { | 509 | struct ethtool_rxnfc { |
| 509 | __u32 cmd; | 510 | __u32 cmd; |
| @@ -726,6 +727,9 @@ enum ethtool_sfeatures_retval_bits { | |||
| 726 | /* needed by dev_disable_lro() */ | 727 | /* needed by dev_disable_lro() */ |
| 727 | extern int __ethtool_set_flags(struct net_device *dev, u32 flags); | 728 | extern int __ethtool_set_flags(struct net_device *dev, u32 flags); |
| 728 | 729 | ||
| 730 | extern int __ethtool_get_settings(struct net_device *dev, | ||
| 731 | struct ethtool_cmd *cmd); | ||
| 732 | |||
| 729 | /** | 733 | /** |
| 730 | * enum ethtool_phys_id_state - indicator state for physical identification | 734 | * enum ethtool_phys_id_state - indicator state for physical identification |
| 731 | * @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated | 735 | * @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated |
| @@ -936,7 +940,7 @@ struct ethtool_ops { | |||
| 936 | int (*set_priv_flags)(struct net_device *, u32); | 940 | int (*set_priv_flags)(struct net_device *, u32); |
| 937 | int (*get_sset_count)(struct net_device *, int); | 941 | int (*get_sset_count)(struct net_device *, int); |
| 938 | int (*get_rxnfc)(struct net_device *, | 942 | int (*get_rxnfc)(struct net_device *, |
| 939 | struct ethtool_rxnfc *, void *); | 943 | struct ethtool_rxnfc *, u32 *rule_locs); |
| 940 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); | 944 | int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); |
| 941 | int (*flash_device)(struct net_device *, struct ethtool_flash *); | 945 | int (*flash_device)(struct net_device *, struct ethtool_flash *); |
| 942 | int (*reset)(struct net_device *, u32 *); | 946 | int (*reset)(struct net_device *, u32 *); |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 741956fa5bfd..8eeb205f298b 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
| @@ -155,7 +155,7 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb, | |||
| 155 | const struct sock_filter *filter); | 155 | const struct sock_filter *filter); |
| 156 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 156 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
| 157 | extern int sk_detach_filter(struct sock *sk); | 157 | extern int sk_detach_filter(struct sock *sk); |
| 158 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 158 | extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen); |
| 159 | 159 | ||
| 160 | #ifdef CONFIG_BPF_JIT | 160 | #ifdef CONFIG_BPF_JIT |
| 161 | extern void bpf_jit_compile(struct sk_filter *fp); | 161 | extern void bpf_jit_compile(struct sk_filter *fp); |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 54c878960872..48363c3c40f8 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -130,6 +130,8 @@ | |||
| 130 | #define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060 | 130 | #define IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK 0x0060 |
| 131 | /* A-MSDU 802.11n */ | 131 | /* A-MSDU 802.11n */ |
| 132 | #define IEEE80211_QOS_CTL_A_MSDU_PRESENT 0x0080 | 132 | #define IEEE80211_QOS_CTL_A_MSDU_PRESENT 0x0080 |
| 133 | /* Mesh Control 802.11s */ | ||
| 134 | #define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100 | ||
| 133 | 135 | ||
| 134 | /* U-APSD queue for WMM IEs sent by AP */ | 136 | /* U-APSD queue for WMM IEs sent by AP */ |
| 135 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) | 137 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) |
| @@ -629,9 +631,14 @@ struct ieee80211_rann_ie { | |||
| 629 | u8 rann_ttl; | 631 | u8 rann_ttl; |
| 630 | u8 rann_addr[6]; | 632 | u8 rann_addr[6]; |
| 631 | u32 rann_seq; | 633 | u32 rann_seq; |
| 634 | u32 rann_interval; | ||
| 632 | u32 rann_metric; | 635 | u32 rann_metric; |
| 633 | } __attribute__ ((packed)); | 636 | } __attribute__ ((packed)); |
| 634 | 637 | ||
| 638 | enum ieee80211_rann_flags { | ||
| 639 | RANN_FLAG_IS_GATE = 1 << 0, | ||
| 640 | }; | ||
| 641 | |||
| 635 | #define WLAN_SA_QUERY_TR_ID_LEN 2 | 642 | #define WLAN_SA_QUERY_TR_ID_LEN 2 |
| 636 | 643 | ||
| 637 | struct ieee80211_mgmt { | 644 | struct ieee80211_mgmt { |
| @@ -736,19 +743,10 @@ struct ieee80211_mgmt { | |||
| 736 | __le16 params; | 743 | __le16 params; |
| 737 | __le16 reason_code; | 744 | __le16 reason_code; |
| 738 | } __attribute__((packed)) delba; | 745 | } __attribute__((packed)) delba; |
| 739 | struct{ | 746 | struct { |
| 740 | u8 action_code; | 747 | u8 action_code; |
| 741 | /* capab_info for open and confirm, | ||
| 742 | * reason for close | ||
| 743 | */ | ||
| 744 | __le16 aux; | ||
| 745 | /* Followed in plink_confirm by status | ||
| 746 | * code, AID and supported rates, | ||
| 747 | * and directly by supported rates in | ||
| 748 | * plink_open and plink_close | ||
| 749 | */ | ||
| 750 | u8 variable[0]; | 748 | u8 variable[0]; |
| 751 | } __attribute__((packed)) plink_action; | 749 | } __attribute__((packed)) self_prot; |
| 752 | struct{ | 750 | struct{ |
| 753 | u8 action_code; | 751 | u8 action_code; |
| 754 | u8 variable[0]; | 752 | u8 variable[0]; |
| @@ -761,6 +759,12 @@ struct ieee80211_mgmt { | |||
| 761 | u8 action; | 759 | u8 action; |
| 762 | u8 smps_control; | 760 | u8 smps_control; |
| 763 | } __attribute__ ((packed)) ht_smps; | 761 | } __attribute__ ((packed)) ht_smps; |
| 762 | struct { | ||
| 763 | u8 action_code; | ||
| 764 | u8 dialog_token; | ||
| 765 | __le16 capability; | ||
| 766 | u8 variable[0]; | ||
| 767 | } __packed tdls_discover_resp; | ||
| 764 | } u; | 768 | } u; |
| 765 | } __attribute__ ((packed)) action; | 769 | } __attribute__ ((packed)) action; |
| 766 | } u; | 770 | } u; |
| @@ -779,6 +783,13 @@ struct ieee80211_mmie { | |||
| 779 | u8 mic[8]; | 783 | u8 mic[8]; |
| 780 | } __attribute__ ((packed)); | 784 | } __attribute__ ((packed)); |
| 781 | 785 | ||
| 786 | struct ieee80211_vendor_ie { | ||
| 787 | u8 element_id; | ||
| 788 | u8 len; | ||
| 789 | u8 oui[3]; | ||
| 790 | u8 oui_type; | ||
| 791 | } __packed; | ||
| 792 | |||
| 782 | /* Control frames */ | 793 | /* Control frames */ |
| 783 | struct ieee80211_rts { | 794 | struct ieee80211_rts { |
| 784 | __le16 frame_control; | 795 | __le16 frame_control; |
| @@ -800,6 +811,52 @@ struct ieee80211_pspoll { | |||
| 800 | u8 ta[6]; | 811 | u8 ta[6]; |
| 801 | } __attribute__ ((packed)); | 812 | } __attribute__ ((packed)); |
| 802 | 813 | ||
| 814 | /* TDLS */ | ||
| 815 | |||
| 816 | /* Link-id information element */ | ||
| 817 | struct ieee80211_tdls_lnkie { | ||
| 818 | u8 ie_type; /* Link Identifier IE */ | ||
| 819 | u8 ie_len; | ||
| 820 | u8 bssid[6]; | ||
| 821 | u8 init_sta[6]; | ||
| 822 | u8 resp_sta[6]; | ||
| 823 | } __packed; | ||
| 824 | |||
| 825 | struct ieee80211_tdls_data { | ||
| 826 | u8 da[6]; | ||
| 827 | u8 sa[6]; | ||
| 828 | __be16 ether_type; | ||
| 829 | u8 payload_type; | ||
| 830 | u8 category; | ||
| 831 | u8 action_code; | ||
| 832 | union { | ||
| 833 | struct { | ||
| 834 | u8 dialog_token; | ||
| 835 | __le16 capability; | ||
| 836 | u8 variable[0]; | ||
| 837 | } __packed setup_req; | ||
| 838 | struct { | ||
| 839 | __le16 status_code; | ||
| 840 | u8 dialog_token; | ||
| 841 | __le16 capability; | ||
| 842 | u8 variable[0]; | ||
| 843 | } __packed setup_resp; | ||
| 844 | struct { | ||
| 845 | __le16 status_code; | ||
| 846 | u8 dialog_token; | ||
| 847 | u8 variable[0]; | ||
| 848 | } __packed setup_cfm; | ||
| 849 | struct { | ||
| 850 | __le16 reason_code; | ||
| 851 | u8 variable[0]; | ||
| 852 | } __packed teardown; | ||
| 853 | struct { | ||
| 854 | u8 dialog_token; | ||
| 855 | u8 variable[0]; | ||
| 856 | } __packed discover_req; | ||
| 857 | } u; | ||
| 858 | } __packed; | ||
| 859 | |||
| 803 | /** | 860 | /** |
| 804 | * struct ieee80211_bar - HT Block Ack Request | 861 | * struct ieee80211_bar - HT Block Ack Request |
| 805 | * | 862 | * |
| @@ -816,9 +873,11 @@ struct ieee80211_bar { | |||
| 816 | } __attribute__((packed)); | 873 | } __attribute__((packed)); |
| 817 | 874 | ||
| 818 | /* 802.11 BAR control masks */ | 875 | /* 802.11 BAR control masks */ |
| 819 | #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 | 876 | #define IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL 0x0000 |
| 820 | #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 | 877 | #define IEEE80211_BAR_CTRL_MULTI_TID 0x0002 |
| 821 | 878 | #define IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA 0x0004 | |
| 879 | #define IEEE80211_BAR_CTRL_TID_INFO_MASK 0xf000 | ||
| 880 | #define IEEE80211_BAR_CTRL_TID_INFO_SHIFT 12 | ||
| 822 | 881 | ||
| 823 | #define IEEE80211_HT_MCS_MASK_LEN 10 | 882 | #define IEEE80211_HT_MCS_MASK_LEN 10 |
| 824 | 883 | ||
| @@ -1189,16 +1248,13 @@ enum ieee80211_eid { | |||
| 1189 | WLAN_EID_TS_DELAY = 43, | 1248 | WLAN_EID_TS_DELAY = 43, |
| 1190 | WLAN_EID_TCLAS_PROCESSING = 44, | 1249 | WLAN_EID_TCLAS_PROCESSING = 44, |
| 1191 | WLAN_EID_QOS_CAPA = 46, | 1250 | WLAN_EID_QOS_CAPA = 46, |
| 1251 | /* 802.11z */ | ||
| 1252 | WLAN_EID_LINK_ID = 101, | ||
| 1192 | /* 802.11s */ | 1253 | /* 802.11s */ |
| 1193 | WLAN_EID_MESH_CONFIG = 113, | 1254 | WLAN_EID_MESH_CONFIG = 113, |
| 1194 | WLAN_EID_MESH_ID = 114, | 1255 | WLAN_EID_MESH_ID = 114, |
| 1195 | WLAN_EID_LINK_METRIC_REPORT = 115, | 1256 | WLAN_EID_LINK_METRIC_REPORT = 115, |
| 1196 | WLAN_EID_CONGESTION_NOTIFICATION = 116, | 1257 | WLAN_EID_CONGESTION_NOTIFICATION = 116, |
| 1197 | /* Note that the Peer Link IE has been replaced with the similar | ||
| 1198 | * Peer Management IE. We will keep the former definition until mesh | ||
| 1199 | * code is changed to comply with latest 802.11s drafts. | ||
| 1200 | */ | ||
| 1201 | WLAN_EID_PEER_LINK = 55, /* no longer in 802.11s drafts */ | ||
| 1202 | WLAN_EID_PEER_MGMT = 117, | 1258 | WLAN_EID_PEER_MGMT = 117, |
| 1203 | WLAN_EID_CHAN_SWITCH_PARAM = 118, | 1259 | WLAN_EID_CHAN_SWITCH_PARAM = 118, |
| 1204 | WLAN_EID_MESH_AWAKE_WINDOW = 119, | 1260 | WLAN_EID_MESH_AWAKE_WINDOW = 119, |
| @@ -1277,13 +1333,11 @@ enum ieee80211_category { | |||
| 1277 | WLAN_CATEGORY_HT = 7, | 1333 | WLAN_CATEGORY_HT = 7, |
| 1278 | WLAN_CATEGORY_SA_QUERY = 8, | 1334 | WLAN_CATEGORY_SA_QUERY = 8, |
| 1279 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, | 1335 | WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9, |
| 1336 | WLAN_CATEGORY_TDLS = 12, | ||
| 1280 | WLAN_CATEGORY_MESH_ACTION = 13, | 1337 | WLAN_CATEGORY_MESH_ACTION = 13, |
| 1281 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1338 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
| 1282 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1339 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
| 1283 | WLAN_CATEGORY_WMM = 17, | 1340 | WLAN_CATEGORY_WMM = 17, |
| 1284 | /* TODO: remove MESH_PATH_SEL after mesh is updated | ||
| 1285 | * to current 802.11s draft */ | ||
| 1286 | WLAN_CATEGORY_MESH_PATH_SEL = 32, | ||
| 1287 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1341 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
| 1288 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1342 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
| 1289 | }; | 1343 | }; |
| @@ -1309,6 +1363,31 @@ enum ieee80211_ht_actioncode { | |||
| 1309 | WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, | 1363 | WLAN_HT_ACTION_ASEL_IDX_FEEDBACK = 7, |
| 1310 | }; | 1364 | }; |
| 1311 | 1365 | ||
| 1366 | /* Self Protected Action codes */ | ||
| 1367 | enum ieee80211_self_protected_actioncode { | ||
| 1368 | WLAN_SP_RESERVED = 0, | ||
| 1369 | WLAN_SP_MESH_PEERING_OPEN = 1, | ||
| 1370 | WLAN_SP_MESH_PEERING_CONFIRM = 2, | ||
| 1371 | WLAN_SP_MESH_PEERING_CLOSE = 3, | ||
| 1372 | WLAN_SP_MGK_INFORM = 4, | ||
| 1373 | WLAN_SP_MGK_ACK = 5, | ||
| 1374 | }; | ||
| 1375 | |||
| 1376 | /* Mesh action codes */ | ||
| 1377 | enum ieee80211_mesh_actioncode { | ||
| 1378 | WLAN_MESH_ACTION_LINK_METRIC_REPORT, | ||
| 1379 | WLAN_MESH_ACTION_HWMP_PATH_SELECTION, | ||
| 1380 | WLAN_MESH_ACTION_GATE_ANNOUNCEMENT, | ||
| 1381 | WLAN_MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION, | ||
| 1382 | WLAN_MESH_ACTION_MCCA_SETUP_REQUEST, | ||
| 1383 | WLAN_MESH_ACTION_MCCA_SETUP_REPLY, | ||
| 1384 | WLAN_MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST, | ||
| 1385 | WLAN_MESH_ACTION_MCCA_ADVERTISEMENT, | ||
| 1386 | WLAN_MESH_ACTION_MCCA_TEARDOWN, | ||
| 1387 | WLAN_MESH_ACTION_TBTT_ADJUSTMENT_REQUEST, | ||
| 1388 | WLAN_MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE, | ||
| 1389 | }; | ||
| 1390 | |||
| 1312 | /* Security key length */ | 1391 | /* Security key length */ |
| 1313 | enum ieee80211_key_len { | 1392 | enum ieee80211_key_len { |
| 1314 | WLAN_KEY_LEN_WEP40 = 5, | 1393 | WLAN_KEY_LEN_WEP40 = 5, |
| @@ -1318,6 +1397,36 @@ enum ieee80211_key_len { | |||
| 1318 | WLAN_KEY_LEN_AES_CMAC = 16, | 1397 | WLAN_KEY_LEN_AES_CMAC = 16, |
| 1319 | }; | 1398 | }; |
| 1320 | 1399 | ||
| 1400 | /* Public action codes */ | ||
| 1401 | enum ieee80211_pub_actioncode { | ||
| 1402 | WLAN_PUB_ACTION_TDLS_DISCOVER_RES = 14, | ||
| 1403 | }; | ||
| 1404 | |||
| 1405 | /* TDLS action codes */ | ||
| 1406 | enum ieee80211_tdls_actioncode { | ||
| 1407 | WLAN_TDLS_SETUP_REQUEST = 0, | ||
| 1408 | WLAN_TDLS_SETUP_RESPONSE = 1, | ||
| 1409 | WLAN_TDLS_SETUP_CONFIRM = 2, | ||
| 1410 | WLAN_TDLS_TEARDOWN = 3, | ||
| 1411 | WLAN_TDLS_PEER_TRAFFIC_INDICATION = 4, | ||
| 1412 | WLAN_TDLS_CHANNEL_SWITCH_REQUEST = 5, | ||
| 1413 | WLAN_TDLS_CHANNEL_SWITCH_RESPONSE = 6, | ||
| 1414 | WLAN_TDLS_PEER_PSM_REQUEST = 7, | ||
| 1415 | WLAN_TDLS_PEER_PSM_RESPONSE = 8, | ||
| 1416 | WLAN_TDLS_PEER_TRAFFIC_RESPONSE = 9, | ||
| 1417 | WLAN_TDLS_DISCOVERY_REQUEST = 10, | ||
| 1418 | }; | ||
| 1419 | |||
| 1420 | /* | ||
| 1421 | * TDLS capabililites to be enabled in the 5th byte of the | ||
| 1422 | * @WLAN_EID_EXT_CAPABILITY information element | ||
| 1423 | */ | ||
| 1424 | #define WLAN_EXT_CAPA5_TDLS_ENABLED BIT(5) | ||
| 1425 | #define WLAN_EXT_CAPA5_TDLS_PROHIBITED BIT(6) | ||
| 1426 | |||
| 1427 | /* TDLS specific payload type in the LLC/SNAP header */ | ||
| 1428 | #define WLAN_TDLS_SNAP_RFTYPE 0x2 | ||
| 1429 | |||
| 1321 | /** | 1430 | /** |
| 1322 | * enum - mesh path selection protocol identifier | 1431 | * enum - mesh path selection protocol identifier |
| 1323 | * | 1432 | * |
| @@ -1453,6 +1562,9 @@ enum ieee80211_sa_query_action { | |||
| 1453 | 1562 | ||
| 1454 | #define WLAN_PMKID_LEN 16 | 1563 | #define WLAN_PMKID_LEN 16 |
| 1455 | 1564 | ||
| 1565 | #define WLAN_OUI_WFA 0x506f9a | ||
| 1566 | #define WLAN_OUI_TYPE_WFA_P2P 9 | ||
| 1567 | |||
| 1456 | /* | 1568 | /* |
| 1457 | * WMM/802.11e Tspec Element | 1569 | * WMM/802.11e Tspec Element |
| 1458 | */ | 1570 | */ |
diff --git a/include/linux/if.h b/include/linux/if.h index 03489ca92ded..db20bd4fd16b 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
| @@ -78,6 +78,7 @@ | |||
| 78 | * datapath port */ | 78 | * datapath port */ |
| 79 | #define IFF_TX_SKB_SHARING 0x10000 /* The interface supports sharing | 79 | #define IFF_TX_SKB_SHARING 0x10000 /* The interface supports sharing |
| 80 | * skbs on transmit */ | 80 | * skbs on transmit */ |
| 81 | #define IFF_UNICAST_FLT 0x20000 /* Supports unicast filtering */ | ||
| 81 | 82 | ||
| 82 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 83 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
| 83 | #define IF_GET_PROTO 0x0002 | 84 | #define IF_GET_PROTO 0x0002 |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index a3d99ff6e3b5..e473003e4bda 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
| @@ -83,11 +83,13 @@ | |||
| 83 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ | 83 | #define ETH_P_8021AH 0x88E7 /* 802.1ah Backbone Service Tag */ |
| 84 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ | 84 | #define ETH_P_1588 0x88F7 /* IEEE 1588 Timesync */ |
| 85 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ | 85 | #define ETH_P_FCOE 0x8906 /* Fibre Channel over Ethernet */ |
| 86 | #define ETH_P_TDLS 0x890D /* TDLS */ | ||
| 86 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ | 87 | #define ETH_P_FIP 0x8914 /* FCoE Initialization Protocol */ |
| 87 | #define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 88 | #define ETH_P_QINQ1 0x9100 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 88 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 89 | #define ETH_P_QINQ2 0x9200 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 89 | #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ | 90 | #define ETH_P_QINQ3 0x9300 /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 90 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ | 91 | #define ETH_P_EDSA 0xDADA /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ |
| 92 | #define ETH_P_AF_IUCV 0xFBFB /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */ | ||
| 91 | 93 | ||
| 92 | /* | 94 | /* |
| 93 | * Non DIX types. Won't clash for 1500 types. | 95 | * Non DIX types. Won't clash for 1500 types. |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 0ee969a5593d..c52d4b5f872a 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
| @@ -279,6 +279,7 @@ enum { | |||
| 279 | IFLA_VF_MAC, /* Hardware queue specific attributes */ | 279 | IFLA_VF_MAC, /* Hardware queue specific attributes */ |
| 280 | IFLA_VF_VLAN, | 280 | IFLA_VF_VLAN, |
| 281 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | 281 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ |
| 282 | IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */ | ||
| 282 | __IFLA_VF_MAX, | 283 | __IFLA_VF_MAX, |
| 283 | }; | 284 | }; |
| 284 | 285 | ||
| @@ -300,13 +301,22 @@ struct ifla_vf_tx_rate { | |||
| 300 | __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ | 301 | __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */ |
| 301 | }; | 302 | }; |
| 302 | 303 | ||
| 304 | struct ifla_vf_spoofchk { | ||
| 305 | __u32 vf; | ||
| 306 | __u32 setting; | ||
| 307 | }; | ||
| 308 | #ifdef __KERNEL__ | ||
| 309 | |||
| 310 | /* We don't want this structure exposed to user space */ | ||
| 303 | struct ifla_vf_info { | 311 | struct ifla_vf_info { |
| 304 | __u32 vf; | 312 | __u32 vf; |
| 305 | __u8 mac[32]; | 313 | __u8 mac[32]; |
| 306 | __u32 vlan; | 314 | __u32 vlan; |
| 307 | __u32 qos; | 315 | __u32 qos; |
| 308 | __u32 tx_rate; | 316 | __u32 tx_rate; |
| 317 | __u32 spoofchk; | ||
| 309 | }; | 318 | }; |
| 319 | #endif | ||
| 310 | 320 | ||
| 311 | /* VF ports management section | 321 | /* VF ports management section |
| 312 | * | 322 | * |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index e28b2e4959d4..d103dca5c563 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
| @@ -64,6 +64,7 @@ struct macvlan_dev { | |||
| 64 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | 64 | int (*forward)(struct net_device *dev, struct sk_buff *skb); |
| 65 | struct macvtap_queue *taps[MAX_MACVTAP_QUEUES]; | 65 | struct macvtap_queue *taps[MAX_MACVTAP_QUEUES]; |
| 66 | int numvtaps; | 66 | int numvtaps; |
| 67 | int minor; | ||
| 67 | }; | 68 | }; |
| 68 | 69 | ||
| 69 | static inline void macvlan_count_rx(const struct macvlan_dev *vlan, | 70 | static inline void macvlan_count_rx(const struct macvlan_dev *vlan, |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index c1486060f5ed..f3799295d231 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
| @@ -61,6 +61,17 @@ struct tpacket_stats { | |||
| 61 | unsigned int tp_drops; | 61 | unsigned int tp_drops; |
| 62 | }; | 62 | }; |
| 63 | 63 | ||
| 64 | struct tpacket_stats_v3 { | ||
| 65 | unsigned int tp_packets; | ||
| 66 | unsigned int tp_drops; | ||
| 67 | unsigned int tp_freeze_q_cnt; | ||
| 68 | }; | ||
| 69 | |||
| 70 | union tpacket_stats_u { | ||
| 71 | struct tpacket_stats stats1; | ||
| 72 | struct tpacket_stats_v3 stats3; | ||
| 73 | }; | ||
| 74 | |||
| 64 | struct tpacket_auxdata { | 75 | struct tpacket_auxdata { |
| 65 | __u32 tp_status; | 76 | __u32 tp_status; |
| 66 | __u32 tp_len; | 77 | __u32 tp_len; |
| @@ -78,6 +89,7 @@ struct tpacket_auxdata { | |||
| 78 | #define TP_STATUS_LOSING 0x4 | 89 | #define TP_STATUS_LOSING 0x4 |
| 79 | #define TP_STATUS_CSUMNOTREADY 0x8 | 90 | #define TP_STATUS_CSUMNOTREADY 0x8 |
| 80 | #define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */ | 91 | #define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */ |
| 92 | #define TP_STATUS_BLK_TMO 0x20 | ||
| 81 | 93 | ||
| 82 | /* Tx ring - header status */ | 94 | /* Tx ring - header status */ |
| 83 | #define TP_STATUS_AVAILABLE 0x0 | 95 | #define TP_STATUS_AVAILABLE 0x0 |
| @@ -85,6 +97,9 @@ struct tpacket_auxdata { | |||
| 85 | #define TP_STATUS_SENDING 0x2 | 97 | #define TP_STATUS_SENDING 0x2 |
| 86 | #define TP_STATUS_WRONG_FORMAT 0x4 | 98 | #define TP_STATUS_WRONG_FORMAT 0x4 |
| 87 | 99 | ||
| 100 | /* Rx ring - feature request bits */ | ||
| 101 | #define TP_FT_REQ_FILL_RXHASH 0x1 | ||
| 102 | |||
| 88 | struct tpacket_hdr { | 103 | struct tpacket_hdr { |
| 89 | unsigned long tp_status; | 104 | unsigned long tp_status; |
| 90 | unsigned int tp_len; | 105 | unsigned int tp_len; |
| @@ -111,11 +126,100 @@ struct tpacket2_hdr { | |||
| 111 | __u16 tp_padding; | 126 | __u16 tp_padding; |
| 112 | }; | 127 | }; |
| 113 | 128 | ||
| 129 | struct tpacket_hdr_variant1 { | ||
| 130 | __u32 tp_rxhash; | ||
| 131 | __u32 tp_vlan_tci; | ||
| 132 | }; | ||
| 133 | |||
| 134 | struct tpacket3_hdr { | ||
| 135 | __u32 tp_next_offset; | ||
| 136 | __u32 tp_sec; | ||
| 137 | __u32 tp_nsec; | ||
| 138 | __u32 tp_snaplen; | ||
| 139 | __u32 tp_len; | ||
| 140 | __u32 tp_status; | ||
| 141 | __u16 tp_mac; | ||
| 142 | __u16 tp_net; | ||
| 143 | /* pkt_hdr variants */ | ||
| 144 | union { | ||
| 145 | struct tpacket_hdr_variant1 hv1; | ||
| 146 | }; | ||
| 147 | }; | ||
| 148 | |||
| 149 | struct tpacket_bd_ts { | ||
| 150 | unsigned int ts_sec; | ||
| 151 | union { | ||
| 152 | unsigned int ts_usec; | ||
| 153 | unsigned int ts_nsec; | ||
| 154 | }; | ||
| 155 | }; | ||
| 156 | |||
| 157 | struct tpacket_hdr_v1 { | ||
| 158 | __u32 block_status; | ||
| 159 | __u32 num_pkts; | ||
| 160 | __u32 offset_to_first_pkt; | ||
| 161 | |||
| 162 | /* Number of valid bytes (including padding) | ||
| 163 | * blk_len <= tp_block_size | ||
| 164 | */ | ||
| 165 | __u32 blk_len; | ||
| 166 | |||
| 167 | /* | ||
| 168 | * Quite a few uses of sequence number: | ||
| 169 | * 1. Make sure cache flush etc worked. | ||
| 170 | * Well, one can argue - why not use the increasing ts below? | ||
| 171 | * But look at 2. below first. | ||
| 172 | * 2. When you pass around blocks to other user space decoders, | ||
| 173 | * you can see which blk[s] is[are] outstanding etc. | ||
| 174 | * 3. Validate kernel code. | ||
| 175 | */ | ||
| 176 | __aligned_u64 seq_num; | ||
| 177 | |||
| 178 | /* | ||
| 179 | * ts_last_pkt: | ||
| 180 | * | ||
| 181 | * Case 1. Block has 'N'(N >=1) packets and TMO'd(timed out) | ||
| 182 | * ts_last_pkt == 'time-stamp of last packet' and NOT the | ||
| 183 | * time when the timer fired and the block was closed. | ||
| 184 | * By providing the ts of the last packet we can absolutely | ||
| 185 | * guarantee that time-stamp wise, the first packet in the | ||
| 186 | * next block will never precede the last packet of the | ||
| 187 | * previous block. | ||
| 188 | * Case 2. Block has zero packets and TMO'd | ||
| 189 | * ts_last_pkt = time when the timer fired and the block | ||
| 190 | * was closed. | ||
| 191 | * Case 3. Block has 'N' packets and NO TMO. | ||
| 192 | * ts_last_pkt = time-stamp of the last pkt in the block. | ||
| 193 | * | ||
| 194 | * ts_first_pkt: | ||
| 195 | * Is always the time-stamp when the block was opened. | ||
| 196 | * Case a) ZERO packets | ||
| 197 | * No packets to deal with but atleast you know the | ||
| 198 | * time-interval of this block. | ||
| 199 | * Case b) Non-zero packets | ||
| 200 | * Use the ts of the first packet in the block. | ||
| 201 | * | ||
| 202 | */ | ||
| 203 | struct tpacket_bd_ts ts_first_pkt, ts_last_pkt; | ||
| 204 | }; | ||
| 205 | |||
| 206 | union tpacket_bd_header_u { | ||
| 207 | struct tpacket_hdr_v1 bh1; | ||
| 208 | }; | ||
| 209 | |||
| 210 | struct tpacket_block_desc { | ||
| 211 | __u32 version; | ||
| 212 | __u32 offset_to_priv; | ||
| 213 | union tpacket_bd_header_u hdr; | ||
| 214 | }; | ||
| 215 | |||
| 114 | #define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) | 216 | #define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) |
| 217 | #define TPACKET3_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll)) | ||
| 115 | 218 | ||
| 116 | enum tpacket_versions { | 219 | enum tpacket_versions { |
| 117 | TPACKET_V1, | 220 | TPACKET_V1, |
| 118 | TPACKET_V2, | 221 | TPACKET_V2, |
| 222 | TPACKET_V3 | ||
| 119 | }; | 223 | }; |
| 120 | 224 | ||
| 121 | /* | 225 | /* |
| @@ -138,6 +242,21 @@ struct tpacket_req { | |||
| 138 | unsigned int tp_frame_nr; /* Total number of frames */ | 242 | unsigned int tp_frame_nr; /* Total number of frames */ |
| 139 | }; | 243 | }; |
| 140 | 244 | ||
| 245 | struct tpacket_req3 { | ||
| 246 | unsigned int tp_block_size; /* Minimal size of contiguous block */ | ||
| 247 | unsigned int tp_block_nr; /* Number of blocks */ | ||
| 248 | unsigned int tp_frame_size; /* Size of frame */ | ||
| 249 | unsigned int tp_frame_nr; /* Total number of frames */ | ||
| 250 | unsigned int tp_retire_blk_tov; /* timeout in msecs */ | ||
| 251 | unsigned int tp_sizeof_priv; /* offset to private data area */ | ||
| 252 | unsigned int tp_feature_req_word; | ||
| 253 | }; | ||
| 254 | |||
| 255 | union tpacket_req_u { | ||
| 256 | struct tpacket_req req; | ||
| 257 | struct tpacket_req3 req3; | ||
| 258 | }; | ||
| 259 | |||
| 141 | struct packet_mreq { | 260 | struct packet_mreq { |
| 142 | int mr_ifindex; | 261 | int mr_ifindex; |
| 143 | unsigned short mr_type; | 262 | unsigned short mr_type; |
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h index 184bc5566207..23cefa1111bf 100644 --- a/include/linux/if_pppol2tp.h +++ b/include/linux/if_pppol2tp.h | |||
| @@ -39,7 +39,7 @@ struct pppol2tp_addr { | |||
| 39 | * bits. So we need a different sockaddr structure. | 39 | * bits. So we need a different sockaddr structure. |
| 40 | */ | 40 | */ |
| 41 | struct pppol2tpv3_addr { | 41 | struct pppol2tpv3_addr { |
| 42 | pid_t pid; /* pid that owns the fd. | 42 | __kernel_pid_t pid; /* pid that owns the fd. |
| 43 | * 0 => current */ | 43 | * 0 => current */ |
| 44 | int fd; /* FD of UDP or IP socket to use */ | 44 | int fd; /* FD of UDP or IP socket to use */ |
| 45 | 45 | ||
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h index 397921b09ef9..b5f927f59f26 100644 --- a/include/linux/if_pppox.h +++ b/include/linux/if_pppox.h | |||
| @@ -20,8 +20,9 @@ | |||
| 20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
| 21 | #include <asm/byteorder.h> | 21 | #include <asm/byteorder.h> |
| 22 | 22 | ||
| 23 | #ifdef __KERNEL__ | 23 | #include <linux/socket.h> |
| 24 | #include <linux/if_ether.h> | 24 | #include <linux/if_ether.h> |
| 25 | #ifdef __KERNEL__ | ||
| 25 | #include <linux/if.h> | 26 | #include <linux/if.h> |
| 26 | #include <linux/netdevice.h> | 27 | #include <linux/netdevice.h> |
| 27 | #include <linux/ppp_channel.h> | 28 | #include <linux/ppp_channel.h> |
| @@ -63,7 +64,7 @@ struct pptp_addr { | |||
| 63 | #define PX_MAX_PROTO 3 | 64 | #define PX_MAX_PROTO 3 |
| 64 | 65 | ||
| 65 | struct sockaddr_pppox { | 66 | struct sockaddr_pppox { |
| 66 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 67 | __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 67 | unsigned int sa_protocol; /* protocol identifier */ | 68 | unsigned int sa_protocol; /* protocol identifier */ |
| 68 | union { | 69 | union { |
| 69 | struct pppoe_addr pppoe; | 70 | struct pppoe_addr pppoe; |
| @@ -77,7 +78,7 @@ struct sockaddr_pppox { | |||
| 77 | * type instead. | 78 | * type instead. |
| 78 | */ | 79 | */ |
| 79 | struct sockaddr_pppol2tp { | 80 | struct sockaddr_pppol2tp { |
| 80 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 81 | __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 81 | unsigned int sa_protocol; /* protocol identifier */ | 82 | unsigned int sa_protocol; /* protocol identifier */ |
| 82 | struct pppol2tp_addr pppol2tp; | 83 | struct pppol2tp_addr pppol2tp; |
| 83 | } __attribute__((packed)); | 84 | } __attribute__((packed)); |
| @@ -86,7 +87,7 @@ struct sockaddr_pppol2tp { | |||
| 86 | * bits. So we need a different sockaddr structure. | 87 | * bits. So we need a different sockaddr structure. |
| 87 | */ | 88 | */ |
| 88 | struct sockaddr_pppol2tpv3 { | 89 | struct sockaddr_pppol2tpv3 { |
| 89 | sa_family_t sa_family; /* address family, AF_PPPOX */ | 90 | __kernel_sa_family_t sa_family; /* address family, AF_PPPOX */ |
| 90 | unsigned int sa_protocol; /* protocol identifier */ | 91 | unsigned int sa_protocol; /* protocol identifier */ |
| 91 | struct pppol2tpv3_addr pppol2tp; | 92 | struct pppol2tpv3_addr pppol2tp; |
| 92 | } __attribute__((packed)); | 93 | } __attribute__((packed)); |
diff --git a/include/linux/in.h b/include/linux/in.h index beeb6dee2b49..01129c0ea87c 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
| @@ -182,7 +182,7 @@ struct in_pktinfo { | |||
| 182 | /* Structure describing an Internet (IP) socket address. */ | 182 | /* Structure describing an Internet (IP) socket address. */ |
| 183 | #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ | 183 | #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ |
| 184 | struct sockaddr_in { | 184 | struct sockaddr_in { |
| 185 | sa_family_t sin_family; /* Address family */ | 185 | __kernel_sa_family_t sin_family; /* Address family */ |
| 186 | __be16 sin_port; /* Port number */ | 186 | __be16 sin_port; /* Port number */ |
| 187 | struct in_addr sin_addr; /* Internet address */ | 187 | struct in_addr sin_addr; /* Internet address */ |
| 188 | 188 | ||
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index bc8c49022084..80b480c97532 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
| @@ -97,9 +97,10 @@ enum { | |||
| 97 | INET_DIAG_INFO, | 97 | INET_DIAG_INFO, |
| 98 | INET_DIAG_VEGASINFO, | 98 | INET_DIAG_VEGASINFO, |
| 99 | INET_DIAG_CONG, | 99 | INET_DIAG_CONG, |
| 100 | INET_DIAG_TOS, | ||
| 100 | }; | 101 | }; |
| 101 | 102 | ||
| 102 | #define INET_DIAG_MAX INET_DIAG_CONG | 103 | #define INET_DIAG_MAX INET_DIAG_TOS |
| 103 | 104 | ||
| 104 | 105 | ||
| 105 | /* INET_DIAG_MEM */ | 106 | /* INET_DIAG_MEM */ |
diff --git a/include/linux/ip6_tunnel.h b/include/linux/ip6_tunnel.h index acb9ad684d63..bf22b0317902 100644 --- a/include/linux/ip6_tunnel.h +++ b/include/linux/ip6_tunnel.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | #define IP6_TNL_F_MIP6_DEV 0x8 | 16 | #define IP6_TNL_F_MIP6_DEV 0x8 |
| 17 | /* copy DSCP from the outer packet */ | 17 | /* copy DSCP from the outer packet */ |
| 18 | #define IP6_TNL_F_RCV_DSCP_COPY 0x10 | 18 | #define IP6_TNL_F_RCV_DSCP_COPY 0x10 |
| 19 | /* copy fwmark from inner packet */ | ||
| 20 | #define IP6_TNL_F_USE_ORIG_FWMARK 0x20 | ||
| 19 | 21 | ||
| 20 | struct ip6_tnl_parm { | 22 | struct ip6_tnl_parm { |
| 21 | char name[IFNAMSIZ]; /* name of tunnel device */ | 23 | char name[IFNAMSIZ]; /* name of tunnel device */ |
diff --git a/include/linux/ipx.h b/include/linux/ipx.h index aabb1d294025..3d48014cdd71 100644 --- a/include/linux/ipx.h +++ b/include/linux/ipx.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #define IPX_MTU 576 | 7 | #define IPX_MTU 576 |
| 8 | 8 | ||
| 9 | struct sockaddr_ipx { | 9 | struct sockaddr_ipx { |
| 10 | sa_family_t sipx_family; | 10 | __kernel_sa_family_t sipx_family; |
| 11 | __be16 sipx_port; | 11 | __be16 sipx_port; |
| 12 | __be32 sipx_network; | 12 | __be32 sipx_network; |
| 13 | unsigned char sipx_node[IPX_NODE_LEN]; | 13 | unsigned char sipx_node[IPX_NODE_LEN]; |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 00bdad0e8515..a014c3252311 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
| @@ -26,12 +26,9 @@ | |||
| 26 | #define KERNEL_IRDA_H | 26 | #define KERNEL_IRDA_H |
| 27 | 27 | ||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/socket.h> | ||
| 29 | 30 | ||
| 30 | /* Please do *not* add any #include in this file, this file is | 31 | /* Note that this file is shared with user space. */ |
| 31 | * included as-is in user space. | ||
| 32 | * Please fix the calling file to properly included needed files before | ||
| 33 | * this one, or preferably to include <net/irda/irda.h> instead. | ||
| 34 | * Jean II */ | ||
| 35 | 32 | ||
| 36 | /* Hint bit positions for first hint byte */ | 33 | /* Hint bit positions for first hint byte */ |
| 37 | #define HINT_PNP 0x01 | 34 | #define HINT_PNP 0x01 |
| @@ -125,7 +122,7 @@ enum { | |||
| 125 | #define LSAP_ANY 0xff | 122 | #define LSAP_ANY 0xff |
| 126 | 123 | ||
| 127 | struct sockaddr_irda { | 124 | struct sockaddr_irda { |
| 128 | sa_family_t sir_family; /* AF_IRDA */ | 125 | __kernel_sa_family_t sir_family; /* AF_IRDA */ |
| 129 | __u8 sir_lsap_sel; /* LSAP selector */ | 126 | __u8 sir_lsap_sel; /* LSAP selector */ |
| 130 | __u32 sir_addr; /* Device address */ | 127 | __u32 sir_addr; /* Device address */ |
| 131 | char sir_name[25]; /* Usually <service>:IrDA:TinyTP */ | 128 | char sir_name[25]; /* Usually <service>:IrDA:TinyTP */ |
diff --git a/include/linux/l2tp.h b/include/linux/l2tp.h index 4bdb31df8e72..e77d7f9bb246 100644 --- a/include/linux/l2tp.h +++ b/include/linux/l2tp.h | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | #define _LINUX_L2TP_H_ | 8 | #define _LINUX_L2TP_H_ |
| 9 | 9 | ||
| 10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
| 11 | #ifdef __KERNEL__ | ||
| 12 | #include <linux/socket.h> | 11 | #include <linux/socket.h> |
| 12 | #ifdef __KERNEL__ | ||
| 13 | #include <linux/in.h> | 13 | #include <linux/in.h> |
| 14 | #else | 14 | #else |
| 15 | #include <netinet/in.h> | 15 | #include <netinet/in.h> |
| @@ -26,14 +26,15 @@ | |||
| 26 | #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ | 26 | #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ |
| 27 | struct sockaddr_l2tpip { | 27 | struct sockaddr_l2tpip { |
| 28 | /* The first fields must match struct sockaddr_in */ | 28 | /* The first fields must match struct sockaddr_in */ |
| 29 | sa_family_t l2tp_family; /* AF_INET */ | 29 | __kernel_sa_family_t l2tp_family; /* AF_INET */ |
| 30 | __be16 l2tp_unused; /* INET port number (unused) */ | 30 | __be16 l2tp_unused; /* INET port number (unused) */ |
| 31 | struct in_addr l2tp_addr; /* Internet address */ | 31 | struct in_addr l2tp_addr; /* Internet address */ |
| 32 | 32 | ||
| 33 | __u32 l2tp_conn_id; /* Connection ID of tunnel */ | 33 | __u32 l2tp_conn_id; /* Connection ID of tunnel */ |
| 34 | 34 | ||
| 35 | /* Pad to size of `struct sockaddr'. */ | 35 | /* Pad to size of `struct sockaddr'. */ |
| 36 | unsigned char __pad[sizeof(struct sockaddr) - sizeof(sa_family_t) - | 36 | unsigned char __pad[sizeof(struct sockaddr) - |
| 37 | sizeof(__kernel_sa_family_t) - | ||
| 37 | sizeof(__be16) - sizeof(struct in_addr) - | 38 | sizeof(__be16) - sizeof(struct in_addr) - |
| 38 | sizeof(__u32)]; | 39 | sizeof(__u32)]; |
| 39 | }; | 40 | }; |
diff --git a/include/linux/lapb.h b/include/linux/lapb.h index ce709e1885cc..873c1eb635e4 100644 --- a/include/linux/lapb.h +++ b/include/linux/lapb.h | |||
| @@ -44,7 +44,8 @@ struct lapb_parms_struct { | |||
| 44 | unsigned int mode; | 44 | unsigned int mode; |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | extern int lapb_register(struct net_device *dev, struct lapb_register_struct *callbacks); | 47 | extern int lapb_register(struct net_device *dev, |
| 48 | const struct lapb_register_struct *callbacks); | ||
| 48 | extern int lapb_unregister(struct net_device *dev); | 49 | extern int lapb_unregister(struct net_device *dev); |
| 49 | extern int lapb_getparms(struct net_device *dev, struct lapb_parms_struct *parms); | 50 | extern int lapb_getparms(struct net_device *dev, struct lapb_parms_struct *parms); |
| 50 | extern int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms); | 51 | extern int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms); |
diff --git a/include/linux/llc.h b/include/linux/llc.h index ad7074ba81af..a2418ae13ee9 100644 --- a/include/linux/llc.h +++ b/include/linux/llc.h | |||
| @@ -12,16 +12,20 @@ | |||
| 12 | * | 12 | * |
| 13 | * See the GNU General Public License for more details. | 13 | * See the GNU General Public License for more details. |
| 14 | */ | 14 | */ |
| 15 | |||
| 16 | #include <linux/socket.h> | ||
| 17 | |||
| 15 | #define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */ | 18 | #define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */ |
| 16 | struct sockaddr_llc { | 19 | struct sockaddr_llc { |
| 17 | sa_family_t sllc_family; /* AF_LLC */ | 20 | __kernel_sa_family_t sllc_family; /* AF_LLC */ |
| 18 | sa_family_t sllc_arphrd; /* ARPHRD_ETHER */ | 21 | __kernel_sa_family_t sllc_arphrd; /* ARPHRD_ETHER */ |
| 19 | unsigned char sllc_test; | 22 | unsigned char sllc_test; |
| 20 | unsigned char sllc_xid; | 23 | unsigned char sllc_xid; |
| 21 | unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */ | 24 | unsigned char sllc_ua; /* UA data, only for SOCK_STREAM. */ |
| 22 | unsigned char sllc_sap; | 25 | unsigned char sllc_sap; |
| 23 | unsigned char sllc_mac[IFHWADDRLEN]; | 26 | unsigned char sllc_mac[IFHWADDRLEN]; |
| 24 | unsigned char __pad[__LLC_SOCK_SIZE__ - sizeof(sa_family_t) * 2 - | 27 | unsigned char __pad[__LLC_SOCK_SIZE__ - |
| 28 | sizeof(__kernel_sa_family_t) * 2 - | ||
| 25 | sizeof(unsigned char) * 4 - IFHWADDRLEN]; | 29 | sizeof(unsigned char) * 4 - IFHWADDRLEN]; |
| 26 | }; | 30 | }; |
| 27 | 31 | ||
diff --git a/include/linux/mii.h b/include/linux/mii.h index 103113a2fd18..27748230aa69 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
| @@ -11,131 +11,130 @@ | |||
| 11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
| 12 | 12 | ||
| 13 | /* Generic MII registers. */ | 13 | /* Generic MII registers. */ |
| 14 | 14 | #define MII_BMCR 0x00 /* Basic mode control register */ | |
| 15 | #define MII_BMCR 0x00 /* Basic mode control register */ | 15 | #define MII_BMSR 0x01 /* Basic mode status register */ |
| 16 | #define MII_BMSR 0x01 /* Basic mode status register */ | 16 | #define MII_PHYSID1 0x02 /* PHYS ID 1 */ |
| 17 | #define MII_PHYSID1 0x02 /* PHYS ID 1 */ | 17 | #define MII_PHYSID2 0x03 /* PHYS ID 2 */ |
| 18 | #define MII_PHYSID2 0x03 /* PHYS ID 2 */ | 18 | #define MII_ADVERTISE 0x04 /* Advertisement control reg */ |
| 19 | #define MII_ADVERTISE 0x04 /* Advertisement control reg */ | 19 | #define MII_LPA 0x05 /* Link partner ability reg */ |
| 20 | #define MII_LPA 0x05 /* Link partner ability reg */ | 20 | #define MII_EXPANSION 0x06 /* Expansion register */ |
| 21 | #define MII_EXPANSION 0x06 /* Expansion register */ | 21 | #define MII_CTRL1000 0x09 /* 1000BASE-T control */ |
| 22 | #define MII_CTRL1000 0x09 /* 1000BASE-T control */ | 22 | #define MII_STAT1000 0x0a /* 1000BASE-T status */ |
| 23 | #define MII_STAT1000 0x0a /* 1000BASE-T status */ | 23 | #define MII_ESTATUS 0x0f /* Extended Status */ |
| 24 | #define MII_ESTATUS 0x0f /* Extended Status */ | 24 | #define MII_DCOUNTER 0x12 /* Disconnect counter */ |
| 25 | #define MII_DCOUNTER 0x12 /* Disconnect counter */ | 25 | #define MII_FCSCOUNTER 0x13 /* False carrier counter */ |
| 26 | #define MII_FCSCOUNTER 0x13 /* False carrier counter */ | 26 | #define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ |
| 27 | #define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ | 27 | #define MII_RERRCOUNTER 0x15 /* Receive error counter */ |
| 28 | #define MII_RERRCOUNTER 0x15 /* Receive error counter */ | 28 | #define MII_SREVISION 0x16 /* Silicon revision */ |
| 29 | #define MII_SREVISION 0x16 /* Silicon revision */ | 29 | #define MII_RESV1 0x17 /* Reserved... */ |
| 30 | #define MII_RESV1 0x17 /* Reserved... */ | 30 | #define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ |
| 31 | #define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ | 31 | #define MII_PHYADDR 0x19 /* PHY address */ |
| 32 | #define MII_PHYADDR 0x19 /* PHY address */ | 32 | #define MII_RESV2 0x1a /* Reserved... */ |
| 33 | #define MII_RESV2 0x1a /* Reserved... */ | 33 | #define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ |
| 34 | #define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ | 34 | #define MII_NCONFIG 0x1c /* Network interface config */ |
| 35 | #define MII_NCONFIG 0x1c /* Network interface config */ | ||
| 36 | 35 | ||
| 37 | /* Basic mode control register. */ | 36 | /* Basic mode control register. */ |
| 38 | #define BMCR_RESV 0x003f /* Unused... */ | 37 | #define BMCR_RESV 0x003f /* Unused... */ |
| 39 | #define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */ | 38 | #define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */ |
| 40 | #define BMCR_CTST 0x0080 /* Collision test */ | 39 | #define BMCR_CTST 0x0080 /* Collision test */ |
| 41 | #define BMCR_FULLDPLX 0x0100 /* Full duplex */ | 40 | #define BMCR_FULLDPLX 0x0100 /* Full duplex */ |
| 42 | #define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ | 41 | #define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ |
| 43 | #define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ | 42 | #define BMCR_ISOLATE 0x0400 /* Isolate data paths from MII */ |
| 44 | #define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ | 43 | #define BMCR_PDOWN 0x0800 /* Enable low power state */ |
| 45 | #define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ | 44 | #define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ |
| 46 | #define BMCR_SPEED100 0x2000 /* Select 100Mbps */ | 45 | #define BMCR_SPEED100 0x2000 /* Select 100Mbps */ |
| 47 | #define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ | 46 | #define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ |
| 48 | #define BMCR_RESET 0x8000 /* Reset the DP83840 */ | 47 | #define BMCR_RESET 0x8000 /* Reset to default state */ |
| 49 | 48 | ||
| 50 | /* Basic mode status register. */ | 49 | /* Basic mode status register. */ |
| 51 | #define BMSR_ERCAP 0x0001 /* Ext-reg capability */ | 50 | #define BMSR_ERCAP 0x0001 /* Ext-reg capability */ |
| 52 | #define BMSR_JCD 0x0002 /* Jabber detected */ | 51 | #define BMSR_JCD 0x0002 /* Jabber detected */ |
| 53 | #define BMSR_LSTATUS 0x0004 /* Link status */ | 52 | #define BMSR_LSTATUS 0x0004 /* Link status */ |
| 54 | #define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ | 53 | #define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ |
| 55 | #define BMSR_RFAULT 0x0010 /* Remote fault detected */ | 54 | #define BMSR_RFAULT 0x0010 /* Remote fault detected */ |
| 56 | #define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ | 55 | #define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ |
| 57 | #define BMSR_RESV 0x00c0 /* Unused... */ | 56 | #define BMSR_RESV 0x00c0 /* Unused... */ |
| 58 | #define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */ | 57 | #define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */ |
| 59 | #define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */ | 58 | #define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */ |
| 60 | #define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */ | 59 | #define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */ |
| 61 | #define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ | 60 | #define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ |
| 62 | #define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ | 61 | #define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ |
| 63 | #define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ | 62 | #define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ |
| 64 | #define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ | 63 | #define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ |
| 65 | #define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ | 64 | #define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ |
| 66 | 65 | ||
| 67 | /* Advertisement control register. */ | 66 | /* Advertisement control register. */ |
| 68 | #define ADVERTISE_SLCT 0x001f /* Selector bits */ | 67 | #define ADVERTISE_SLCT 0x001f /* Selector bits */ |
| 69 | #define ADVERTISE_CSMA 0x0001 /* Only selector supported */ | 68 | #define ADVERTISE_CSMA 0x0001 /* Only selector supported */ |
| 70 | #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ | 69 | #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ |
| 71 | #define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */ | 70 | #define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */ |
| 72 | #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ | 71 | #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ |
| 73 | #define ADVERTISE_1000XHALF 0x0040 /* Try for 1000BASE-X half-duplex */ | 72 | #define ADVERTISE_1000XHALF 0x0040 /* Try for 1000BASE-X half-duplex */ |
| 74 | #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ | 73 | #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ |
| 75 | #define ADVERTISE_1000XPAUSE 0x0080 /* Try for 1000BASE-X pause */ | 74 | #define ADVERTISE_1000XPAUSE 0x0080 /* Try for 1000BASE-X pause */ |
| 76 | #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ | 75 | #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ |
| 77 | #define ADVERTISE_1000XPSE_ASYM 0x0100 /* Try for 1000BASE-X asym pause */ | 76 | #define ADVERTISE_1000XPSE_ASYM 0x0100 /* Try for 1000BASE-X asym pause */ |
| 78 | #define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ | 77 | #define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ |
| 79 | #define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */ | 78 | #define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */ |
| 80 | #define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */ | 79 | #define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */ |
| 81 | #define ADVERTISE_RESV 0x1000 /* Unused... */ | 80 | #define ADVERTISE_RESV 0x1000 /* Unused... */ |
| 82 | #define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ | 81 | #define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ |
| 83 | #define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ | 82 | #define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ |
| 84 | #define ADVERTISE_NPAGE 0x8000 /* Next page bit */ | 83 | #define ADVERTISE_NPAGE 0x8000 /* Next page bit */ |
| 85 | 84 | ||
| 86 | #define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ | 85 | #define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ |
| 87 | ADVERTISE_CSMA) | 86 | ADVERTISE_CSMA) |
| 88 | #define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ | 87 | #define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ |
| 89 | ADVERTISE_100HALF | ADVERTISE_100FULL) | 88 | ADVERTISE_100HALF | ADVERTISE_100FULL) |
| 90 | 89 | ||
| 91 | /* Link partner ability register. */ | 90 | /* Link partner ability register. */ |
| 92 | #define LPA_SLCT 0x001f /* Same as advertise selector */ | 91 | #define LPA_SLCT 0x001f /* Same as advertise selector */ |
| 93 | #define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ | 92 | #define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ |
| 94 | #define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */ | 93 | #define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */ |
| 95 | #define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ | 94 | #define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ |
| 96 | #define LPA_1000XHALF 0x0040 /* Can do 1000BASE-X half-duplex */ | 95 | #define LPA_1000XHALF 0x0040 /* Can do 1000BASE-X half-duplex */ |
| 97 | #define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ | 96 | #define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ |
| 98 | #define LPA_1000XPAUSE 0x0080 /* Can do 1000BASE-X pause */ | 97 | #define LPA_1000XPAUSE 0x0080 /* Can do 1000BASE-X pause */ |
| 99 | #define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ | 98 | #define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ |
| 100 | #define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/ | 99 | #define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/ |
| 101 | #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ | 100 | #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ |
| 102 | #define LPA_PAUSE_CAP 0x0400 /* Can pause */ | 101 | #define LPA_PAUSE_CAP 0x0400 /* Can pause */ |
| 103 | #define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */ | 102 | #define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */ |
| 104 | #define LPA_RESV 0x1000 /* Unused... */ | 103 | #define LPA_RESV 0x1000 /* Unused... */ |
| 105 | #define LPA_RFAULT 0x2000 /* Link partner faulted */ | 104 | #define LPA_RFAULT 0x2000 /* Link partner faulted */ |
| 106 | #define LPA_LPACK 0x4000 /* Link partner acked us */ | 105 | #define LPA_LPACK 0x4000 /* Link partner acked us */ |
| 107 | #define LPA_NPAGE 0x8000 /* Next page bit */ | 106 | #define LPA_NPAGE 0x8000 /* Next page bit */ |
| 108 | 107 | ||
| 109 | #define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) | 108 | #define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) |
| 110 | #define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) | 109 | #define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) |
| 111 | 110 | ||
| 112 | /* Expansion register for auto-negotiation. */ | 111 | /* Expansion register for auto-negotiation. */ |
| 113 | #define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ | 112 | #define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ |
| 114 | #define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ | 113 | #define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ |
| 115 | #define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ | 114 | #define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ |
| 116 | #define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ | 115 | #define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ |
| 117 | #define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ | 116 | #define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ |
| 118 | #define EXPANSION_RESV 0xffe0 /* Unused... */ | 117 | #define EXPANSION_RESV 0xffe0 /* Unused... */ |
| 119 | 118 | ||
| 120 | #define ESTATUS_1000_TFULL 0x2000 /* Can do 1000BT Full */ | 119 | #define ESTATUS_1000_TFULL 0x2000 /* Can do 1000BT Full */ |
| 121 | #define ESTATUS_1000_THALF 0x1000 /* Can do 1000BT Half */ | 120 | #define ESTATUS_1000_THALF 0x1000 /* Can do 1000BT Half */ |
| 122 | 121 | ||
| 123 | /* N-way test register. */ | 122 | /* N-way test register. */ |
| 124 | #define NWAYTEST_RESV1 0x00ff /* Unused... */ | 123 | #define NWAYTEST_RESV1 0x00ff /* Unused... */ |
| 125 | #define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ | 124 | #define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ |
| 126 | #define NWAYTEST_RESV2 0xfe00 /* Unused... */ | 125 | #define NWAYTEST_RESV2 0xfe00 /* Unused... */ |
| 127 | 126 | ||
| 128 | /* 1000BASE-T Control register */ | 127 | /* 1000BASE-T Control register */ |
| 129 | #define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */ | 128 | #define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */ |
| 130 | #define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */ | 129 | #define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */ |
| 131 | #define CTL1000_AS_MASTER 0x0800 | 130 | #define CTL1000_AS_MASTER 0x0800 |
| 132 | #define CTL1000_ENABLE_MASTER 0x1000 | 131 | #define CTL1000_ENABLE_MASTER 0x1000 |
| 133 | 132 | ||
| 134 | /* 1000BASE-T Status register */ | 133 | /* 1000BASE-T Status register */ |
| 135 | #define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */ | 134 | #define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */ |
| 136 | #define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */ | 135 | #define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */ |
| 137 | #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ | 136 | #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ |
| 138 | #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ | 137 | #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ |
| 139 | 138 | ||
| 140 | /* Flow control flags */ | 139 | /* Flow control flags */ |
| 141 | #define FLOW_CTRL_TX 0x01 | 140 | #define FLOW_CTRL_TX 0x01 |
| @@ -149,7 +148,7 @@ struct mii_ioctl_data { | |||
| 149 | __u16 val_out; | 148 | __u16 val_out; |
| 150 | }; | 149 | }; |
| 151 | 150 | ||
| 152 | #ifdef __KERNEL__ | 151 | #ifdef __KERNEL__ |
| 153 | 152 | ||
| 154 | #include <linux/if.h> | 153 | #include <linux/if.h> |
| 155 | 154 | ||
| @@ -180,7 +179,7 @@ extern unsigned int mii_check_media (struct mii_if_info *mii, | |||
| 180 | unsigned int ok_to_print, | 179 | unsigned int ok_to_print, |
| 181 | unsigned int init_media); | 180 | unsigned int init_media); |
| 182 | extern int generic_mii_ioctl(struct mii_if_info *mii_if, | 181 | extern int generic_mii_ioctl(struct mii_if_info *mii_if, |
| 183 | struct mii_ioctl_data *mii_data, int cmd, | 182 | struct mii_ioctl_data *mii_data, int cmd, |
| 184 | unsigned int *duplex_changed); | 183 | unsigned int *duplex_changed); |
| 185 | 184 | ||
| 186 | 185 | ||
| @@ -189,7 +188,6 @@ static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) | |||
| 189 | return (struct mii_ioctl_data *) &rq->ifr_ifru; | 188 | return (struct mii_ioctl_data *) &rq->ifr_ifru; |
| 190 | } | 189 | } |
| 191 | 190 | ||
| 192 | |||
| 193 | /** | 191 | /** |
| 194 | * mii_nway_result | 192 | * mii_nway_result |
| 195 | * @negotiated: value of MII ANAR and'd with ANLPAR | 193 | * @negotiated: value of MII ANAR and'd with ANLPAR |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 53ef894bfa05..2366f94a095a 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -75,6 +75,7 @@ enum { | |||
| 75 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21, | 75 | MLX4_DEV_CAP_FLAG_UD_MCAST = 1LL << 21, |
| 76 | MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30, | 76 | MLX4_DEV_CAP_FLAG_IBOE = 1LL << 30, |
| 77 | MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32, | 77 | MLX4_DEV_CAP_FLAG_UC_LOOPBACK = 1LL << 32, |
| 78 | MLX4_DEV_CAP_FLAG_FCS_KEEP = 1LL << 34, | ||
| 78 | MLX4_DEV_CAP_FLAG_WOL = 1LL << 38, | 79 | MLX4_DEV_CAP_FLAG_WOL = 1LL << 38, |
| 79 | MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, | 80 | MLX4_DEV_CAP_FLAG_UDP_RSS = 1LL << 40, |
| 80 | MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, | 81 | MLX4_DEV_CAP_FLAG_VEP_UC_STEER = 1LL << 41, |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 774b8952deb4..29971a589ff2 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
| @@ -135,6 +135,17 @@ struct page { | |||
| 135 | #endif | 135 | #endif |
| 136 | ; | 136 | ; |
| 137 | 137 | ||
| 138 | struct page_frag { | ||
| 139 | struct page *page; | ||
| 140 | #if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) | ||
| 141 | __u32 offset; | ||
| 142 | __u32 size; | ||
| 143 | #else | ||
| 144 | __u16 offset; | ||
| 145 | __u16 size; | ||
| 146 | #endif | ||
| 147 | }; | ||
| 148 | |||
| 138 | typedef unsigned long __nocast vm_flags_t; | 149 | typedef unsigned long __nocast vm_flags_t; |
| 139 | 150 | ||
| 140 | /* | 151 | /* |
diff --git a/include/linux/net_tstamp.h b/include/linux/net_tstamp.h index a3b8546354ac..ae5df122e42f 100644 --- a/include/linux/net_tstamp.h +++ b/include/linux/net_tstamp.h | |||
| @@ -45,7 +45,7 @@ struct hwtstamp_config { | |||
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | /* possible values for hwtstamp_config->tx_type */ | 47 | /* possible values for hwtstamp_config->tx_type */ |
| 48 | enum { | 48 | enum hwtstamp_tx_types { |
| 49 | /* | 49 | /* |
| 50 | * No outgoing packet will need hardware time stamping; | 50 | * No outgoing packet will need hardware time stamping; |
| 51 | * should a packet arrive which asks for it, no hardware | 51 | * should a packet arrive which asks for it, no hardware |
| @@ -60,10 +60,19 @@ enum { | |||
| 60 | * before sending the packet. | 60 | * before sending the packet. |
| 61 | */ | 61 | */ |
| 62 | HWTSTAMP_TX_ON, | 62 | HWTSTAMP_TX_ON, |
| 63 | |||
| 64 | /* | ||
| 65 | * Enables time stamping for outgoing packets just as | ||
| 66 | * HWTSTAMP_TX_ON does, but also enables time stamp insertion | ||
| 67 | * directly into Sync packets. In this case, transmitted Sync | ||
| 68 | * packets will not received a time stamp via the socket error | ||
| 69 | * queue. | ||
| 70 | */ | ||
| 71 | HWTSTAMP_TX_ONESTEP_SYNC, | ||
| 63 | }; | 72 | }; |
| 64 | 73 | ||
| 65 | /* possible values for hwtstamp_config->rx_filter */ | 74 | /* possible values for hwtstamp_config->rx_filter */ |
| 66 | enum { | 75 | enum hwtstamp_rx_filters { |
| 67 | /* time stamp no incoming packet at all */ | 76 | /* time stamp no incoming packet at all */ |
| 68 | HWTSTAMP_FILTER_NONE, | 77 | HWTSTAMP_FILTER_NONE, |
| 69 | 78 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 279726039f00..c8615cd0b2f6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -723,9 +723,8 @@ struct netdev_tc_txq { | |||
| 723 | * | 723 | * |
| 724 | * void (*ndo_set_rx_mode)(struct net_device *dev); | 724 | * void (*ndo_set_rx_mode)(struct net_device *dev); |
| 725 | * This function is called device changes address list filtering. | 725 | * This function is called device changes address list filtering. |
| 726 | * | 726 | * If driver handles unicast address filtering, it should set |
| 727 | * void (*ndo_set_multicast_list)(struct net_device *dev); | 727 | * IFF_UNICAST_FLT to its priv_flags. |
| 728 | * This function is called when the multicast address list changes. | ||
| 729 | * | 728 | * |
| 730 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); | 729 | * int (*ndo_set_mac_address)(struct net_device *dev, void *addr); |
| 731 | * This function is called when the Media Access Control address | 730 | * This function is called when the Media Access Control address |
| @@ -782,6 +781,7 @@ struct netdev_tc_txq { | |||
| 782 | * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac); | 781 | * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac); |
| 783 | * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos); | 782 | * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan, u8 qos); |
| 784 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); | 783 | * int (*ndo_set_vf_tx_rate)(struct net_device *dev, int vf, int rate); |
| 784 | * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting); | ||
| 785 | * int (*ndo_get_vf_config)(struct net_device *dev, | 785 | * int (*ndo_get_vf_config)(struct net_device *dev, |
| 786 | * int vf, struct ifla_vf_info *ivf); | 786 | * int vf, struct ifla_vf_info *ivf); |
| 787 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, | 787 | * int (*ndo_set_vf_port)(struct net_device *dev, int vf, |
| @@ -868,7 +868,6 @@ struct net_device_ops { | |||
| 868 | void (*ndo_change_rx_flags)(struct net_device *dev, | 868 | void (*ndo_change_rx_flags)(struct net_device *dev, |
| 869 | int flags); | 869 | int flags); |
| 870 | void (*ndo_set_rx_mode)(struct net_device *dev); | 870 | void (*ndo_set_rx_mode)(struct net_device *dev); |
| 871 | void (*ndo_set_multicast_list)(struct net_device *dev); | ||
| 872 | int (*ndo_set_mac_address)(struct net_device *dev, | 871 | int (*ndo_set_mac_address)(struct net_device *dev, |
| 873 | void *addr); | 872 | void *addr); |
| 874 | int (*ndo_validate_addr)(struct net_device *dev); | 873 | int (*ndo_validate_addr)(struct net_device *dev); |
| @@ -902,6 +901,8 @@ struct net_device_ops { | |||
| 902 | int queue, u16 vlan, u8 qos); | 901 | int queue, u16 vlan, u8 qos); |
| 903 | int (*ndo_set_vf_tx_rate)(struct net_device *dev, | 902 | int (*ndo_set_vf_tx_rate)(struct net_device *dev, |
| 904 | int vf, int rate); | 903 | int vf, int rate); |
| 904 | int (*ndo_set_vf_spoofchk)(struct net_device *dev, | ||
| 905 | int vf, bool setting); | ||
| 905 | int (*ndo_get_vf_config)(struct net_device *dev, | 906 | int (*ndo_get_vf_config)(struct net_device *dev, |
| 906 | int vf, | 907 | int vf, |
| 907 | struct ifla_vf_info *ivf); | 908 | struct ifla_vf_info *ivf); |
| @@ -924,11 +925,15 @@ struct net_device_ops { | |||
| 924 | u16 xid, | 925 | u16 xid, |
| 925 | struct scatterlist *sgl, | 926 | struct scatterlist *sgl, |
| 926 | unsigned int sgc); | 927 | unsigned int sgc); |
| 928 | #endif | ||
| 929 | |||
| 930 | #if defined(CONFIG_LIBFCOE) || defined(CONFIG_LIBFCOE_MODULE) | ||
| 927 | #define NETDEV_FCOE_WWNN 0 | 931 | #define NETDEV_FCOE_WWNN 0 |
| 928 | #define NETDEV_FCOE_WWPN 1 | 932 | #define NETDEV_FCOE_WWPN 1 |
| 929 | int (*ndo_fcoe_get_wwn)(struct net_device *dev, | 933 | int (*ndo_fcoe_get_wwn)(struct net_device *dev, |
| 930 | u64 *wwn, int type); | 934 | u64 *wwn, int type); |
| 931 | #endif | 935 | #endif |
| 936 | |||
| 932 | #ifdef CONFIG_RFS_ACCEL | 937 | #ifdef CONFIG_RFS_ACCEL |
| 933 | int (*ndo_rx_flow_steer)(struct net_device *dev, | 938 | int (*ndo_rx_flow_steer)(struct net_device *dev, |
| 934 | const struct sk_buff *skb, | 939 | const struct sk_buff *skb, |
| @@ -2587,9 +2592,6 @@ static inline int netif_is_bond_slave(struct net_device *dev) | |||
| 2587 | 2592 | ||
| 2588 | extern struct pernet_operations __net_initdata loopback_net_ops; | 2593 | extern struct pernet_operations __net_initdata loopback_net_ops; |
| 2589 | 2594 | ||
| 2590 | int dev_ethtool_get_settings(struct net_device *dev, | ||
| 2591 | struct ethtool_cmd *cmd); | ||
| 2592 | |||
| 2593 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2595 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
| 2594 | { | 2596 | { |
| 2595 | if (dev->features & NETIF_F_RXCSUM) | 2597 | if (dev->features & NETIF_F_RXCSUM) |
diff --git a/include/linux/netfilter/xt_connlimit.h b/include/linux/netfilter/xt_connlimit.h index 0ca66e97acbc..d1366f05d1b2 100644 --- a/include/linux/netfilter/xt_connlimit.h +++ b/include/linux/netfilter/xt_connlimit.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _XT_CONNLIMIT_H | 2 | #define _XT_CONNLIMIT_H |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/netfilter.h> | ||
| 5 | 6 | ||
| 6 | struct xt_connlimit_data; | 7 | struct xt_connlimit_data; |
| 7 | 8 | ||
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index 74b904d8f99c..e3c041d54020 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #define _XT_CONNTRACK_H | 6 | #define _XT_CONNTRACK_H |
| 7 | 7 | ||
| 8 | #include <linux/types.h> | 8 | #include <linux/types.h> |
| 9 | #include <linux/netfilter.h> | ||
| 9 | #include <linux/netfilter/nf_conntrack_tuple_common.h> | 10 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
| 10 | 11 | ||
| 11 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | 12 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) |
diff --git a/include/linux/netfilter/xt_iprange.h b/include/linux/netfilter/xt_iprange.h index c1f21a779a45..25fd7cf851f0 100644 --- a/include/linux/netfilter/xt_iprange.h +++ b/include/linux/netfilter/xt_iprange.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define _LINUX_NETFILTER_XT_IPRANGE_H 1 | 2 | #define _LINUX_NETFILTER_XT_IPRANGE_H 1 |
| 3 | 3 | ||
| 4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
| 5 | #include <linux/netfilter.h> | ||
| 5 | 6 | ||
| 6 | enum { | 7 | enum { |
| 7 | IPRANGE_SRC = 1 << 0, /* match source IP address */ | 8 | IPRANGE_SRC = 1 << 0, /* match source IP address */ |
diff --git a/include/linux/netfilter_arp/arp_tables.h b/include/linux/netfilter_arp/arp_tables.h index adbf4bff87ed..e08565d45178 100644 --- a/include/linux/netfilter_arp/arp_tables.h +++ b/include/linux/netfilter_arp/arp_tables.h | |||
| @@ -52,7 +52,7 @@ struct arpt_arp { | |||
| 52 | struct in_addr smsk, tmsk; | 52 | struct in_addr smsk, tmsk; |
| 53 | 53 | ||
| 54 | /* Device hw address length, src+target device addresses */ | 54 | /* Device hw address length, src+target device addresses */ |
| 55 | u_int8_t arhln, arhln_mask; | 55 | __u8 arhln, arhln_mask; |
| 56 | struct arpt_devaddr_info src_devaddr; | 56 | struct arpt_devaddr_info src_devaddr; |
| 57 | struct arpt_devaddr_info tgt_devaddr; | 57 | struct arpt_devaddr_info tgt_devaddr; |
| 58 | 58 | ||
| @@ -71,9 +71,9 @@ struct arpt_arp { | |||
| 71 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; | 71 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; |
| 72 | 72 | ||
| 73 | /* Flags word */ | 73 | /* Flags word */ |
| 74 | u_int8_t flags; | 74 | __u8 flags; |
| 75 | /* Inverse flags */ | 75 | /* Inverse flags */ |
| 76 | u_int16_t invflags; | 76 | __u16 invflags; |
| 77 | }; | 77 | }; |
| 78 | 78 | ||
| 79 | /* Values for "flag" field in struct arpt_ip (general arp structure). | 79 | /* Values for "flag" field in struct arpt_ip (general arp structure). |
| @@ -102,9 +102,9 @@ struct arpt_entry | |||
| 102 | struct arpt_arp arp; | 102 | struct arpt_arp arp; |
| 103 | 103 | ||
| 104 | /* Size of arpt_entry + matches */ | 104 | /* Size of arpt_entry + matches */ |
| 105 | u_int16_t target_offset; | 105 | __u16 target_offset; |
| 106 | /* Size of arpt_entry + matches + target */ | 106 | /* Size of arpt_entry + matches + target */ |
| 107 | u_int16_t next_offset; | 107 | __u16 next_offset; |
| 108 | 108 | ||
| 109 | /* Back pointer */ | 109 | /* Back pointer */ |
| 110 | unsigned int comefrom; | 110 | unsigned int comefrom; |
| @@ -260,8 +260,8 @@ extern unsigned int arpt_do_table(struct sk_buff *skb, | |||
| 260 | 260 | ||
| 261 | struct compat_arpt_entry { | 261 | struct compat_arpt_entry { |
| 262 | struct arpt_arp arp; | 262 | struct arpt_arp arp; |
| 263 | u_int16_t target_offset; | 263 | __u16 target_offset; |
| 264 | u_int16_t next_offset; | 264 | __u16 next_offset; |
| 265 | compat_uint_t comefrom; | 265 | compat_uint_t comefrom; |
| 266 | struct compat_xt_counters counters; | 266 | struct compat_xt_counters counters; |
| 267 | unsigned char elems[0]; | 267 | unsigned char elems[0]; |
diff --git a/include/linux/netfilter_decnet.h b/include/linux/netfilter_decnet.h index 6f425369ee29..0b09732aacd5 100644 --- a/include/linux/netfilter_decnet.h +++ b/include/linux/netfilter_decnet.h | |||
| @@ -11,6 +11,9 @@ | |||
| 11 | 11 | ||
| 12 | /* only for userspace compatibility */ | 12 | /* only for userspace compatibility */ |
| 13 | #ifndef __KERNEL__ | 13 | #ifndef __KERNEL__ |
| 14 | |||
| 15 | #include <limits.h> /* for INT_MIN, INT_MAX */ | ||
| 16 | |||
| 14 | /* IP Cache bits. */ | 17 | /* IP Cache bits. */ |
| 15 | /* Src IP address. */ | 18 | /* Src IP address. */ |
| 16 | #define NFC_DN_SRC 0x0001 | 19 | #define NFC_DN_SRC 0x0001 |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index 29c7727ff0e8..fa0946c549d3 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
| @@ -9,6 +9,9 @@ | |||
| 9 | 9 | ||
| 10 | /* only for userspace compatibility */ | 10 | /* only for userspace compatibility */ |
| 11 | #ifndef __KERNEL__ | 11 | #ifndef __KERNEL__ |
| 12 | |||
| 13 | #include <limits.h> /* for INT_MIN, INT_MAX */ | ||
| 14 | |||
| 12 | /* IP Cache bits. */ | 15 | /* IP Cache bits. */ |
| 13 | /* Src IP address. */ | 16 | /* Src IP address. */ |
| 14 | #define NFC_IP_SRC 0x0001 | 17 | #define NFC_IP_SRC 0x0001 |
diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 64a5d95c58e8..db79231914ce 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h | |||
| @@ -81,12 +81,12 @@ struct ipt_ip { | |||
| 81 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; | 81 | unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; |
| 82 | 82 | ||
| 83 | /* Protocol, 0 = ANY */ | 83 | /* Protocol, 0 = ANY */ |
| 84 | u_int16_t proto; | 84 | __u16 proto; |
| 85 | 85 | ||
| 86 | /* Flags word */ | 86 | /* Flags word */ |
| 87 | u_int8_t flags; | 87 | __u8 flags; |
| 88 | /* Inverse flags */ | 88 | /* Inverse flags */ |
| 89 | u_int8_t invflags; | 89 | __u8 invflags; |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| 92 | /* Values for "flag" field in struct ipt_ip (general ip structure). */ | 92 | /* Values for "flag" field in struct ipt_ip (general ip structure). */ |
| @@ -114,9 +114,9 @@ struct ipt_entry { | |||
| 114 | unsigned int nfcache; | 114 | unsigned int nfcache; |
| 115 | 115 | ||
| 116 | /* Size of ipt_entry + matches */ | 116 | /* Size of ipt_entry + matches */ |
| 117 | u_int16_t target_offset; | 117 | __u16 target_offset; |
| 118 | /* Size of ipt_entry + matches + target */ | 118 | /* Size of ipt_entry + matches + target */ |
| 119 | u_int16_t next_offset; | 119 | __u16 next_offset; |
| 120 | 120 | ||
| 121 | /* Back pointer */ | 121 | /* Back pointer */ |
| 122 | unsigned int comefrom; | 122 | unsigned int comefrom; |
| @@ -149,9 +149,9 @@ struct ipt_entry { | |||
| 149 | 149 | ||
| 150 | /* ICMP matching stuff */ | 150 | /* ICMP matching stuff */ |
| 151 | struct ipt_icmp { | 151 | struct ipt_icmp { |
| 152 | u_int8_t type; /* type to match */ | 152 | __u8 type; /* type to match */ |
| 153 | u_int8_t code[2]; /* range of code */ | 153 | __u8 code[2]; /* range of code */ |
| 154 | u_int8_t invflags; /* Inverse flags */ | 154 | __u8 invflags; /* Inverse flags */ |
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | /* Values for "inv" field for struct ipt_icmp. */ | 157 | /* Values for "inv" field for struct ipt_icmp. */ |
| @@ -288,8 +288,8 @@ extern unsigned int ipt_do_table(struct sk_buff *skb, | |||
| 288 | struct compat_ipt_entry { | 288 | struct compat_ipt_entry { |
| 289 | struct ipt_ip ip; | 289 | struct ipt_ip ip; |
| 290 | compat_uint_t nfcache; | 290 | compat_uint_t nfcache; |
| 291 | u_int16_t target_offset; | 291 | __u16 target_offset; |
| 292 | u_int16_t next_offset; | 292 | __u16 next_offset; |
| 293 | compat_uint_t comefrom; | 293 | compat_uint_t comefrom; |
| 294 | struct compat_xt_counters counters; | 294 | struct compat_xt_counters counters; |
| 295 | unsigned char elems[0]; | 295 | unsigned char elems[0]; |
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 1f7e300094cd..57c025127f1d 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
| @@ -12,6 +12,9 @@ | |||
| 12 | 12 | ||
| 13 | /* only for userspace compatibility */ | 13 | /* only for userspace compatibility */ |
| 14 | #ifndef __KERNEL__ | 14 | #ifndef __KERNEL__ |
| 15 | |||
| 16 | #include <limits.h> /* for INT_MIN, INT_MAX */ | ||
| 17 | |||
| 15 | /* IP Cache bits. */ | 18 | /* IP Cache bits. */ |
| 16 | /* Src IP address. */ | 19 | /* Src IP address. */ |
| 17 | #define NFC_IP6_SRC 0x0001 | 20 | #define NFC_IP6_SRC 0x0001 |
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h index c9784f7a9c1f..f549adccc94c 100644 --- a/include/linux/netfilter_ipv6/ip6_tables.h +++ b/include/linux/netfilter_ipv6/ip6_tables.h | |||
| @@ -81,14 +81,14 @@ struct ip6t_ip6 { | |||
| 81 | * MH do not match any packets. | 81 | * MH do not match any packets. |
| 82 | * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. | 82 | * - You also need to set IP6T_FLAGS_PROTO to "flags" to check protocol. |
| 83 | */ | 83 | */ |
| 84 | u_int16_t proto; | 84 | __u16 proto; |
| 85 | /* TOS to match iff flags & IP6T_F_TOS */ | 85 | /* TOS to match iff flags & IP6T_F_TOS */ |
| 86 | u_int8_t tos; | 86 | __u8 tos; |
| 87 | 87 | ||
| 88 | /* Flags word */ | 88 | /* Flags word */ |
| 89 | u_int8_t flags; | 89 | __u8 flags; |
| 90 | /* Inverse flags */ | 90 | /* Inverse flags */ |
| 91 | u_int8_t invflags; | 91 | __u8 invflags; |
| 92 | }; | 92 | }; |
| 93 | 93 | ||
| 94 | /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ | 94 | /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */ |
| @@ -118,9 +118,9 @@ struct ip6t_entry { | |||
| 118 | unsigned int nfcache; | 118 | unsigned int nfcache; |
| 119 | 119 | ||
| 120 | /* Size of ipt_entry + matches */ | 120 | /* Size of ipt_entry + matches */ |
| 121 | u_int16_t target_offset; | 121 | __u16 target_offset; |
| 122 | /* Size of ipt_entry + matches + target */ | 122 | /* Size of ipt_entry + matches + target */ |
| 123 | u_int16_t next_offset; | 123 | __u16 next_offset; |
| 124 | 124 | ||
| 125 | /* Back pointer */ | 125 | /* Back pointer */ |
| 126 | unsigned int comefrom; | 126 | unsigned int comefrom; |
| @@ -186,9 +186,9 @@ struct ip6t_error { | |||
| 186 | 186 | ||
| 187 | /* ICMP matching stuff */ | 187 | /* ICMP matching stuff */ |
| 188 | struct ip6t_icmp { | 188 | struct ip6t_icmp { |
| 189 | u_int8_t type; /* type to match */ | 189 | __u8 type; /* type to match */ |
| 190 | u_int8_t code[2]; /* range of code */ | 190 | __u8 code[2]; /* range of code */ |
| 191 | u_int8_t invflags; /* Inverse flags */ | 191 | __u8 invflags; /* Inverse flags */ |
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | /* Values for "inv" field for struct ipt_icmp. */ | 194 | /* 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, | |||
| 298 | struct compat_ip6t_entry { | 298 | struct compat_ip6t_entry { |
| 299 | struct ip6t_ip6 ipv6; | 299 | struct ip6t_ip6 ipv6; |
| 300 | compat_uint_t nfcache; | 300 | compat_uint_t nfcache; |
| 301 | u_int16_t target_offset; | 301 | __u16 target_offset; |
| 302 | u_int16_t next_offset; | 302 | __u16 next_offset; |
| 303 | compat_uint_t comefrom; | 303 | compat_uint_t comefrom; |
| 304 | struct compat_xt_counters counters; | 304 | struct compat_xt_counters counters; |
| 305 | unsigned char elems[0]; | 305 | unsigned char elems[0]; |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 180540a84d37..8180cd9d73d5 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #ifndef __LINUX_NETLINK_H | 1 | #ifndef __LINUX_NETLINK_H |
| 2 | #define __LINUX_NETLINK_H | 2 | #define __LINUX_NETLINK_H |
| 3 | 3 | ||
| 4 | #include <linux/socket.h> /* for sa_family_t */ | 4 | #include <linux/socket.h> /* for __kernel_sa_family_t */ |
| 5 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | 6 | ||
| 7 | #define NETLINK_ROUTE 0 /* Routing/device hook */ | 7 | #define NETLINK_ROUTE 0 /* Routing/device hook */ |
diff --git a/include/linux/netrom.h b/include/linux/netrom.h index 6939b32f66a0..af7313cc9cb6 100644 --- a/include/linux/netrom.h +++ b/include/linux/netrom.h | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #ifndef NETROM_KERNEL_H | 7 | #ifndef NETROM_KERNEL_H |
| 8 | #define NETROM_KERNEL_H | 8 | #define NETROM_KERNEL_H |
| 9 | 9 | ||
| 10 | #include <linux/ax25.h> | ||
| 11 | |||
| 10 | #define NETROM_MTU 236 | 12 | #define NETROM_MTU 236 |
| 11 | 13 | ||
| 12 | #define NETROM_T1 1 | 14 | #define NETROM_T1 1 |
diff --git a/include/linux/nfc.h b/include/linux/nfc.h index 330a4c5db588..36cb955b05cc 100644 --- a/include/linux/nfc.h +++ b/include/linux/nfc.h | |||
| @@ -39,6 +39,10 @@ | |||
| 39 | * | 39 | * |
| 40 | * @NFC_CMD_GET_DEVICE: request information about a device (requires | 40 | * @NFC_CMD_GET_DEVICE: request information about a device (requires |
| 41 | * %NFC_ATTR_DEVICE_INDEX) or dump request to get a list of all nfc devices | 41 | * %NFC_ATTR_DEVICE_INDEX) or dump request to get a list of all nfc devices |
| 42 | * @NFC_CMD_DEV_UP: turn on the nfc device | ||
| 43 | * (requires %NFC_ATTR_DEVICE_INDEX) | ||
| 44 | * @NFC_CMD_DEV_DOWN: turn off the nfc device | ||
| 45 | * (requires %NFC_ATTR_DEVICE_INDEX) | ||
| 42 | * @NFC_CMD_START_POLL: start polling for targets using the given protocols | 46 | * @NFC_CMD_START_POLL: start polling for targets using the given protocols |
| 43 | * (requires %NFC_ATTR_DEVICE_INDEX and %NFC_ATTR_PROTOCOLS) | 47 | * (requires %NFC_ATTR_DEVICE_INDEX and %NFC_ATTR_PROTOCOLS) |
| 44 | * @NFC_CMD_STOP_POLL: stop polling for targets (requires | 48 | * @NFC_CMD_STOP_POLL: stop polling for targets (requires |
| @@ -56,6 +60,8 @@ | |||
| 56 | enum nfc_commands { | 60 | enum nfc_commands { |
| 57 | NFC_CMD_UNSPEC, | 61 | NFC_CMD_UNSPEC, |
| 58 | NFC_CMD_GET_DEVICE, | 62 | NFC_CMD_GET_DEVICE, |
| 63 | NFC_CMD_DEV_UP, | ||
| 64 | NFC_CMD_DEV_DOWN, | ||
| 59 | NFC_CMD_START_POLL, | 65 | NFC_CMD_START_POLL, |
| 60 | NFC_CMD_STOP_POLL, | 66 | NFC_CMD_STOP_POLL, |
| 61 | NFC_CMD_GET_TARGET, | 67 | NFC_CMD_GET_TARGET, |
| @@ -123,4 +129,6 @@ struct sockaddr_nfc { | |||
| 123 | #define NFC_SOCKPROTO_RAW 0 | 129 | #define NFC_SOCKPROTO_RAW 0 |
| 124 | #define NFC_SOCKPROTO_MAX 1 | 130 | #define NFC_SOCKPROTO_MAX 1 |
| 125 | 131 | ||
| 132 | #define NFC_HEADER_SIZE 1 | ||
| 133 | |||
| 126 | #endif /*__LINUX_NFC_H */ | 134 | #endif /*__LINUX_NFC_H */ |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 8ad70dcac3f9..8049bf77d799 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -161,6 +161,13 @@ | |||
| 161 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface | 161 | * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface |
| 162 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, | 162 | * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD, |
| 163 | * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes. | 163 | * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes. |
| 164 | * Following attributes are provided for drivers that generate full Beacon | ||
| 165 | * and Probe Response frames internally: %NL80211_ATTR_SSID, | ||
| 166 | * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE, | ||
| 167 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, | ||
| 168 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, | ||
| 169 | * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP, | ||
| 170 | * %NL80211_ATTR_IE_ASSOC_RESP. | ||
| 164 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, | 171 | * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface, |
| 165 | * parameters are like for %NL80211_CMD_SET_BEACON. | 172 | * parameters are like for %NL80211_CMD_SET_BEACON. |
| 166 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it | 173 | * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it |
| @@ -231,6 +238,8 @@ | |||
| 231 | * | 238 | * |
| 232 | * @NL80211_CMD_GET_SCAN: get scan results | 239 | * @NL80211_CMD_GET_SCAN: get scan results |
| 233 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters | 240 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters |
| 241 | * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the | ||
| 242 | * probe requests at CCK rate or not. | ||
| 234 | * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to | 243 | * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to |
| 235 | * NL80211_CMD_GET_SCAN and on the "scan" multicast group) | 244 | * NL80211_CMD_GET_SCAN and on the "scan" multicast group) |
| 236 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 245 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
| @@ -425,6 +434,8 @@ | |||
| 425 | * specified using %NL80211_ATTR_DURATION. When called, this operation | 434 | * specified using %NL80211_ATTR_DURATION. When called, this operation |
| 426 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the | 435 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the |
| 427 | * TX status event pertaining to the TX request. | 436 | * TX status event pertaining to the TX request. |
| 437 | * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the | ||
| 438 | * management frames at CCK rate or not in 2GHz band. | ||
| 428 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this | 439 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this |
| 429 | * command may be used with the corresponding cookie to cancel the wait | 440 | * command may be used with the corresponding cookie to cancel the wait |
| 430 | * time if it is known that it is no longer necessary. | 441 | * time if it is known that it is no longer necessary. |
| @@ -492,6 +503,12 @@ | |||
| 492 | * this command may also be sent by the driver as an MLME event to | 503 | * this command may also be sent by the driver as an MLME event to |
| 493 | * inform userspace of the new replay counter. | 504 | * inform userspace of the new replay counter. |
| 494 | * | 505 | * |
| 506 | * @NL80211_CMD_PMKSA_CANDIDATE: This is used as an event to inform userspace | ||
| 507 | * of PMKSA caching dandidates. | ||
| 508 | * | ||
| 509 | * @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup). | ||
| 510 | * @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame. | ||
| 511 | * | ||
| 495 | * @NL80211_CMD_MAX: highest used command number | 512 | * @NL80211_CMD_MAX: highest used command number |
| 496 | * @__NL80211_CMD_AFTER_LAST: internal use | 513 | * @__NL80211_CMD_AFTER_LAST: internal use |
| 497 | */ | 514 | */ |
| @@ -616,6 +633,11 @@ enum nl80211_commands { | |||
| 616 | 633 | ||
| 617 | NL80211_CMD_SET_REKEY_OFFLOAD, | 634 | NL80211_CMD_SET_REKEY_OFFLOAD, |
| 618 | 635 | ||
| 636 | NL80211_CMD_PMKSA_CANDIDATE, | ||
| 637 | |||
| 638 | NL80211_CMD_TDLS_OPER, | ||
| 639 | NL80211_CMD_TDLS_MGMT, | ||
| 640 | |||
| 619 | /* add new commands above here */ | 641 | /* add new commands above here */ |
| 620 | 642 | ||
| 621 | /* used to define NL80211_CMD_MAX below */ | 643 | /* used to define NL80211_CMD_MAX below */ |
| @@ -762,6 +784,8 @@ enum nl80211_commands { | |||
| 762 | * that can be added to a scan request | 784 | * that can be added to a scan request |
| 763 | * @NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN: maximum length of information | 785 | * @NL80211_ATTR_MAX_SCHED_SCAN_IE_LEN: maximum length of information |
| 764 | * elements that can be added to a scheduled scan request | 786 | * elements that can be added to a scheduled scan request |
| 787 | * @NL80211_ATTR_MAX_MATCH_SETS: maximum number of sets that can be | ||
| 788 | * used with @NL80211_ATTR_SCHED_SCAN_MATCH, a wiphy attribute. | ||
| 765 | * | 789 | * |
| 766 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) | 790 | * @NL80211_ATTR_SCAN_FREQUENCIES: nested attribute with frequencies (in MHz) |
| 767 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive | 791 | * @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive |
| @@ -842,18 +866,20 @@ enum nl80211_commands { | |||
| 842 | * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT | 866 | * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT |
| 843 | * event (u16) | 867 | * event (u16) |
| 844 | * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating | 868 | * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating |
| 845 | * that protected APs should be used. | 869 | * that protected APs should be used. This is also used with NEW_BEACON to |
| 870 | * indicate that the BSS is to use protection. | ||
| 846 | * | 871 | * |
| 847 | * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to | 872 | * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT, ASSOCIATE, and NEW_BEACON |
| 848 | * indicate which unicast key ciphers will be used with the connection | 873 | * to indicate which unicast key ciphers will be used with the connection |
| 849 | * (an array of u32). | 874 | * (an array of u32). |
| 850 | * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate | 875 | * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT, ASSOCIATE, and NEW_BEACON to |
| 851 | * which group key cipher will be used with the connection (a u32). | 876 | * indicate which group key cipher will be used with the connection (a |
| 852 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate | 877 | * u32). |
| 853 | * which WPA version(s) the AP we want to associate with is using | 878 | * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT, ASSOCIATE, and NEW_BEACON to |
| 879 | * indicate which WPA version(s) the AP we want to associate with is using | ||
| 854 | * (a u32 with flags from &enum nl80211_wpa_versions). | 880 | * (a u32 with flags from &enum nl80211_wpa_versions). |
| 855 | * @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate | 881 | * @NL80211_ATTR_AKM_SUITES: Used with CONNECT, ASSOCIATE, and NEW_BEACON to |
| 856 | * which key management algorithm(s) to use (an array of u32). | 882 | * indicate which key management algorithm(s) to use (an array of u32). |
| 857 | * | 883 | * |
| 858 | * @NL80211_ATTR_REQ_IE: (Re)association request information elements as | 884 | * @NL80211_ATTR_REQ_IE: (Re)association request information elements as |
| 859 | * sent out by the card, for ROAM and successful CONNECT events. | 885 | * sent out by the card, for ROAM and successful CONNECT events. |
| @@ -1002,6 +1028,24 @@ enum nl80211_commands { | |||
| 1002 | 1028 | ||
| 1003 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan | 1029 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan |
| 1004 | * cycles, in msecs. | 1030 | * cycles, in msecs. |
| 1031 | |||
| 1032 | * @NL80211_ATTR_SCHED_SCAN_MATCH: Nested attribute with one or more | ||
| 1033 | * sets of attributes to match during scheduled scans. Only BSSs | ||
| 1034 | * that match any of the sets will be reported. These are | ||
| 1035 | * pass-thru filter rules. | ||
| 1036 | * For a match to succeed, the BSS must match all attributes of a | ||
| 1037 | * set. Since not every hardware supports matching all types of | ||
| 1038 | * attributes, there is no guarantee that the reported BSSs are | ||
| 1039 | * fully complying with the match sets and userspace needs to be | ||
| 1040 | * able to ignore them by itself. | ||
| 1041 | * Thus, the implementation is somewhat hardware-dependent, but | ||
| 1042 | * this is only an optimization and the userspace application | ||
| 1043 | * needs to handle all the non-filtered results anyway. | ||
| 1044 | * If the match attributes don't make sense when combined with | ||
| 1045 | * the values passed in @NL80211_ATTR_SCAN_SSIDS (eg. if an SSID | ||
| 1046 | * is included in the probe request, but the match attributes | ||
| 1047 | * will never let it go through), -EINVAL may be returned. | ||
| 1048 | * If ommited, no filtering is done. | ||
| 1005 | * | 1049 | * |
| 1006 | * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported | 1050 | * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported |
| 1007 | * interface combinations. In each nested item, it contains attributes | 1051 | * interface combinations. In each nested item, it contains attributes |
| @@ -1019,6 +1063,52 @@ enum nl80211_commands { | |||
| 1019 | * being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but | 1063 | * being a list of supported rates as defined by IEEE 802.11 7.3.2.2 but |
| 1020 | * without the length restriction (at most %NL80211_MAX_SUPP_RATES). | 1064 | * without the length restriction (at most %NL80211_MAX_SUPP_RATES). |
| 1021 | * | 1065 | * |
| 1066 | * @NL80211_ATTR_HIDDEN_SSID: indicates whether SSID is to be hidden from Beacon | ||
| 1067 | * and Probe Response (when response to wildcard Probe Request); see | ||
| 1068 | * &enum nl80211_hidden_ssid, represented as a u32 | ||
| 1069 | * | ||
| 1070 | * @NL80211_ATTR_IE_PROBE_RESP: Information element(s) for Probe Response frame. | ||
| 1071 | * This is used with %NL80211_CMD_NEW_BEACON and %NL80211_CMD_SET_BEACON to | ||
| 1072 | * provide extra IEs (e.g., WPS/P2P IE) into Probe Response frames when the | ||
| 1073 | * driver (or firmware) replies to Probe Request frames. | ||
| 1074 | * @NL80211_ATTR_IE_ASSOC_RESP: Information element(s) for (Re)Association | ||
| 1075 | * Response frames. This is used with %NL80211_CMD_NEW_BEACON and | ||
| 1076 | * %NL80211_CMD_SET_BEACON to provide extra IEs (e.g., WPS/P2P IE) into | ||
| 1077 | * (Re)Association Response frames when the driver (or firmware) replies to | ||
| 1078 | * (Re)Association Request frames. | ||
| 1079 | * | ||
| 1080 | * @NL80211_ATTR_STA_WME: Nested attribute containing the wme configuration | ||
| 1081 | * of the station, see &enum nl80211_sta_wme_attr. | ||
| 1082 | * @NL80211_ATTR_SUPPORT_AP_UAPSD: the device supports uapsd when working | ||
| 1083 | * as AP. | ||
| 1084 | * | ||
| 1085 | * @NL80211_ATTR_ROAM_SUPPORT: Indicates whether the firmware is capable of | ||
| 1086 | * roaming to another AP in the same ESS if the signal lever is low. | ||
| 1087 | * | ||
| 1088 | * @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching | ||
| 1089 | * candidate information, see &enum nl80211_pmksa_candidate_attr. | ||
| 1090 | * | ||
| 1091 | * @NL80211_ATTR_TX_NO_CCK_RATE: Indicates whether to use CCK rate or not | ||
| 1092 | * for management frames transmission. In order to avoid p2p probe/action | ||
| 1093 | * frames are being transmitted at CCK rate in 2GHz band, the user space | ||
| 1094 | * applications use this attribute. | ||
| 1095 | * This attribute is used with %NL80211_CMD_TRIGGER_SCAN and | ||
| 1096 | * %NL80211_CMD_FRAME commands. | ||
| 1097 | * | ||
| 1098 | * @NL80211_ATTR_TDLS_ACTION: Low level TDLS action code (e.g. link setup | ||
| 1099 | * request, link setup confirm, link teardown, etc.). Values are | ||
| 1100 | * described in the TDLS (802.11z) specification. | ||
| 1101 | * @NL80211_ATTR_TDLS_DIALOG_TOKEN: Non-zero token for uniquely identifying a | ||
| 1102 | * TDLS conversation between two devices. | ||
| 1103 | * @NL80211_ATTR_TDLS_OPERATION: High level TDLS operation; see | ||
| 1104 | * &enum nl80211_tdls_operation, represented as a u8. | ||
| 1105 | * @NL80211_ATTR_TDLS_SUPPORT: A flag indicating the device can operate | ||
| 1106 | * as a TDLS peer sta. | ||
| 1107 | * @NL80211_ATTR_TDLS_EXTERNAL_SETUP: The TDLS discovery/setup and teardown | ||
| 1108 | * procedures should be performed by sending TDLS packets via | ||
| 1109 | * %NL80211_CMD_TDLS_MGMT. Otherwise %NL80211_CMD_TDLS_OPER should be | ||
| 1110 | * used for asking the driver to perform a TDLS operation. | ||
| 1111 | * | ||
| 1022 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1112 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1023 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1113 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1024 | */ | 1114 | */ |
| @@ -1224,6 +1314,29 @@ enum nl80211_attrs { | |||
| 1224 | 1314 | ||
| 1225 | NL80211_ATTR_SCAN_SUPP_RATES, | 1315 | NL80211_ATTR_SCAN_SUPP_RATES, |
| 1226 | 1316 | ||
| 1317 | NL80211_ATTR_HIDDEN_SSID, | ||
| 1318 | |||
| 1319 | NL80211_ATTR_IE_PROBE_RESP, | ||
| 1320 | NL80211_ATTR_IE_ASSOC_RESP, | ||
| 1321 | |||
| 1322 | NL80211_ATTR_STA_WME, | ||
| 1323 | NL80211_ATTR_SUPPORT_AP_UAPSD, | ||
| 1324 | |||
| 1325 | NL80211_ATTR_ROAM_SUPPORT, | ||
| 1326 | |||
| 1327 | NL80211_ATTR_SCHED_SCAN_MATCH, | ||
| 1328 | NL80211_ATTR_MAX_MATCH_SETS, | ||
| 1329 | |||
| 1330 | NL80211_ATTR_PMKSA_CANDIDATE, | ||
| 1331 | |||
| 1332 | NL80211_ATTR_TX_NO_CCK_RATE, | ||
| 1333 | |||
| 1334 | NL80211_ATTR_TDLS_ACTION, | ||
| 1335 | NL80211_ATTR_TDLS_DIALOG_TOKEN, | ||
| 1336 | NL80211_ATTR_TDLS_OPERATION, | ||
| 1337 | NL80211_ATTR_TDLS_SUPPORT, | ||
| 1338 | NL80211_ATTR_TDLS_EXTERNAL_SETUP, | ||
| 1339 | |||
| 1227 | /* add attributes here, update the policy in nl80211.c */ | 1340 | /* add attributes here, update the policy in nl80211.c */ |
| 1228 | 1341 | ||
| 1229 | __NL80211_ATTR_AFTER_LAST, | 1342 | __NL80211_ATTR_AFTER_LAST, |
| @@ -1321,6 +1434,7 @@ enum nl80211_iftype { | |||
| 1321 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1434 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
| 1322 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1435 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
| 1323 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated | 1436 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated |
| 1437 | * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer | ||
| 1324 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1438 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
| 1325 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1439 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
| 1326 | */ | 1440 | */ |
| @@ -1331,6 +1445,7 @@ enum nl80211_sta_flags { | |||
| 1331 | NL80211_STA_FLAG_WME, | 1445 | NL80211_STA_FLAG_WME, |
| 1332 | NL80211_STA_FLAG_MFP, | 1446 | NL80211_STA_FLAG_MFP, |
| 1333 | NL80211_STA_FLAG_AUTHENTICATED, | 1447 | NL80211_STA_FLAG_AUTHENTICATED, |
| 1448 | NL80211_STA_FLAG_TDLS_PEER, | ||
| 1334 | 1449 | ||
| 1335 | /* keep last */ | 1450 | /* keep last */ |
| 1336 | __NL80211_STA_FLAG_AFTER_LAST, | 1451 | __NL80211_STA_FLAG_AFTER_LAST, |
| @@ -1433,6 +1548,7 @@ enum nl80211_sta_bss_param { | |||
| 1433 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute | 1548 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute |
| 1434 | * containing info as possible, see &enum nl80211_sta_bss_param | 1549 | * containing info as possible, see &enum nl80211_sta_bss_param |
| 1435 | * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected | 1550 | * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected |
| 1551 | * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. | ||
| 1436 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1552 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
| 1437 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1553 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
| 1438 | */ | 1554 | */ |
| @@ -1454,6 +1570,7 @@ enum nl80211_sta_info { | |||
| 1454 | NL80211_STA_INFO_RX_BITRATE, | 1570 | NL80211_STA_INFO_RX_BITRATE, |
| 1455 | NL80211_STA_INFO_BSS_PARAM, | 1571 | NL80211_STA_INFO_BSS_PARAM, |
| 1456 | NL80211_STA_INFO_CONNECTED_TIME, | 1572 | NL80211_STA_INFO_CONNECTED_TIME, |
| 1573 | NL80211_STA_INFO_STA_FLAGS, | ||
| 1457 | 1574 | ||
| 1458 | /* keep last */ | 1575 | /* keep last */ |
| 1459 | __NL80211_STA_INFO_AFTER_LAST, | 1576 | __NL80211_STA_INFO_AFTER_LAST, |
| @@ -1683,6 +1800,26 @@ enum nl80211_reg_rule_attr { | |||
| 1683 | }; | 1800 | }; |
| 1684 | 1801 | ||
| 1685 | /** | 1802 | /** |
| 1803 | * enum nl80211_sched_scan_match_attr - scheduled scan match attributes | ||
| 1804 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved | ||
| 1805 | * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching, | ||
| 1806 | * only report BSS with matching SSID. | ||
| 1807 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter | ||
| 1808 | * attribute number currently defined | ||
| 1809 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use | ||
| 1810 | */ | ||
| 1811 | enum nl80211_sched_scan_match_attr { | ||
| 1812 | __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID, | ||
| 1813 | |||
| 1814 | NL80211_ATTR_SCHED_SCAN_MATCH_SSID, | ||
| 1815 | |||
| 1816 | /* keep last */ | ||
| 1817 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, | ||
| 1818 | NL80211_SCHED_SCAN_MATCH_ATTR_MAX = | ||
| 1819 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1 | ||
| 1820 | }; | ||
| 1821 | |||
| 1822 | /** | ||
| 1686 | * enum nl80211_reg_rule_flags - regulatory rule flags | 1823 | * enum nl80211_reg_rule_flags - regulatory rule flags |
| 1687 | * | 1824 | * |
| 1688 | * @NL80211_RRF_NO_OFDM: OFDM modulation not allowed | 1825 | * @NL80211_RRF_NO_OFDM: OFDM modulation not allowed |
| @@ -1833,6 +1970,13 @@ enum nl80211_mntr_flags { | |||
| 1833 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a | 1970 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a |
| 1834 | * source mesh point for path selection elements. | 1971 | * source mesh point for path selection elements. |
| 1835 | * | 1972 | * |
| 1973 | * @NL80211_MESHCONF_HWMP_RANN_INTERVAL: The interval of time (in TUs) between | ||
| 1974 | * root announcements are transmitted. | ||
| 1975 | * | ||
| 1976 | * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has | ||
| 1977 | * access to a broader network beyond the MBSS. This is done via Root | ||
| 1978 | * Announcement frames. | ||
| 1979 | * | ||
| 1836 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | 1980 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute |
| 1837 | * | 1981 | * |
| 1838 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 1982 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
| @@ -1854,6 +1998,8 @@ enum nl80211_meshconf_params { | |||
| 1854 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, | 1998 | NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME, |
| 1855 | NL80211_MESHCONF_HWMP_ROOTMODE, | 1999 | NL80211_MESHCONF_HWMP_ROOTMODE, |
| 1856 | NL80211_MESHCONF_ELEMENT_TTL, | 2000 | NL80211_MESHCONF_ELEMENT_TTL, |
| 2001 | NL80211_MESHCONF_HWMP_RANN_INTERVAL, | ||
| 2002 | NL80211_MESHCONF_GATE_ANNOUNCEMENTS, | ||
| 1857 | 2003 | ||
| 1858 | /* keep last */ | 2004 | /* keep last */ |
| 1859 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 2005 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
| @@ -2430,4 +2576,78 @@ enum nl80211_rekey_data { | |||
| 2430 | MAX_NL80211_REKEY_DATA = NUM_NL80211_REKEY_DATA - 1 | 2576 | MAX_NL80211_REKEY_DATA = NUM_NL80211_REKEY_DATA - 1 |
| 2431 | }; | 2577 | }; |
| 2432 | 2578 | ||
| 2579 | /** | ||
| 2580 | * enum nl80211_hidden_ssid - values for %NL80211_ATTR_HIDDEN_SSID | ||
| 2581 | * @NL80211_HIDDEN_SSID_NOT_IN_USE: do not hide SSID (i.e., broadcast it in | ||
| 2582 | * Beacon frames) | ||
| 2583 | * @NL80211_HIDDEN_SSID_ZERO_LEN: hide SSID by using zero-length SSID element | ||
| 2584 | * in Beacon frames | ||
| 2585 | * @NL80211_HIDDEN_SSID_ZERO_CONTENTS: hide SSID by using correct length of SSID | ||
| 2586 | * element in Beacon frames but zero out each byte in the SSID | ||
| 2587 | */ | ||
| 2588 | enum nl80211_hidden_ssid { | ||
| 2589 | NL80211_HIDDEN_SSID_NOT_IN_USE, | ||
| 2590 | NL80211_HIDDEN_SSID_ZERO_LEN, | ||
| 2591 | NL80211_HIDDEN_SSID_ZERO_CONTENTS | ||
| 2592 | }; | ||
| 2593 | |||
| 2594 | /** | ||
| 2595 | * enum nl80211_sta_wme_attr - station WME attributes | ||
| 2596 | * @__NL80211_STA_WME_INVALID: invalid number for nested attribute | ||
| 2597 | * @NL80211_STA_WME_UAPSD_QUEUES: bitmap of uapsd queues. the format | ||
| 2598 | * is the same as the AC bitmap in the QoS info field. | ||
| 2599 | * @NL80211_STA_WME_MAX_SP: max service period. the format is the same | ||
| 2600 | * as the MAX_SP field in the QoS info field (but already shifted down). | ||
| 2601 | * @__NL80211_STA_WME_AFTER_LAST: internal | ||
| 2602 | * @NL80211_STA_WME_MAX: highest station WME attribute | ||
| 2603 | */ | ||
| 2604 | enum nl80211_sta_wme_attr { | ||
| 2605 | __NL80211_STA_WME_INVALID, | ||
| 2606 | NL80211_STA_WME_UAPSD_QUEUES, | ||
| 2607 | NL80211_STA_WME_MAX_SP, | ||
| 2608 | |||
| 2609 | /* keep last */ | ||
| 2610 | __NL80211_STA_WME_AFTER_LAST, | ||
| 2611 | NL80211_STA_WME_MAX = __NL80211_STA_WME_AFTER_LAST - 1 | ||
| 2612 | }; | ||
| 2613 | |||
| 2614 | /** | ||
| 2615 | * enum nl80211_pmksa_candidate_attr - attributes for PMKSA caching candidates | ||
| 2616 | * @__NL80211_PMKSA_CANDIDATE_INVALID: invalid number for nested attributes | ||
| 2617 | * @NL80211_PMKSA_CANDIDATE_INDEX: candidate index (u32; the smaller, the higher | ||
| 2618 | * priority) | ||
| 2619 | * @NL80211_PMKSA_CANDIDATE_BSSID: candidate BSSID (6 octets) | ||
| 2620 | * @NL80211_PMKSA_CANDIDATE_PREAUTH: RSN pre-authentication supported (flag) | ||
| 2621 | * @NUM_NL80211_PMKSA_CANDIDATE: number of PMKSA caching candidate attributes | ||
| 2622 | * (internal) | ||
| 2623 | * @MAX_NL80211_PMKSA_CANDIDATE: highest PMKSA caching candidate attribute | ||
| 2624 | * (internal) | ||
| 2625 | */ | ||
| 2626 | enum nl80211_pmksa_candidate_attr { | ||
| 2627 | __NL80211_PMKSA_CANDIDATE_INVALID, | ||
| 2628 | NL80211_PMKSA_CANDIDATE_INDEX, | ||
| 2629 | NL80211_PMKSA_CANDIDATE_BSSID, | ||
| 2630 | NL80211_PMKSA_CANDIDATE_PREAUTH, | ||
| 2631 | |||
| 2632 | /* keep last */ | ||
| 2633 | NUM_NL80211_PMKSA_CANDIDATE, | ||
| 2634 | MAX_NL80211_PMKSA_CANDIDATE = NUM_NL80211_PMKSA_CANDIDATE - 1 | ||
| 2635 | }; | ||
| 2636 | |||
| 2637 | /** | ||
| 2638 | * enum nl80211_tdls_operation - values for %NL80211_ATTR_TDLS_OPERATION | ||
| 2639 | * @NL80211_TDLS_DISCOVERY_REQ: Send a TDLS discovery request | ||
| 2640 | * @NL80211_TDLS_SETUP: Setup TDLS link | ||
| 2641 | * @NL80211_TDLS_TEARDOWN: Teardown a TDLS link which is already established | ||
| 2642 | * @NL80211_TDLS_ENABLE_LINK: Enable TDLS link | ||
| 2643 | * @NL80211_TDLS_DISABLE_LINK: Disable TDLS link | ||
| 2644 | */ | ||
| 2645 | enum nl80211_tdls_operation { | ||
| 2646 | NL80211_TDLS_DISCOVERY_REQ, | ||
| 2647 | NL80211_TDLS_SETUP, | ||
| 2648 | NL80211_TDLS_TEARDOWN, | ||
| 2649 | NL80211_TDLS_ENABLE_LINK, | ||
| 2650 | NL80211_TDLS_DISABLE_LINK, | ||
| 2651 | }; | ||
| 2652 | |||
| 2433 | #endif /* __LINUX_NL80211_H */ | 2653 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 9fc01226055b..f1b1ca1a09e1 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -174,6 +174,8 @@ enum pci_dev_flags { | |||
| 174 | PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, | 174 | PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG = (__force pci_dev_flags_t) 1, |
| 175 | /* Device configuration is irrevocably lost if disabled into D3 */ | 175 | /* Device configuration is irrevocably lost if disabled into D3 */ |
| 176 | PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, | 176 | PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, |
| 177 | /* Provide indication device is assigned by a Virtual Machine Manager */ | ||
| 178 | PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, | ||
| 177 | }; | 179 | }; |
| 178 | 180 | ||
| 179 | enum pci_irq_reroute_variant { | 181 | enum pci_irq_reroute_variant { |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index 6fb13841db45..f53a4167c5f4 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #define LINUX_PHONET_H | 24 | #define LINUX_PHONET_H |
| 25 | 25 | ||
| 26 | #include <linux/types.h> | 26 | #include <linux/types.h> |
| 27 | #include <linux/socket.h> | ||
| 27 | 28 | ||
| 28 | /* Automatic protocol selection */ | 29 | /* Automatic protocol selection */ |
| 29 | #define PN_PROTO_TRANSPORT 0 | 30 | #define PN_PROTO_TRANSPORT 0 |
| @@ -96,11 +97,11 @@ struct phonetmsg { | |||
| 96 | 97 | ||
| 97 | /* Phonet socket address structure */ | 98 | /* Phonet socket address structure */ |
| 98 | struct sockaddr_pn { | 99 | struct sockaddr_pn { |
| 99 | sa_family_t spn_family; | 100 | __kernel_sa_family_t spn_family; |
| 100 | __u8 spn_obj; | 101 | __u8 spn_obj; |
| 101 | __u8 spn_dev; | 102 | __u8 spn_dev; |
| 102 | __u8 spn_resource; | 103 | __u8 spn_resource; |
| 103 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(sa_family_t) - 3]; | 104 | __u8 spn_zero[sizeof(struct sockaddr) - sizeof(__kernel_sa_family_t) - 3]; |
| 104 | } __attribute__((packed)); | 105 | } __attribute__((packed)); |
| 105 | 106 | ||
| 106 | /* Well known address */ | 107 | /* Well known address */ |
diff --git a/include/linux/phy.h b/include/linux/phy.h index 54fc4138955f..79f337c47388 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
| @@ -420,7 +420,7 @@ struct phy_driver { | |||
| 420 | 420 | ||
| 421 | /* | 421 | /* |
| 422 | * Requests a Tx timestamp for 'skb'. The phy driver promises | 422 | * Requests a Tx timestamp for 'skb'. The phy driver promises |
| 423 | * to deliver it to the socket's error queue as soon as a | 423 | * to deliver it using skb_complete_tx_timestamp() as soon as a |
| 424 | * timestamp becomes available. One of the PTP_CLASS_ values | 424 | * timestamp becomes available. One of the PTP_CLASS_ values |
| 425 | * is passed in 'type'. | 425 | * is passed in 'type'. |
| 426 | */ | 426 | */ |
diff --git a/include/linux/rfkill-gpio.h b/include/linux/rfkill-gpio.h index a175d0598033..4d09f6eab359 100644 --- a/include/linux/rfkill-gpio.h +++ b/include/linux/rfkill-gpio.h | |||
| @@ -30,6 +30,8 @@ | |||
| 30 | * @reset_gpio: GPIO which is used for reseting rfkill switch | 30 | * @reset_gpio: GPIO which is used for reseting rfkill switch |
| 31 | * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch | 31 | * @shutdown_gpio: GPIO which is used for shutdown of rfkill switch |
| 32 | * @power_clk_name: [optional] name of clk to turn off while blocked | 32 | * @power_clk_name: [optional] name of clk to turn off while blocked |
| 33 | * @gpio_runtime_close: clean up platform specific gpio configuration | ||
| 34 | * @gpio_runtime_setup: set up platform specific gpio configuration | ||
| 33 | */ | 35 | */ |
| 34 | 36 | ||
| 35 | struct rfkill_gpio_platform_data { | 37 | struct rfkill_gpio_platform_data { |
| @@ -38,6 +40,8 @@ struct rfkill_gpio_platform_data { | |||
| 38 | int shutdown_gpio; | 40 | int shutdown_gpio; |
| 39 | const char *power_clk_name; | 41 | const char *power_clk_name; |
| 40 | enum rfkill_type type; | 42 | enum rfkill_type type; |
| 43 | void (*gpio_runtime_close)(struct platform_device *); | ||
| 44 | int (*gpio_runtime_setup)(struct platform_device *); | ||
| 41 | }; | 45 | }; |
| 42 | 46 | ||
| 43 | #endif /* __RFKILL_GPIO_H */ | 47 | #endif /* __RFKILL_GPIO_H */ |
diff --git a/include/linux/rose.h b/include/linux/rose.h index c7b4b184c82e..1fcfe95893b8 100644 --- a/include/linux/rose.h +++ b/include/linux/rose.h | |||
| @@ -7,6 +7,9 @@ | |||
| 7 | #ifndef ROSE_KERNEL_H | 7 | #ifndef ROSE_KERNEL_H |
| 8 | #define ROSE_KERNEL_H | 8 | #define ROSE_KERNEL_H |
| 9 | 9 | ||
| 10 | #include <linux/socket.h> | ||
| 11 | #include <linux/ax25.h> | ||
| 12 | |||
| 10 | #define ROSE_MTU 251 | 13 | #define ROSE_MTU 251 |
| 11 | 14 | ||
| 12 | #define ROSE_MAX_DIGIS 6 | 15 | #define ROSE_MAX_DIGIS 6 |
| @@ -44,7 +47,7 @@ typedef struct { | |||
| 44 | } rose_address; | 47 | } rose_address; |
| 45 | 48 | ||
| 46 | struct sockaddr_rose { | 49 | struct sockaddr_rose { |
| 47 | sa_family_t srose_family; | 50 | __kernel_sa_family_t srose_family; |
| 48 | rose_address srose_addr; | 51 | rose_address srose_addr; |
| 49 | ax25_address srose_call; | 52 | ax25_address srose_call; |
| 50 | int srose_ndigis; | 53 | int srose_ndigis; |
| @@ -52,7 +55,7 @@ struct sockaddr_rose { | |||
| 52 | }; | 55 | }; |
| 53 | 56 | ||
| 54 | struct full_sockaddr_rose { | 57 | struct full_sockaddr_rose { |
| 55 | sa_family_t srose_family; | 58 | __kernel_sa_family_t srose_family; |
| 56 | rose_address srose_addr; | 59 | rose_address srose_addr; |
| 57 | ax25_address srose_call; | 60 | ax25_address srose_call; |
| 58 | unsigned int srose_ndigis; | 61 | unsigned int srose_ndigis; |
diff --git a/include/linux/sh_eth.h b/include/linux/sh_eth.h new file mode 100644 index 000000000000..2076acf8294d --- /dev/null +++ b/include/linux/sh_eth.h | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #ifndef __ASM_SH_ETH_H__ | ||
| 2 | #define __ASM_SH_ETH_H__ | ||
| 3 | |||
| 4 | #include <linux/phy.h> | ||
| 5 | |||
| 6 | enum {EDMAC_LITTLE_ENDIAN, EDMAC_BIG_ENDIAN}; | ||
| 7 | enum { | ||
| 8 | SH_ETH_REG_GIGABIT, | ||
| 9 | SH_ETH_REG_FAST_SH4, | ||
| 10 | SH_ETH_REG_FAST_SH3_SH2 | ||
| 11 | }; | ||
| 12 | |||
| 13 | struct sh_eth_plat_data { | ||
| 14 | int phy; | ||
| 15 | int edmac_endian; | ||
| 16 | int register_type; | ||
| 17 | phy_interface_t phy_interface; | ||
| 18 | void (*set_mdio_gate)(void *addr); | ||
| 19 | |||
| 20 | unsigned char mac_addr[6]; | ||
| 21 | unsigned no_ether_link:1; | ||
| 22 | unsigned ether_link_active_low:1; | ||
| 23 | }; | ||
| 24 | |||
| 25 | #endif | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 8bd383caa363..6a6b352326d7 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/rcupdate.h> | 29 | #include <linux/rcupdate.h> |
| 30 | #include <linux/dmaengine.h> | 30 | #include <linux/dmaengine.h> |
| 31 | #include <linux/hrtimer.h> | 31 | #include <linux/hrtimer.h> |
| 32 | #include <linux/dma-mapping.h> | ||
| 32 | 33 | ||
| 33 | /* Don't change this without changing skb_csum_unnecessary! */ | 34 | /* Don't change this without changing skb_csum_unnecessary! */ |
| 34 | #define CHECKSUM_NONE 0 | 35 | #define CHECKSUM_NONE 0 |
| @@ -45,6 +46,11 @@ | |||
| 45 | #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) | 46 | #define SKB_MAX_HEAD(X) (SKB_MAX_ORDER((X), 0)) |
| 46 | #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) | 47 | #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) |
| 47 | 48 | ||
| 49 | /* return minimum truesize of one skb containing X bytes of data */ | ||
| 50 | #define SKB_TRUESIZE(X) ((X) + \ | ||
| 51 | SKB_DATA_ALIGN(sizeof(struct sk_buff)) + \ | ||
| 52 | SKB_DATA_ALIGN(sizeof(struct skb_shared_info))) | ||
| 53 | |||
| 48 | /* A. Checksumming of received packets by device. | 54 | /* A. Checksumming of received packets by device. |
| 49 | * | 55 | * |
| 50 | * NONE: device failed to checksum this packet. | 56 | * NONE: device failed to checksum this packet. |
| @@ -134,7 +140,9 @@ struct sk_buff; | |||
| 134 | typedef struct skb_frag_struct skb_frag_t; | 140 | typedef struct skb_frag_struct skb_frag_t; |
| 135 | 141 | ||
| 136 | struct skb_frag_struct { | 142 | struct skb_frag_struct { |
| 137 | struct page *page; | 143 | struct { |
| 144 | struct page *p; | ||
| 145 | } page; | ||
| 138 | #if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) | 146 | #if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) |
| 139 | __u32 page_offset; | 147 | __u32 page_offset; |
| 140 | __u32 size; | 148 | __u32 size; |
| @@ -144,6 +152,26 @@ struct skb_frag_struct { | |||
| 144 | #endif | 152 | #endif |
| 145 | }; | 153 | }; |
| 146 | 154 | ||
| 155 | static inline unsigned int skb_frag_size(const skb_frag_t *frag) | ||
| 156 | { | ||
| 157 | return frag->size; | ||
| 158 | } | ||
| 159 | |||
| 160 | static inline void skb_frag_size_set(skb_frag_t *frag, unsigned int size) | ||
| 161 | { | ||
| 162 | frag->size = size; | ||
| 163 | } | ||
| 164 | |||
| 165 | static inline void skb_frag_size_add(skb_frag_t *frag, int delta) | ||
| 166 | { | ||
| 167 | frag->size += delta; | ||
| 168 | } | ||
| 169 | |||
| 170 | static inline void skb_frag_size_sub(skb_frag_t *frag, int delta) | ||
| 171 | { | ||
| 172 | frag->size -= delta; | ||
| 173 | } | ||
| 174 | |||
| 147 | #define HAVE_HW_TIME_STAMP | 175 | #define HAVE_HW_TIME_STAMP |
| 148 | 176 | ||
| 149 | /** | 177 | /** |
| @@ -322,6 +350,8 @@ typedef unsigned char *sk_buff_data_t; | |||
| 322 | * @queue_mapping: Queue mapping for multiqueue devices | 350 | * @queue_mapping: Queue mapping for multiqueue devices |
| 323 | * @ndisc_nodetype: router type (from link layer) | 351 | * @ndisc_nodetype: router type (from link layer) |
| 324 | * @ooo_okay: allow the mapping of a socket to a queue to be changed | 352 | * @ooo_okay: allow the mapping of a socket to a queue to be changed |
| 353 | * @l4_rxhash: indicate rxhash is a canonical 4-tuple hash over transport | ||
| 354 | * ports. | ||
| 325 | * @dma_cookie: a cookie to one of several possible DMA operations | 355 | * @dma_cookie: a cookie to one of several possible DMA operations |
| 326 | * done by skb DMA functions | 356 | * done by skb DMA functions |
| 327 | * @secmark: security marking | 357 | * @secmark: security marking |
| @@ -414,6 +444,7 @@ struct sk_buff { | |||
| 414 | __u8 ndisc_nodetype:2; | 444 | __u8 ndisc_nodetype:2; |
| 415 | #endif | 445 | #endif |
| 416 | __u8 ooo_okay:1; | 446 | __u8 ooo_okay:1; |
| 447 | __u8 l4_rxhash:1; | ||
| 417 | kmemcheck_bitfield_end(flags2); | 448 | kmemcheck_bitfield_end(flags2); |
| 418 | 449 | ||
| 419 | /* 0/13 bit hole */ | 450 | /* 0/13 bit hole */ |
| @@ -521,6 +552,7 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
| 521 | return __alloc_skb(size, priority, 1, NUMA_NO_NODE); | 552 | return __alloc_skb(size, priority, 1, NUMA_NO_NODE); |
| 522 | } | 553 | } |
| 523 | 554 | ||
| 555 | extern void skb_recycle(struct sk_buff *skb); | ||
| 524 | extern bool skb_recycle_check(struct sk_buff *skb, int skb_size); | 556 | extern bool skb_recycle_check(struct sk_buff *skb, int skb_size); |
| 525 | 557 | ||
| 526 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | 558 | 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, | |||
| 573 | unsigned int to, struct ts_config *config, | 605 | unsigned int to, struct ts_config *config, |
| 574 | struct ts_state *state); | 606 | struct ts_state *state); |
| 575 | 607 | ||
| 576 | extern __u32 __skb_get_rxhash(struct sk_buff *skb); | 608 | extern void __skb_get_rxhash(struct sk_buff *skb); |
| 577 | static inline __u32 skb_get_rxhash(struct sk_buff *skb) | 609 | static inline __u32 skb_get_rxhash(struct sk_buff *skb) |
| 578 | { | 610 | { |
| 579 | if (!skb->rxhash) | 611 | if (!skb->rxhash) |
| 580 | skb->rxhash = __skb_get_rxhash(skb); | 612 | __skb_get_rxhash(skb); |
| 581 | 613 | ||
| 582 | return skb->rxhash; | 614 | return skb->rxhash; |
| 583 | } | 615 | } |
| @@ -823,9 +855,9 @@ static inline struct sk_buff *skb_unshare(struct sk_buff *skb, | |||
| 823 | * The reference count is not incremented and the reference is therefore | 855 | * The reference count is not incremented and the reference is therefore |
| 824 | * volatile. Use with caution. | 856 | * volatile. Use with caution. |
| 825 | */ | 857 | */ |
| 826 | static inline struct sk_buff *skb_peek(struct sk_buff_head *list_) | 858 | static inline struct sk_buff *skb_peek(const struct sk_buff_head *list_) |
| 827 | { | 859 | { |
| 828 | struct sk_buff *list = ((struct sk_buff *)list_)->next; | 860 | struct sk_buff *list = ((const struct sk_buff *)list_)->next; |
| 829 | if (list == (struct sk_buff *)list_) | 861 | if (list == (struct sk_buff *)list_) |
| 830 | list = NULL; | 862 | list = NULL; |
| 831 | return list; | 863 | return list; |
| @@ -844,9 +876,9 @@ static inline struct sk_buff *skb_peek(struct sk_buff_head *list_) | |||
| 844 | * The reference count is not incremented and the reference is therefore | 876 | * The reference count is not incremented and the reference is therefore |
| 845 | * volatile. Use with caution. | 877 | * volatile. Use with caution. |
| 846 | */ | 878 | */ |
| 847 | static inline struct sk_buff *skb_peek_tail(struct sk_buff_head *list_) | 879 | static inline struct sk_buff *skb_peek_tail(const struct sk_buff_head *list_) |
| 848 | { | 880 | { |
| 849 | struct sk_buff *list = ((struct sk_buff *)list_)->prev; | 881 | struct sk_buff *list = ((const struct sk_buff *)list_)->prev; |
| 850 | if (list == (struct sk_buff *)list_) | 882 | if (list == (struct sk_buff *)list_) |
| 851 | list = NULL; | 883 | list = NULL; |
| 852 | return list; | 884 | return list; |
| @@ -1123,18 +1155,51 @@ static inline int skb_pagelen(const struct sk_buff *skb) | |||
| 1123 | int i, len = 0; | 1155 | int i, len = 0; |
| 1124 | 1156 | ||
| 1125 | for (i = (int)skb_shinfo(skb)->nr_frags - 1; i >= 0; i--) | 1157 | for (i = (int)skb_shinfo(skb)->nr_frags - 1; i >= 0; i--) |
| 1126 | len += skb_shinfo(skb)->frags[i].size; | 1158 | len += skb_frag_size(&skb_shinfo(skb)->frags[i]); |
| 1127 | return len + skb_headlen(skb); | 1159 | return len + skb_headlen(skb); |
| 1128 | } | 1160 | } |
| 1129 | 1161 | ||
| 1130 | static inline void skb_fill_page_desc(struct sk_buff *skb, int i, | 1162 | /** |
| 1131 | struct page *page, int off, int size) | 1163 | * __skb_fill_page_desc - initialise a paged fragment in an skb |
| 1164 | * @skb: buffer containing fragment to be initialised | ||
| 1165 | * @i: paged fragment index to initialise | ||
| 1166 | * @page: the page to use for this fragment | ||
| 1167 | * @off: the offset to the data with @page | ||
| 1168 | * @size: the length of the data | ||
| 1169 | * | ||
| 1170 | * Initialises the @i'th fragment of @skb to point to &size bytes at | ||
| 1171 | * offset @off within @page. | ||
| 1172 | * | ||
| 1173 | * Does not take any additional reference on the fragment. | ||
| 1174 | */ | ||
| 1175 | static inline void __skb_fill_page_desc(struct sk_buff *skb, int i, | ||
| 1176 | struct page *page, int off, int size) | ||
| 1132 | { | 1177 | { |
| 1133 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | 1178 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; |
| 1134 | 1179 | ||
| 1135 | frag->page = page; | 1180 | frag->page.p = page; |
| 1136 | frag->page_offset = off; | 1181 | frag->page_offset = off; |
| 1137 | frag->size = size; | 1182 | skb_frag_size_set(frag, size); |
| 1183 | } | ||
| 1184 | |||
| 1185 | /** | ||
| 1186 | * skb_fill_page_desc - initialise a paged fragment in an skb | ||
| 1187 | * @skb: buffer containing fragment to be initialised | ||
| 1188 | * @i: paged fragment index to initialise | ||
| 1189 | * @page: the page to use for this fragment | ||
| 1190 | * @off: the offset to the data with @page | ||
| 1191 | * @size: the length of the data | ||
| 1192 | * | ||
| 1193 | * As per __skb_fill_page_desc() -- initialises the @i'th fragment of | ||
| 1194 | * @skb to point to &size bytes at offset @off within @page. In | ||
| 1195 | * addition updates @skb such that @i is the last fragment. | ||
| 1196 | * | ||
| 1197 | * Does not take any additional reference on the fragment. | ||
| 1198 | */ | ||
| 1199 | static inline void skb_fill_page_desc(struct sk_buff *skb, int i, | ||
| 1200 | struct page *page, int off, int size) | ||
| 1201 | { | ||
| 1202 | __skb_fill_page_desc(skb, i, page, off, size); | ||
| 1138 | skb_shinfo(skb)->nr_frags = i + 1; | 1203 | skb_shinfo(skb)->nr_frags = i + 1; |
| 1139 | } | 1204 | } |
| 1140 | 1205 | ||
| @@ -1629,6 +1694,137 @@ static inline void netdev_free_page(struct net_device *dev, struct page *page) | |||
| 1629 | } | 1694 | } |
| 1630 | 1695 | ||
| 1631 | /** | 1696 | /** |
| 1697 | * skb_frag_page - retrieve the page refered to by a paged fragment | ||
| 1698 | * @frag: the paged fragment | ||
| 1699 | * | ||
| 1700 | * Returns the &struct page associated with @frag. | ||
| 1701 | */ | ||
| 1702 | static inline struct page *skb_frag_page(const skb_frag_t *frag) | ||
| 1703 | { | ||
| 1704 | return frag->page.p; | ||
| 1705 | } | ||
| 1706 | |||
| 1707 | /** | ||
| 1708 | * __skb_frag_ref - take an addition reference on a paged fragment. | ||
| 1709 | * @frag: the paged fragment | ||
| 1710 | * | ||
| 1711 | * Takes an additional reference on the paged fragment @frag. | ||
| 1712 | */ | ||
| 1713 | static inline void __skb_frag_ref(skb_frag_t *frag) | ||
| 1714 | { | ||
| 1715 | get_page(skb_frag_page(frag)); | ||
| 1716 | } | ||
| 1717 | |||
| 1718 | /** | ||
| 1719 | * skb_frag_ref - take an addition reference on a paged fragment of an skb. | ||
| 1720 | * @skb: the buffer | ||
| 1721 | * @f: the fragment offset. | ||
| 1722 | * | ||
| 1723 | * Takes an additional reference on the @f'th paged fragment of @skb. | ||
| 1724 | */ | ||
| 1725 | static inline void skb_frag_ref(struct sk_buff *skb, int f) | ||
| 1726 | { | ||
| 1727 | __skb_frag_ref(&skb_shinfo(skb)->frags[f]); | ||
| 1728 | } | ||
| 1729 | |||
| 1730 | /** | ||
| 1731 | * __skb_frag_unref - release a reference on a paged fragment. | ||
| 1732 | * @frag: the paged fragment | ||
| 1733 | * | ||
| 1734 | * Releases a reference on the paged fragment @frag. | ||
| 1735 | */ | ||
| 1736 | static inline void __skb_frag_unref(skb_frag_t *frag) | ||
| 1737 | { | ||
| 1738 | put_page(skb_frag_page(frag)); | ||
| 1739 | } | ||
| 1740 | |||
| 1741 | /** | ||
| 1742 | * skb_frag_unref - release a reference on a paged fragment of an skb. | ||
| 1743 | * @skb: the buffer | ||
| 1744 | * @f: the fragment offset | ||
| 1745 | * | ||
| 1746 | * Releases a reference on the @f'th paged fragment of @skb. | ||
| 1747 | */ | ||
| 1748 | static inline void skb_frag_unref(struct sk_buff *skb, int f) | ||
| 1749 | { | ||
| 1750 | __skb_frag_unref(&skb_shinfo(skb)->frags[f]); | ||
| 1751 | } | ||
| 1752 | |||
| 1753 | /** | ||
| 1754 | * skb_frag_address - gets the address of the data contained in a paged fragment | ||
| 1755 | * @frag: the paged fragment buffer | ||
| 1756 | * | ||
| 1757 | * Returns the address of the data within @frag. The page must already | ||
| 1758 | * be mapped. | ||
| 1759 | */ | ||
| 1760 | static inline void *skb_frag_address(const skb_frag_t *frag) | ||
| 1761 | { | ||
| 1762 | return page_address(skb_frag_page(frag)) + frag->page_offset; | ||
| 1763 | } | ||
| 1764 | |||
| 1765 | /** | ||
| 1766 | * skb_frag_address_safe - gets the address of the data contained in a paged fragment | ||
| 1767 | * @frag: the paged fragment buffer | ||
| 1768 | * | ||
| 1769 | * Returns the address of the data within @frag. Checks that the page | ||
| 1770 | * is mapped and returns %NULL otherwise. | ||
| 1771 | */ | ||
| 1772 | static inline void *skb_frag_address_safe(const skb_frag_t *frag) | ||
| 1773 | { | ||
| 1774 | void *ptr = page_address(skb_frag_page(frag)); | ||
| 1775 | if (unlikely(!ptr)) | ||
| 1776 | return NULL; | ||
| 1777 | |||
| 1778 | return ptr + frag->page_offset; | ||
| 1779 | } | ||
| 1780 | |||
| 1781 | /** | ||
| 1782 | * __skb_frag_set_page - sets the page contained in a paged fragment | ||
| 1783 | * @frag: the paged fragment | ||
| 1784 | * @page: the page to set | ||
| 1785 | * | ||
| 1786 | * Sets the fragment @frag to contain @page. | ||
| 1787 | */ | ||
| 1788 | static inline void __skb_frag_set_page(skb_frag_t *frag, struct page *page) | ||
| 1789 | { | ||
| 1790 | frag->page.p = page; | ||
| 1791 | } | ||
| 1792 | |||
| 1793 | /** | ||
| 1794 | * skb_frag_set_page - sets the page contained in a paged fragment of an skb | ||
| 1795 | * @skb: the buffer | ||
| 1796 | * @f: the fragment offset | ||
| 1797 | * @page: the page to set | ||
| 1798 | * | ||
| 1799 | * Sets the @f'th fragment of @skb to contain @page. | ||
| 1800 | */ | ||
| 1801 | static inline void skb_frag_set_page(struct sk_buff *skb, int f, | ||
| 1802 | struct page *page) | ||
| 1803 | { | ||
| 1804 | __skb_frag_set_page(&skb_shinfo(skb)->frags[f], page); | ||
| 1805 | } | ||
| 1806 | |||
| 1807 | /** | ||
| 1808 | * skb_frag_dma_map - maps a paged fragment via the DMA API | ||
| 1809 | * @device: the device to map the fragment to | ||
| 1810 | * @frag: the paged fragment to map | ||
| 1811 | * @offset: the offset within the fragment (starting at the | ||
| 1812 | * fragment's own offset) | ||
| 1813 | * @size: the number of bytes to map | ||
| 1814 | * @direction: the direction of the mapping (%PCI_DMA_*) | ||
| 1815 | * | ||
| 1816 | * Maps the page associated with @frag to @device. | ||
| 1817 | */ | ||
| 1818 | static inline dma_addr_t skb_frag_dma_map(struct device *dev, | ||
| 1819 | const skb_frag_t *frag, | ||
| 1820 | size_t offset, size_t size, | ||
| 1821 | enum dma_data_direction dir) | ||
| 1822 | { | ||
| 1823 | return dma_map_page(dev, skb_frag_page(frag), | ||
| 1824 | frag->page_offset + offset, size, dir); | ||
| 1825 | } | ||
| 1826 | |||
| 1827 | /** | ||
| 1632 | * skb_clone_writable - is the header of a clone writable | 1828 | * skb_clone_writable - is the header of a clone writable |
| 1633 | * @skb: buffer to check | 1829 | * @skb: buffer to check |
| 1634 | * @len: length up to which to write | 1830 | * @len: length up to which to write |
| @@ -1636,7 +1832,7 @@ static inline void netdev_free_page(struct net_device *dev, struct page *page) | |||
| 1636 | * Returns true if modifying the header part of the cloned buffer | 1832 | * Returns true if modifying the header part of the cloned buffer |
| 1637 | * does not requires the data to be copied. | 1833 | * does not requires the data to be copied. |
| 1638 | */ | 1834 | */ |
| 1639 | static inline int skb_clone_writable(struct sk_buff *skb, unsigned int len) | 1835 | static inline int skb_clone_writable(const struct sk_buff *skb, unsigned int len) |
| 1640 | { | 1836 | { |
| 1641 | return !skb_header_cloned(skb) && | 1837 | return !skb_header_cloned(skb) && |
| 1642 | skb_headroom(skb) + len <= skb->hdr_len; | 1838 | skb_headroom(skb) + len <= skb->hdr_len; |
| @@ -1730,13 +1926,13 @@ static inline int skb_add_data(struct sk_buff *skb, | |||
| 1730 | } | 1926 | } |
| 1731 | 1927 | ||
| 1732 | static inline int skb_can_coalesce(struct sk_buff *skb, int i, | 1928 | static inline int skb_can_coalesce(struct sk_buff *skb, int i, |
| 1733 | struct page *page, int off) | 1929 | const struct page *page, int off) |
| 1734 | { | 1930 | { |
| 1735 | if (i) { | 1931 | if (i) { |
| 1736 | struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1]; | 1932 | const struct skb_frag_struct *frag = &skb_shinfo(skb)->frags[i - 1]; |
| 1737 | 1933 | ||
| 1738 | return page == frag->page && | 1934 | return page == skb_frag_page(frag) && |
| 1739 | off == frag->page_offset + frag->size; | 1935 | off == frag->page_offset + skb_frag_size(frag); |
| 1740 | } | 1936 | } |
| 1741 | return 0; | 1937 | return 0; |
| 1742 | } | 1938 | } |
| @@ -2020,8 +2216,13 @@ static inline bool skb_defer_rx_timestamp(struct sk_buff *skb) | |||
| 2020 | /** | 2216 | /** |
| 2021 | * skb_complete_tx_timestamp() - deliver cloned skb with tx timestamps | 2217 | * skb_complete_tx_timestamp() - deliver cloned skb with tx timestamps |
| 2022 | * | 2218 | * |
| 2219 | * PHY drivers may accept clones of transmitted packets for | ||
| 2220 | * timestamping via their phy_driver.txtstamp method. These drivers | ||
| 2221 | * must call this function to return the skb back to the stack, with | ||
| 2222 | * or without a timestamp. | ||
| 2223 | * | ||
| 2023 | * @skb: clone of the the original outgoing packet | 2224 | * @skb: clone of the the original outgoing packet |
| 2024 | * @hwtstamps: hardware time stamps | 2225 | * @hwtstamps: hardware time stamps, may be NULL if not available |
| 2025 | * | 2226 | * |
| 2026 | */ | 2227 | */ |
| 2027 | void skb_complete_tx_timestamp(struct sk_buff *skb, | 2228 | 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) | |||
| 2257 | { | 2458 | { |
| 2258 | /* LRO sets gso_size but not gso_type, whereas if GSO is really | 2459 | /* LRO sets gso_size but not gso_type, whereas if GSO is really |
| 2259 | * wanted then gso_type will be set. */ | 2460 | * wanted then gso_type will be set. */ |
| 2260 | struct skb_shared_info *shinfo = skb_shinfo(skb); | 2461 | const struct skb_shared_info *shinfo = skb_shinfo(skb); |
| 2462 | |||
| 2261 | if (skb_is_nonlinear(skb) && shinfo->gso_size != 0 && | 2463 | if (skb_is_nonlinear(skb) && shinfo->gso_size != 0 && |
| 2262 | unlikely(shinfo->gso_type == 0)) { | 2464 | unlikely(shinfo->gso_type == 0)) { |
| 2263 | __skb_warn_lro_forwarding(skb); | 2465 | __skb_warn_lro_forwarding(skb); |
| @@ -2281,7 +2483,7 @@ static inline void skb_forward_csum(struct sk_buff *skb) | |||
| 2281 | * Instead of forcing ip_summed to CHECKSUM_NONE, we can | 2483 | * Instead of forcing ip_summed to CHECKSUM_NONE, we can |
| 2282 | * use this helper, to document places where we make this assertion. | 2484 | * use this helper, to document places where we make this assertion. |
| 2283 | */ | 2485 | */ |
| 2284 | static inline void skb_checksum_none_assert(struct sk_buff *skb) | 2486 | static inline void skb_checksum_none_assert(const struct sk_buff *skb) |
| 2285 | { | 2487 | { |
| 2286 | #ifdef DEBUG | 2488 | #ifdef DEBUG |
| 2287 | BUG_ON(skb->ip_summed != CHECKSUM_NONE); | 2489 | BUG_ON(skb->ip_summed != CHECKSUM_NONE); |
| @@ -2290,5 +2492,25 @@ static inline void skb_checksum_none_assert(struct sk_buff *skb) | |||
| 2290 | 2492 | ||
| 2291 | bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off); | 2493 | bool skb_partial_csum_set(struct sk_buff *skb, u16 start, u16 off); |
| 2292 | 2494 | ||
| 2495 | static inline bool skb_is_recycleable(const struct sk_buff *skb, int skb_size) | ||
| 2496 | { | ||
| 2497 | if (irqs_disabled()) | ||
| 2498 | return false; | ||
| 2499 | |||
| 2500 | if (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) | ||
| 2501 | return false; | ||
| 2502 | |||
| 2503 | if (skb_is_nonlinear(skb) || skb->fclone != SKB_FCLONE_UNAVAILABLE) | ||
| 2504 | return false; | ||
| 2505 | |||
| 2506 | skb_size = SKB_DATA_ALIGN(skb_size + NET_SKB_PAD); | ||
| 2507 | if (skb_end_pointer(skb) - skb->head < skb_size) | ||
| 2508 | return false; | ||
| 2509 | |||
| 2510 | if (skb_shared(skb) || skb_cloned(skb)) | ||
| 2511 | return false; | ||
| 2512 | |||
| 2513 | return true; | ||
| 2514 | } | ||
| 2293 | #endif /* __KERNEL__ */ | 2515 | #endif /* __KERNEL__ */ |
| 2294 | #endif /* _LINUX_SKBUFF_H */ | 2516 | #endif /* _LINUX_SKBUFF_H */ |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 8623217f84d0..f10ed7b4a714 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -25,7 +25,7 @@ struct ssb_sprom { | |||
| 25 | u8 et1phyaddr; /* MII address for enet1 */ | 25 | u8 et1phyaddr; /* MII address for enet1 */ |
| 26 | u8 et0mdcport; /* MDIO for enet0 */ | 26 | u8 et0mdcport; /* MDIO for enet0 */ |
| 27 | u8 et1mdcport; /* MDIO for enet1 */ | 27 | u8 et1mdcport; /* MDIO for enet1 */ |
| 28 | u8 board_rev; /* Board revision number from SPROM. */ | 28 | u16 board_rev; /* Board revision number from SPROM. */ |
| 29 | u8 country_code; /* Country Code */ | 29 | u8 country_code; /* Country Code */ |
| 30 | u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */ | 30 | u16 leddc_on_time; /* LED Powersave Duty Cycle On Count */ |
| 31 | u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */ | 31 | u16 leddc_off_time; /* LED Powersave Duty Cycle Off Count */ |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index efbf459d571c..98941203a27f 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
| @@ -462,6 +462,46 @@ | |||
| 462 | #define SSB_SPROM8_OFDM5GLPO 0x014A /* 5.2GHz OFDM power offset */ | 462 | #define SSB_SPROM8_OFDM5GLPO 0x014A /* 5.2GHz OFDM power offset */ |
| 463 | #define SSB_SPROM8_OFDM5GHPO 0x014E /* 5.8GHz OFDM power offset */ | 463 | #define SSB_SPROM8_OFDM5GHPO 0x014E /* 5.8GHz OFDM power offset */ |
| 464 | 464 | ||
| 465 | /* Values for boardflags_lo read from SPROM */ | ||
| 466 | #define SSB_BFL_BTCOEXIST 0x0001 /* implements Bluetooth coexistance */ | ||
| 467 | #define SSB_BFL_PACTRL 0x0002 /* GPIO 9 controlling the PA */ | ||
| 468 | #define SSB_BFL_AIRLINEMODE 0x0004 /* implements GPIO 13 radio disable indication */ | ||
| 469 | #define SSB_BFL_RSSI 0x0008 /* software calculates nrssi slope. */ | ||
| 470 | #define SSB_BFL_ENETSPI 0x0010 /* has ephy roboswitch spi */ | ||
| 471 | #define SSB_BFL_XTAL_NOSLOW 0x0020 /* no slow clock available */ | ||
| 472 | #define SSB_BFL_CCKHIPWR 0x0040 /* can do high power CCK transmission */ | ||
| 473 | #define SSB_BFL_ENETADM 0x0080 /* has ADMtek switch */ | ||
| 474 | #define SSB_BFL_ENETVLAN 0x0100 /* can do vlan */ | ||
| 475 | #define SSB_BFL_AFTERBURNER 0x0200 /* supports Afterburner mode */ | ||
| 476 | #define SSB_BFL_NOPCI 0x0400 /* board leaves PCI floating */ | ||
| 477 | #define SSB_BFL_FEM 0x0800 /* supports the Front End Module */ | ||
| 478 | #define SSB_BFL_EXTLNA 0x1000 /* has an external LNA */ | ||
| 479 | #define SSB_BFL_HGPA 0x2000 /* had high gain PA */ | ||
| 480 | #define SSB_BFL_BTCMOD 0x4000 /* BFL_BTCOEXIST is given in alternate GPIOs */ | ||
| 481 | #define SSB_BFL_ALTIQ 0x8000 /* alternate I/Q settings */ | ||
| 482 | |||
| 483 | /* Values for boardflags_hi read from SPROM */ | ||
| 484 | #define SSB_BFH_NOPA 0x0001 /* has no PA */ | ||
| 485 | #define SSB_BFH_RSSIINV 0x0002 /* RSSI uses positive slope (not TSSI) */ | ||
| 486 | #define SSB_BFH_PAREF 0x0004 /* uses the PARef LDO */ | ||
| 487 | #define SSB_BFH_3TSWITCH 0x0008 /* uses a triple throw switch shared with bluetooth */ | ||
| 488 | #define SSB_BFH_PHASESHIFT 0x0010 /* can support phase shifter */ | ||
| 489 | #define SSB_BFH_BUCKBOOST 0x0020 /* has buck/booster */ | ||
| 490 | #define SSB_BFH_FEM_BT 0x0040 /* has FEM and switch to share antenna with bluetooth */ | ||
| 491 | |||
| 492 | /* Values for boardflags2_lo read from SPROM */ | ||
| 493 | #define SSB_BFL2_RXBB_INT_REG_DIS 0x0001 /* external RX BB regulator present */ | ||
| 494 | #define SSB_BFL2_APLL_WAR 0x0002 /* alternative A-band PLL settings implemented */ | ||
| 495 | #define SSB_BFL2_TXPWRCTRL_EN 0x0004 /* permits enabling TX Power Control */ | ||
| 496 | #define SSB_BFL2_2X4_DIV 0x0008 /* 2x4 diversity switch */ | ||
| 497 | #define SSB_BFL2_5G_PWRGAIN 0x0010 /* supports 5G band power gain */ | ||
| 498 | #define SSB_BFL2_PCIEWAR_OVR 0x0020 /* overrides ASPM and Clkreq settings */ | ||
| 499 | #define SSB_BFL2_CAESERS_BRD 0x0040 /* is Caesers board (unused) */ | ||
| 500 | #define SSB_BFL2_BTC3WIRE 0x0080 /* used 3-wire bluetooth coexist */ | ||
| 501 | #define SSB_BFL2_SKWRKFEM_BRD 0x0100 /* 4321mcm93 uses Skyworks FEM */ | ||
| 502 | #define SSB_BFL2_SPUR_WAR 0x0200 /* has a workaround for clock-harmonic spurs */ | ||
| 503 | #define SSB_BFL2_GPLL_WAR 0x0400 /* altenative G-band PLL settings implemented */ | ||
| 504 | |||
| 465 | /* Values for SSB_SPROM1_BINF_CCODE */ | 505 | /* Values for SSB_SPROM1_BINF_CCODE */ |
| 466 | enum { | 506 | enum { |
| 467 | SSB_SPROM1CCODE_WORLD = 0, | 507 | SSB_SPROM1CCODE_WORLD = 0, |
diff --git a/include/linux/sungem_phy.h b/include/linux/sungem_phy.h new file mode 100644 index 000000000000..bd9be9f59d3a --- /dev/null +++ b/include/linux/sungem_phy.h | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | #ifndef __SUNGEM_PHY_H__ | ||
| 2 | #define __SUNGEM_PHY_H__ | ||
| 3 | |||
| 4 | struct mii_phy; | ||
| 5 | |||
| 6 | /* Operations supported by any kind of PHY */ | ||
| 7 | struct mii_phy_ops | ||
| 8 | { | ||
| 9 | int (*init)(struct mii_phy *phy); | ||
| 10 | int (*suspend)(struct mii_phy *phy); | ||
| 11 | int (*setup_aneg)(struct mii_phy *phy, u32 advertise); | ||
| 12 | int (*setup_forced)(struct mii_phy *phy, int speed, int fd); | ||
| 13 | int (*poll_link)(struct mii_phy *phy); | ||
| 14 | int (*read_link)(struct mii_phy *phy); | ||
| 15 | int (*enable_fiber)(struct mii_phy *phy, int autoneg); | ||
| 16 | }; | ||
| 17 | |||
| 18 | /* Structure used to statically define an mii/gii based PHY */ | ||
| 19 | struct mii_phy_def | ||
| 20 | { | ||
| 21 | u32 phy_id; /* Concatenated ID1 << 16 | ID2 */ | ||
| 22 | u32 phy_id_mask; /* Significant bits */ | ||
| 23 | u32 features; /* Ethtool SUPPORTED_* defines */ | ||
| 24 | int magic_aneg; /* Autoneg does all speed test for us */ | ||
| 25 | const char* name; | ||
| 26 | const struct mii_phy_ops* ops; | ||
| 27 | }; | ||
| 28 | |||
| 29 | enum { | ||
| 30 | BCM54XX_COPPER, | ||
| 31 | BCM54XX_FIBER, | ||
| 32 | BCM54XX_GBIC, | ||
| 33 | BCM54XX_SGMII, | ||
| 34 | BCM54XX_UNKNOWN, | ||
| 35 | }; | ||
| 36 | |||
| 37 | /* An instance of a PHY, partially borrowed from mii_if_info */ | ||
| 38 | struct mii_phy | ||
| 39 | { | ||
| 40 | struct mii_phy_def* def; | ||
| 41 | u32 advertising; | ||
| 42 | int mii_id; | ||
| 43 | |||
| 44 | /* 1: autoneg enabled, 0: disabled */ | ||
| 45 | int autoneg; | ||
| 46 | |||
| 47 | /* forced speed & duplex (no autoneg) | ||
| 48 | * partner speed & duplex & pause (autoneg) | ||
| 49 | */ | ||
| 50 | int speed; | ||
| 51 | int duplex; | ||
| 52 | int pause; | ||
| 53 | |||
| 54 | /* Provided by host chip */ | ||
| 55 | struct net_device *dev; | ||
| 56 | int (*mdio_read) (struct net_device *dev, int mii_id, int reg); | ||
| 57 | void (*mdio_write) (struct net_device *dev, int mii_id, int reg, int val); | ||
| 58 | void *platform_data; | ||
| 59 | }; | ||
| 60 | |||
| 61 | /* Pass in a struct mii_phy with dev, mdio_read and mdio_write | ||
| 62 | * filled, the remaining fields will be filled on return | ||
| 63 | */ | ||
| 64 | extern int sungem_phy_probe(struct mii_phy *phy, int mii_id); | ||
| 65 | |||
| 66 | |||
| 67 | /* MII definitions missing from mii.h */ | ||
| 68 | |||
| 69 | #define BMCR_SPD2 0x0040 /* Gigabit enable (bcm54xx) */ | ||
| 70 | #define LPA_PAUSE 0x0400 | ||
| 71 | |||
| 72 | /* More PHY registers (model specific) */ | ||
| 73 | |||
| 74 | /* MII BCM5201 MULTIPHY interrupt register */ | ||
| 75 | #define MII_BCM5201_INTERRUPT 0x1A | ||
| 76 | #define MII_BCM5201_INTERRUPT_INTENABLE 0x4000 | ||
| 77 | |||
| 78 | #define MII_BCM5201_AUXMODE2 0x1B | ||
| 79 | #define MII_BCM5201_AUXMODE2_LOWPOWER 0x0008 | ||
| 80 | |||
| 81 | #define MII_BCM5201_MULTIPHY 0x1E | ||
| 82 | |||
| 83 | /* MII BCM5201 MULTIPHY register bits */ | ||
| 84 | #define MII_BCM5201_MULTIPHY_SERIALMODE 0x0002 | ||
| 85 | #define MII_BCM5201_MULTIPHY_SUPERISOLATE 0x0008 | ||
| 86 | |||
| 87 | /* MII BCM5221 Additional registers */ | ||
| 88 | #define MII_BCM5221_TEST 0x1f | ||
| 89 | #define MII_BCM5221_TEST_ENABLE_SHADOWS 0x0080 | ||
| 90 | #define MII_BCM5221_SHDOW_AUX_STAT2 0x1b | ||
| 91 | #define MII_BCM5221_SHDOW_AUX_STAT2_APD 0x0020 | ||
| 92 | #define MII_BCM5221_SHDOW_AUX_MODE4 0x1a | ||
| 93 | #define MII_BCM5221_SHDOW_AUX_MODE4_IDDQMODE 0x0001 | ||
| 94 | #define MII_BCM5221_SHDOW_AUX_MODE4_CLKLOPWR 0x0004 | ||
| 95 | |||
| 96 | /* MII BCM5241 Additional registers */ | ||
| 97 | #define MII_BCM5241_SHDOW_AUX_MODE4_STANDBYPWR 0x0008 | ||
| 98 | |||
| 99 | /* MII BCM5400 1000-BASET Control register */ | ||
| 100 | #define MII_BCM5400_GB_CONTROL 0x09 | ||
| 101 | #define MII_BCM5400_GB_CONTROL_FULLDUPLEXCAP 0x0200 | ||
| 102 | |||
| 103 | /* MII BCM5400 AUXCONTROL register */ | ||
| 104 | #define MII_BCM5400_AUXCONTROL 0x18 | ||
| 105 | #define MII_BCM5400_AUXCONTROL_PWR10BASET 0x0004 | ||
| 106 | |||
| 107 | /* MII BCM5400 AUXSTATUS register */ | ||
| 108 | #define MII_BCM5400_AUXSTATUS 0x19 | ||
| 109 | #define MII_BCM5400_AUXSTATUS_LINKMODE_MASK 0x0700 | ||
| 110 | #define MII_BCM5400_AUXSTATUS_LINKMODE_SHIFT 8 | ||
| 111 | |||
| 112 | /* 1000BT control (Marvell & BCM54xx at least) */ | ||
| 113 | #define MII_1000BASETCONTROL 0x09 | ||
| 114 | #define MII_1000BASETCONTROL_FULLDUPLEXCAP 0x0200 | ||
| 115 | #define MII_1000BASETCONTROL_HALFDUPLEXCAP 0x0100 | ||
| 116 | |||
| 117 | /* Marvell 88E1011 PHY control */ | ||
| 118 | #define MII_M1011_PHY_SPEC_CONTROL 0x10 | ||
| 119 | #define MII_M1011_PHY_SPEC_CONTROL_MANUAL_MDIX 0x20 | ||
| 120 | #define MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX 0x40 | ||
| 121 | |||
| 122 | /* Marvell 88E1011 PHY status */ | ||
| 123 | #define MII_M1011_PHY_SPEC_STATUS 0x11 | ||
| 124 | #define MII_M1011_PHY_SPEC_STATUS_1000 0x8000 | ||
| 125 | #define MII_M1011_PHY_SPEC_STATUS_100 0x4000 | ||
| 126 | #define MII_M1011_PHY_SPEC_STATUS_SPD_MASK 0xc000 | ||
| 127 | #define MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX 0x2000 | ||
| 128 | #define MII_M1011_PHY_SPEC_STATUS_RESOLVED 0x0800 | ||
| 129 | #define MII_M1011_PHY_SPEC_STATUS_TX_PAUSE 0x0008 | ||
| 130 | #define MII_M1011_PHY_SPEC_STATUS_RX_PAUSE 0x0004 | ||
| 131 | |||
| 132 | #endif /* __SUNGEM_PHY_H__ */ | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 11684d9e6bd2..9a1ec10fd504 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -435,7 +435,7 @@ enum { | |||
| 435 | NET_IPV4_ROUTE_MAX_SIZE=5, | 435 | NET_IPV4_ROUTE_MAX_SIZE=5, |
| 436 | NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, | 436 | NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, |
| 437 | NET_IPV4_ROUTE_GC_TIMEOUT=7, | 437 | NET_IPV4_ROUTE_GC_TIMEOUT=7, |
| 438 | NET_IPV4_ROUTE_GC_INTERVAL=8, | 438 | NET_IPV4_ROUTE_GC_INTERVAL=8, /* obsolete since 2.6.38 */ |
| 439 | NET_IPV4_ROUTE_REDIRECT_LOAD=9, | 439 | NET_IPV4_ROUTE_REDIRECT_LOAD=9, |
| 440 | NET_IPV4_ROUTE_REDIRECT_NUMBER=10, | 440 | NET_IPV4_ROUTE_REDIRECT_NUMBER=10, |
| 441 | NET_IPV4_ROUTE_REDIRECT_SILENCE=11, | 441 | NET_IPV4_ROUTE_REDIRECT_SILENCE=11, |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index d7d2f2158142..dac0859e6440 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -112,6 +112,7 @@ struct bin_attribute { | |||
| 112 | struct sysfs_ops { | 112 | struct sysfs_ops { |
| 113 | ssize_t (*show)(struct kobject *, struct attribute *,char *); | 113 | ssize_t (*show)(struct kobject *, struct attribute *,char *); |
| 114 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); | 114 | ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t); |
| 115 | const void *(*namespace)(struct kobject *, const struct attribute *); | ||
| 115 | }; | 116 | }; |
| 116 | 117 | ||
| 117 | struct sysfs_dirent; | 118 | struct sysfs_dirent; |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 531ede8006d9..7f59ee946983 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -111,7 +111,8 @@ enum { | |||
| 111 | #define TCPI_OPT_TIMESTAMPS 1 | 111 | #define TCPI_OPT_TIMESTAMPS 1 |
| 112 | #define TCPI_OPT_SACK 2 | 112 | #define TCPI_OPT_SACK 2 |
| 113 | #define TCPI_OPT_WSCALE 4 | 113 | #define TCPI_OPT_WSCALE 4 |
| 114 | #define TCPI_OPT_ECN 8 | 114 | #define TCPI_OPT_ECN 8 /* ECN was negociated at TCP session init */ |
| 115 | #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ | ||
| 115 | 116 | ||
| 116 | enum tcp_ca_state { | 117 | enum tcp_ca_state { |
| 117 | TCP_CA_Open = 0, | 118 | TCP_CA_Open = 0, |
| @@ -379,6 +380,10 @@ struct tcp_sock { | |||
| 379 | u32 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ | 380 | u32 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */ |
| 380 | u32 snd_cwnd_used; | 381 | u32 snd_cwnd_used; |
| 381 | u32 snd_cwnd_stamp; | 382 | u32 snd_cwnd_stamp; |
| 383 | u32 prior_cwnd; /* Congestion window at start of Recovery. */ | ||
| 384 | u32 prr_delivered; /* Number of newly delivered packets to | ||
| 385 | * receiver in Recovery. */ | ||
| 386 | u32 prr_out; /* Total number of pkts sent during Recovery. */ | ||
| 382 | 387 | ||
| 383 | u32 rcv_wnd; /* Current receiver window */ | 388 | u32 rcv_wnd; /* Current receiver window */ |
| 384 | u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ | 389 | u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ |
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 0db239590b4d..9730b0e51e46 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
| @@ -41,6 +41,10 @@ | |||
| 41 | #include <linux/string.h> | 41 | #include <linux/string.h> |
| 42 | #include <asm/byteorder.h> | 42 | #include <asm/byteorder.h> |
| 43 | 43 | ||
| 44 | #ifndef __KERNEL__ | ||
| 45 | #include <arpa/inet.h> /* for ntohs etc. */ | ||
| 46 | #endif | ||
| 47 | |||
| 44 | /* | 48 | /* |
| 45 | * Configuration | 49 | * Configuration |
| 46 | * | 50 | * |
diff --git a/include/linux/un.h b/include/linux/un.h index 45561c564b8e..3ed3e46c1b1f 100644 --- a/include/linux/un.h +++ b/include/linux/un.h | |||
| @@ -1,10 +1,12 @@ | |||
| 1 | #ifndef _LINUX_UN_H | 1 | #ifndef _LINUX_UN_H |
| 2 | #define _LINUX_UN_H | 2 | #define _LINUX_UN_H |
| 3 | 3 | ||
| 4 | #include <linux/socket.h> | ||
| 5 | |||
| 4 | #define UNIX_PATH_MAX 108 | 6 | #define UNIX_PATH_MAX 108 |
| 5 | 7 | ||
| 6 | struct sockaddr_un { | 8 | struct sockaddr_un { |
| 7 | sa_family_t sun_family; /* AF_UNIX */ | 9 | __kernel_sa_family_t sun_family; /* AF_UNIX */ |
| 8 | char sun_path[UNIX_PATH_MAX]; /* pathname */ | 10 | char sun_path[UNIX_PATH_MAX]; /* pathname */ |
| 9 | }; | 11 | }; |
| 10 | 12 | ||
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 710885749605..851ebf1a4476 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
| @@ -61,6 +61,9 @@ struct virtqueue { | |||
| 61 | * virtqueue_detach_unused_buf: detach first unused buffer | 61 | * virtqueue_detach_unused_buf: detach first unused buffer |
| 62 | * vq: the struct virtqueue we're talking about. | 62 | * vq: the struct virtqueue we're talking about. |
| 63 | * Returns NULL or the "data" token handed to add_buf | 63 | * Returns NULL or the "data" token handed to add_buf |
| 64 | * virtqueue_get_vring_size: return the size of the virtqueue's vring | ||
| 65 | * vq: the struct virtqueue containing the vring of interest. | ||
| 66 | * Returns the size of the vring. | ||
| 64 | * | 67 | * |
| 65 | * Locking rules are straightforward: the driver is responsible for | 68 | * Locking rules are straightforward: the driver is responsible for |
| 66 | * locking. No two operations may be invoked simultaneously, with the exception | 69 | * locking. No two operations may be invoked simultaneously, with the exception |
| @@ -97,6 +100,8 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *vq); | |||
| 97 | 100 | ||
| 98 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); | 101 | void *virtqueue_detach_unused_buf(struct virtqueue *vq); |
| 99 | 102 | ||
| 103 | unsigned int virtqueue_get_vring_size(struct virtqueue *vq); | ||
| 104 | |||
| 100 | /** | 105 | /** |
| 101 | * virtio_device - representation of a device using virtio | 106 | * virtio_device - representation of a device using virtio |
| 102 | * @index: unique position on the virtio bus | 107 | * @index: unique position on the virtio bus |
diff --git a/include/linux/x25.h b/include/linux/x25.h index 6450a7f12074..810cce6737ea 100644 --- a/include/linux/x25.h +++ b/include/linux/x25.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #define X25_KERNEL_H | 12 | #define X25_KERNEL_H |
| 13 | 13 | ||
| 14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 15 | #include <linux/socket.h> | ||
| 15 | 16 | ||
| 16 | #define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0) | 17 | #define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0) |
| 17 | #define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1) | 18 | #define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1) |
| @@ -57,7 +58,7 @@ struct x25_address { | |||
| 57 | * Linux X.25 Address structure, used for bind, and connect mostly. | 58 | * Linux X.25 Address structure, used for bind, and connect mostly. |
| 58 | */ | 59 | */ |
| 59 | struct sockaddr_x25 { | 60 | struct sockaddr_x25 { |
| 60 | sa_family_t sx25_family; /* Must be AF_X25 */ | 61 | __kernel_sa_family_t sx25_family; /* Must be AF_X25 */ |
| 61 | struct x25_address sx25_addr; /* X.121 Address */ | 62 | struct x25_address sx25_addr; /* X.121 Address */ |
| 62 | }; | 63 | }; |
| 63 | 64 | ||
