diff options
Diffstat (limited to 'include/linux')
58 files changed, 1419 insertions, 336 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index 8deaf6d050c3..1954a4e305a3 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
| @@ -7,6 +7,7 @@ | |||
| 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/bcma/bcma_driver_mips.h> |
| 10 | #include <linux/bcma/bcma_driver_gmac_cmn.h> | ||
| 10 | #include <linux/ssb/ssb.h> /* SPROM sharing */ | 11 | #include <linux/ssb/ssb.h> /* SPROM sharing */ |
| 11 | 12 | ||
| 12 | #include "bcma_regs.h" | 13 | #include "bcma_regs.h" |
| @@ -70,6 +71,13 @@ struct bcma_host_ops { | |||
| 70 | 71 | ||
| 71 | /* Core-ID values. */ | 72 | /* Core-ID values. */ |
| 72 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ | 73 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ |
| 74 | #define BCMA_CORE_4706_CHIPCOMMON 0x500 | ||
| 75 | #define BCMA_CORE_4706_SOC_RAM 0x50E | ||
| 76 | #define BCMA_CORE_4706_MAC_GBIT 0x52D | ||
| 77 | #define BCMA_CORE_AMEMC 0x52E /* DDR1/2 memory controller core */ | ||
| 78 | #define BCMA_CORE_ALTA 0x534 /* I2S core */ | ||
| 79 | #define BCMA_CORE_4706_MAC_GBIT_COMMON 0x5DC | ||
| 80 | #define BCMA_CORE_DDR23_PHY 0x5DD | ||
| 73 | #define BCMA_CORE_INVALID 0x700 | 81 | #define BCMA_CORE_INVALID 0x700 |
| 74 | #define BCMA_CORE_CHIPCOMMON 0x800 | 82 | #define BCMA_CORE_CHIPCOMMON 0x800 |
| 75 | #define BCMA_CORE_ILINE20 0x801 | 83 | #define BCMA_CORE_ILINE20 0x801 |
| @@ -130,6 +138,36 @@ struct bcma_host_ops { | |||
| 130 | 138 | ||
| 131 | #define BCMA_MAX_NR_CORES 16 | 139 | #define BCMA_MAX_NR_CORES 16 |
| 132 | 140 | ||
| 141 | /* Chip IDs of PCIe devices */ | ||
| 142 | #define BCMA_CHIP_ID_BCM4313 0x4313 | ||
| 143 | #define BCMA_CHIP_ID_BCM43224 43224 | ||
| 144 | #define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8 | ||
| 145 | #define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa | ||
| 146 | #define BCMA_CHIP_ID_BCM43225 43225 | ||
| 147 | #define BCMA_CHIP_ID_BCM43227 43227 | ||
| 148 | #define BCMA_CHIP_ID_BCM43228 43228 | ||
| 149 | #define BCMA_CHIP_ID_BCM43421 43421 | ||
| 150 | #define BCMA_CHIP_ID_BCM43428 43428 | ||
| 151 | #define BCMA_CHIP_ID_BCM43431 43431 | ||
| 152 | #define BCMA_CHIP_ID_BCM43460 43460 | ||
| 153 | #define BCMA_CHIP_ID_BCM4331 0x4331 | ||
| 154 | #define BCMA_CHIP_ID_BCM6362 0x6362 | ||
| 155 | #define BCMA_CHIP_ID_BCM4360 0x4360 | ||
| 156 | #define BCMA_CHIP_ID_BCM4352 0x4352 | ||
| 157 | |||
| 158 | /* Chip IDs of SoCs */ | ||
| 159 | #define BCMA_CHIP_ID_BCM4706 0x5300 | ||
| 160 | #define BCMA_CHIP_ID_BCM4716 0x4716 | ||
| 161 | #define BCMA_PKG_ID_BCM4716 8 | ||
| 162 | #define BCMA_PKG_ID_BCM4717 9 | ||
| 163 | #define BCMA_PKG_ID_BCM4718 10 | ||
| 164 | #define BCMA_CHIP_ID_BCM47162 47162 | ||
| 165 | #define BCMA_CHIP_ID_BCM4748 0x4748 | ||
| 166 | #define BCMA_CHIP_ID_BCM4749 0x4749 | ||
| 167 | #define BCMA_CHIP_ID_BCM5356 0x5356 | ||
| 168 | #define BCMA_CHIP_ID_BCM5357 0x5357 | ||
| 169 | #define BCMA_CHIP_ID_BCM53572 53572 | ||
| 170 | |||
| 133 | struct bcma_device { | 171 | struct bcma_device { |
| 134 | struct bcma_bus *bus; | 172 | struct bcma_bus *bus; |
| 135 | struct bcma_device_id id; | 173 | struct bcma_device_id id; |
| @@ -215,6 +253,7 @@ struct bcma_bus { | |||
| 215 | struct bcma_drv_cc drv_cc; | 253 | struct bcma_drv_cc drv_cc; |
| 216 | struct bcma_drv_pci drv_pci; | 254 | struct bcma_drv_pci drv_pci; |
| 217 | struct bcma_drv_mips drv_mips; | 255 | struct bcma_drv_mips drv_mips; |
| 256 | struct bcma_drv_gmac_cmn drv_gmac_cmn; | ||
| 218 | 257 | ||
| 219 | /* We decided to share SPROM struct with SSB as long as we do not need | 258 | /* We decided to share SPROM struct with SSB as long as we do not need |
| 220 | * any hacks for BCMA. This simplifies drivers code. */ | 259 | * 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 8bbfe31fbac8..3c80885fa829 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -24,7 +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_NFLASH 0x00000200 /* NAND flash */ |
| 28 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ | 28 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ |
| 29 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ | 29 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ |
| 30 | #define BCMA_PLLTYPE_NONE 0x00000000 | 30 | #define BCMA_PLLTYPE_NONE 0x00000000 |
| @@ -45,6 +45,7 @@ | |||
| 45 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ | 45 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ |
| 46 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ | 46 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ |
| 47 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ | 47 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ |
| 48 | #define BCMA_CC_CAP_NFLASH 0x80000000 /* NAND flash present (rev >= 35 or BCM4706?) */ | ||
| 48 | #define BCMA_CC_CORECTL 0x0008 | 49 | #define BCMA_CC_CORECTL 0x0008 |
| 49 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ | 50 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ |
| 50 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ | 51 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ |
| @@ -88,6 +89,11 @@ | |||
| 88 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 | 89 | #define BCMA_CC_CHIPST_4313_OTP_PRESENT 2 |
| 89 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 | 90 | #define BCMA_CC_CHIPST_4331_SPROM_PRESENT 2 |
| 90 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 | 91 | #define BCMA_CC_CHIPST_4331_OTP_PRESENT 4 |
| 92 | #define BCMA_CC_CHIPST_4706_PKG_OPTION BIT(0) /* 0: full-featured package 1: low-cost package */ | ||
| 93 | #define BCMA_CC_CHIPST_4706_SFLASH_PRESENT BIT(1) /* 0: parallel, 1: serial flash is present */ | ||
| 94 | #define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ | ||
| 95 | #define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */ | ||
| 96 | #define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ | ||
| 91 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | 97 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ |
| 92 | #define BCMA_CC_JCMD_START 0x80000000 | 98 | #define BCMA_CC_JCMD_START 0x80000000 |
| 93 | #define BCMA_CC_JCMD_BUSY 0x80000000 | 99 | #define BCMA_CC_JCMD_BUSY 0x80000000 |
| @@ -117,10 +123,58 @@ | |||
| 117 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ | 123 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ |
| 118 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ | 124 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ |
| 119 | #define BCMA_CC_FLASHCTL 0x0040 | 125 | #define BCMA_CC_FLASHCTL 0x0040 |
| 126 | /* Start/busy bit in flashcontrol */ | ||
| 127 | #define BCMA_CC_FLASHCTL_OPCODE 0x000000ff | ||
| 128 | #define BCMA_CC_FLASHCTL_ACTION 0x00000700 | ||
| 129 | #define BCMA_CC_FLASHCTL_CS_ACTIVE 0x00001000 /* Chip Select Active, rev >= 20 */ | ||
| 120 | #define BCMA_CC_FLASHCTL_START 0x80000000 | 130 | #define BCMA_CC_FLASHCTL_START 0x80000000 |
| 121 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START | 131 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START |
| 132 | /* Flashcontrol action + opcodes for ST flashes */ | ||
| 133 | #define BCMA_CC_FLASHCTL_ST_WREN 0x0006 /* Write Enable */ | ||
| 134 | #define BCMA_CC_FLASHCTL_ST_WRDIS 0x0004 /* Write Disable */ | ||
| 135 | #define BCMA_CC_FLASHCTL_ST_RDSR 0x0105 /* Read Status Register */ | ||
| 136 | #define BCMA_CC_FLASHCTL_ST_WRSR 0x0101 /* Write Status Register */ | ||
| 137 | #define BCMA_CC_FLASHCTL_ST_READ 0x0303 /* Read Data Bytes */ | ||
| 138 | #define BCMA_CC_FLASHCTL_ST_PP 0x0302 /* Page Program */ | ||
| 139 | #define BCMA_CC_FLASHCTL_ST_SE 0x02d8 /* Sector Erase */ | ||
| 140 | #define BCMA_CC_FLASHCTL_ST_BE 0x00c7 /* Bulk Erase */ | ||
| 141 | #define BCMA_CC_FLASHCTL_ST_DP 0x00b9 /* Deep Power-down */ | ||
| 142 | #define BCMA_CC_FLASHCTL_ST_RES 0x03ab /* Read Electronic Signature */ | ||
| 143 | #define BCMA_CC_FLASHCTL_ST_CSA 0x1000 /* Keep chip select asserted */ | ||
| 144 | #define BCMA_CC_FLASHCTL_ST_SSE 0x0220 /* Sub-sector Erase */ | ||
| 145 | /* Flashcontrol action + opcodes for Atmel flashes */ | ||
| 146 | #define BCMA_CC_FLASHCTL_AT_READ 0x07e8 | ||
| 147 | #define BCMA_CC_FLASHCTL_AT_PAGE_READ 0x07d2 | ||
| 148 | #define BCMA_CC_FLASHCTL_AT_STATUS 0x01d7 | ||
| 149 | #define BCMA_CC_FLASHCTL_AT_BUF1_WRITE 0x0384 | ||
| 150 | #define BCMA_CC_FLASHCTL_AT_BUF2_WRITE 0x0387 | ||
| 151 | #define BCMA_CC_FLASHCTL_AT_BUF1_ERASE_PROGRAM 0x0283 | ||
| 152 | #define BCMA_CC_FLASHCTL_AT_BUF2_ERASE_PROGRAM 0x0286 | ||
| 153 | #define BCMA_CC_FLASHCTL_AT_BUF1_PROGRAM 0x0288 | ||
| 154 | #define BCMA_CC_FLASHCTL_AT_BUF2_PROGRAM 0x0289 | ||
| 155 | #define BCMA_CC_FLASHCTL_AT_PAGE_ERASE 0x0281 | ||
| 156 | #define BCMA_CC_FLASHCTL_AT_BLOCK_ERASE 0x0250 | ||
| 157 | #define BCMA_CC_FLASHCTL_AT_BUF1_WRITE_ERASE_PROGRAM 0x0382 | ||
| 158 | #define BCMA_CC_FLASHCTL_AT_BUF2_WRITE_ERASE_PROGRAM 0x0385 | ||
| 159 | #define BCMA_CC_FLASHCTL_AT_BUF1_LOAD 0x0253 | ||
| 160 | #define BCMA_CC_FLASHCTL_AT_BUF2_LOAD 0x0255 | ||
| 161 | #define BCMA_CC_FLASHCTL_AT_BUF1_COMPARE 0x0260 | ||
| 162 | #define BCMA_CC_FLASHCTL_AT_BUF2_COMPARE 0x0261 | ||
| 163 | #define BCMA_CC_FLASHCTL_AT_BUF1_REPROGRAM 0x0258 | ||
| 164 | #define BCMA_CC_FLASHCTL_AT_BUF2_REPROGRAM 0x0259 | ||
| 122 | #define BCMA_CC_FLASHADDR 0x0044 | 165 | #define BCMA_CC_FLASHADDR 0x0044 |
| 123 | #define BCMA_CC_FLASHDATA 0x0048 | 166 | #define BCMA_CC_FLASHDATA 0x0048 |
| 167 | /* Status register bits for ST flashes */ | ||
| 168 | #define BCMA_CC_FLASHDATA_ST_WIP 0x01 /* Write In Progress */ | ||
| 169 | #define BCMA_CC_FLASHDATA_ST_WEL 0x02 /* Write Enable Latch */ | ||
| 170 | #define BCMA_CC_FLASHDATA_ST_BP_MASK 0x1c /* Block Protect */ | ||
| 171 | #define BCMA_CC_FLASHDATA_ST_BP_SHIFT 2 | ||
| 172 | #define BCMA_CC_FLASHDATA_ST_SRWD 0x80 /* Status Register Write Disable */ | ||
| 173 | /* Status register bits for Atmel flashes */ | ||
| 174 | #define BCMA_CC_FLASHDATA_AT_READY 0x80 | ||
| 175 | #define BCMA_CC_FLASHDATA_AT_MISMATCH 0x40 | ||
| 176 | #define BCMA_CC_FLASHDATA_AT_ID_MASK 0x38 | ||
| 177 | #define BCMA_CC_FLASHDATA_AT_ID_SHIFT 3 | ||
| 124 | #define BCMA_CC_BCAST_ADDR 0x0050 | 178 | #define BCMA_CC_BCAST_ADDR 0x0050 |
| 125 | #define BCMA_CC_BCAST_DATA 0x0054 | 179 | #define BCMA_CC_BCAST_DATA 0x0054 |
| 126 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | 180 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ |
| @@ -280,6 +334,15 @@ | |||
| 280 | 334 | ||
| 281 | /* 4706 PMU */ | 335 | /* 4706 PMU */ |
| 282 | #define BCMA_CC_PMU4706_MAINPLL_PLL0 0 | 336 | #define BCMA_CC_PMU4706_MAINPLL_PLL0 0 |
| 337 | #define BCMA_CC_PMU6_4706_PROCPLL_OFF 4 /* The CPU PLL */ | ||
| 338 | #define BCMA_CC_PMU6_4706_PROC_P2DIV_MASK 0x000f0000 | ||
| 339 | #define BCMA_CC_PMU6_4706_PROC_P2DIV_SHIFT 16 | ||
| 340 | #define BCMA_CC_PMU6_4706_PROC_P1DIV_MASK 0x0000f000 | ||
| 341 | #define BCMA_CC_PMU6_4706_PROC_P1DIV_SHIFT 12 | ||
| 342 | #define BCMA_CC_PMU6_4706_PROC_NDIV_INT_MASK 0x00000ff8 | ||
| 343 | #define BCMA_CC_PMU6_4706_PROC_NDIV_INT_SHIFT 3 | ||
| 344 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007 | ||
| 345 | #define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0 | ||
| 283 | 346 | ||
| 284 | /* ALP clock on pre-PMU chips */ | 347 | /* ALP clock on pre-PMU chips */ |
| 285 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 | 348 | #define BCMA_CC_PMU_ALP_CLOCK 20000000 |
| @@ -308,6 +371,19 @@ | |||
| 308 | #define BCMA_CC_PPL_PCHI_OFF 5 | 371 | #define BCMA_CC_PPL_PCHI_OFF 5 |
| 309 | #define BCMA_CC_PPL_PCHI_MASK 0x0000003f | 372 | #define BCMA_CC_PPL_PCHI_MASK 0x0000003f |
| 310 | 373 | ||
| 374 | #define BCMA_CC_PMU_PLL_CTL0 0 | ||
| 375 | #define BCMA_CC_PMU_PLL_CTL1 1 | ||
| 376 | #define BCMA_CC_PMU_PLL_CTL2 2 | ||
| 377 | #define BCMA_CC_PMU_PLL_CTL3 3 | ||
| 378 | #define BCMA_CC_PMU_PLL_CTL4 4 | ||
| 379 | #define BCMA_CC_PMU_PLL_CTL5 5 | ||
| 380 | |||
| 381 | #define BCMA_CC_PMU1_PLL0_PC0_P1DIV_MASK 0x00f00000 | ||
| 382 | #define BCMA_CC_PMU1_PLL0_PC0_P1DIV_SHIFT 20 | ||
| 383 | |||
| 384 | #define BCMA_CC_PMU1_PLL0_PC2_NDIV_INT_MASK 0x1ff00000 | ||
| 385 | #define BCMA_CC_PMU1_PLL0_PC2_NDIV_INT_SHIFT 20 | ||
| 386 | |||
| 311 | /* BCM4331 ChipControl numbers. */ | 387 | /* BCM4331 ChipControl numbers. */ |
| 312 | #define BCMA_CHIPCTL_4331_BT_COEXIST BIT(0) /* 0 disable */ | 388 | #define BCMA_CHIPCTL_4331_BT_COEXIST BIT(0) /* 0 disable */ |
| 313 | #define BCMA_CHIPCTL_4331_SECI BIT(1) /* 0 SECI is disabled (JATG functional) */ | 389 | #define BCMA_CHIPCTL_4331_SECI BIT(1) /* 0 SECI is disabled (JATG functional) */ |
| @@ -321,9 +397,18 @@ | |||
| 321 | #define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN BIT(9) /* override core control on pipe_AuxPowerDown */ | 397 | #define BCMA_CHIPCTL_4331_OVR_PIPEAUXPWRDOWN BIT(9) /* override core control on pipe_AuxPowerDown */ |
| 322 | #define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN BIT(10) /* pcie_auxclkenable */ | 398 | #define BCMA_CHIPCTL_4331_PCIE_AUXCLKEN BIT(10) /* pcie_auxclkenable */ |
| 323 | #define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN BIT(11) /* pcie_pipe_pllpowerdown */ | 399 | #define BCMA_CHIPCTL_4331_PCIE_PIPE_PLLDOWN BIT(11) /* pcie_pipe_pllpowerdown */ |
| 400 | #define BCMA_CHIPCTL_4331_EXTPA_EN2 BIT(12) /* 0 ext pa disable, 1 ext pa enabled */ | ||
| 324 | #define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4 BIT(16) /* enable bt_shd0 at gpio4 */ | 401 | #define BCMA_CHIPCTL_4331_BT_SHD0_ON_GPIO4 BIT(16) /* enable bt_shd0 at gpio4 */ |
| 325 | #define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5 BIT(17) /* enable bt_shd1 at gpio5 */ | 402 | #define BCMA_CHIPCTL_4331_BT_SHD1_ON_GPIO5 BIT(17) /* enable bt_shd1 at gpio5 */ |
| 326 | 403 | ||
| 404 | /* 43224 chip-specific ChipControl register bits */ | ||
| 405 | #define BCMA_CCTRL_43224_GPIO_TOGGLE 0x8000 /* gpio[3:0] pins as btcoex or s/w gpio */ | ||
| 406 | #define BCMA_CCTRL_43224A0_12MA_LED_DRIVE 0x00F000F0 /* 12 mA drive strength */ | ||
| 407 | #define BCMA_CCTRL_43224B0_12MA_LED_DRIVE 0xF0 /* 12 mA drive strength for later 43224s */ | ||
| 408 | |||
| 409 | /* 4313 Chip specific ChipControl register bits */ | ||
| 410 | #define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ | ||
| 411 | |||
| 327 | /* Data for the PMU, if available. | 412 | /* Data for the PMU, if available. |
| 328 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | 413 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) |
| 329 | */ | 414 | */ |
| @@ -411,5 +496,6 @@ extern void bcma_chipco_chipctl_maskset(struct bcma_drv_cc *cc, | |||
| 411 | u32 offset, u32 mask, u32 set); | 496 | u32 offset, u32 mask, u32 set); |
| 412 | extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, | 497 | extern void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, |
| 413 | u32 offset, u32 mask, u32 set); | 498 | u32 offset, u32 mask, u32 set); |
| 499 | extern void bcma_pmu_spuravoid_pllupdate(struct bcma_drv_cc *cc, int spuravoid); | ||
| 414 | 500 | ||
| 415 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ | 501 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ |
diff --git a/include/linux/bcma/bcma_driver_gmac_cmn.h b/include/linux/bcma/bcma_driver_gmac_cmn.h new file mode 100644 index 000000000000..def894b83b0d --- /dev/null +++ b/include/linux/bcma/bcma_driver_gmac_cmn.h | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | #ifndef LINUX_BCMA_DRIVER_GMAC_CMN_H_ | ||
| 2 | #define LINUX_BCMA_DRIVER_GMAC_CMN_H_ | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | #define BCMA_GMAC_CMN_STAG0 0x000 | ||
| 7 | #define BCMA_GMAC_CMN_STAG1 0x004 | ||
| 8 | #define BCMA_GMAC_CMN_STAG2 0x008 | ||
| 9 | #define BCMA_GMAC_CMN_STAG3 0x00C | ||
| 10 | #define BCMA_GMAC_CMN_PARSER_CTL 0x020 | ||
| 11 | #define BCMA_GMAC_CMN_MIB_MAX_LEN 0x024 | ||
| 12 | #define BCMA_GMAC_CMN_PHY_ACCESS 0x100 | ||
| 13 | #define BCMA_GMAC_CMN_PA_DATA_MASK 0x0000ffff | ||
| 14 | #define BCMA_GMAC_CMN_PA_ADDR_MASK 0x001f0000 | ||
| 15 | #define BCMA_GMAC_CMN_PA_ADDR_SHIFT 16 | ||
| 16 | #define BCMA_GMAC_CMN_PA_REG_MASK 0x1f000000 | ||
| 17 | #define BCMA_GMAC_CMN_PA_REG_SHIFT 24 | ||
| 18 | #define BCMA_GMAC_CMN_PA_WRITE 0x20000000 | ||
| 19 | #define BCMA_GMAC_CMN_PA_START 0x40000000 | ||
| 20 | #define BCMA_GMAC_CMN_PHY_CTL 0x104 | ||
| 21 | #define BCMA_GMAC_CMN_PC_EPA_MASK 0x0000001f | ||
| 22 | #define BCMA_GMAC_CMN_PC_MCT_MASK 0x007f0000 | ||
| 23 | #define BCMA_GMAC_CMN_PC_MCT_SHIFT 16 | ||
| 24 | #define BCMA_GMAC_CMN_PC_MTE 0x00800000 | ||
| 25 | #define BCMA_GMAC_CMN_GMAC0_RGMII_CTL 0x110 | ||
| 26 | #define BCMA_GMAC_CMN_CFP_ACCESS 0x200 | ||
| 27 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA0 0x210 | ||
| 28 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA1 0x214 | ||
| 29 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA2 0x218 | ||
| 30 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA3 0x21C | ||
| 31 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA4 0x220 | ||
| 32 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA5 0x224 | ||
| 33 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA6 0x228 | ||
| 34 | #define BCMA_GMAC_CMN_CFP_TCAM_DATA7 0x22C | ||
| 35 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK0 0x230 | ||
| 36 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK1 0x234 | ||
| 37 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK2 0x238 | ||
| 38 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK3 0x23C | ||
| 39 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK4 0x240 | ||
| 40 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK5 0x244 | ||
| 41 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK6 0x248 | ||
| 42 | #define BCMA_GMAC_CMN_CFP_TCAM_MASK7 0x24C | ||
| 43 | #define BCMA_GMAC_CMN_CFP_ACTION_DATA 0x250 | ||
| 44 | #define BCMA_GMAC_CMN_TCAM_BIST_CTL 0x2A0 | ||
| 45 | #define BCMA_GMAC_CMN_TCAM_BIST_STATUS 0x2A4 | ||
| 46 | #define BCMA_GMAC_CMN_TCAM_CMP_STATUS 0x2A8 | ||
| 47 | #define BCMA_GMAC_CMN_TCAM_DISABLE 0x2AC | ||
| 48 | #define BCMA_GMAC_CMN_TCAM_TEST_CTL 0x2F0 | ||
| 49 | #define BCMA_GMAC_CMN_UDF_0_A3_A0 0x300 | ||
| 50 | #define BCMA_GMAC_CMN_UDF_0_A7_A4 0x304 | ||
| 51 | #define BCMA_GMAC_CMN_UDF_0_A8 0x308 | ||
| 52 | #define BCMA_GMAC_CMN_UDF_1_A3_A0 0x310 | ||
| 53 | #define BCMA_GMAC_CMN_UDF_1_A7_A4 0x314 | ||
| 54 | #define BCMA_GMAC_CMN_UDF_1_A8 0x318 | ||
| 55 | #define BCMA_GMAC_CMN_UDF_2_A3_A0 0x320 | ||
| 56 | #define BCMA_GMAC_CMN_UDF_2_A7_A4 0x324 | ||
| 57 | #define BCMA_GMAC_CMN_UDF_2_A8 0x328 | ||
| 58 | #define BCMA_GMAC_CMN_UDF_0_B3_B0 0x330 | ||
| 59 | #define BCMA_GMAC_CMN_UDF_0_B7_B4 0x334 | ||
| 60 | #define BCMA_GMAC_CMN_UDF_0_B8 0x338 | ||
| 61 | #define BCMA_GMAC_CMN_UDF_1_B3_B0 0x340 | ||
| 62 | #define BCMA_GMAC_CMN_UDF_1_B7_B4 0x344 | ||
| 63 | #define BCMA_GMAC_CMN_UDF_1_B8 0x348 | ||
| 64 | #define BCMA_GMAC_CMN_UDF_2_B3_B0 0x350 | ||
| 65 | #define BCMA_GMAC_CMN_UDF_2_B7_B4 0x354 | ||
| 66 | #define BCMA_GMAC_CMN_UDF_2_B8 0x358 | ||
| 67 | #define BCMA_GMAC_CMN_UDF_0_C3_C0 0x360 | ||
| 68 | #define BCMA_GMAC_CMN_UDF_0_C7_C4 0x364 | ||
| 69 | #define BCMA_GMAC_CMN_UDF_0_C8 0x368 | ||
| 70 | #define BCMA_GMAC_CMN_UDF_1_C3_C0 0x370 | ||
| 71 | #define BCMA_GMAC_CMN_UDF_1_C7_C4 0x374 | ||
| 72 | #define BCMA_GMAC_CMN_UDF_1_C8 0x378 | ||
| 73 | #define BCMA_GMAC_CMN_UDF_2_C3_C0 0x380 | ||
| 74 | #define BCMA_GMAC_CMN_UDF_2_C7_C4 0x384 | ||
| 75 | #define BCMA_GMAC_CMN_UDF_2_C8 0x388 | ||
| 76 | #define BCMA_GMAC_CMN_UDF_0_D3_D0 0x390 | ||
| 77 | #define BCMA_GMAC_CMN_UDF_0_D7_D4 0x394 | ||
| 78 | #define BCMA_GMAC_CMN_UDF_0_D11_D8 0x394 | ||
| 79 | |||
| 80 | struct bcma_drv_gmac_cmn { | ||
| 81 | struct bcma_device *core; | ||
| 82 | |||
| 83 | /* Drivers accessing BCMA_GMAC_CMN_PHY_ACCESS and | ||
| 84 | * BCMA_GMAC_CMN_PHY_CTL need to take that mutex first. */ | ||
| 85 | struct mutex phy_mutex; | ||
| 86 | }; | ||
| 87 | |||
| 88 | /* Register access */ | ||
| 89 | #define gmac_cmn_read16(gc, offset) bcma_read16((gc)->core, offset) | ||
| 90 | #define gmac_cmn_read32(gc, offset) bcma_read32((gc)->core, offset) | ||
| 91 | #define gmac_cmn_write16(gc, offset, val) bcma_write16((gc)->core, offset, val) | ||
| 92 | #define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val) | ||
| 93 | |||
| 94 | #ifdef CONFIG_BCMA_DRIVER_GMAC_CMN | ||
| 95 | extern void __devinit bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc); | ||
| 96 | #else | ||
| 97 | static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { } | ||
| 98 | #endif | ||
| 99 | |||
| 100 | #endif /* LINUX_BCMA_DRIVER_GMAC_CMN_H_ */ | ||
diff --git a/include/linux/can.h b/include/linux/can.h index 9a19bcb3eeaf..018055efc034 100644 --- a/include/linux/can.h +++ b/include/linux/can.h | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | /* special address description flags for the CAN_ID */ | 21 | /* special address description flags for the CAN_ID */ |
| 22 | #define CAN_EFF_FLAG 0x80000000U /* EFF/SFF is set in the MSB */ | 22 | #define CAN_EFF_FLAG 0x80000000U /* EFF/SFF is set in the MSB */ |
| 23 | #define CAN_RTR_FLAG 0x40000000U /* remote transmission request */ | 23 | #define CAN_RTR_FLAG 0x40000000U /* remote transmission request */ |
| 24 | #define CAN_ERR_FLAG 0x20000000U /* error frame */ | 24 | #define CAN_ERR_FLAG 0x20000000U /* error message frame */ |
| 25 | 25 | ||
| 26 | /* valid bits in CAN ID for frame formats */ | 26 | /* valid bits in CAN ID for frame formats */ |
| 27 | #define CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */ | 27 | #define CAN_SFF_MASK 0x000007FFU /* standard frame format (SFF) */ |
| @@ -32,32 +32,84 @@ | |||
| 32 | * Controller Area Network Identifier structure | 32 | * Controller Area Network Identifier structure |
| 33 | * | 33 | * |
| 34 | * bit 0-28 : CAN identifier (11/29 bit) | 34 | * bit 0-28 : CAN identifier (11/29 bit) |
| 35 | * bit 29 : error frame flag (0 = data frame, 1 = error frame) | 35 | * bit 29 : error message frame flag (0 = data frame, 1 = error message) |
| 36 | * bit 30 : remote transmission request flag (1 = rtr frame) | 36 | * bit 30 : remote transmission request flag (1 = rtr frame) |
| 37 | * bit 31 : frame format flag (0 = standard 11 bit, 1 = extended 29 bit) | 37 | * bit 31 : frame format flag (0 = standard 11 bit, 1 = extended 29 bit) |
| 38 | */ | 38 | */ |
| 39 | typedef __u32 canid_t; | 39 | typedef __u32 canid_t; |
| 40 | 40 | ||
| 41 | #define CAN_SFF_ID_BITS 11 | ||
| 42 | #define CAN_EFF_ID_BITS 29 | ||
| 43 | |||
| 41 | /* | 44 | /* |
| 42 | * Controller Area Network Error Frame Mask structure | 45 | * Controller Area Network Error Message Frame Mask structure |
| 43 | * | 46 | * |
| 44 | * bit 0-28 : error class mask (see include/linux/can/error.h) | 47 | * bit 0-28 : error class mask (see include/linux/can/error.h) |
| 45 | * bit 29-31 : set to zero | 48 | * bit 29-31 : set to zero |
| 46 | */ | 49 | */ |
| 47 | typedef __u32 can_err_mask_t; | 50 | typedef __u32 can_err_mask_t; |
| 48 | 51 | ||
| 52 | /* CAN payload length and DLC definitions according to ISO 11898-1 */ | ||
| 53 | #define CAN_MAX_DLC 8 | ||
| 54 | #define CAN_MAX_DLEN 8 | ||
| 55 | |||
| 56 | /* CAN FD payload length and DLC definitions according to ISO 11898-7 */ | ||
| 57 | #define CANFD_MAX_DLC 15 | ||
| 58 | #define CANFD_MAX_DLEN 64 | ||
| 59 | |||
| 49 | /** | 60 | /** |
| 50 | * struct can_frame - basic CAN frame structure | 61 | * struct can_frame - basic CAN frame structure |
| 51 | * @can_id: the CAN ID of the frame and CAN_*_FLAG flags, see above. | 62 | * @can_id: CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition |
| 52 | * @can_dlc: the data length field of the CAN frame | 63 | * @can_dlc: frame payload length in byte (0 .. 8) aka data length code |
| 53 | * @data: the CAN frame payload. | 64 | * N.B. the DLC field from ISO 11898-1 Chapter 8.4.2.3 has a 1:1 |
| 65 | * mapping of the 'data length code' to the real payload length | ||
| 66 | * @data: CAN frame payload (up to 8 byte) | ||
| 54 | */ | 67 | */ |
| 55 | struct can_frame { | 68 | struct can_frame { |
| 56 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ | 69 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ |
| 57 | __u8 can_dlc; /* data length code: 0 .. 8 */ | 70 | __u8 can_dlc; /* frame payload length in byte (0 .. CAN_MAX_DLEN) */ |
| 58 | __u8 data[8] __attribute__((aligned(8))); | 71 | __u8 data[CAN_MAX_DLEN] __attribute__((aligned(8))); |
| 72 | }; | ||
| 73 | |||
| 74 | /* | ||
| 75 | * defined bits for canfd_frame.flags | ||
| 76 | * | ||
| 77 | * As the default for CAN FD should be to support the high data rate in the | ||
| 78 | * payload section of the frame (HDR) and to support up to 64 byte in the | ||
| 79 | * data section (EDL) the bits are only set in the non-default case. | ||
| 80 | * Btw. as long as there's no real implementation for CAN FD network driver | ||
| 81 | * these bits are only preliminary. | ||
| 82 | * | ||
| 83 | * RX: NOHDR/NOEDL - info about received CAN FD frame | ||
| 84 | * ESI - bit from originating CAN controller | ||
| 85 | * TX: NOHDR/NOEDL - control per-frame settings if supported by CAN controller | ||
| 86 | * ESI - bit is set by local CAN controller | ||
| 87 | */ | ||
| 88 | #define CANFD_NOHDR 0x01 /* frame without high data rate */ | ||
| 89 | #define CANFD_NOEDL 0x02 /* frame without extended data length */ | ||
| 90 | #define CANFD_ESI 0x04 /* error state indicator */ | ||
| 91 | |||
| 92 | /** | ||
| 93 | * struct canfd_frame - CAN flexible data rate frame structure | ||
| 94 | * @can_id: CAN ID of the frame and CAN_*_FLAG flags, see canid_t definition | ||
| 95 | * @len: frame payload length in byte (0 .. CANFD_MAX_DLEN) | ||
| 96 | * @flags: additional flags for CAN FD | ||
| 97 | * @__res0: reserved / padding | ||
| 98 | * @__res1: reserved / padding | ||
| 99 | * @data: CAN FD frame payload (up to CANFD_MAX_DLEN byte) | ||
| 100 | */ | ||
| 101 | struct canfd_frame { | ||
| 102 | canid_t can_id; /* 32 bit CAN_ID + EFF/RTR/ERR flags */ | ||
| 103 | __u8 len; /* frame payload length in byte */ | ||
| 104 | __u8 flags; /* additional flags for CAN FD */ | ||
| 105 | __u8 __res0; /* reserved / padding */ | ||
| 106 | __u8 __res1; /* reserved / padding */ | ||
| 107 | __u8 data[CANFD_MAX_DLEN] __attribute__((aligned(8))); | ||
| 59 | }; | 108 | }; |
| 60 | 109 | ||
| 110 | #define CAN_MTU (sizeof(struct can_frame)) | ||
| 111 | #define CANFD_MTU (sizeof(struct canfd_frame)) | ||
| 112 | |||
| 61 | /* particular protocols of the protocol family PF_CAN */ | 113 | /* particular protocols of the protocol family PF_CAN */ |
| 62 | #define CAN_RAW 1 /* RAW sockets */ | 114 | #define CAN_RAW 1 /* RAW sockets */ |
| 63 | #define CAN_BCM 2 /* Broadcast Manager */ | 115 | #define CAN_BCM 2 /* Broadcast Manager */ |
| @@ -97,7 +149,7 @@ struct sockaddr_can { | |||
| 97 | * <received_can_id> & mask == can_id & mask | 149 | * <received_can_id> & mask == can_id & mask |
| 98 | * | 150 | * |
| 99 | * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can | 151 | * The filter can be inverted (CAN_INV_FILTER bit set in can_id) or it can |
| 100 | * filter for error frames (CAN_ERR_FLAG bit set in mask). | 152 | * filter for error message frames (CAN_ERR_FLAG bit set in mask). |
| 101 | */ | 153 | */ |
| 102 | struct can_filter { | 154 | struct can_filter { |
| 103 | canid_t can_id; | 155 | canid_t can_id; |
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 0ccc1cd28b95..78c6c52073ad 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
| @@ -17,10 +17,10 @@ | |||
| 17 | #include <linux/skbuff.h> | 17 | #include <linux/skbuff.h> |
| 18 | #include <linux/netdevice.h> | 18 | #include <linux/netdevice.h> |
| 19 | 19 | ||
| 20 | #define CAN_VERSION "20090105" | 20 | #define CAN_VERSION "20120528" |
| 21 | 21 | ||
| 22 | /* increment this number each time you change some user-space interface */ | 22 | /* increment this number each time you change some user-space interface */ |
| 23 | #define CAN_ABI_VERSION "8" | 23 | #define CAN_ABI_VERSION "9" |
| 24 | 24 | ||
| 25 | #define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION | 25 | #define CAN_VERSION_STRING "rev " CAN_VERSION " abi " CAN_ABI_VERSION |
| 26 | 26 | ||
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 5d2efe7e3f1b..2b2fc345afca 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -33,7 +33,7 @@ struct can_priv { | |||
| 33 | struct can_device_stats can_stats; | 33 | struct can_device_stats can_stats; |
| 34 | 34 | ||
| 35 | struct can_bittiming bittiming; | 35 | struct can_bittiming bittiming; |
| 36 | struct can_bittiming_const *bittiming_const; | 36 | const struct can_bittiming_const *bittiming_const; |
| 37 | struct can_clock clock; | 37 | struct can_clock clock; |
| 38 | 38 | ||
| 39 | enum can_state state; | 39 | enum can_state state; |
| @@ -61,23 +61,40 @@ struct can_priv { | |||
| 61 | * To be used in the CAN netdriver receive path to ensure conformance with | 61 | * To be used in the CAN netdriver receive path to ensure conformance with |
| 62 | * ISO 11898-1 Chapter 8.4.2.3 (DLC field) | 62 | * ISO 11898-1 Chapter 8.4.2.3 (DLC field) |
| 63 | */ | 63 | */ |
| 64 | #define get_can_dlc(i) (min_t(__u8, (i), 8)) | 64 | #define get_can_dlc(i) (min_t(__u8, (i), CAN_MAX_DLC)) |
| 65 | #define get_canfd_dlc(i) (min_t(__u8, (i), CANFD_MAX_DLC)) | ||
| 65 | 66 | ||
| 66 | /* Drop a given socketbuffer if it does not contain a valid CAN frame. */ | 67 | /* Drop a given socketbuffer if it does not contain a valid CAN frame. */ |
| 67 | static inline int can_dropped_invalid_skb(struct net_device *dev, | 68 | static inline int can_dropped_invalid_skb(struct net_device *dev, |
| 68 | struct sk_buff *skb) | 69 | struct sk_buff *skb) |
| 69 | { | 70 | { |
| 70 | const struct can_frame *cf = (struct can_frame *)skb->data; | 71 | const struct canfd_frame *cfd = (struct canfd_frame *)skb->data; |
| 71 | 72 | ||
| 72 | if (unlikely(skb->len != sizeof(*cf) || cf->can_dlc > 8)) { | 73 | if (skb->protocol == htons(ETH_P_CAN)) { |
| 73 | kfree_skb(skb); | 74 | if (unlikely(skb->len != CAN_MTU || |
| 74 | dev->stats.tx_dropped++; | 75 | cfd->len > CAN_MAX_DLEN)) |
| 75 | return 1; | 76 | goto inval_skb; |
| 76 | } | 77 | } else if (skb->protocol == htons(ETH_P_CANFD)) { |
| 78 | if (unlikely(skb->len != CANFD_MTU || | ||
| 79 | cfd->len > CANFD_MAX_DLEN)) | ||
| 80 | goto inval_skb; | ||
| 81 | } else | ||
| 82 | goto inval_skb; | ||
| 77 | 83 | ||
| 78 | return 0; | 84 | return 0; |
| 85 | |||
| 86 | inval_skb: | ||
| 87 | kfree_skb(skb); | ||
| 88 | dev->stats.tx_dropped++; | ||
| 89 | return 1; | ||
| 79 | } | 90 | } |
| 80 | 91 | ||
| 92 | /* get data length from can_dlc with sanitized can_dlc */ | ||
| 93 | u8 can_dlc2len(u8 can_dlc); | ||
| 94 | |||
| 95 | /* map the sanitized data length to an appropriate data length code */ | ||
| 96 | u8 can_len2dlc(u8 len); | ||
| 97 | |||
| 81 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); | 98 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); |
| 82 | void free_candev(struct net_device *dev); | 99 | void free_candev(struct net_device *dev); |
| 83 | 100 | ||
diff --git a/include/linux/can/error.h b/include/linux/can/error.h index 63e855ea6b84..7b7148bded71 100644 --- a/include/linux/can/error.h +++ b/include/linux/can/error.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * linux/can/error.h | 2 | * linux/can/error.h |
| 3 | * | 3 | * |
| 4 | * Definitions of the CAN error frame to be filtered and passed to the user. | 4 | * Definitions of the CAN error messages to be filtered and passed to the user. |
| 5 | * | 5 | * |
| 6 | * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> | 6 | * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> |
| 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | 7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research |
| @@ -12,7 +12,7 @@ | |||
| 12 | #ifndef CAN_ERROR_H | 12 | #ifndef CAN_ERROR_H |
| 13 | #define CAN_ERROR_H | 13 | #define CAN_ERROR_H |
| 14 | 14 | ||
| 15 | #define CAN_ERR_DLC 8 /* dlc for error frames */ | 15 | #define CAN_ERR_DLC 8 /* dlc for error message frames */ |
| 16 | 16 | ||
| 17 | /* error class (mask) in can_id */ | 17 | /* error class (mask) in can_id */ |
| 18 | #define CAN_ERR_TX_TIMEOUT 0x00000001U /* TX timeout (by netdevice driver) */ | 18 | #define CAN_ERR_TX_TIMEOUT 0x00000001U /* TX timeout (by netdevice driver) */ |
diff --git a/include/linux/can/raw.h b/include/linux/can/raw.h index 781f3a3701be..a814062b0719 100644 --- a/include/linux/can/raw.h +++ b/include/linux/can/raw.h | |||
| @@ -23,7 +23,8 @@ enum { | |||
| 23 | CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s) */ | 23 | CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s) */ |
| 24 | CAN_RAW_ERR_FILTER, /* set filter for error frames */ | 24 | CAN_RAW_ERR_FILTER, /* set filter for error frames */ |
| 25 | CAN_RAW_LOOPBACK, /* local loopback (default:on) */ | 25 | CAN_RAW_LOOPBACK, /* local loopback (default:on) */ |
| 26 | CAN_RAW_RECV_OWN_MSGS /* receive my own msgs (default:off) */ | 26 | CAN_RAW_RECV_OWN_MSGS, /* receive my own msgs (default:off) */ |
| 27 | CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */ | ||
| 27 | }; | 28 | }; |
| 28 | 29 | ||
| 29 | #endif | 30 | #endif |
diff --git a/include/linux/cpu_rmap.h b/include/linux/cpu_rmap.h index 473771a528c0..ac3bbb5b9502 100644 --- a/include/linux/cpu_rmap.h +++ b/include/linux/cpu_rmap.h | |||
| @@ -1,3 +1,6 @@ | |||
| 1 | #ifndef __LINUX_CPU_RMAP_H | ||
| 2 | #define __LINUX_CPU_RMAP_H | ||
| 3 | |||
| 1 | /* | 4 | /* |
| 2 | * cpu_rmap.c: CPU affinity reverse-map support | 5 | * cpu_rmap.c: CPU affinity reverse-map support |
| 3 | * Copyright 2011 Solarflare Communications Inc. | 6 | * Copyright 2011 Solarflare Communications Inc. |
| @@ -71,3 +74,4 @@ extern void free_irq_cpu_rmap(struct cpu_rmap *rmap); | |||
| 71 | extern int irq_cpu_rmap_add(struct cpu_rmap *rmap, int irq); | 74 | extern int irq_cpu_rmap_add(struct cpu_rmap *rmap, int irq); |
| 72 | 75 | ||
| 73 | #endif | 76 | #endif |
| 77 | #endif /* __LINUX_CPU_RMAP_H */ | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 3d406e0ede6d..d426336d92d9 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -124,17 +124,30 @@ static inline bool is_valid_ether_addr(const u8 *addr) | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /** | 126 | /** |
| 127 | * random_ether_addr - Generate software assigned random Ethernet address | 127 | * eth_random_addr - Generate software assigned random Ethernet address |
| 128 | * @addr: Pointer to a six-byte array containing the Ethernet address | 128 | * @addr: Pointer to a six-byte array containing the Ethernet address |
| 129 | * | 129 | * |
| 130 | * Generate a random Ethernet address (MAC) that is not multicast | 130 | * Generate a random Ethernet address (MAC) that is not multicast |
| 131 | * and has the local assigned bit set. | 131 | * and has the local assigned bit set. |
| 132 | */ | 132 | */ |
| 133 | static inline void random_ether_addr(u8 *addr) | 133 | static inline void eth_random_addr(u8 *addr) |
| 134 | { | 134 | { |
| 135 | get_random_bytes (addr, ETH_ALEN); | 135 | get_random_bytes(addr, ETH_ALEN); |
| 136 | addr [0] &= 0xfe; /* clear multicast bit */ | 136 | addr[0] &= 0xfe; /* clear multicast bit */ |
| 137 | addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ | 137 | addr[0] |= 0x02; /* set local assignment bit (IEEE802) */ |
| 138 | } | ||
| 139 | |||
| 140 | #define random_ether_addr(addr) eth_random_addr(addr) | ||
| 141 | |||
| 142 | /** | ||
| 143 | * eth_broadcast_addr - Assign broadcast address | ||
| 144 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
| 145 | * | ||
| 146 | * Assign the broadcast address to the given address array. | ||
| 147 | */ | ||
| 148 | static inline void eth_broadcast_addr(u8 *addr) | ||
| 149 | { | ||
| 150 | memset(addr, 0xff, ETH_ALEN); | ||
| 138 | } | 151 | } |
| 139 | 152 | ||
| 140 | /** | 153 | /** |
| @@ -149,7 +162,7 @@ static inline void random_ether_addr(u8 *addr) | |||
| 149 | static inline void eth_hw_addr_random(struct net_device *dev) | 162 | static inline void eth_hw_addr_random(struct net_device *dev) |
| 150 | { | 163 | { |
| 151 | dev->addr_assign_type |= NET_ADDR_RANDOM; | 164 | dev->addr_assign_type |= NET_ADDR_RANDOM; |
| 152 | random_ether_addr(dev->dev_addr); | 165 | eth_random_addr(dev->dev_addr); |
| 153 | } | 166 | } |
| 154 | 167 | ||
| 155 | /** | 168 | /** |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index e17fa7140588..21eff418091b 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -137,6 +137,35 @@ struct ethtool_eeprom { | |||
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | /** | 139 | /** |
| 140 | * struct ethtool_eee - Energy Efficient Ethernet information | ||
| 141 | * @cmd: ETHTOOL_{G,S}EEE | ||
| 142 | * @supported: Mask of %SUPPORTED_* flags for the speed/duplex combinations | ||
| 143 | * for which there is EEE support. | ||
| 144 | * @advertised: Mask of %ADVERTISED_* flags for the speed/duplex combinations | ||
| 145 | * advertised as eee capable. | ||
| 146 | * @lp_advertised: Mask of %ADVERTISED_* flags for the speed/duplex | ||
| 147 | * combinations advertised by the link partner as eee capable. | ||
| 148 | * @eee_active: Result of the eee auto negotiation. | ||
| 149 | * @eee_enabled: EEE configured mode (enabled/disabled). | ||
| 150 | * @tx_lpi_enabled: Whether the interface should assert its tx lpi, given | ||
| 151 | * that eee was negotiated. | ||
| 152 | * @tx_lpi_timer: Time in microseconds the interface delays prior to asserting | ||
| 153 | * its tx lpi (after reaching 'idle' state). Effective only when eee | ||
| 154 | * was negotiated and tx_lpi_enabled was set. | ||
| 155 | */ | ||
| 156 | struct ethtool_eee { | ||
| 157 | __u32 cmd; | ||
| 158 | __u32 supported; | ||
| 159 | __u32 advertised; | ||
| 160 | __u32 lp_advertised; | ||
| 161 | __u32 eee_active; | ||
| 162 | __u32 eee_enabled; | ||
| 163 | __u32 tx_lpi_enabled; | ||
| 164 | __u32 tx_lpi_timer; | ||
| 165 | __u32 reserved[2]; | ||
| 166 | }; | ||
| 167 | |||
| 168 | /** | ||
| 140 | * struct ethtool_modinfo - plugin module eeprom information | 169 | * struct ethtool_modinfo - plugin module eeprom information |
| 141 | * @cmd: %ETHTOOL_GMODULEINFO | 170 | * @cmd: %ETHTOOL_GMODULEINFO |
| 142 | * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx | 171 | * @type: Standard the module information conforms to %ETH_MODULE_SFF_xxxx |
| @@ -945,6 +974,8 @@ static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings) | |||
| 945 | * @get_module_info: Get the size and type of the eeprom contained within | 974 | * @get_module_info: Get the size and type of the eeprom contained within |
| 946 | * a plug-in module. | 975 | * a plug-in module. |
| 947 | * @get_module_eeprom: Get the eeprom information from the plug-in module | 976 | * @get_module_eeprom: Get the eeprom information from the plug-in module |
| 977 | * @get_eee: Get Energy-Efficient (EEE) supported and status. | ||
| 978 | * @set_eee: Set EEE status (enable/disable) as well as LPI timers. | ||
| 948 | * | 979 | * |
| 949 | * All operations are optional (i.e. the function pointer may be set | 980 | * All operations are optional (i.e. the function pointer may be set |
| 950 | * to %NULL) and callers must take this into account. Callers must | 981 | * to %NULL) and callers must take this into account. Callers must |
| @@ -1011,6 +1042,8 @@ struct ethtool_ops { | |||
| 1011 | struct ethtool_modinfo *); | 1042 | struct ethtool_modinfo *); |
| 1012 | int (*get_module_eeprom)(struct net_device *, | 1043 | int (*get_module_eeprom)(struct net_device *, |
| 1013 | struct ethtool_eeprom *, u8 *); | 1044 | struct ethtool_eeprom *, u8 *); |
| 1045 | int (*get_eee)(struct net_device *, struct ethtool_eee *); | ||
| 1046 | int (*set_eee)(struct net_device *, struct ethtool_eee *); | ||
| 1014 | 1047 | ||
| 1015 | 1048 | ||
| 1016 | }; | 1049 | }; |
| @@ -1089,6 +1122,8 @@ struct ethtool_ops { | |||
| 1089 | #define ETHTOOL_GET_TS_INFO 0x00000041 /* Get time stamping and PHC info */ | 1122 | #define ETHTOOL_GET_TS_INFO 0x00000041 /* Get time stamping and PHC info */ |
| 1090 | #define ETHTOOL_GMODULEINFO 0x00000042 /* Get plug-in module information */ | 1123 | #define ETHTOOL_GMODULEINFO 0x00000042 /* Get plug-in module information */ |
| 1091 | #define ETHTOOL_GMODULEEEPROM 0x00000043 /* Get plug-in module eeprom */ | 1124 | #define ETHTOOL_GMODULEEEPROM 0x00000043 /* Get plug-in module eeprom */ |
| 1125 | #define ETHTOOL_GEEE 0x00000044 /* Get EEE settings */ | ||
| 1126 | #define ETHTOOL_SEEE 0x00000045 /* Set EEE settings */ | ||
| 1092 | 1127 | ||
| 1093 | /* compatibility with older code */ | 1128 | /* compatibility with older code */ |
| 1094 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1129 | #define SPARC_ETH_GSET ETHTOOL_GSET |
| @@ -1118,6 +1153,10 @@ struct ethtool_ops { | |||
| 1118 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 1153 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
| 1119 | #define SUPPORTED_20000baseMLD2_Full (1 << 21) | 1154 | #define SUPPORTED_20000baseMLD2_Full (1 << 21) |
| 1120 | #define SUPPORTED_20000baseKR2_Full (1 << 22) | 1155 | #define SUPPORTED_20000baseKR2_Full (1 << 22) |
| 1156 | #define SUPPORTED_40000baseKR4_Full (1 << 23) | ||
| 1157 | #define SUPPORTED_40000baseCR4_Full (1 << 24) | ||
| 1158 | #define SUPPORTED_40000baseSR4_Full (1 << 25) | ||
| 1159 | #define SUPPORTED_40000baseLR4_Full (1 << 26) | ||
| 1121 | 1160 | ||
| 1122 | /* Indicates what features are advertised by the interface. */ | 1161 | /* Indicates what features are advertised by the interface. */ |
| 1123 | #define ADVERTISED_10baseT_Half (1 << 0) | 1162 | #define ADVERTISED_10baseT_Half (1 << 0) |
| @@ -1143,6 +1182,10 @@ struct ethtool_ops { | |||
| 1143 | #define ADVERTISED_10000baseR_FEC (1 << 20) | 1182 | #define ADVERTISED_10000baseR_FEC (1 << 20) |
| 1144 | #define ADVERTISED_20000baseMLD2_Full (1 << 21) | 1183 | #define ADVERTISED_20000baseMLD2_Full (1 << 21) |
| 1145 | #define ADVERTISED_20000baseKR2_Full (1 << 22) | 1184 | #define ADVERTISED_20000baseKR2_Full (1 << 22) |
| 1185 | #define ADVERTISED_40000baseKR4_Full (1 << 23) | ||
| 1186 | #define ADVERTISED_40000baseCR4_Full (1 << 24) | ||
| 1187 | #define ADVERTISED_40000baseSR4_Full (1 << 25) | ||
| 1188 | #define ADVERTISED_40000baseLR4_Full (1 << 26) | ||
| 1146 | 1189 | ||
| 1147 | /* The following are all involved in forcing a particular link | 1190 | /* The following are all involved in forcing a particular link |
| 1148 | * mode for the device for setting things. When getting the | 1191 | * mode for the device for setting things. When getting the |
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index 7a114016ac7d..5ab61c1eb6bf 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
| @@ -85,7 +85,7 @@ enum { | |||
| 85 | /* All generic netlink requests are serialized by a global lock. */ | 85 | /* All generic netlink requests are serialized by a global lock. */ |
| 86 | extern void genl_lock(void); | 86 | extern void genl_lock(void); |
| 87 | extern void genl_unlock(void); | 87 | extern void genl_unlock(void); |
| 88 | #ifdef CONFIG_PROVE_LOCKING | 88 | #ifdef CONFIG_LOCKDEP |
| 89 | extern int lockdep_genl_is_held(void); | 89 | extern int lockdep_genl_is_held(void); |
| 90 | #endif | 90 | #endif |
| 91 | 91 | ||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index ce9af8918514..e02fc682bb68 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #define IEEE80211_FCTL_MOREDATA 0x2000 | 47 | #define IEEE80211_FCTL_MOREDATA 0x2000 |
| 48 | #define IEEE80211_FCTL_PROTECTED 0x4000 | 48 | #define IEEE80211_FCTL_PROTECTED 0x4000 |
| 49 | #define IEEE80211_FCTL_ORDER 0x8000 | 49 | #define IEEE80211_FCTL_ORDER 0x8000 |
| 50 | #define IEEE80211_FCTL_CTL_EXT 0x0f00 | ||
| 50 | 51 | ||
| 51 | #define IEEE80211_SCTL_FRAG 0x000F | 52 | #define IEEE80211_SCTL_FRAG 0x000F |
| 52 | #define IEEE80211_SCTL_SEQ 0xFFF0 | 53 | #define IEEE80211_SCTL_SEQ 0xFFF0 |
| @@ -54,6 +55,7 @@ | |||
| 54 | #define IEEE80211_FTYPE_MGMT 0x0000 | 55 | #define IEEE80211_FTYPE_MGMT 0x0000 |
| 55 | #define IEEE80211_FTYPE_CTL 0x0004 | 56 | #define IEEE80211_FTYPE_CTL 0x0004 |
| 56 | #define IEEE80211_FTYPE_DATA 0x0008 | 57 | #define IEEE80211_FTYPE_DATA 0x0008 |
| 58 | #define IEEE80211_FTYPE_EXT 0x000c | ||
| 57 | 59 | ||
| 58 | /* management */ | 60 | /* management */ |
| 59 | #define IEEE80211_STYPE_ASSOC_REQ 0x0000 | 61 | #define IEEE80211_STYPE_ASSOC_REQ 0x0000 |
| @@ -70,6 +72,7 @@ | |||
| 70 | #define IEEE80211_STYPE_ACTION 0x00D0 | 72 | #define IEEE80211_STYPE_ACTION 0x00D0 |
| 71 | 73 | ||
| 72 | /* control */ | 74 | /* control */ |
| 75 | #define IEEE80211_STYPE_CTL_EXT 0x0060 | ||
| 73 | #define IEEE80211_STYPE_BACK_REQ 0x0080 | 76 | #define IEEE80211_STYPE_BACK_REQ 0x0080 |
| 74 | #define IEEE80211_STYPE_BACK 0x0090 | 77 | #define IEEE80211_STYPE_BACK 0x0090 |
| 75 | #define IEEE80211_STYPE_PSPOLL 0x00A0 | 78 | #define IEEE80211_STYPE_PSPOLL 0x00A0 |
| @@ -97,6 +100,18 @@ | |||
| 97 | #define IEEE80211_STYPE_QOS_CFPOLL 0x00E0 | 100 | #define IEEE80211_STYPE_QOS_CFPOLL 0x00E0 |
| 98 | #define IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0 | 101 | #define IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0 |
| 99 | 102 | ||
| 103 | /* extension, added by 802.11ad */ | ||
| 104 | #define IEEE80211_STYPE_DMG_BEACON 0x0000 | ||
| 105 | |||
| 106 | /* control extension - for IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTL_EXT */ | ||
| 107 | #define IEEE80211_CTL_EXT_POLL 0x2000 | ||
| 108 | #define IEEE80211_CTL_EXT_SPR 0x3000 | ||
| 109 | #define IEEE80211_CTL_EXT_GRANT 0x4000 | ||
| 110 | #define IEEE80211_CTL_EXT_DMG_CTS 0x5000 | ||
| 111 | #define IEEE80211_CTL_EXT_DMG_DTS 0x6000 | ||
| 112 | #define IEEE80211_CTL_EXT_SSW 0x8000 | ||
| 113 | #define IEEE80211_CTL_EXT_SSW_FBACK 0x9000 | ||
| 114 | #define IEEE80211_CTL_EXT_SSW_ACK 0xa000 | ||
| 100 | 115 | ||
| 101 | /* miscellaneous IEEE 802.11 constants */ | 116 | /* miscellaneous IEEE 802.11 constants */ |
| 102 | #define IEEE80211_MAX_FRAG_THRESHOLD 2352 | 117 | #define IEEE80211_MAX_FRAG_THRESHOLD 2352 |
| @@ -568,6 +583,26 @@ struct ieee80211s_hdr { | |||
| 568 | #define MESH_FLAGS_PS_DEEP 0x4 | 583 | #define MESH_FLAGS_PS_DEEP 0x4 |
| 569 | 584 | ||
| 570 | /** | 585 | /** |
| 586 | * enum ieee80211_preq_flags - mesh PREQ element flags | ||
| 587 | * | ||
| 588 | * @IEEE80211_PREQ_PROACTIVE_PREP_FLAG: proactive PREP subfield | ||
| 589 | */ | ||
| 590 | enum ieee80211_preq_flags { | ||
| 591 | IEEE80211_PREQ_PROACTIVE_PREP_FLAG = 1<<2, | ||
| 592 | }; | ||
| 593 | |||
| 594 | /** | ||
| 595 | * enum ieee80211_preq_target_flags - mesh PREQ element per target flags | ||
| 596 | * | ||
| 597 | * @IEEE80211_PREQ_TO_FLAG: target only subfield | ||
| 598 | * @IEEE80211_PREQ_USN_FLAG: unknown target HWMP sequence number subfield | ||
| 599 | */ | ||
| 600 | enum ieee80211_preq_target_flags { | ||
| 601 | IEEE80211_PREQ_TO_FLAG = 1<<0, | ||
| 602 | IEEE80211_PREQ_USN_FLAG = 1<<2, | ||
| 603 | }; | ||
| 604 | |||
| 605 | /** | ||
| 571 | * struct ieee80211_quiet_ie | 606 | * struct ieee80211_quiet_ie |
| 572 | * | 607 | * |
| 573 | * This structure refers to "Quiet information element" | 608 | * This structure refers to "Quiet information element" |
| @@ -1072,6 +1107,73 @@ struct ieee80211_ht_operation { | |||
| 1072 | #define WLAN_HT_SMPS_CONTROL_STATIC 1 | 1107 | #define WLAN_HT_SMPS_CONTROL_STATIC 1 |
| 1073 | #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 | 1108 | #define WLAN_HT_SMPS_CONTROL_DYNAMIC 3 |
| 1074 | 1109 | ||
| 1110 | #define VHT_MCS_SUPPORTED_SET_SIZE 8 | ||
| 1111 | |||
| 1112 | struct ieee80211_vht_capabilities { | ||
| 1113 | __le32 vht_capabilities_info; | ||
| 1114 | u8 vht_supported_mcs_set[VHT_MCS_SUPPORTED_SET_SIZE]; | ||
| 1115 | } __packed; | ||
| 1116 | |||
| 1117 | struct ieee80211_vht_operation { | ||
| 1118 | u8 vht_op_info_chwidth; | ||
| 1119 | u8 vht_op_info_chan_center_freq_seg1_idx; | ||
| 1120 | u8 vht_op_info_chan_center_freq_seg2_idx; | ||
| 1121 | __le16 vht_basic_mcs_set; | ||
| 1122 | } __packed; | ||
| 1123 | |||
| 1124 | /** | ||
| 1125 | * struct ieee80211_vht_mcs_info - VHT MCS information | ||
| 1126 | * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams | ||
| 1127 | * @rx_highest: Indicates highest long GI VHT PPDU data rate | ||
| 1128 | * STA can receive. Rate expressed in units of 1 Mbps. | ||
| 1129 | * If this field is 0 this value should not be used to | ||
| 1130 | * consider the highest RX data rate supported. | ||
| 1131 | * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams | ||
| 1132 | * @tx_highest: Indicates highest long GI VHT PPDU data rate | ||
| 1133 | * STA can transmit. Rate expressed in units of 1 Mbps. | ||
| 1134 | * If this field is 0 this value should not be used to | ||
| 1135 | * consider the highest TX data rate supported. | ||
| 1136 | */ | ||
| 1137 | struct ieee80211_vht_mcs_info { | ||
| 1138 | __le16 rx_mcs_map; | ||
| 1139 | __le16 rx_highest; | ||
| 1140 | __le16 tx_mcs_map; | ||
| 1141 | __le16 tx_highest; | ||
| 1142 | } __packed; | ||
| 1143 | |||
| 1144 | #define IEEE80211_VHT_MCS_ZERO_TO_SEVEN_SUPPORT 0 | ||
| 1145 | #define IEEE80211_VHT_MCS_ZERO_TO_EIGHT_SUPPORT 1 | ||
| 1146 | #define IEEE80211_VHT_MCS_ZERO_TO_NINE_SUPPORT 2 | ||
| 1147 | #define IEEE80211_VHT_MCS_NOT_SUPPORTED 3 | ||
| 1148 | |||
| 1149 | /* 802.11ac VHT Capabilities */ | ||
| 1150 | #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x00000000 | ||
| 1151 | #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x00000001 | ||
| 1152 | #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 0x00000002 | ||
| 1153 | #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004 | ||
| 1154 | #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008 | ||
| 1155 | #define IEEE80211_VHT_CAP_RXLDPC 0x00000010 | ||
| 1156 | #define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020 | ||
| 1157 | #define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040 | ||
| 1158 | #define IEEE80211_VHT_CAP_TXSTBC 0x00000080 | ||
| 1159 | #define IEEE80211_VHT_CAP_RXSTBC_1 0x00000100 | ||
| 1160 | #define IEEE80211_VHT_CAP_RXSTBC_2 0x00000200 | ||
| 1161 | #define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 | ||
| 1162 | #define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 | ||
| 1163 | #define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 | ||
| 1164 | #define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 | ||
| 1165 | #define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000 | ||
| 1166 | #define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX 0x00030000 | ||
| 1167 | #define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000 | ||
| 1168 | #define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000 | ||
| 1169 | #define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000 | ||
| 1170 | #define IEEE80211_VHT_CAP_HTC_VHT 0x00400000 | ||
| 1171 | #define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT 0x00800000 | ||
| 1172 | #define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB 0x08000000 | ||
| 1173 | #define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000 | ||
| 1174 | #define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000 | ||
| 1175 | #define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000 | ||
| 1176 | |||
| 1075 | /* Authentication algorithms */ | 1177 | /* Authentication algorithms */ |
| 1076 | #define WLAN_AUTH_OPEN 0 | 1178 | #define WLAN_AUTH_OPEN 0 |
| 1077 | #define WLAN_AUTH_SHARED_KEY 1 | 1179 | #define WLAN_AUTH_SHARED_KEY 1 |
| @@ -1104,6 +1206,21 @@ struct ieee80211_ht_operation { | |||
| 1104 | #define WLAN_CAPABILITY_QOS (1<<9) | 1206 | #define WLAN_CAPABILITY_QOS (1<<9) |
| 1105 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) | 1207 | #define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) |
| 1106 | #define WLAN_CAPABILITY_DSSS_OFDM (1<<13) | 1208 | #define WLAN_CAPABILITY_DSSS_OFDM (1<<13) |
| 1209 | |||
| 1210 | /* DMG (60gHz) 802.11ad */ | ||
| 1211 | /* type - bits 0..1 */ | ||
| 1212 | #define WLAN_CAPABILITY_DMG_TYPE_IBSS (1<<0) /* Tx by: STA */ | ||
| 1213 | #define WLAN_CAPABILITY_DMG_TYPE_PBSS (2<<0) /* Tx by: PCP */ | ||
| 1214 | #define WLAN_CAPABILITY_DMG_TYPE_AP (3<<0) /* Tx by: AP */ | ||
| 1215 | |||
| 1216 | #define WLAN_CAPABILITY_DMG_CBAP_ONLY (1<<2) | ||
| 1217 | #define WLAN_CAPABILITY_DMG_CBAP_SOURCE (1<<3) | ||
| 1218 | #define WLAN_CAPABILITY_DMG_PRIVACY (1<<4) | ||
| 1219 | #define WLAN_CAPABILITY_DMG_ECPAC (1<<5) | ||
| 1220 | |||
| 1221 | #define WLAN_CAPABILITY_DMG_SPECTRUM_MGMT (1<<8) | ||
| 1222 | #define WLAN_CAPABILITY_DMG_RADIO_MEASURE (1<<12) | ||
| 1223 | |||
| 1107 | /* measurement */ | 1224 | /* measurement */ |
| 1108 | #define IEEE80211_SPCT_MSR_RPRT_MODE_LATE (1<<0) | 1225 | #define IEEE80211_SPCT_MSR_RPRT_MODE_LATE (1<<0) |
| 1109 | #define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE (1<<1) | 1226 | #define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE (1<<1) |
| @@ -1113,7 +1230,6 @@ struct ieee80211_ht_operation { | |||
| 1113 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA 1 | 1230 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA 1 |
| 1114 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI 2 | 1231 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI 2 |
| 1115 | 1232 | ||
| 1116 | |||
| 1117 | /* 802.11g ERP information element */ | 1233 | /* 802.11g ERP information element */ |
| 1118 | #define WLAN_ERP_NON_ERP_PRESENT (1<<0) | 1234 | #define WLAN_ERP_NON_ERP_PRESENT (1<<0) |
| 1119 | #define WLAN_ERP_USE_PROTECTION (1<<1) | 1235 | #define WLAN_ERP_USE_PROTECTION (1<<1) |
| @@ -1125,6 +1241,16 @@ enum { | |||
| 1125 | WLAN_ERP_PREAMBLE_LONG = 1, | 1241 | WLAN_ERP_PREAMBLE_LONG = 1, |
| 1126 | }; | 1242 | }; |
| 1127 | 1243 | ||
| 1244 | /* Band ID, 802.11ad #8.4.1.45 */ | ||
| 1245 | enum { | ||
| 1246 | IEEE80211_BANDID_TV_WS = 0, /* TV white spaces */ | ||
| 1247 | IEEE80211_BANDID_SUB1 = 1, /* Sub-1 GHz (excluding TV white spaces) */ | ||
| 1248 | IEEE80211_BANDID_2G = 2, /* 2.4 GHz */ | ||
| 1249 | IEEE80211_BANDID_3G = 3, /* 3.6 GHz */ | ||
| 1250 | IEEE80211_BANDID_5G = 4, /* 4.9 and 5 GHz */ | ||
| 1251 | IEEE80211_BANDID_60G = 5, /* 60 GHz */ | ||
| 1252 | }; | ||
| 1253 | |||
| 1128 | /* Status codes */ | 1254 | /* Status codes */ |
| 1129 | enum ieee80211_statuscode { | 1255 | enum ieee80211_statuscode { |
| 1130 | WLAN_STATUS_SUCCESS = 0, | 1256 | WLAN_STATUS_SUCCESS = 0, |
| @@ -1176,6 +1302,17 @@ enum ieee80211_statuscode { | |||
| 1176 | WLAN_STATUS_ANTI_CLOG_REQUIRED = 76, | 1302 | WLAN_STATUS_ANTI_CLOG_REQUIRED = 76, |
| 1177 | WLAN_STATUS_FCG_NOT_SUPP = 78, | 1303 | WLAN_STATUS_FCG_NOT_SUPP = 78, |
| 1178 | WLAN_STATUS_STA_NO_TBTT = 78, | 1304 | WLAN_STATUS_STA_NO_TBTT = 78, |
| 1305 | /* 802.11ad */ | ||
| 1306 | WLAN_STATUS_REJECTED_WITH_SUGGESTED_CHANGES = 39, | ||
| 1307 | WLAN_STATUS_REJECTED_FOR_DELAY_PERIOD = 47, | ||
| 1308 | WLAN_STATUS_REJECT_WITH_SCHEDULE = 83, | ||
| 1309 | WLAN_STATUS_PENDING_ADMITTING_FST_SESSION = 86, | ||
| 1310 | WLAN_STATUS_PERFORMING_FST_NOW = 87, | ||
| 1311 | WLAN_STATUS_PENDING_GAP_IN_BA_WINDOW = 88, | ||
| 1312 | WLAN_STATUS_REJECT_U_PID_SETTING = 89, | ||
| 1313 | WLAN_STATUS_REJECT_DSE_BAND = 96, | ||
| 1314 | WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL = 99, | ||
| 1315 | WLAN_STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT = 103, | ||
| 1179 | }; | 1316 | }; |
| 1180 | 1317 | ||
| 1181 | 1318 | ||
| @@ -1332,6 +1469,43 @@ enum ieee80211_eid { | |||
| 1332 | WLAN_EID_DSE_REGISTERED_LOCATION = 58, | 1469 | WLAN_EID_DSE_REGISTERED_LOCATION = 58, |
| 1333 | WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59, | 1470 | WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59, |
| 1334 | WLAN_EID_EXT_CHANSWITCH_ANN = 60, | 1471 | WLAN_EID_EXT_CHANSWITCH_ANN = 60, |
| 1472 | |||
| 1473 | WLAN_EID_VHT_CAPABILITY = 191, | ||
| 1474 | WLAN_EID_VHT_OPERATION = 192, | ||
| 1475 | |||
| 1476 | /* 802.11ad */ | ||
| 1477 | WLAN_EID_NON_TX_BSSID_CAP = 83, | ||
| 1478 | WLAN_EID_WAKEUP_SCHEDULE = 143, | ||
| 1479 | WLAN_EID_EXT_SCHEDULE = 144, | ||
| 1480 | WLAN_EID_STA_AVAILABILITY = 145, | ||
| 1481 | WLAN_EID_DMG_TSPEC = 146, | ||
| 1482 | WLAN_EID_DMG_AT = 147, | ||
| 1483 | WLAN_EID_DMG_CAP = 148, | ||
| 1484 | WLAN_EID_DMG_OPERATION = 151, | ||
| 1485 | WLAN_EID_DMG_BSS_PARAM_CHANGE = 152, | ||
| 1486 | WLAN_EID_DMG_BEAM_REFINEMENT = 153, | ||
| 1487 | WLAN_EID_CHANNEL_MEASURE_FEEDBACK = 154, | ||
| 1488 | WLAN_EID_AWAKE_WINDOW = 157, | ||
| 1489 | WLAN_EID_MULTI_BAND = 158, | ||
| 1490 | WLAN_EID_ADDBA_EXT = 159, | ||
| 1491 | WLAN_EID_NEXT_PCP_LIST = 160, | ||
| 1492 | WLAN_EID_PCP_HANDOVER = 161, | ||
| 1493 | WLAN_EID_DMG_LINK_MARGIN = 162, | ||
| 1494 | WLAN_EID_SWITCHING_STREAM = 163, | ||
| 1495 | WLAN_EID_SESSION_TRANSITION = 164, | ||
| 1496 | WLAN_EID_DYN_TONE_PAIRING_REPORT = 165, | ||
| 1497 | WLAN_EID_CLUSTER_REPORT = 166, | ||
| 1498 | WLAN_EID_RELAY_CAP = 167, | ||
| 1499 | WLAN_EID_RELAY_XFER_PARAM_SET = 168, | ||
| 1500 | WLAN_EID_BEAM_LINK_MAINT = 169, | ||
| 1501 | WLAN_EID_MULTIPLE_MAC_ADDR = 170, | ||
| 1502 | WLAN_EID_U_PID = 171, | ||
| 1503 | WLAN_EID_DMG_LINK_ADAPT_ACK = 172, | ||
| 1504 | WLAN_EID_QUIET_PERIOD_REQ = 175, | ||
| 1505 | WLAN_EID_QUIET_PERIOD_RESP = 177, | ||
| 1506 | WLAN_EID_EPAC_POLICY = 182, | ||
| 1507 | WLAN_EID_CLISTER_TIME_OFF = 183, | ||
| 1508 | WLAN_EID_ANTENNA_SECTOR_ID_PATTERN = 190, | ||
| 1335 | }; | 1509 | }; |
| 1336 | 1510 | ||
| 1337 | /* Action category code */ | 1511 | /* Action category code */ |
| @@ -1348,7 +1522,10 @@ enum ieee80211_category { | |||
| 1348 | WLAN_CATEGORY_MESH_ACTION = 13, | 1522 | WLAN_CATEGORY_MESH_ACTION = 13, |
| 1349 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1523 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
| 1350 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1524 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
| 1525 | WLAN_CATEGORY_DMG = 16, | ||
| 1351 | WLAN_CATEGORY_WMM = 17, | 1526 | WLAN_CATEGORY_WMM = 17, |
| 1527 | WLAN_CATEGORY_FST = 18, | ||
| 1528 | WLAN_CATEGORY_UNPROT_DMG = 20, | ||
| 1352 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1529 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
| 1353 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1530 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
| 1354 | }; | 1531 | }; |
| @@ -1443,7 +1620,7 @@ enum ieee80211_tdls_actioncode { | |||
| 1443 | * | 1620 | * |
| 1444 | * @IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET: the default synchronization method | 1621 | * @IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET: the default synchronization method |
| 1445 | * @IEEE80211_SYNC_METHOD_VENDOR: a vendor specific synchronization method | 1622 | * @IEEE80211_SYNC_METHOD_VENDOR: a vendor specific synchronization method |
| 1446 | * that will be specified in a vendor specific information element | 1623 | * that will be specified in a vendor specific information element |
| 1447 | */ | 1624 | */ |
| 1448 | enum { | 1625 | enum { |
| 1449 | IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET = 1, | 1626 | IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET = 1, |
| @@ -1455,7 +1632,7 @@ enum { | |||
| 1455 | * | 1632 | * |
| 1456 | * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol | 1633 | * @IEEE80211_PATH_PROTOCOL_HWMP: the default path selection protocol |
| 1457 | * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will | 1634 | * @IEEE80211_PATH_PROTOCOL_VENDOR: a vendor specific protocol that will |
| 1458 | * be specified in a vendor specific information element | 1635 | * be specified in a vendor specific information element |
| 1459 | */ | 1636 | */ |
| 1460 | enum { | 1637 | enum { |
| 1461 | IEEE80211_PATH_PROTOCOL_HWMP = 1, | 1638 | IEEE80211_PATH_PROTOCOL_HWMP = 1, |
| @@ -1467,13 +1644,35 @@ enum { | |||
| 1467 | * | 1644 | * |
| 1468 | * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric | 1645 | * @IEEE80211_PATH_METRIC_AIRTIME: the default path selection metric |
| 1469 | * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be | 1646 | * @IEEE80211_PATH_METRIC_VENDOR: a vendor specific metric that will be |
| 1470 | * specified in a vendor specific information element | 1647 | * specified in a vendor specific information element |
| 1471 | */ | 1648 | */ |
| 1472 | enum { | 1649 | enum { |
| 1473 | IEEE80211_PATH_METRIC_AIRTIME = 1, | 1650 | IEEE80211_PATH_METRIC_AIRTIME = 1, |
| 1474 | IEEE80211_PATH_METRIC_VENDOR = 255, | 1651 | IEEE80211_PATH_METRIC_VENDOR = 255, |
| 1475 | }; | 1652 | }; |
| 1476 | 1653 | ||
| 1654 | /** | ||
| 1655 | * enum ieee80211_root_mode_identifier - root mesh STA mode identifier | ||
| 1656 | * | ||
| 1657 | * These attribute are used by dot11MeshHWMPRootMode to set root mesh STA mode | ||
| 1658 | * | ||
| 1659 | * @IEEE80211_ROOTMODE_NO_ROOT: the mesh STA is not a root mesh STA (default) | ||
| 1660 | * @IEEE80211_ROOTMODE_ROOT: the mesh STA is a root mesh STA if greater than | ||
| 1661 | * this value | ||
| 1662 | * @IEEE80211_PROACTIVE_PREQ_NO_PREP: the mesh STA is a root mesh STA supports | ||
| 1663 | * the proactive PREQ with proactive PREP subfield set to 0 | ||
| 1664 | * @IEEE80211_PROACTIVE_PREQ_WITH_PREP: the mesh STA is a root mesh STA | ||
| 1665 | * supports the proactive PREQ with proactive PREP subfield set to 1 | ||
| 1666 | * @IEEE80211_PROACTIVE_RANN: the mesh STA is a root mesh STA supports | ||
| 1667 | * the proactive RANN | ||
| 1668 | */ | ||
| 1669 | enum ieee80211_root_mode_identifier { | ||
| 1670 | IEEE80211_ROOTMODE_NO_ROOT = 0, | ||
| 1671 | IEEE80211_ROOTMODE_ROOT = 1, | ||
| 1672 | IEEE80211_PROACTIVE_PREQ_NO_PREP = 2, | ||
| 1673 | IEEE80211_PROACTIVE_PREQ_WITH_PREP = 3, | ||
| 1674 | IEEE80211_PROACTIVE_RANN = 4, | ||
| 1675 | }; | ||
| 1477 | 1676 | ||
| 1478 | /* | 1677 | /* |
| 1479 | * IEEE 802.11-2007 7.3.2.9 Country information element | 1678 | * IEEE 802.11-2007 7.3.2.9 Country information element |
| @@ -1574,6 +1773,7 @@ enum ieee80211_sa_query_action { | |||
| 1574 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 | 1773 | #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 |
| 1575 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 | 1774 | #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 |
| 1576 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 | 1775 | #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 |
| 1776 | #define WLAN_CIPHER_SUITE_GCMP 0x000FAC08 | ||
| 1577 | 1777 | ||
| 1578 | #define WLAN_CIPHER_SUITE_SMS4 0x00147201 | 1778 | #define WLAN_CIPHER_SUITE_SMS4 0x00147201 |
| 1579 | 1779 | ||
| @@ -1589,6 +1789,10 @@ enum ieee80211_sa_query_action { | |||
| 1589 | 1789 | ||
| 1590 | #define WLAN_OUI_WFA 0x506f9a | 1790 | #define WLAN_OUI_WFA 0x506f9a |
| 1591 | #define WLAN_OUI_TYPE_WFA_P2P 9 | 1791 | #define WLAN_OUI_TYPE_WFA_P2P 9 |
| 1792 | #define WLAN_OUI_MICROSOFT 0x0050f2 | ||
| 1793 | #define WLAN_OUI_TYPE_MICROSOFT_WPA 1 | ||
| 1794 | #define WLAN_OUI_TYPE_MICROSOFT_WMM 2 | ||
| 1795 | #define WLAN_OUI_TYPE_MICROSOFT_WPS 4 | ||
| 1592 | 1796 | ||
| 1593 | /* | 1797 | /* |
| 1594 | * WMM/802.11e Tspec Element | 1798 | * WMM/802.11e Tspec Element |
diff --git a/include/linux/if.h b/include/linux/if.h index f995c663c493..1ec407b01e46 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
| @@ -81,6 +81,8 @@ | |||
| 81 | #define IFF_UNICAST_FLT 0x20000 /* Supports unicast filtering */ | 81 | #define IFF_UNICAST_FLT 0x20000 /* Supports unicast filtering */ |
| 82 | #define IFF_TEAM_PORT 0x40000 /* device used as team port */ | 82 | #define IFF_TEAM_PORT 0x40000 /* device used as team port */ |
| 83 | #define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */ | 83 | #define IFF_SUPP_NOFCS 0x80000 /* device supports sending custom FCS */ |
| 84 | #define IFF_LIVE_ADDR_CHANGE 0x100000 /* device supports hardware address | ||
| 85 | * change when it's running */ | ||
| 84 | 86 | ||
| 85 | 87 | ||
| 86 | #define IF_GET_IFACE 0x0001 /* for querying only */ | 88 | #define IF_GET_IFACE 0x0001 /* for querying only */ |
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index 56d907a2c804..167ce5b363d2 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
| @@ -105,7 +105,8 @@ | |||
| 105 | #define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ | 105 | #define ETH_P_WAN_PPP 0x0007 /* Dummy type for WAN PPP frames*/ |
| 106 | #define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ | 106 | #define ETH_P_PPP_MP 0x0008 /* Dummy type for PPP MP frames */ |
| 107 | #define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ | 107 | #define ETH_P_LOCALTALK 0x0009 /* Localtalk pseudo type */ |
| 108 | #define ETH_P_CAN 0x000C /* Controller Area Network */ | 108 | #define ETH_P_CAN 0x000C /* CAN: Controller Area Network */ |
| 109 | #define ETH_P_CANFD 0x000D /* CANFD: CAN flexible data rate*/ | ||
| 109 | #define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ | 110 | #define ETH_P_PPPTALK 0x0010 /* Dummy type for Atalk over PPP*/ |
| 110 | #define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ | 111 | #define ETH_P_TR_802_2 0x0011 /* 802.2 frames */ |
| 111 | #define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ | 112 | #define ETH_P_MOBITEX 0x0015 /* Mobitex (kaz@cafe.net) */ |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index f715750d0b87..ac173bd2ab65 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
| @@ -140,6 +140,8 @@ enum { | |||
| 140 | IFLA_EXT_MASK, /* Extended info mask, VFs, etc */ | 140 | IFLA_EXT_MASK, /* Extended info mask, VFs, etc */ |
| 141 | IFLA_PROMISCUITY, /* Promiscuity count: > 0 means acts PROMISC */ | 141 | IFLA_PROMISCUITY, /* Promiscuity count: > 0 means acts PROMISC */ |
| 142 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY | 142 | #define IFLA_PROMISCUITY IFLA_PROMISCUITY |
| 143 | IFLA_NUM_TX_QUEUES, | ||
| 144 | IFLA_NUM_RX_QUEUES, | ||
| 143 | __IFLA_MAX | 145 | __IFLA_MAX |
| 144 | }; | 146 | }; |
| 145 | 147 | ||
diff --git a/include/linux/if_team.h b/include/linux/if_team.h index 8185f57a9c7f..6960fc1841a7 100644 --- a/include/linux/if_team.h +++ b/include/linux/if_team.h | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | 13 | ||
| 14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
| 15 | 15 | ||
| 16 | #include <linux/netpoll.h> | ||
| 17 | #include <net/sch_generic.h> | ||
| 18 | |||
| 16 | struct team_pcpu_stats { | 19 | struct team_pcpu_stats { |
| 17 | u64 rx_packets; | 20 | u64 rx_packets; |
| 18 | u64 rx_bytes; | 21 | u64 rx_bytes; |
| @@ -60,9 +63,54 @@ struct team_port { | |||
| 60 | unsigned int mtu; | 63 | unsigned int mtu; |
| 61 | } orig; | 64 | } orig; |
| 62 | 65 | ||
| 63 | struct rcu_head rcu; | 66 | #ifdef CONFIG_NET_POLL_CONTROLLER |
| 67 | struct netpoll *np; | ||
| 68 | #endif | ||
| 69 | |||
| 70 | long mode_priv[0]; | ||
| 64 | }; | 71 | }; |
| 65 | 72 | ||
| 73 | static inline bool team_port_enabled(struct team_port *port) | ||
| 74 | { | ||
| 75 | return port->index != -1; | ||
| 76 | } | ||
| 77 | |||
| 78 | static inline bool team_port_txable(struct team_port *port) | ||
| 79 | { | ||
| 80 | return port->linkup && team_port_enabled(port); | ||
| 81 | } | ||
| 82 | |||
| 83 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
| 84 | static inline void team_netpoll_send_skb(struct team_port *port, | ||
| 85 | struct sk_buff *skb) | ||
| 86 | { | ||
| 87 | struct netpoll *np = port->np; | ||
| 88 | |||
| 89 | if (np) | ||
| 90 | netpoll_send_skb(np, skb); | ||
| 91 | } | ||
| 92 | #else | ||
| 93 | static inline void team_netpoll_send_skb(struct team_port *port, | ||
| 94 | struct sk_buff *skb) | ||
| 95 | { | ||
| 96 | } | ||
| 97 | #endif | ||
| 98 | |||
| 99 | static inline int team_dev_queue_xmit(struct team *team, struct team_port *port, | ||
| 100 | struct sk_buff *skb) | ||
| 101 | { | ||
| 102 | BUILD_BUG_ON(sizeof(skb->queue_mapping) != | ||
| 103 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | ||
| 104 | skb_set_queue_mapping(skb, qdisc_skb_cb(skb)->slave_dev_queue_mapping); | ||
| 105 | |||
| 106 | skb->dev = port->dev; | ||
| 107 | if (unlikely(netpoll_tx_running(port->dev))) { | ||
| 108 | team_netpoll_send_skb(port, skb); | ||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | return dev_queue_xmit(skb); | ||
| 112 | } | ||
| 113 | |||
| 66 | struct team_mode_ops { | 114 | struct team_mode_ops { |
| 67 | int (*init)(struct team *team); | 115 | int (*init)(struct team *team); |
| 68 | void (*exit)(struct team *team); | 116 | void (*exit)(struct team *team); |
| @@ -73,6 +121,8 @@ struct team_mode_ops { | |||
| 73 | int (*port_enter)(struct team *team, struct team_port *port); | 121 | int (*port_enter)(struct team *team, struct team_port *port); |
| 74 | void (*port_leave)(struct team *team, struct team_port *port); | 122 | void (*port_leave)(struct team *team, struct team_port *port); |
| 75 | void (*port_change_mac)(struct team *team, struct team_port *port); | 123 | void (*port_change_mac)(struct team *team, struct team_port *port); |
| 124 | void (*port_enabled)(struct team *team, struct team_port *port); | ||
| 125 | void (*port_disabled)(struct team *team, struct team_port *port); | ||
| 76 | }; | 126 | }; |
| 77 | 127 | ||
| 78 | enum team_option_type { | 128 | enum team_option_type { |
| @@ -82,6 +132,11 @@ enum team_option_type { | |||
| 82 | TEAM_OPTION_TYPE_BOOL, | 132 | TEAM_OPTION_TYPE_BOOL, |
| 83 | }; | 133 | }; |
| 84 | 134 | ||
| 135 | struct team_option_inst_info { | ||
| 136 | u32 array_index; | ||
| 137 | struct team_port *port; /* != NULL if per-port */ | ||
| 138 | }; | ||
| 139 | |||
| 85 | struct team_gsetter_ctx { | 140 | struct team_gsetter_ctx { |
| 86 | union { | 141 | union { |
| 87 | u32 u32_val; | 142 | u32 u32_val; |
| @@ -92,23 +147,28 @@ struct team_gsetter_ctx { | |||
| 92 | } bin_val; | 147 | } bin_val; |
| 93 | bool bool_val; | 148 | bool bool_val; |
| 94 | } data; | 149 | } data; |
| 95 | struct team_port *port; | 150 | struct team_option_inst_info *info; |
| 96 | }; | 151 | }; |
| 97 | 152 | ||
| 98 | struct team_option { | 153 | struct team_option { |
| 99 | struct list_head list; | 154 | struct list_head list; |
| 100 | const char *name; | 155 | const char *name; |
| 101 | bool per_port; | 156 | bool per_port; |
| 157 | unsigned int array_size; /* != 0 means the option is array */ | ||
| 102 | enum team_option_type type; | 158 | enum team_option_type type; |
| 159 | int (*init)(struct team *team, struct team_option_inst_info *info); | ||
| 103 | int (*getter)(struct team *team, struct team_gsetter_ctx *ctx); | 160 | int (*getter)(struct team *team, struct team_gsetter_ctx *ctx); |
| 104 | int (*setter)(struct team *team, struct team_gsetter_ctx *ctx); | 161 | int (*setter)(struct team *team, struct team_gsetter_ctx *ctx); |
| 105 | }; | 162 | }; |
| 106 | 163 | ||
| 164 | extern void team_option_inst_set_change(struct team_option_inst_info *opt_inst_info); | ||
| 165 | extern void team_options_change_check(struct team *team); | ||
| 166 | |||
| 107 | struct team_mode { | 167 | struct team_mode { |
| 108 | struct list_head list; | ||
| 109 | const char *kind; | 168 | const char *kind; |
| 110 | struct module *owner; | 169 | struct module *owner; |
| 111 | size_t priv_size; | 170 | size_t priv_size; |
| 171 | size_t port_priv_size; | ||
| 112 | const struct team_mode_ops *ops; | 172 | const struct team_mode_ops *ops; |
| 113 | }; | 173 | }; |
| 114 | 174 | ||
| @@ -178,8 +238,11 @@ extern int team_options_register(struct team *team, | |||
| 178 | extern void team_options_unregister(struct team *team, | 238 | extern void team_options_unregister(struct team *team, |
| 179 | const struct team_option *option, | 239 | const struct team_option *option, |
| 180 | size_t option_count); | 240 | size_t option_count); |
| 181 | extern int team_mode_register(struct team_mode *mode); | 241 | extern int team_mode_register(const struct team_mode *mode); |
| 182 | extern int team_mode_unregister(struct team_mode *mode); | 242 | extern void team_mode_unregister(const struct team_mode *mode); |
| 243 | |||
| 244 | #define TEAM_DEFAULT_NUM_TX_QUEUES 16 | ||
| 245 | #define TEAM_DEFAULT_NUM_RX_QUEUES 16 | ||
| 183 | 246 | ||
| 184 | #endif /* __KERNEL__ */ | 247 | #endif /* __KERNEL__ */ |
| 185 | 248 | ||
| @@ -241,6 +304,7 @@ enum { | |||
| 241 | TEAM_ATTR_OPTION_DATA, /* dynamic */ | 304 | TEAM_ATTR_OPTION_DATA, /* dynamic */ |
| 242 | TEAM_ATTR_OPTION_REMOVED, /* flag */ | 305 | TEAM_ATTR_OPTION_REMOVED, /* flag */ |
| 243 | TEAM_ATTR_OPTION_PORT_IFINDEX, /* u32 */ /* for per-port options */ | 306 | TEAM_ATTR_OPTION_PORT_IFINDEX, /* u32 */ /* for per-port options */ |
| 307 | TEAM_ATTR_OPTION_ARRAY_INDEX, /* u32 */ /* for array options */ | ||
| 244 | 308 | ||
| 245 | __TEAM_ATTR_OPTION_MAX, | 309 | __TEAM_ATTR_OPTION_MAX, |
| 246 | TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, | 310 | TEAM_ATTR_OPTION_MAX = __TEAM_ATTR_OPTION_MAX - 1, |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index 16b92d008bed..5efff60b6f56 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
| @@ -80,4 +80,18 @@ enum { | |||
| 80 | 80 | ||
| 81 | #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) | 81 | #define IFLA_GRE_MAX (__IFLA_GRE_MAX - 1) |
| 82 | 82 | ||
| 83 | /* VTI-mode i_flags */ | ||
| 84 | #define VTI_ISVTI 0x0001 | ||
| 85 | |||
| 86 | enum { | ||
| 87 | IFLA_VTI_UNSPEC, | ||
| 88 | IFLA_VTI_LINK, | ||
| 89 | IFLA_VTI_IKEY, | ||
| 90 | IFLA_VTI_OKEY, | ||
| 91 | IFLA_VTI_LOCAL, | ||
| 92 | IFLA_VTI_REMOTE, | ||
| 93 | __IFLA_VTI_MAX, | ||
| 94 | }; | ||
| 95 | |||
| 96 | #define IFLA_VTI_MAX (__IFLA_VTI_MAX - 1) | ||
| 83 | #endif /* _IF_TUNNEL_H_ */ | 97 | #endif /* _IF_TUNNEL_H_ */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 597f4a9f3240..67f9ddacb70c 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
| @@ -38,6 +38,7 @@ enum | |||
| 38 | IPV4_DEVCONF_ACCEPT_LOCAL, | 38 | IPV4_DEVCONF_ACCEPT_LOCAL, |
| 39 | IPV4_DEVCONF_SRC_VMARK, | 39 | IPV4_DEVCONF_SRC_VMARK, |
| 40 | IPV4_DEVCONF_PROXY_ARP_PVLAN, | 40 | IPV4_DEVCONF_PROXY_ARP_PVLAN, |
| 41 | IPV4_DEVCONF_ROUTE_LOCALNET, | ||
| 41 | __IPV4_DEVCONF_MAX | 42 | __IPV4_DEVCONF_MAX |
| 42 | }; | 43 | }; |
| 43 | 44 | ||
| @@ -131,6 +132,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
| 131 | #define IN_DEV_PROMOTE_SECONDARIES(in_dev) \ | 132 | #define IN_DEV_PROMOTE_SECONDARIES(in_dev) \ |
| 132 | IN_DEV_ORCONF((in_dev), \ | 133 | IN_DEV_ORCONF((in_dev), \ |
| 133 | PROMOTE_SECONDARIES) | 134 | PROMOTE_SECONDARIES) |
| 135 | #define IN_DEV_ROUTE_LOCALNET(in_dev) IN_DEV_ORCONF(in_dev, ROUTE_LOCALNET) | ||
| 134 | 136 | ||
| 135 | #define IN_DEV_RX_REDIRECTS(in_dev) \ | 137 | #define IN_DEV_RX_REDIRECTS(in_dev) \ |
| 136 | ((IN_DEV_FORWARD(in_dev) && \ | 138 | ((IN_DEV_FORWARD(in_dev) && \ |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 8260ef779762..379e433e15e0 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
| @@ -299,9 +299,9 @@ struct ipv6_pinfo { | |||
| 299 | struct in6_addr rcv_saddr; | 299 | struct in6_addr rcv_saddr; |
| 300 | struct in6_addr daddr; | 300 | struct in6_addr daddr; |
| 301 | struct in6_pktinfo sticky_pktinfo; | 301 | struct in6_pktinfo sticky_pktinfo; |
| 302 | struct in6_addr *daddr_cache; | 302 | const struct in6_addr *daddr_cache; |
| 303 | #ifdef CONFIG_IPV6_SUBTREES | 303 | #ifdef CONFIG_IPV6_SUBTREES |
| 304 | struct in6_addr *saddr_cache; | 304 | const struct in6_addr *saddr_cache; |
| 305 | #endif | 305 | #endif |
| 306 | 306 | ||
| 307 | __be32 flow_label; | 307 | __be32 flow_label; |
| @@ -410,6 +410,22 @@ struct tcp6_sock { | |||
| 410 | 410 | ||
| 411 | extern int inet6_sk_rebuild_header(struct sock *sk); | 411 | extern int inet6_sk_rebuild_header(struct sock *sk); |
| 412 | 412 | ||
| 413 | struct inet6_timewait_sock { | ||
| 414 | struct in6_addr tw_v6_daddr; | ||
| 415 | struct in6_addr tw_v6_rcv_saddr; | ||
| 416 | }; | ||
| 417 | |||
| 418 | struct tcp6_timewait_sock { | ||
| 419 | struct tcp_timewait_sock tcp6tw_tcp; | ||
| 420 | struct inet6_timewait_sock tcp6tw_inet6; | ||
| 421 | }; | ||
| 422 | |||
| 423 | static inline struct inet6_timewait_sock *inet6_twsk(const struct sock *sk) | ||
| 424 | { | ||
| 425 | return (struct inet6_timewait_sock *)(((u8 *)sk) + | ||
| 426 | inet_twsk(sk)->tw_ipv6_offset); | ||
| 427 | } | ||
| 428 | |||
| 413 | #if IS_ENABLED(CONFIG_IPV6) | 429 | #if IS_ENABLED(CONFIG_IPV6) |
| 414 | static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) | 430 | static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) |
| 415 | { | 431 | { |
| @@ -459,28 +475,12 @@ static inline void inet_sk_copy_descendant(struct sock *sk_to, | |||
| 459 | #define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only) | 475 | #define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only) |
| 460 | #define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk)) | 476 | #define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk)) |
| 461 | 477 | ||
| 462 | struct inet6_timewait_sock { | ||
| 463 | struct in6_addr tw_v6_daddr; | ||
| 464 | struct in6_addr tw_v6_rcv_saddr; | ||
| 465 | }; | ||
| 466 | |||
| 467 | struct tcp6_timewait_sock { | ||
| 468 | struct tcp_timewait_sock tcp6tw_tcp; | ||
| 469 | struct inet6_timewait_sock tcp6tw_inet6; | ||
| 470 | }; | ||
| 471 | |||
| 472 | static inline u16 inet6_tw_offset(const struct proto *prot) | 478 | static inline u16 inet6_tw_offset(const struct proto *prot) |
| 473 | { | 479 | { |
| 474 | return prot->twsk_prot->twsk_obj_size - | 480 | return prot->twsk_prot->twsk_obj_size - |
| 475 | sizeof(struct inet6_timewait_sock); | 481 | sizeof(struct inet6_timewait_sock); |
| 476 | } | 482 | } |
| 477 | 483 | ||
| 478 | static inline struct inet6_timewait_sock *inet6_twsk(const struct sock *sk) | ||
| 479 | { | ||
| 480 | return (struct inet6_timewait_sock *)(((u8 *)sk) + | ||
| 481 | inet_twsk(sk)->tw_ipv6_offset); | ||
| 482 | } | ||
| 483 | |||
| 484 | static inline struct in6_addr *__inet6_rcv_saddr(const struct sock *sk) | 484 | static inline struct in6_addr *__inet6_rcv_saddr(const struct sock *sk) |
| 485 | { | 485 | { |
| 486 | return likely(sk->sk_state != TCP_TIME_WAIT) ? | 486 | return likely(sk->sk_state != TCP_TIME_WAIT) ? |
diff --git a/include/linux/ks8851_mll.h b/include/linux/ks8851_mll.h new file mode 100644 index 000000000000..e9ccfb59ed30 --- /dev/null +++ b/include/linux/ks8851_mll.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * ks8861_mll platform data struct definition | ||
| 3 | * Copyright (c) 2012 BTicino S.p.A. | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License version 2 as | ||
| 7 | * published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | * GNU General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU General Public License | ||
| 15 | * along with this program; if not, write to the Free Software | ||
| 16 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef _LINUX_KS8851_MLL_H | ||
| 20 | #define _LINUX_KS8851_MLL_H | ||
| 21 | |||
| 22 | #include <linux/if_ether.h> | ||
| 23 | |||
| 24 | /** | ||
| 25 | * struct ks8851_mll_platform_data - Platform data of the KS8851_MLL network driver | ||
| 26 | * @macaddr: The MAC address of the device, set to all 0:s to use the on in | ||
| 27 | * the chip. | ||
| 28 | */ | ||
| 29 | struct ks8851_mll_platform_data { | ||
| 30 | u8 mac_addr[ETH_ALEN]; | ||
| 31 | }; | ||
| 32 | |||
| 33 | #endif | ||
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index dfb947959ec9..7cccafe50e7b 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h | |||
| @@ -43,7 +43,11 @@ | |||
| 43 | #define MDIO_PKGID2 15 | 43 | #define MDIO_PKGID2 15 |
| 44 | #define MDIO_AN_ADVERTISE 16 /* AN advertising (base page) */ | 44 | #define MDIO_AN_ADVERTISE 16 /* AN advertising (base page) */ |
| 45 | #define MDIO_AN_LPA 19 /* AN LP abilities (base page) */ | 45 | #define MDIO_AN_LPA 19 /* AN LP abilities (base page) */ |
| 46 | #define MDIO_PCS_EEE_ABLE 20 /* EEE Capability register */ | ||
| 47 | #define MDIO_PCS_EEE_WK_ERR 22 /* EEE wake error counter */ | ||
| 46 | #define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */ | 48 | #define MDIO_PHYXS_LNSTAT 24 /* PHY XGXS lane state */ |
| 49 | #define MDIO_AN_EEE_ADV 60 /* EEE advertisement */ | ||
| 50 | #define MDIO_AN_EEE_LPABLE 61 /* EEE link partner ability */ | ||
| 47 | 51 | ||
| 48 | /* Media-dependent registers. */ | 52 | /* Media-dependent registers. */ |
| 49 | #define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ | 53 | #define MDIO_PMA_10GBT_SWAPPOL 130 /* 10GBASE-T pair swap & polarity */ |
| @@ -56,7 +60,6 @@ | |||
| 56 | #define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ | 60 | #define MDIO_PCS_10GBRT_STAT2 33 /* 10GBASE-R/-T PCS status 2 */ |
| 57 | #define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ | 61 | #define MDIO_AN_10GBT_CTRL 32 /* 10GBASE-T auto-negotiation control */ |
| 58 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ | 62 | #define MDIO_AN_10GBT_STAT 33 /* 10GBASE-T auto-negotiation status */ |
| 59 | #define MDIO_AN_EEE_ADV 60 /* EEE advertisement */ | ||
| 60 | 63 | ||
| 61 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ | 64 | /* LASI (Link Alarm Status Interrupt) registers, defined by XENPAK MSA. */ |
| 62 | #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */ | 65 | #define MDIO_PMA_LASI_RXCTRL 0x9000 /* RX_ALARM control */ |
| @@ -82,6 +85,7 @@ | |||
| 82 | #define MDIO_AN_CTRL1_RESTART BMCR_ANRESTART | 85 | #define MDIO_AN_CTRL1_RESTART BMCR_ANRESTART |
| 83 | #define MDIO_AN_CTRL1_ENABLE BMCR_ANENABLE | 86 | #define MDIO_AN_CTRL1_ENABLE BMCR_ANENABLE |
| 84 | #define MDIO_AN_CTRL1_XNP 0x2000 /* Enable extended next page */ | 87 | #define MDIO_AN_CTRL1_XNP 0x2000 /* Enable extended next page */ |
| 88 | #define MDIO_PCS_CTRL1_CLKSTOP_EN 0x400 /* Stop the clock during LPI */ | ||
| 85 | 89 | ||
| 86 | /* 10 Gb/s */ | 90 | /* 10 Gb/s */ |
| 87 | #define MDIO_CTRL1_SPEED10G (MDIO_CTRL1_SPEEDSELEXT | 0x00) | 91 | #define MDIO_CTRL1_SPEED10G (MDIO_CTRL1_SPEEDSELEXT | 0x00) |
| @@ -237,9 +241,25 @@ | |||
| 237 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ | 241 | #define MDIO_AN_10GBT_STAT_MS 0x4000 /* Master/slave config */ |
| 238 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ | 242 | #define MDIO_AN_10GBT_STAT_MSFLT 0x8000 /* Master/slave config fault */ |
| 239 | 243 | ||
| 240 | /* AN EEE Advertisement register. */ | 244 | /* EEE Supported/Advertisement/LP Advertisement registers. |
| 241 | #define MDIO_AN_EEE_ADV_100TX 0x0002 /* Advertise 100TX EEE cap */ | 245 | * |
| 242 | #define MDIO_AN_EEE_ADV_1000T 0x0004 /* Advertise 1000T EEE cap */ | 246 | * EEE capability Register (3.20), Advertisement (7.60) and |
| 247 | * Link partner ability (7.61) registers have and can use the same identical | ||
| 248 | * bit masks. | ||
| 249 | */ | ||
| 250 | #define MDIO_AN_EEE_ADV_100TX 0x0002 /* Advertise 100TX EEE cap */ | ||
| 251 | #define MDIO_AN_EEE_ADV_1000T 0x0004 /* Advertise 1000T EEE cap */ | ||
| 252 | /* Note: the two defines above can be potentially used by the user-land | ||
| 253 | * and cannot remove them now. | ||
| 254 | * So, we define the new generic MDIO_EEE_100TX and MDIO_EEE_1000T macros | ||
| 255 | * using the previous ones (that can be considered obsolete). | ||
| 256 | */ | ||
| 257 | #define MDIO_EEE_100TX MDIO_AN_EEE_ADV_100TX /* 100TX EEE cap */ | ||
| 258 | #define MDIO_EEE_1000T MDIO_AN_EEE_ADV_1000T /* 1000T EEE cap */ | ||
| 259 | #define MDIO_EEE_10GT 0x0008 /* 10GT EEE cap */ | ||
| 260 | #define MDIO_EEE_1000KX 0x0010 /* 1000KX EEE cap */ | ||
| 261 | #define MDIO_EEE_10GKX4 0x0020 /* 10G KX4 EEE cap */ | ||
| 262 | #define MDIO_EEE_10GKR 0x0040 /* 10G KR EEE cap */ | ||
| 243 | 263 | ||
| 244 | /* LASI RX_ALARM control/status registers. */ | 264 | /* LASI RX_ALARM control/status registers. */ |
| 245 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ | 265 | #define MDIO_PMA_LASI_RX_PHYXSLFLT 0x0001 /* PHY XS RX local fault */ |
diff --git a/include/linux/mii.h b/include/linux/mii.h index 2783eca629a0..8ef3a7a11592 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
| @@ -21,6 +21,8 @@ | |||
| 21 | #define MII_EXPANSION 0x06 /* Expansion register */ | 21 | #define MII_EXPANSION 0x06 /* Expansion register */ |
| 22 | #define MII_CTRL1000 0x09 /* 1000BASE-T control */ | 22 | #define MII_CTRL1000 0x09 /* 1000BASE-T control */ |
| 23 | #define MII_STAT1000 0x0a /* 1000BASE-T status */ | 23 | #define MII_STAT1000 0x0a /* 1000BASE-T status */ |
| 24 | #define MII_MMD_CTRL 0x0d /* MMD Access Control Register */ | ||
| 25 | #define MII_MMD_DATA 0x0e /* MMD Access Data Register */ | ||
| 24 | #define MII_ESTATUS 0x0f /* Extended Status */ | 26 | #define MII_ESTATUS 0x0f /* Extended Status */ |
| 25 | #define MII_DCOUNTER 0x12 /* Disconnect counter */ | 27 | #define MII_DCOUNTER 0x12 /* Disconnect counter */ |
| 26 | #define MII_FCSCOUNTER 0x13 /* False carrier counter */ | 28 | #define MII_FCSCOUNTER 0x13 /* False carrier counter */ |
| @@ -141,6 +143,13 @@ | |||
| 141 | #define FLOW_CTRL_TX 0x01 | 143 | #define FLOW_CTRL_TX 0x01 |
| 142 | #define FLOW_CTRL_RX 0x02 | 144 | #define FLOW_CTRL_RX 0x02 |
| 143 | 145 | ||
| 146 | /* MMD Access Control register fields */ | ||
| 147 | #define MII_MMD_CTRL_DEVAD_MASK 0x1f /* Mask MMD DEVAD*/ | ||
| 148 | #define MII_MMD_CTRL_ADDR 0x0000 /* Address */ | ||
| 149 | #define MII_MMD_CTRL_NOINCR 0x4000 /* no post increment */ | ||
| 150 | #define MII_MMD_CTRL_INCR_RDWT 0x8000 /* post increment on reads & writes */ | ||
| 151 | #define MII_MMD_CTRL_INCR_ON_WT 0xC000 /* post increment on writes only */ | ||
| 152 | |||
| 144 | /* This structure is used in all SIOCxMIIxxx ioctl calls */ | 153 | /* This structure is used in all SIOCxMIIxxx ioctl calls */ |
| 145 | struct mii_ioctl_data { | 154 | struct mii_ioctl_data { |
| 146 | __u16 phy_id; | 155 | __u16 phy_id; |
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h index 1f3860a8a109..260695186256 100644 --- a/include/linux/mlx4/cmd.h +++ b/include/linux/mlx4/cmd.h | |||
| @@ -154,6 +154,10 @@ enum { | |||
| 154 | /* set port opcode modifiers */ | 154 | /* set port opcode modifiers */ |
| 155 | MLX4_SET_PORT_PRIO2TC = 0x8, | 155 | MLX4_SET_PORT_PRIO2TC = 0x8, |
| 156 | MLX4_SET_PORT_SCHEDULER = 0x9, | 156 | MLX4_SET_PORT_SCHEDULER = 0x9, |
| 157 | |||
| 158 | /* register/delete flow steering network rules */ | ||
| 159 | MLX4_QP_FLOW_STEERING_ATTACH = 0x65, | ||
| 160 | MLX4_QP_FLOW_STEERING_DETACH = 0x66, | ||
| 157 | }; | 161 | }; |
| 158 | 162 | ||
| 159 | enum { | 163 | enum { |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 6a8f002b8ed3..4d7761f8c3f6 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/pci.h> | 36 | #include <linux/pci.h> |
| 37 | #include <linux/completion.h> | 37 | #include <linux/completion.h> |
| 38 | #include <linux/radix-tree.h> | 38 | #include <linux/radix-tree.h> |
| 39 | #include <linux/cpu_rmap.h> | ||
| 39 | 40 | ||
| 40 | #include <linux/atomic.h> | 41 | #include <linux/atomic.h> |
| 41 | 42 | ||
| @@ -70,6 +71,36 @@ enum { | |||
| 70 | MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) | 71 | MLX4_MFUNC_EQE_MASK = (MLX4_MFUNC_MAX_EQES - 1) |
| 71 | }; | 72 | }; |
| 72 | 73 | ||
| 74 | /* Driver supports 3 diffrent device methods to manage traffic steering: | ||
| 75 | * -device managed - High level API for ib and eth flow steering. FW is | ||
| 76 | * managing flow steering tables. | ||
| 77 | * - B0 steering mode - Common low level API for ib and (if supported) eth. | ||
| 78 | * - A0 steering mode - Limited low level API for eth. In case of IB, | ||
| 79 | * B0 mode is in use. | ||
| 80 | */ | ||
| 81 | enum { | ||
| 82 | MLX4_STEERING_MODE_A0, | ||
| 83 | MLX4_STEERING_MODE_B0, | ||
| 84 | MLX4_STEERING_MODE_DEVICE_MANAGED | ||
| 85 | }; | ||
| 86 | |||
| 87 | static inline const char *mlx4_steering_mode_str(int steering_mode) | ||
| 88 | { | ||
| 89 | switch (steering_mode) { | ||
| 90 | case MLX4_STEERING_MODE_A0: | ||
| 91 | return "A0 steering"; | ||
| 92 | |||
| 93 | case MLX4_STEERING_MODE_B0: | ||
| 94 | return "B0 steering"; | ||
| 95 | |||
| 96 | case MLX4_STEERING_MODE_DEVICE_MANAGED: | ||
| 97 | return "Device managed flow steering"; | ||
| 98 | |||
| 99 | default: | ||
| 100 | return "Unrecognize steering mode"; | ||
| 101 | } | ||
| 102 | } | ||
| 103 | |||
| 73 | enum { | 104 | enum { |
| 74 | MLX4_DEV_CAP_FLAG_RC = 1LL << 0, | 105 | MLX4_DEV_CAP_FLAG_RC = 1LL << 0, |
| 75 | MLX4_DEV_CAP_FLAG_UC = 1LL << 1, | 106 | MLX4_DEV_CAP_FLAG_UC = 1LL << 1, |
| @@ -102,7 +133,8 @@ enum { | |||
| 102 | enum { | 133 | enum { |
| 103 | MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, | 134 | MLX4_DEV_CAP_FLAG2_RSS = 1LL << 0, |
| 104 | MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, | 135 | MLX4_DEV_CAP_FLAG2_RSS_TOP = 1LL << 1, |
| 105 | MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2 | 136 | MLX4_DEV_CAP_FLAG2_RSS_XOR = 1LL << 2, |
| 137 | MLX4_DEV_CAP_FLAG2_FS_EN = 1LL << 3 | ||
| 106 | }; | 138 | }; |
| 107 | 139 | ||
| 108 | #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) | 140 | #define MLX4_ATTR_EXTENDED_PORT_INFO cpu_to_be16(0xff90) |
| @@ -295,6 +327,8 @@ struct mlx4_caps { | |||
| 295 | int num_amgms; | 327 | int num_amgms; |
| 296 | int reserved_mcgs; | 328 | int reserved_mcgs; |
| 297 | int num_qp_per_mgm; | 329 | int num_qp_per_mgm; |
| 330 | int steering_mode; | ||
| 331 | int fs_log_max_ucast_qp_range_size; | ||
| 298 | int num_pds; | 332 | int num_pds; |
| 299 | int reserved_pds; | 333 | int reserved_pds; |
| 300 | int max_xrcds; | 334 | int max_xrcds; |
| @@ -509,6 +543,8 @@ struct mlx4_dev { | |||
| 509 | u8 rev_id; | 543 | u8 rev_id; |
| 510 | char board_id[MLX4_BOARD_ID_LEN]; | 544 | char board_id[MLX4_BOARD_ID_LEN]; |
| 511 | int num_vfs; | 545 | int num_vfs; |
| 546 | u64 regid_promisc_array[MLX4_MAX_PORTS + 1]; | ||
| 547 | u64 regid_allmulti_array[MLX4_MAX_PORTS + 1]; | ||
| 512 | }; | 548 | }; |
| 513 | 549 | ||
| 514 | struct mlx4_init_port_param { | 550 | struct mlx4_init_port_param { |
| @@ -623,9 +659,99 @@ int mlx4_unicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | |||
| 623 | int mlx4_unicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 659 | int mlx4_unicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 624 | enum mlx4_protocol prot); | 660 | enum mlx4_protocol prot); |
| 625 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 661 | int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 626 | int block_mcast_loopback, enum mlx4_protocol protocol); | 662 | u8 port, int block_mcast_loopback, |
| 663 | enum mlx4_protocol protocol, u64 *reg_id); | ||
| 627 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], | 664 | int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16], |
| 628 | enum mlx4_protocol protocol); | 665 | enum mlx4_protocol protocol, u64 reg_id); |
| 666 | |||
| 667 | enum { | ||
| 668 | MLX4_DOMAIN_UVERBS = 0x1000, | ||
| 669 | MLX4_DOMAIN_ETHTOOL = 0x2000, | ||
| 670 | MLX4_DOMAIN_RFS = 0x3000, | ||
| 671 | MLX4_DOMAIN_NIC = 0x5000, | ||
| 672 | }; | ||
| 673 | |||
| 674 | enum mlx4_net_trans_rule_id { | ||
| 675 | MLX4_NET_TRANS_RULE_ID_ETH = 0, | ||
| 676 | MLX4_NET_TRANS_RULE_ID_IB, | ||
| 677 | MLX4_NET_TRANS_RULE_ID_IPV6, | ||
| 678 | MLX4_NET_TRANS_RULE_ID_IPV4, | ||
| 679 | MLX4_NET_TRANS_RULE_ID_TCP, | ||
| 680 | MLX4_NET_TRANS_RULE_ID_UDP, | ||
| 681 | MLX4_NET_TRANS_RULE_NUM, /* should be last */ | ||
| 682 | }; | ||
| 683 | |||
| 684 | enum mlx4_net_trans_promisc_mode { | ||
| 685 | MLX4_FS_PROMISC_NONE = 0, | ||
| 686 | MLX4_FS_PROMISC_UPLINK, | ||
| 687 | /* For future use. Not implemented yet */ | ||
| 688 | MLX4_FS_PROMISC_FUNCTION_PORT, | ||
| 689 | MLX4_FS_PROMISC_ALL_MULTI, | ||
| 690 | }; | ||
| 691 | |||
| 692 | struct mlx4_spec_eth { | ||
| 693 | u8 dst_mac[6]; | ||
| 694 | u8 dst_mac_msk[6]; | ||
| 695 | u8 src_mac[6]; | ||
| 696 | u8 src_mac_msk[6]; | ||
| 697 | u8 ether_type_enable; | ||
| 698 | __be16 ether_type; | ||
| 699 | __be16 vlan_id_msk; | ||
| 700 | __be16 vlan_id; | ||
| 701 | }; | ||
| 702 | |||
| 703 | struct mlx4_spec_tcp_udp { | ||
| 704 | __be16 dst_port; | ||
| 705 | __be16 dst_port_msk; | ||
| 706 | __be16 src_port; | ||
| 707 | __be16 src_port_msk; | ||
| 708 | }; | ||
| 709 | |||
| 710 | struct mlx4_spec_ipv4 { | ||
| 711 | __be32 dst_ip; | ||
| 712 | __be32 dst_ip_msk; | ||
| 713 | __be32 src_ip; | ||
| 714 | __be32 src_ip_msk; | ||
| 715 | }; | ||
| 716 | |||
| 717 | struct mlx4_spec_ib { | ||
| 718 | __be32 r_qpn; | ||
| 719 | __be32 qpn_msk; | ||
| 720 | u8 dst_gid[16]; | ||
| 721 | u8 dst_gid_msk[16]; | ||
| 722 | }; | ||
| 723 | |||
| 724 | struct mlx4_spec_list { | ||
| 725 | struct list_head list; | ||
| 726 | enum mlx4_net_trans_rule_id id; | ||
| 727 | union { | ||
| 728 | struct mlx4_spec_eth eth; | ||
| 729 | struct mlx4_spec_ib ib; | ||
| 730 | struct mlx4_spec_ipv4 ipv4; | ||
| 731 | struct mlx4_spec_tcp_udp tcp_udp; | ||
| 732 | }; | ||
| 733 | }; | ||
| 734 | |||
| 735 | enum mlx4_net_trans_hw_rule_queue { | ||
| 736 | MLX4_NET_TRANS_Q_FIFO, | ||
| 737 | MLX4_NET_TRANS_Q_LIFO, | ||
| 738 | }; | ||
| 739 | |||
| 740 | struct mlx4_net_trans_rule { | ||
| 741 | struct list_head list; | ||
| 742 | enum mlx4_net_trans_hw_rule_queue queue_mode; | ||
| 743 | bool exclusive; | ||
| 744 | bool allow_loopback; | ||
| 745 | enum mlx4_net_trans_promisc_mode promisc_mode; | ||
| 746 | u8 port; | ||
| 747 | u16 priority; | ||
| 748 | u32 qpn; | ||
| 749 | }; | ||
| 750 | |||
| 751 | int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port, u32 qpn, | ||
| 752 | enum mlx4_net_trans_promisc_mode mode); | ||
| 753 | int mlx4_flow_steer_promisc_remove(struct mlx4_dev *dev, u8 port, | ||
| 754 | enum mlx4_net_trans_promisc_mode mode); | ||
| 629 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | 755 | int mlx4_multicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); |
| 630 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); | 756 | int mlx4_multicast_promisc_remove(struct mlx4_dev *dev, u32 qpn, u8 port); |
| 631 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); | 757 | int mlx4_unicast_promisc_add(struct mlx4_dev *dev, u32 qpn, u8 port); |
| @@ -659,7 +785,8 @@ void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, | |||
| 659 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); | 785 | int mlx4_fmr_free(struct mlx4_dev *dev, struct mlx4_fmr *fmr); |
| 660 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); | 786 | int mlx4_SYNC_TPT(struct mlx4_dev *dev); |
| 661 | int mlx4_test_interrupts(struct mlx4_dev *dev); | 787 | int mlx4_test_interrupts(struct mlx4_dev *dev); |
| 662 | int mlx4_assign_eq(struct mlx4_dev *dev, char* name , int* vector); | 788 | int mlx4_assign_eq(struct mlx4_dev *dev, char *name, struct cpu_rmap *rmap, |
| 789 | int *vector); | ||
| 663 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); | 790 | void mlx4_release_eq(struct mlx4_dev *dev, int vec); |
| 664 | 791 | ||
| 665 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); | 792 | int mlx4_wol_read(struct mlx4_dev *dev, u64 *config, int port); |
| @@ -668,4 +795,8 @@ int mlx4_wol_write(struct mlx4_dev *dev, u64 config, int port); | |||
| 668 | int mlx4_counter_alloc(struct mlx4_dev *dev, u32 *idx); | 795 | int mlx4_counter_alloc(struct mlx4_dev *dev, u32 *idx); |
| 669 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx); | 796 | void mlx4_counter_free(struct mlx4_dev *dev, u32 idx); |
| 670 | 797 | ||
| 798 | int mlx4_flow_attach(struct mlx4_dev *dev, | ||
| 799 | struct mlx4_net_trans_rule *rule, u64 *reg_id); | ||
| 800 | int mlx4_flow_detach(struct mlx4_dev *dev, u64 reg_id); | ||
| 801 | |||
| 671 | #endif /* MLX4_DEVICE_H */ | 802 | #endif /* MLX4_DEVICE_H */ |
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h index 5f1298b1b5ef..8dc485febc6b 100644 --- a/include/linux/mlx4/driver.h +++ b/include/linux/mlx4/driver.h | |||
| @@ -37,6 +37,8 @@ | |||
| 37 | 37 | ||
| 38 | struct mlx4_dev; | 38 | struct mlx4_dev; |
| 39 | 39 | ||
| 40 | #define MLX4_MAC_MASK 0xffffffffffffULL | ||
| 41 | |||
| 40 | enum mlx4_dev_event { | 42 | enum mlx4_dev_event { |
| 41 | MLX4_DEV_EVENT_CATASTROPHIC_ERROR, | 43 | MLX4_DEV_EVENT_CATASTROPHIC_ERROR, |
| 42 | MLX4_DEV_EVENT_PORT_UP, | 44 | MLX4_DEV_EVENT_PORT_UP, |
diff --git a/include/linux/net.h b/include/linux/net.h index e9ac2df079ba..99276c3dc89a 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
| @@ -72,6 +72,7 @@ struct net; | |||
| 72 | #define SOCK_NOSPACE 2 | 72 | #define SOCK_NOSPACE 2 |
| 73 | #define SOCK_PASSCRED 3 | 73 | #define SOCK_PASSCRED 3 |
| 74 | #define SOCK_PASSSEC 4 | 74 | #define SOCK_PASSSEC 4 |
| 75 | #define SOCK_EXTERNALLY_ALLOCATED 5 | ||
| 75 | 76 | ||
| 76 | #ifndef ARCH_HAS_SOCKET_TYPES | 77 | #ifndef ARCH_HAS_SOCKET_TYPES |
| 77 | /** | 78 | /** |
| @@ -247,6 +248,7 @@ extern int sock_recvmsg(struct socket *sock, struct msghdr *msg, | |||
| 247 | size_t size, int flags); | 248 | size_t size, int flags); |
| 248 | extern int sock_map_fd(struct socket *sock, int flags); | 249 | extern int sock_map_fd(struct socket *sock, int flags); |
| 249 | extern struct socket *sockfd_lookup(int fd, int *err); | 250 | extern struct socket *sockfd_lookup(int fd, int *err); |
| 251 | extern struct socket *sock_from_file(struct file *file, int *err); | ||
| 250 | #define sockfd_put(sock) fput(sock->file) | 252 | #define sockfd_put(sock) fput(sock->file) |
| 251 | extern int net_ratelimit(void); | 253 | extern int net_ratelimit(void); |
| 252 | 254 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index d94cb1431519..eb06e58bed0b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1046,10 +1046,9 @@ struct net_device { | |||
| 1046 | */ | 1046 | */ |
| 1047 | char name[IFNAMSIZ]; | 1047 | char name[IFNAMSIZ]; |
| 1048 | 1048 | ||
| 1049 | struct pm_qos_request pm_qos_req; | 1049 | /* device name hash chain, please keep it close to name[] */ |
| 1050 | |||
| 1051 | /* device name hash chain */ | ||
| 1052 | struct hlist_node name_hlist; | 1050 | struct hlist_node name_hlist; |
| 1051 | |||
| 1053 | /* snmp alias */ | 1052 | /* snmp alias */ |
| 1054 | char *ifalias; | 1053 | char *ifalias; |
| 1055 | 1054 | ||
| @@ -1322,6 +1321,8 @@ struct net_device { | |||
| 1322 | 1321 | ||
| 1323 | /* group the device belongs to */ | 1322 | /* group the device belongs to */ |
| 1324 | int group; | 1323 | int group; |
| 1324 | |||
| 1325 | struct pm_qos_request pm_qos_req; | ||
| 1325 | }; | 1326 | }; |
| 1326 | #define to_net_dev(d) container_of(d, struct net_device, dev) | 1327 | #define to_net_dev(d) container_of(d, struct net_device, dev) |
| 1327 | 1328 | ||
| @@ -1626,6 +1627,7 @@ extern int dev_alloc_name(struct net_device *dev, const char *name); | |||
| 1626 | extern int dev_open(struct net_device *dev); | 1627 | extern int dev_open(struct net_device *dev); |
| 1627 | extern int dev_close(struct net_device *dev); | 1628 | extern int dev_close(struct net_device *dev); |
| 1628 | extern void dev_disable_lro(struct net_device *dev); | 1629 | extern void dev_disable_lro(struct net_device *dev); |
| 1630 | extern int dev_loopback_xmit(struct sk_buff *newskb); | ||
| 1629 | extern int dev_queue_xmit(struct sk_buff *skb); | 1631 | extern int dev_queue_xmit(struct sk_buff *skb); |
| 1630 | extern int register_netdevice(struct net_device *dev); | 1632 | extern int register_netdevice(struct net_device *dev); |
| 1631 | extern void unregister_netdevice_queue(struct net_device *dev, | 1633 | extern void unregister_netdevice_queue(struct net_device *dev, |
| @@ -2108,7 +2110,12 @@ static inline int netif_set_real_num_rx_queues(struct net_device *dev, | |||
| 2108 | static inline int netif_copy_real_num_queues(struct net_device *to_dev, | 2110 | static inline int netif_copy_real_num_queues(struct net_device *to_dev, |
| 2109 | const struct net_device *from_dev) | 2111 | const struct net_device *from_dev) |
| 2110 | { | 2112 | { |
| 2111 | netif_set_real_num_tx_queues(to_dev, from_dev->real_num_tx_queues); | 2113 | int err; |
| 2114 | |||
| 2115 | err = netif_set_real_num_tx_queues(to_dev, | ||
| 2116 | from_dev->real_num_tx_queues); | ||
| 2117 | if (err) | ||
| 2118 | return err; | ||
| 2112 | #ifdef CONFIG_RPS | 2119 | #ifdef CONFIG_RPS |
| 2113 | return netif_set_real_num_rx_queues(to_dev, | 2120 | return netif_set_real_num_rx_queues(to_dev, |
| 2114 | from_dev->real_num_rx_queues); | 2121 | from_dev->real_num_rx_queues); |
| @@ -2117,6 +2124,9 @@ static inline int netif_copy_real_num_queues(struct net_device *to_dev, | |||
| 2117 | #endif | 2124 | #endif |
| 2118 | } | 2125 | } |
| 2119 | 2126 | ||
| 2127 | #define DEFAULT_MAX_NUM_RSS_QUEUES (8) | ||
| 2128 | extern int netif_get_num_default_rss_queues(void); | ||
| 2129 | |||
| 2120 | /* Use this variant when it is known for sure that it | 2130 | /* Use this variant when it is known for sure that it |
| 2121 | * is executing from hardware interrupt context or with hardware interrupts | 2131 | * is executing from hardware interrupt context or with hardware interrupts |
| 2122 | * disabled. | 2132 | * disabled. |
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h index ff9c84c29b28..c613cf0d7884 100644 --- a/include/linux/netfilter.h +++ b/include/linux/netfilter.h | |||
| @@ -94,6 +94,16 @@ static inline int nf_inet_addr_cmp(const union nf_inet_addr *a1, | |||
| 94 | a1->all[3] == a2->all[3]; | 94 | a1->all[3] == a2->all[3]; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | static inline void nf_inet_addr_mask(const union nf_inet_addr *a1, | ||
| 98 | union nf_inet_addr *result, | ||
| 99 | const union nf_inet_addr *mask) | ||
| 100 | { | ||
| 101 | result->all[0] = a1->all[0] & mask->all[0]; | ||
| 102 | result->all[1] = a1->all[1] & mask->all[1]; | ||
| 103 | result->all[2] = a1->all[2] & mask->all[2]; | ||
| 104 | result->all[3] = a1->all[3] & mask->all[3]; | ||
| 105 | } | ||
| 106 | |||
| 97 | extern void netfilter_init(void); | 107 | extern void netfilter_init(void); |
| 98 | 108 | ||
| 99 | /* Largest hook number + 1 */ | 109 | /* Largest hook number + 1 */ |
| @@ -383,6 +393,22 @@ nf_nat_decode_session(struct sk_buff *skb, struct flowi *fl, u_int8_t family) | |||
| 383 | extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *) __rcu; | 393 | extern void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *) __rcu; |
| 384 | extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); | 394 | extern void nf_ct_attach(struct sk_buff *, struct sk_buff *); |
| 385 | extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu; | 395 | extern void (*nf_ct_destroy)(struct nf_conntrack *) __rcu; |
| 396 | |||
| 397 | struct nf_conn; | ||
| 398 | struct nlattr; | ||
| 399 | |||
| 400 | struct nfq_ct_hook { | ||
| 401 | size_t (*build_size)(const struct nf_conn *ct); | ||
| 402 | int (*build)(struct sk_buff *skb, struct nf_conn *ct); | ||
| 403 | int (*parse)(const struct nlattr *attr, struct nf_conn *ct); | ||
| 404 | }; | ||
| 405 | extern struct nfq_ct_hook __rcu *nfq_ct_hook; | ||
| 406 | |||
| 407 | struct nfq_ct_nat_hook { | ||
| 408 | void (*seq_adjust)(struct sk_buff *skb, struct nf_conn *ct, | ||
| 409 | u32 ctinfo, int off); | ||
| 410 | }; | ||
| 411 | extern struct nfq_ct_nat_hook __rcu *nfq_ct_nat_hook; | ||
| 386 | #else | 412 | #else |
| 387 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} | 413 | static inline void nf_ct_attach(struct sk_buff *new, struct sk_buff *skb) {} |
| 388 | #endif | 414 | #endif |
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index 1697036336b6..874ae8f2706b 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild | |||
| @@ -10,6 +10,7 @@ header-y += nfnetlink.h | |||
| 10 | header-y += nfnetlink_acct.h | 10 | header-y += nfnetlink_acct.h |
| 11 | header-y += nfnetlink_compat.h | 11 | header-y += nfnetlink_compat.h |
| 12 | header-y += nfnetlink_conntrack.h | 12 | header-y += nfnetlink_conntrack.h |
| 13 | header-y += nfnetlink_cthelper.h | ||
| 13 | header-y += nfnetlink_cttimeout.h | 14 | header-y += nfnetlink_cttimeout.h |
| 14 | header-y += nfnetlink_log.h | 15 | header-y += nfnetlink_log.h |
| 15 | header-y += nfnetlink_queue.h | 16 | header-y += nfnetlink_queue.h |
diff --git a/include/linux/netfilter/nf_conntrack_sip.h b/include/linux/netfilter/nf_conntrack_sip.h index 0ce91d56a5f2..0dfc8b7210a3 100644 --- a/include/linux/netfilter/nf_conntrack_sip.h +++ b/include/linux/netfilter/nf_conntrack_sip.h | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | #define __NF_CONNTRACK_SIP_H__ | 2 | #define __NF_CONNTRACK_SIP_H__ |
| 3 | #ifdef __KERNEL__ | 3 | #ifdef __KERNEL__ |
| 4 | 4 | ||
| 5 | #include <net/netfilter/nf_conntrack_expect.h> | ||
| 6 | |||
| 5 | #define SIP_PORT 5060 | 7 | #define SIP_PORT 5060 |
| 6 | #define SIP_TIMEOUT 3600 | 8 | #define SIP_TIMEOUT 3600 |
| 7 | 9 | ||
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h index a1048c1587d1..18341cdb2443 100644 --- a/include/linux/netfilter/nfnetlink.h +++ b/include/linux/netfilter/nfnetlink.h | |||
| @@ -50,7 +50,8 @@ struct nfgenmsg { | |||
| 50 | #define NFNL_SUBSYS_IPSET 6 | 50 | #define NFNL_SUBSYS_IPSET 6 |
| 51 | #define NFNL_SUBSYS_ACCT 7 | 51 | #define NFNL_SUBSYS_ACCT 7 |
| 52 | #define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8 | 52 | #define NFNL_SUBSYS_CTNETLINK_TIMEOUT 8 |
| 53 | #define NFNL_SUBSYS_COUNT 9 | 53 | #define NFNL_SUBSYS_CTHELPER 9 |
| 54 | #define NFNL_SUBSYS_COUNT 10 | ||
| 54 | 55 | ||
| 55 | #ifdef __KERNEL__ | 56 | #ifdef __KERNEL__ |
| 56 | 57 | ||
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h index e58e4b93c108..f649f7423ca2 100644 --- a/include/linux/netfilter/nfnetlink_conntrack.h +++ b/include/linux/netfilter/nfnetlink_conntrack.h | |||
| @@ -7,6 +7,8 @@ enum cntl_msg_types { | |||
| 7 | IPCTNL_MSG_CT_GET, | 7 | IPCTNL_MSG_CT_GET, |
| 8 | IPCTNL_MSG_CT_DELETE, | 8 | IPCTNL_MSG_CT_DELETE, |
| 9 | IPCTNL_MSG_CT_GET_CTRZERO, | 9 | IPCTNL_MSG_CT_GET_CTRZERO, |
| 10 | IPCTNL_MSG_CT_GET_STATS_CPU, | ||
| 11 | IPCTNL_MSG_CT_GET_STATS, | ||
| 10 | 12 | ||
| 11 | IPCTNL_MSG_MAX | 13 | IPCTNL_MSG_MAX |
| 12 | }; | 14 | }; |
| @@ -15,6 +17,7 @@ enum ctnl_exp_msg_types { | |||
| 15 | IPCTNL_MSG_EXP_NEW, | 17 | IPCTNL_MSG_EXP_NEW, |
| 16 | IPCTNL_MSG_EXP_GET, | 18 | IPCTNL_MSG_EXP_GET, |
| 17 | IPCTNL_MSG_EXP_DELETE, | 19 | IPCTNL_MSG_EXP_DELETE, |
| 20 | IPCTNL_MSG_EXP_GET_STATS_CPU, | ||
| 18 | 21 | ||
| 19 | IPCTNL_MSG_EXP_MAX | 22 | IPCTNL_MSG_EXP_MAX |
| 20 | }; | 23 | }; |
| @@ -191,6 +194,7 @@ enum ctattr_expect_nat { | |||
| 191 | enum ctattr_help { | 194 | enum ctattr_help { |
| 192 | CTA_HELP_UNSPEC, | 195 | CTA_HELP_UNSPEC, |
| 193 | CTA_HELP_NAME, | 196 | CTA_HELP_NAME, |
| 197 | CTA_HELP_INFO, | ||
| 194 | __CTA_HELP_MAX | 198 | __CTA_HELP_MAX |
| 195 | }; | 199 | }; |
| 196 | #define CTA_HELP_MAX (__CTA_HELP_MAX - 1) | 200 | #define CTA_HELP_MAX (__CTA_HELP_MAX - 1) |
| @@ -202,4 +206,39 @@ enum ctattr_secctx { | |||
| 202 | }; | 206 | }; |
| 203 | #define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1) | 207 | #define CTA_SECCTX_MAX (__CTA_SECCTX_MAX - 1) |
| 204 | 208 | ||
| 209 | enum ctattr_stats_cpu { | ||
| 210 | CTA_STATS_UNSPEC, | ||
| 211 | CTA_STATS_SEARCHED, | ||
| 212 | CTA_STATS_FOUND, | ||
| 213 | CTA_STATS_NEW, | ||
| 214 | CTA_STATS_INVALID, | ||
| 215 | CTA_STATS_IGNORE, | ||
| 216 | CTA_STATS_DELETE, | ||
| 217 | CTA_STATS_DELETE_LIST, | ||
| 218 | CTA_STATS_INSERT, | ||
| 219 | CTA_STATS_INSERT_FAILED, | ||
| 220 | CTA_STATS_DROP, | ||
| 221 | CTA_STATS_EARLY_DROP, | ||
| 222 | CTA_STATS_ERROR, | ||
| 223 | CTA_STATS_SEARCH_RESTART, | ||
| 224 | __CTA_STATS_MAX, | ||
| 225 | }; | ||
| 226 | #define CTA_STATS_MAX (__CTA_STATS_MAX - 1) | ||
| 227 | |||
| 228 | enum ctattr_stats_global { | ||
| 229 | CTA_STATS_GLOBAL_UNSPEC, | ||
| 230 | CTA_STATS_GLOBAL_ENTRIES, | ||
| 231 | __CTA_STATS_GLOBAL_MAX, | ||
| 232 | }; | ||
| 233 | #define CTA_STATS_GLOBAL_MAX (__CTA_STATS_GLOBAL_MAX - 1) | ||
| 234 | |||
| 235 | enum ctattr_expect_stats { | ||
| 236 | CTA_STATS_EXP_UNSPEC, | ||
| 237 | CTA_STATS_EXP_NEW, | ||
| 238 | CTA_STATS_EXP_CREATE, | ||
| 239 | CTA_STATS_EXP_DELETE, | ||
| 240 | __CTA_STATS_EXP_MAX, | ||
| 241 | }; | ||
| 242 | #define CTA_STATS_EXP_MAX (__CTA_STATS_EXP_MAX - 1) | ||
| 243 | |||
| 205 | #endif /* _IPCONNTRACK_NETLINK_H */ | 244 | #endif /* _IPCONNTRACK_NETLINK_H */ |
diff --git a/include/linux/netfilter/nfnetlink_cthelper.h b/include/linux/netfilter/nfnetlink_cthelper.h new file mode 100644 index 000000000000..33659f6fad3e --- /dev/null +++ b/include/linux/netfilter/nfnetlink_cthelper.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | #ifndef _NFNL_CTHELPER_H_ | ||
| 2 | #define _NFNL_CTHELPER_H_ | ||
| 3 | |||
| 4 | #define NFCT_HELPER_STATUS_DISABLED 0 | ||
| 5 | #define NFCT_HELPER_STATUS_ENABLED 1 | ||
| 6 | |||
| 7 | enum nfnl_acct_msg_types { | ||
| 8 | NFNL_MSG_CTHELPER_NEW, | ||
| 9 | NFNL_MSG_CTHELPER_GET, | ||
| 10 | NFNL_MSG_CTHELPER_DEL, | ||
| 11 | NFNL_MSG_CTHELPER_MAX | ||
| 12 | }; | ||
| 13 | |||
| 14 | enum nfnl_cthelper_type { | ||
| 15 | NFCTH_UNSPEC, | ||
| 16 | NFCTH_NAME, | ||
| 17 | NFCTH_TUPLE, | ||
| 18 | NFCTH_QUEUE_NUM, | ||
| 19 | NFCTH_POLICY, | ||
| 20 | NFCTH_PRIV_DATA_LEN, | ||
| 21 | NFCTH_STATUS, | ||
| 22 | __NFCTH_MAX | ||
| 23 | }; | ||
| 24 | #define NFCTH_MAX (__NFCTH_MAX - 1) | ||
| 25 | |||
| 26 | enum nfnl_cthelper_policy_type { | ||
| 27 | NFCTH_POLICY_SET_UNSPEC, | ||
| 28 | NFCTH_POLICY_SET_NUM, | ||
| 29 | NFCTH_POLICY_SET, | ||
| 30 | NFCTH_POLICY_SET1 = NFCTH_POLICY_SET, | ||
| 31 | NFCTH_POLICY_SET2, | ||
| 32 | NFCTH_POLICY_SET3, | ||
| 33 | NFCTH_POLICY_SET4, | ||
| 34 | __NFCTH_POLICY_SET_MAX | ||
| 35 | }; | ||
| 36 | #define NFCTH_POLICY_SET_MAX (__NFCTH_POLICY_SET_MAX - 1) | ||
| 37 | |||
| 38 | enum nfnl_cthelper_pol_type { | ||
| 39 | NFCTH_POLICY_UNSPEC, | ||
| 40 | NFCTH_POLICY_NAME, | ||
| 41 | NFCTH_POLICY_EXPECT_MAX, | ||
| 42 | NFCTH_POLICY_EXPECT_TIMEOUT, | ||
| 43 | __NFCTH_POLICY_MAX | ||
| 44 | }; | ||
| 45 | #define NFCTH_POLICY_MAX (__NFCTH_POLICY_MAX - 1) | ||
| 46 | |||
| 47 | enum nfnl_cthelper_tuple_type { | ||
| 48 | NFCTH_TUPLE_UNSPEC, | ||
| 49 | NFCTH_TUPLE_L3PROTONUM, | ||
| 50 | NFCTH_TUPLE_L4PROTONUM, | ||
| 51 | __NFCTH_TUPLE_MAX, | ||
| 52 | }; | ||
| 53 | #define NFCTH_TUPLE_MAX (__NFCTH_TUPLE_MAX - 1) | ||
| 54 | |||
| 55 | #endif /* _NFNL_CTHELPER_H */ | ||
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h index 24b32e6c009e..3b1c1360aedf 100644 --- a/include/linux/netfilter/nfnetlink_queue.h +++ b/include/linux/netfilter/nfnetlink_queue.h | |||
| @@ -42,6 +42,8 @@ enum nfqnl_attr_type { | |||
| 42 | NFQA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */ | 42 | NFQA_IFINDEX_PHYSOUTDEV, /* __u32 ifindex */ |
| 43 | NFQA_HWADDR, /* nfqnl_msg_packet_hw */ | 43 | NFQA_HWADDR, /* nfqnl_msg_packet_hw */ |
| 44 | NFQA_PAYLOAD, /* opaque data payload */ | 44 | NFQA_PAYLOAD, /* opaque data payload */ |
| 45 | NFQA_CT, /* nf_conntrack_netlink.h */ | ||
| 46 | NFQA_CT_INFO, /* enum ip_conntrack_info */ | ||
| 45 | 47 | ||
| 46 | __NFQA_MAX | 48 | __NFQA_MAX |
| 47 | }; | 49 | }; |
| @@ -84,8 +86,15 @@ enum nfqnl_attr_config { | |||
| 84 | NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */ | 86 | NFQA_CFG_CMD, /* nfqnl_msg_config_cmd */ |
| 85 | NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */ | 87 | NFQA_CFG_PARAMS, /* nfqnl_msg_config_params */ |
| 86 | NFQA_CFG_QUEUE_MAXLEN, /* __u32 */ | 88 | NFQA_CFG_QUEUE_MAXLEN, /* __u32 */ |
| 89 | NFQA_CFG_MASK, /* identify which flags to change */ | ||
| 90 | NFQA_CFG_FLAGS, /* value of these flags (__u32) */ | ||
| 87 | __NFQA_CFG_MAX | 91 | __NFQA_CFG_MAX |
| 88 | }; | 92 | }; |
| 89 | #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1) | 93 | #define NFQA_CFG_MAX (__NFQA_CFG_MAX-1) |
| 90 | 94 | ||
| 95 | /* Flags for NFQA_CFG_FLAGS */ | ||
| 96 | #define NFQA_CFG_F_FAIL_OPEN (1 << 0) | ||
| 97 | #define NFQA_CFG_F_CONNTRACK (1 << 1) | ||
| 98 | #define NFQA_CFG_F_MAX (1 << 2) | ||
| 99 | |||
| 91 | #endif /* _NFNETLINK_QUEUE_H */ | 100 | #endif /* _NFNETLINK_QUEUE_H */ |
diff --git a/include/linux/netfilter/xt_connlimit.h b/include/linux/netfilter/xt_connlimit.h index d1366f05d1b2..f1656096121e 100644 --- a/include/linux/netfilter/xt_connlimit.h +++ b/include/linux/netfilter/xt_connlimit.h | |||
| @@ -22,13 +22,8 @@ struct xt_connlimit_info { | |||
| 22 | #endif | 22 | #endif |
| 23 | }; | 23 | }; |
| 24 | unsigned int limit; | 24 | unsigned int limit; |
| 25 | union { | 25 | /* revision 1 */ |
| 26 | /* revision 0 */ | 26 | __u32 flags; |
| 27 | unsigned int inverse; | ||
| 28 | |||
| 29 | /* revision 1 */ | ||
| 30 | __u32 flags; | ||
| 31 | }; | ||
| 32 | 27 | ||
| 33 | /* Used internally by the kernel */ | 28 | /* Used internally by the kernel */ |
| 34 | struct xt_connlimit_data *data __attribute__((aligned(8))); | 29 | struct xt_connlimit_data *data __attribute__((aligned(8))); |
diff --git a/include/linux/netfilter/xt_recent.h b/include/linux/netfilter/xt_recent.h index 83318e01425e..6ef36c113e89 100644 --- a/include/linux/netfilter/xt_recent.h +++ b/include/linux/netfilter/xt_recent.h | |||
| @@ -32,4 +32,14 @@ struct xt_recent_mtinfo { | |||
| 32 | __u8 side; | 32 | __u8 side; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | struct xt_recent_mtinfo_v1 { | ||
| 36 | __u32 seconds; | ||
| 37 | __u32 hit_count; | ||
| 38 | __u8 check_set; | ||
| 39 | __u8 invert; | ||
| 40 | char name[XT_RECENT_NAME_LEN]; | ||
| 41 | __u8 side; | ||
| 42 | union nf_inet_addr mask; | ||
| 43 | }; | ||
| 44 | |||
| 35 | #endif /* _LINUX_NETFILTER_XT_RECENT_H */ | 45 | #endif /* _LINUX_NETFILTER_XT_RECENT_H */ |
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h index fa0946c549d3..e2b12801378d 100644 --- a/include/linux/netfilter_ipv4.h +++ b/include/linux/netfilter_ipv4.h | |||
| @@ -66,6 +66,7 @@ enum nf_ip_hook_priorities { | |||
| 66 | NF_IP_PRI_SECURITY = 50, | 66 | NF_IP_PRI_SECURITY = 50, |
| 67 | NF_IP_PRI_NAT_SRC = 100, | 67 | NF_IP_PRI_NAT_SRC = 100, |
| 68 | NF_IP_PRI_SELINUX_LAST = 225, | 68 | NF_IP_PRI_SELINUX_LAST = 225, |
| 69 | NF_IP_PRI_CONNTRACK_HELPER = 300, | ||
| 69 | NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX, | 70 | NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX, |
| 70 | NF_IP_PRI_LAST = INT_MAX, | 71 | NF_IP_PRI_LAST = INT_MAX, |
| 71 | }; | 72 | }; |
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild index c61b8fb1a9ef..8ba0c5b72ea9 100644 --- a/include/linux/netfilter_ipv4/Kbuild +++ b/include/linux/netfilter_ipv4/Kbuild | |||
| @@ -5,7 +5,6 @@ header-y += ipt_LOG.h | |||
| 5 | header-y += ipt_REJECT.h | 5 | header-y += ipt_REJECT.h |
| 6 | header-y += ipt_TTL.h | 6 | header-y += ipt_TTL.h |
| 7 | header-y += ipt_ULOG.h | 7 | header-y += ipt_ULOG.h |
| 8 | header-y += ipt_addrtype.h | ||
| 9 | header-y += ipt_ah.h | 8 | header-y += ipt_ah.h |
| 10 | header-y += ipt_ecn.h | 9 | header-y += ipt_ecn.h |
| 11 | header-y += ipt_ttl.h | 10 | header-y += ipt_ttl.h |
diff --git a/include/linux/netfilter_ipv4/ipt_addrtype.h b/include/linux/netfilter_ipv4/ipt_addrtype.h deleted file mode 100644 index 0da42237c8da..000000000000 --- a/include/linux/netfilter_ipv4/ipt_addrtype.h +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | #ifndef _IPT_ADDRTYPE_H | ||
| 2 | #define _IPT_ADDRTYPE_H | ||
| 3 | |||
| 4 | #include <linux/types.h> | ||
| 5 | |||
| 6 | enum { | ||
| 7 | IPT_ADDRTYPE_INVERT_SOURCE = 0x0001, | ||
| 8 | IPT_ADDRTYPE_INVERT_DEST = 0x0002, | ||
| 9 | IPT_ADDRTYPE_LIMIT_IFACE_IN = 0x0004, | ||
| 10 | IPT_ADDRTYPE_LIMIT_IFACE_OUT = 0x0008, | ||
| 11 | }; | ||
| 12 | |||
| 13 | struct ipt_addrtype_info_v1 { | ||
| 14 | __u16 source; /* source-type mask */ | ||
| 15 | __u16 dest; /* dest-type mask */ | ||
| 16 | __u32 flags; | ||
| 17 | }; | ||
| 18 | |||
| 19 | /* revision 0 */ | ||
| 20 | struct ipt_addrtype_info { | ||
| 21 | __u16 source; /* source-type mask */ | ||
| 22 | __u16 dest; /* dest-type mask */ | ||
| 23 | __u32 invert_source; | ||
| 24 | __u32 invert_dest; | ||
| 25 | }; | ||
| 26 | |||
| 27 | #endif | ||
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 57c025127f1d..7c8a513ce7a3 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h | |||
| @@ -71,6 +71,7 @@ enum nf_ip6_hook_priorities { | |||
| 71 | NF_IP6_PRI_SECURITY = 50, | 71 | NF_IP6_PRI_SECURITY = 50, |
| 72 | NF_IP6_PRI_NAT_SRC = 100, | 72 | NF_IP6_PRI_NAT_SRC = 100, |
| 73 | NF_IP6_PRI_SELINUX_LAST = 225, | 73 | NF_IP6_PRI_SELINUX_LAST = 225, |
| 74 | NF_IP6_PRI_CONNTRACK_HELPER = 300, | ||
| 74 | NF_IP6_PRI_LAST = INT_MAX, | 75 | NF_IP6_PRI_LAST = INT_MAX, |
| 75 | }; | 76 | }; |
| 76 | 77 | ||
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 0f628ffa420c..f74dd133788f 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
| @@ -174,11 +174,17 @@ struct netlink_skb_parms { | |||
| 174 | extern void netlink_table_grab(void); | 174 | extern void netlink_table_grab(void); |
| 175 | extern void netlink_table_ungrab(void); | 175 | extern void netlink_table_ungrab(void); |
| 176 | 176 | ||
| 177 | extern struct sock *netlink_kernel_create(struct net *net, | 177 | /* optional Netlink kernel configuration parameters */ |
| 178 | int unit,unsigned int groups, | 178 | struct netlink_kernel_cfg { |
| 179 | void (*input)(struct sk_buff *skb), | 179 | unsigned int groups; |
| 180 | struct mutex *cb_mutex, | 180 | void (*input)(struct sk_buff *skb); |
| 181 | struct module *module); | 181 | struct mutex *cb_mutex; |
| 182 | void (*bind)(int group); | ||
| 183 | }; | ||
| 184 | |||
| 185 | extern struct sock *netlink_kernel_create(struct net *net, int unit, | ||
| 186 | struct module *module, | ||
| 187 | struct netlink_kernel_cfg *cfg); | ||
| 182 | extern void netlink_kernel_release(struct sock *sk); | 188 | extern void netlink_kernel_release(struct sock *sk); |
| 183 | extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups); | 189 | extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups); |
| 184 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); | 190 | extern int netlink_change_ngroups(struct sock *sk, unsigned int groups); |
| @@ -241,14 +247,6 @@ struct netlink_notify { | |||
| 241 | struct nlmsghdr * | 247 | struct nlmsghdr * |
| 242 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags); | 248 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags); |
| 243 | 249 | ||
| 244 | #define NLMSG_NEW(skb, pid, seq, type, len, flags) \ | ||
| 245 | ({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \ | ||
| 246 | goto nlmsg_failure; \ | ||
| 247 | __nlmsg_put(skb, pid, seq, type, len, flags); }) | ||
| 248 | |||
| 249 | #define NLMSG_PUT(skb, pid, seq, type, len) \ | ||
| 250 | NLMSG_NEW(skb, pid, seq, type, len, 0) | ||
| 251 | |||
| 252 | struct netlink_dump_control { | 250 | struct netlink_dump_control { |
| 253 | int (*dump)(struct sk_buff *skb, struct netlink_callback *); | 251 | int (*dump)(struct sk_buff *skb, struct netlink_callback *); |
| 254 | int (*done)(struct netlink_callback*); | 252 | int (*done)(struct netlink_callback*); |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 5dfa091c3347..28f5389c924b 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -43,7 +43,7 @@ struct netpoll_info { | |||
| 43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); | 43 | void netpoll_send_udp(struct netpoll *np, const char *msg, int len); |
| 44 | void netpoll_print_options(struct netpoll *np); | 44 | void netpoll_print_options(struct netpoll *np); |
| 45 | int netpoll_parse_options(struct netpoll *np, char *opt); | 45 | int netpoll_parse_options(struct netpoll *np, char *opt); |
| 46 | int __netpoll_setup(struct netpoll *np); | 46 | int __netpoll_setup(struct netpoll *np, struct net_device *ndev); |
| 47 | int netpoll_setup(struct netpoll *np); | 47 | int netpoll_setup(struct netpoll *np); |
| 48 | int netpoll_trap(void); | 48 | int netpoll_trap(void); |
| 49 | void netpoll_set_trap(int trap); | 49 | void netpoll_set_trap(int trap); |
diff --git a/include/linux/nfc.h b/include/linux/nfc.h index 0ae9b5857c83..6189f27e305b 100644 --- a/include/linux/nfc.h +++ b/include/linux/nfc.h | |||
| @@ -56,6 +56,10 @@ | |||
| 56 | * %NFC_ATTR_PROTOCOLS) | 56 | * %NFC_ATTR_PROTOCOLS) |
| 57 | * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed | 57 | * @NFC_EVENT_DEVICE_REMOVED: event emitted when a device is removed |
| 58 | * (it sends %NFC_ATTR_DEVICE_INDEX) | 58 | * (it sends %NFC_ATTR_DEVICE_INDEX) |
| 59 | * @NFC_EVENT_TM_ACTIVATED: event emitted when the adapter is activated in | ||
| 60 | * target mode. | ||
| 61 | * @NFC_EVENT_DEVICE_DEACTIVATED: event emitted when the adapter is deactivated | ||
| 62 | * from target mode. | ||
| 59 | */ | 63 | */ |
| 60 | enum nfc_commands { | 64 | enum nfc_commands { |
| 61 | NFC_CMD_UNSPEC, | 65 | NFC_CMD_UNSPEC, |
| @@ -71,6 +75,8 @@ enum nfc_commands { | |||
| 71 | NFC_EVENT_DEVICE_ADDED, | 75 | NFC_EVENT_DEVICE_ADDED, |
| 72 | NFC_EVENT_DEVICE_REMOVED, | 76 | NFC_EVENT_DEVICE_REMOVED, |
| 73 | NFC_EVENT_TARGET_LOST, | 77 | NFC_EVENT_TARGET_LOST, |
| 78 | NFC_EVENT_TM_ACTIVATED, | ||
| 79 | NFC_EVENT_TM_DEACTIVATED, | ||
| 74 | /* private: internal use only */ | 80 | /* private: internal use only */ |
| 75 | __NFC_CMD_AFTER_LAST | 81 | __NFC_CMD_AFTER_LAST |
| 76 | }; | 82 | }; |
| @@ -94,6 +100,8 @@ enum nfc_commands { | |||
| 94 | * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes | 100 | * @NFC_ATTR_TARGET_SENSF_RES: NFC-F targets extra information, max 18 bytes |
| 95 | * @NFC_ATTR_COMM_MODE: Passive or active mode | 101 | * @NFC_ATTR_COMM_MODE: Passive or active mode |
| 96 | * @NFC_ATTR_RF_MODE: Initiator or target | 102 | * @NFC_ATTR_RF_MODE: Initiator or target |
| 103 | * @NFC_ATTR_IM_PROTOCOLS: Initiator mode protocols to poll for | ||
| 104 | * @NFC_ATTR_TM_PROTOCOLS: Target mode protocols to listen for | ||
| 97 | */ | 105 | */ |
| 98 | enum nfc_attrs { | 106 | enum nfc_attrs { |
| 99 | NFC_ATTR_UNSPEC, | 107 | NFC_ATTR_UNSPEC, |
| @@ -109,6 +117,8 @@ enum nfc_attrs { | |||
| 109 | NFC_ATTR_COMM_MODE, | 117 | NFC_ATTR_COMM_MODE, |
| 110 | NFC_ATTR_RF_MODE, | 118 | NFC_ATTR_RF_MODE, |
| 111 | NFC_ATTR_DEVICE_POWERED, | 119 | NFC_ATTR_DEVICE_POWERED, |
| 120 | NFC_ATTR_IM_PROTOCOLS, | ||
| 121 | NFC_ATTR_TM_PROTOCOLS, | ||
| 112 | /* private: internal use only */ | 122 | /* private: internal use only */ |
| 113 | __NFC_ATTR_AFTER_LAST | 123 | __NFC_ATTR_AFTER_LAST |
| 114 | }; | 124 | }; |
| @@ -118,6 +128,7 @@ enum nfc_attrs { | |||
| 118 | #define NFC_NFCID1_MAXSIZE 10 | 128 | #define NFC_NFCID1_MAXSIZE 10 |
| 119 | #define NFC_SENSB_RES_MAXSIZE 12 | 129 | #define NFC_SENSB_RES_MAXSIZE 12 |
| 120 | #define NFC_SENSF_RES_MAXSIZE 18 | 130 | #define NFC_SENSF_RES_MAXSIZE 18 |
| 131 | #define NFC_GB_MAXSIZE 48 | ||
| 121 | 132 | ||
| 122 | /* NFC protocols */ | 133 | /* NFC protocols */ |
| 123 | #define NFC_PROTO_JEWEL 1 | 134 | #define NFC_PROTO_JEWEL 1 |
| @@ -125,8 +136,9 @@ enum nfc_attrs { | |||
| 125 | #define NFC_PROTO_FELICA 3 | 136 | #define NFC_PROTO_FELICA 3 |
| 126 | #define NFC_PROTO_ISO14443 4 | 137 | #define NFC_PROTO_ISO14443 4 |
| 127 | #define NFC_PROTO_NFC_DEP 5 | 138 | #define NFC_PROTO_NFC_DEP 5 |
| 139 | #define NFC_PROTO_ISO14443_B 6 | ||
| 128 | 140 | ||
| 129 | #define NFC_PROTO_MAX 6 | 141 | #define NFC_PROTO_MAX 7 |
| 130 | 142 | ||
| 131 | /* NFC communication modes */ | 143 | /* NFC communication modes */ |
| 132 | #define NFC_COMM_ACTIVE 0 | 144 | #define NFC_COMM_ACTIVE 0 |
| @@ -135,13 +147,15 @@ enum nfc_attrs { | |||
| 135 | /* NFC RF modes */ | 147 | /* NFC RF modes */ |
| 136 | #define NFC_RF_INITIATOR 0 | 148 | #define NFC_RF_INITIATOR 0 |
| 137 | #define NFC_RF_TARGET 1 | 149 | #define NFC_RF_TARGET 1 |
| 150 | #define NFC_RF_NONE 2 | ||
| 138 | 151 | ||
| 139 | /* NFC protocols masks used in bitsets */ | 152 | /* NFC protocols masks used in bitsets */ |
| 140 | #define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) | 153 | #define NFC_PROTO_JEWEL_MASK (1 << NFC_PROTO_JEWEL) |
| 141 | #define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE) | 154 | #define NFC_PROTO_MIFARE_MASK (1 << NFC_PROTO_MIFARE) |
| 142 | #define NFC_PROTO_FELICA_MASK (1 << NFC_PROTO_FELICA) | 155 | #define NFC_PROTO_FELICA_MASK (1 << NFC_PROTO_FELICA) |
| 143 | #define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443) | 156 | #define NFC_PROTO_ISO14443_MASK (1 << NFC_PROTO_ISO14443) |
| 144 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) | 157 | #define NFC_PROTO_NFC_DEP_MASK (1 << NFC_PROTO_NFC_DEP) |
| 158 | #define NFC_PROTO_ISO14443_B_MASK (1 << NFC_PROTO_ISO14443_B) | ||
| 145 | 159 | ||
| 146 | struct sockaddr_nfc { | 160 | struct sockaddr_nfc { |
| 147 | sa_family_t sa_family; | 161 | sa_family_t sa_family; |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index a6959f72745e..2f3878806403 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
| @@ -170,6 +170,8 @@ | |||
| 170 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, | 170 | * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS, |
| 171 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, | 171 | * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY, |
| 172 | * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. | 172 | * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT. |
| 173 | * The channel to use can be set on the interface or be given using the | ||
| 174 | * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_WIPHY_CHANNEL_TYPE attrs. | ||
| 173 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP | 175 | * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP |
| 174 | * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface | 176 | * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface |
| 175 | * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP | 177 | * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP |
| @@ -275,6 +277,12 @@ | |||
| 275 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | 277 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to |
| 276 | * NL80211_CMD_GET_SURVEY and on the "scan" multicast group) | 278 | * NL80211_CMD_GET_SURVEY and on the "scan" multicast group) |
| 277 | * | 279 | * |
| 280 | * @NL80211_CMD_SET_PMKSA: Add a PMKSA cache entry, using %NL80211_ATTR_MAC | ||
| 281 | * (for the BSSID) and %NL80211_ATTR_PMKID. | ||
| 282 | * @NL80211_CMD_DEL_PMKSA: Delete a PMKSA cache entry, using %NL80211_ATTR_MAC | ||
| 283 | * (for the BSSID) and %NL80211_ATTR_PMKID. | ||
| 284 | * @NL80211_CMD_FLUSH_PMKSA: Flush all PMKSA cache entries. | ||
| 285 | * | ||
| 278 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain | 286 | * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain |
| 279 | * has been changed and provides details of the request information | 287 | * has been changed and provides details of the request information |
| 280 | * that caused the change such as who initiated the regulatory request | 288 | * that caused the change such as who initiated the regulatory request |
| @@ -454,6 +462,10 @@ | |||
| 454 | * the frame. | 462 | * the frame. |
| 455 | * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for | 463 | * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for |
| 456 | * backward compatibility. | 464 | * backward compatibility. |
| 465 | * | ||
| 466 | * @NL80211_CMD_SET_POWER_SAVE: Set powersave, using %NL80211_ATTR_PS_STATE | ||
| 467 | * @NL80211_CMD_GET_POWER_SAVE: Get powersave status in %NL80211_ATTR_PS_STATE | ||
| 468 | * | ||
| 457 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command | 469 | * @NL80211_CMD_SET_CQM: Connection quality monitor configuration. This command |
| 458 | * is used to configure connection quality monitoring notification trigger | 470 | * is used to configure connection quality monitoring notification trigger |
| 459 | * levels. | 471 | * levels. |
| @@ -759,6 +771,9 @@ enum nl80211_commands { | |||
| 759 | * @NL80211_ATTR_IFNAME: network interface name | 771 | * @NL80211_ATTR_IFNAME: network interface name |
| 760 | * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype | 772 | * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype |
| 761 | * | 773 | * |
| 774 | * @NL80211_ATTR_WDEV: wireless device identifier, used for pseudo-devices | ||
| 775 | * that don't have a netdev (u64) | ||
| 776 | * | ||
| 762 | * @NL80211_ATTR_MAC: MAC address (various uses) | 777 | * @NL80211_ATTR_MAC: MAC address (various uses) |
| 763 | * | 778 | * |
| 764 | * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of | 779 | * @NL80211_ATTR_KEY_DATA: (temporal) key data; for TKIP this consists of |
| @@ -769,6 +784,13 @@ enum nl80211_commands { | |||
| 769 | * section 7.3.2.25.1, e.g. 0x000FAC04) | 784 | * section 7.3.2.25.1, e.g. 0x000FAC04) |
| 770 | * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | 785 | * @NL80211_ATTR_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and |
| 771 | * CCMP keys, each six bytes in little endian | 786 | * CCMP keys, each six bytes in little endian |
| 787 | * @NL80211_ATTR_KEY_DEFAULT: Flag attribute indicating the key is default key | ||
| 788 | * @NL80211_ATTR_KEY_DEFAULT_MGMT: Flag attribute indicating the key is the | ||
| 789 | * default management key | ||
| 790 | * @NL80211_ATTR_CIPHER_SUITES_PAIRWISE: For crypto settings for connect or | ||
| 791 | * other commands, indicates which pairwise cipher suites are used | ||
| 792 | * @NL80211_ATTR_CIPHER_SUITE_GROUP: For crypto settings for connect or | ||
| 793 | * other commands, indicates which group cipher suite is used | ||
| 772 | * | 794 | * |
| 773 | * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU | 795 | * @NL80211_ATTR_BEACON_INTERVAL: beacon interval in TU |
| 774 | * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing | 796 | * @NL80211_ATTR_DTIM_PERIOD: DTIM period for beaconing |
| @@ -1004,6 +1026,8 @@ enum nl80211_commands { | |||
| 1004 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was | 1026 | * @NL80211_ATTR_ACK: Flag attribute indicating that the frame was |
| 1005 | * acknowledged by the recipient. | 1027 | * acknowledged by the recipient. |
| 1006 | * | 1028 | * |
| 1029 | * @NL80211_ATTR_PS_STATE: powersave state, using &enum nl80211_ps_state values. | ||
| 1030 | * | ||
| 1007 | * @NL80211_ATTR_CQM: connection quality monitor configuration in a | 1031 | * @NL80211_ATTR_CQM: connection quality monitor configuration in a |
| 1008 | * nested attribute with %NL80211_ATTR_CQM_* sub-attributes. | 1032 | * nested attribute with %NL80211_ATTR_CQM_* sub-attributes. |
| 1009 | * | 1033 | * |
| @@ -1061,7 +1085,7 @@ enum nl80211_commands { | |||
| 1061 | * flag isn't set, the frame will be rejected. This is also used as an | 1085 | * flag isn't set, the frame will be rejected. This is also used as an |
| 1062 | * nl80211 capability flag. | 1086 | * nl80211 capability flag. |
| 1063 | * | 1087 | * |
| 1064 | * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16) | 1088 | * @NL80211_ATTR_BSS_HT_OPMODE: HT operation mode (u16) |
| 1065 | * | 1089 | * |
| 1066 | * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags | 1090 | * @NL80211_ATTR_KEY_DEFAULT_TYPES: A nested attribute containing flags |
| 1067 | * attributes, specifying what a key should be set as default as. | 1091 | * attributes, specifying what a key should be set as default as. |
| @@ -1085,10 +1109,10 @@ enum nl80211_commands { | |||
| 1085 | * indicate which WoW triggers should be enabled. This is also | 1109 | * indicate which WoW triggers should be enabled. This is also |
| 1086 | * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN | 1110 | * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN |
| 1087 | * triggers. | 1111 | * triggers. |
| 1088 | 1112 | * | |
| 1089 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan | 1113 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan |
| 1090 | * cycles, in msecs. | 1114 | * cycles, in msecs. |
| 1091 | 1115 | * | |
| 1092 | * @NL80211_ATTR_SCHED_SCAN_MATCH: Nested attribute with one or more | 1116 | * @NL80211_ATTR_SCHED_SCAN_MATCH: Nested attribute with one or more |
| 1093 | * sets of attributes to match during scheduled scans. Only BSSs | 1117 | * sets of attributes to match during scheduled scans. Only BSSs |
| 1094 | * that match any of the sets will be reported. These are | 1118 | * that match any of the sets will be reported. These are |
| @@ -1115,7 +1139,7 @@ enum nl80211_commands { | |||
| 1115 | * are managed in software: interfaces of these types aren't subject to | 1139 | * are managed in software: interfaces of these types aren't subject to |
| 1116 | * any restrictions in their number or combinations. | 1140 | * any restrictions in their number or combinations. |
| 1117 | * | 1141 | * |
| 1118 | * @%NL80211_ATTR_REKEY_DATA: nested attribute containing the information | 1142 | * @NL80211_ATTR_REKEY_DATA: nested attribute containing the information |
| 1119 | * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data. | 1143 | * necessary for GTK rekeying in the device, see &enum nl80211_rekey_data. |
| 1120 | * | 1144 | * |
| 1121 | * @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan, | 1145 | * @NL80211_ATTR_SCAN_SUPP_RATES: rates per to be advertised as supported in scan, |
| @@ -1182,7 +1206,6 @@ enum nl80211_commands { | |||
| 1182 | * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from | 1206 | * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from |
| 1183 | * &enum nl80211_feature_flags and is advertised in wiphy information. | 1207 | * &enum nl80211_feature_flags and is advertised in wiphy information. |
| 1184 | * @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe | 1208 | * @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe |
| 1185 | * | ||
| 1186 | * requests while operating in AP-mode. | 1209 | * requests while operating in AP-mode. |
| 1187 | * This attribute holds a bitmap of the supported protocols for | 1210 | * This attribute holds a bitmap of the supported protocols for |
| 1188 | * offloading (see &enum nl80211_probe_resp_offload_support_attr). | 1211 | * offloading (see &enum nl80211_probe_resp_offload_support_attr). |
| @@ -1222,6 +1245,12 @@ enum nl80211_commands { | |||
| 1222 | * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds | 1245 | * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds |
| 1223 | * or 0 to disable background scan. | 1246 | * or 0 to disable background scan. |
| 1224 | * | 1247 | * |
| 1248 | * @NL80211_ATTR_USER_REG_HINT_TYPE: type of regulatory hint passed from | ||
| 1249 | * userspace. If unset it is assumed the hint comes directly from | ||
| 1250 | * a user. If set code could specify exactly what type of source | ||
| 1251 | * was used to provide the hint. For the different types of | ||
| 1252 | * allowed user regulatory hints see nl80211_user_reg_hint_type. | ||
| 1253 | * | ||
| 1225 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1254 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 1226 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1255 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| 1227 | */ | 1256 | */ |
| @@ -1473,6 +1502,10 @@ enum nl80211_attrs { | |||
| 1473 | 1502 | ||
| 1474 | NL80211_ATTR_BG_SCAN_PERIOD, | 1503 | NL80211_ATTR_BG_SCAN_PERIOD, |
| 1475 | 1504 | ||
| 1505 | NL80211_ATTR_WDEV, | ||
| 1506 | |||
| 1507 | NL80211_ATTR_USER_REG_HINT_TYPE, | ||
| 1508 | |||
| 1476 | /* add attributes here, update the policy in nl80211.c */ | 1509 | /* add attributes here, update the policy in nl80211.c */ |
| 1477 | 1510 | ||
| 1478 | __NL80211_ATTR_AFTER_LAST, | 1511 | __NL80211_ATTR_AFTER_LAST, |
| @@ -1520,6 +1553,13 @@ enum nl80211_attrs { | |||
| 1520 | #define NL80211_MAX_NR_CIPHER_SUITES 5 | 1553 | #define NL80211_MAX_NR_CIPHER_SUITES 5 |
| 1521 | #define NL80211_MAX_NR_AKM_SUITES 2 | 1554 | #define NL80211_MAX_NR_AKM_SUITES 2 |
| 1522 | 1555 | ||
| 1556 | #define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10 | ||
| 1557 | |||
| 1558 | /* default RSSI threshold for scan results if none specified. */ | ||
| 1559 | #define NL80211_SCAN_RSSI_THOLD_OFF -300 | ||
| 1560 | |||
| 1561 | #define NL80211_CQM_TXE_MAX_INTVL 1800 | ||
| 1562 | |||
| 1523 | /** | 1563 | /** |
| 1524 | * enum nl80211_iftype - (virtual) interface types | 1564 | * enum nl80211_iftype - (virtual) interface types |
| 1525 | * | 1565 | * |
| @@ -1613,12 +1653,20 @@ struct nl80211_sta_flag_update { | |||
| 1613 | * | 1653 | * |
| 1614 | * These attribute types are used with %NL80211_STA_INFO_TXRATE | 1654 | * These attribute types are used with %NL80211_STA_INFO_TXRATE |
| 1615 | * when getting information about the bitrate of a station. | 1655 | * when getting information about the bitrate of a station. |
| 1656 | * There are 2 attributes for bitrate, a legacy one that represents | ||
| 1657 | * a 16-bit value, and new one that represents a 32-bit value. | ||
| 1658 | * If the rate value fits into 16 bit, both attributes are reported | ||
| 1659 | * with the same value. If the rate is too high to fit into 16 bits | ||
| 1660 | * (>6.5535Gbps) only 32-bit attribute is included. | ||
| 1661 | * User space tools encouraged to use the 32-bit attribute and fall | ||
| 1662 | * back to the 16-bit one for compatibility with older kernels. | ||
| 1616 | * | 1663 | * |
| 1617 | * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved | 1664 | * @__NL80211_RATE_INFO_INVALID: attribute number 0 is reserved |
| 1618 | * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s) | 1665 | * @NL80211_RATE_INFO_BITRATE: total bitrate (u16, 100kbit/s) |
| 1619 | * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8) | 1666 | * @NL80211_RATE_INFO_MCS: mcs index for 802.11n (u8) |
| 1620 | * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate | 1667 | * @NL80211_RATE_INFO_40_MHZ_WIDTH: 40 Mhz dualchannel bitrate |
| 1621 | * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval | 1668 | * @NL80211_RATE_INFO_SHORT_GI: 400ns guard interval |
| 1669 | * @NL80211_RATE_INFO_BITRATE32: total bitrate (u32, 100kbit/s) | ||
| 1622 | * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined | 1670 | * @NL80211_RATE_INFO_MAX: highest rate_info number currently defined |
| 1623 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use | 1671 | * @__NL80211_RATE_INFO_AFTER_LAST: internal use |
| 1624 | */ | 1672 | */ |
| @@ -1628,6 +1676,7 @@ enum nl80211_rate_info { | |||
| 1628 | NL80211_RATE_INFO_MCS, | 1676 | NL80211_RATE_INFO_MCS, |
| 1629 | NL80211_RATE_INFO_40_MHZ_WIDTH, | 1677 | NL80211_RATE_INFO_40_MHZ_WIDTH, |
| 1630 | NL80211_RATE_INFO_SHORT_GI, | 1678 | NL80211_RATE_INFO_SHORT_GI, |
| 1679 | NL80211_RATE_INFO_BITRATE32, | ||
| 1631 | 1680 | ||
| 1632 | /* keep last */ | 1681 | /* keep last */ |
| 1633 | __NL80211_RATE_INFO_AFTER_LAST, | 1682 | __NL80211_RATE_INFO_AFTER_LAST, |
| @@ -1788,6 +1837,9 @@ enum nl80211_mpath_info { | |||
| 1788 | * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE | 1837 | * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE |
| 1789 | * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n | 1838 | * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n |
| 1790 | * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n | 1839 | * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n |
| 1840 | * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as | ||
| 1841 | * defined in 802.11ac | ||
| 1842 | * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE | ||
| 1791 | * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined | 1843 | * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined |
| 1792 | * @__NL80211_BAND_ATTR_AFTER_LAST: internal use | 1844 | * @__NL80211_BAND_ATTR_AFTER_LAST: internal use |
| 1793 | */ | 1845 | */ |
| @@ -1801,6 +1853,9 @@ enum nl80211_band_attr { | |||
| 1801 | NL80211_BAND_ATTR_HT_AMPDU_FACTOR, | 1853 | NL80211_BAND_ATTR_HT_AMPDU_FACTOR, |
| 1802 | NL80211_BAND_ATTR_HT_AMPDU_DENSITY, | 1854 | NL80211_BAND_ATTR_HT_AMPDU_DENSITY, |
| 1803 | 1855 | ||
| 1856 | NL80211_BAND_ATTR_VHT_MCS_SET, | ||
| 1857 | NL80211_BAND_ATTR_VHT_CAPA, | ||
| 1858 | |||
| 1804 | /* keep last */ | 1859 | /* keep last */ |
| 1805 | __NL80211_BAND_ATTR_AFTER_LAST, | 1860 | __NL80211_BAND_ATTR_AFTER_LAST, |
| 1806 | NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 | 1861 | NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1 |
| @@ -1952,6 +2007,8 @@ enum nl80211_reg_rule_attr { | |||
| 1952 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved | 2007 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved |
| 1953 | * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching, | 2008 | * @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching, |
| 1954 | * only report BSS with matching SSID. | 2009 | * only report BSS with matching SSID. |
| 2010 | * @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a | ||
| 2011 | * BSS in scan results. Filtering is turned off if not specified. | ||
| 1955 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter | 2012 | * @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter |
| 1956 | * attribute number currently defined | 2013 | * attribute number currently defined |
| 1957 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use | 2014 | * @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use |
| @@ -1959,7 +2016,8 @@ enum nl80211_reg_rule_attr { | |||
| 1959 | enum nl80211_sched_scan_match_attr { | 2016 | enum nl80211_sched_scan_match_attr { |
| 1960 | __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID, | 2017 | __NL80211_SCHED_SCAN_MATCH_ATTR_INVALID, |
| 1961 | 2018 | ||
| 1962 | NL80211_ATTR_SCHED_SCAN_MATCH_SSID, | 2019 | NL80211_SCHED_SCAN_MATCH_ATTR_SSID, |
| 2020 | NL80211_SCHED_SCAN_MATCH_ATTR_RSSI, | ||
| 1963 | 2021 | ||
| 1964 | /* keep last */ | 2022 | /* keep last */ |
| 1965 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, | 2023 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST, |
| @@ -1967,6 +2025,9 @@ enum nl80211_sched_scan_match_attr { | |||
| 1967 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1 | 2025 | __NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST - 1 |
| 1968 | }; | 2026 | }; |
| 1969 | 2027 | ||
| 2028 | /* only for backward compatibility */ | ||
| 2029 | #define NL80211_ATTR_SCHED_SCAN_MATCH_SSID NL80211_SCHED_SCAN_MATCH_ATTR_SSID | ||
| 2030 | |||
| 1970 | /** | 2031 | /** |
| 1971 | * enum nl80211_reg_rule_flags - regulatory rule flags | 2032 | * enum nl80211_reg_rule_flags - regulatory rule flags |
| 1972 | * | 2033 | * |
| @@ -2008,6 +2069,26 @@ enum nl80211_dfs_regions { | |||
| 2008 | }; | 2069 | }; |
| 2009 | 2070 | ||
| 2010 | /** | 2071 | /** |
| 2072 | * enum nl80211_user_reg_hint_type - type of user regulatory hint | ||
| 2073 | * | ||
| 2074 | * @NL80211_USER_REG_HINT_USER: a user sent the hint. This is always | ||
| 2075 | * assumed if the attribute is not set. | ||
| 2076 | * @NL80211_USER_REG_HINT_CELL_BASE: the hint comes from a cellular | ||
| 2077 | * base station. Device drivers that have been tested to work | ||
| 2078 | * properly to support this type of hint can enable these hints | ||
| 2079 | * by setting the NL80211_FEATURE_CELL_BASE_REG_HINTS feature | ||
| 2080 | * capability on the struct wiphy. The wireless core will | ||
| 2081 | * ignore all cell base station hints until at least one device | ||
| 2082 | * present has been registered with the wireless core that | ||
| 2083 | * has listed NL80211_FEATURE_CELL_BASE_REG_HINTS as a | ||
| 2084 | * supported feature. | ||
| 2085 | */ | ||
| 2086 | enum nl80211_user_reg_hint_type { | ||
| 2087 | NL80211_USER_REG_HINT_USER = 0, | ||
| 2088 | NL80211_USER_REG_HINT_CELL_BASE = 1, | ||
| 2089 | }; | ||
| 2090 | |||
| 2091 | /** | ||
| 2011 | * enum nl80211_survey_info - survey information | 2092 | * enum nl80211_survey_info - survey information |
| 2012 | * | 2093 | * |
| 2013 | * These attribute types are used with %NL80211_ATTR_SURVEY_INFO | 2094 | * These attribute types are used with %NL80211_ATTR_SURVEY_INFO |
| @@ -2086,78 +2167,91 @@ enum nl80211_mntr_flags { | |||
| 2086 | * @__NL80211_MESHCONF_INVALID: internal use | 2167 | * @__NL80211_MESHCONF_INVALID: internal use |
| 2087 | * | 2168 | * |
| 2088 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in | 2169 | * @NL80211_MESHCONF_RETRY_TIMEOUT: specifies the initial retry timeout in |
| 2089 | * millisecond units, used by the Peer Link Open message | 2170 | * millisecond units, used by the Peer Link Open message |
| 2090 | * | 2171 | * |
| 2091 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in | 2172 | * @NL80211_MESHCONF_CONFIRM_TIMEOUT: specifies the initial confirm timeout, in |
| 2092 | * millisecond units, used by the peer link management to close a peer link | 2173 | * millisecond units, used by the peer link management to close a peer link |
| 2093 | * | 2174 | * |
| 2094 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in | 2175 | * @NL80211_MESHCONF_HOLDING_TIMEOUT: specifies the holding timeout, in |
| 2095 | * millisecond units | 2176 | * millisecond units |
| 2096 | * | 2177 | * |
| 2097 | * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed | 2178 | * @NL80211_MESHCONF_MAX_PEER_LINKS: maximum number of peer links allowed |
| 2098 | * on this mesh interface | 2179 | * on this mesh interface |
| 2099 | * | 2180 | * |
| 2100 | * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link | 2181 | * @NL80211_MESHCONF_MAX_RETRIES: specifies the maximum number of peer link |
| 2101 | * open retries that can be sent to establish a new peer link instance in a | 2182 | * open retries that can be sent to establish a new peer link instance in a |
| 2102 | * mesh | 2183 | * mesh |
| 2103 | * | 2184 | * |
| 2104 | * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh | 2185 | * @NL80211_MESHCONF_TTL: specifies the value of TTL field set at a source mesh |
| 2105 | * point. | 2186 | * point. |
| 2106 | * | 2187 | * |
| 2107 | * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically | 2188 | * @NL80211_MESHCONF_AUTO_OPEN_PLINKS: whether we should automatically |
| 2108 | * open peer links when we detect compatible mesh peers. | 2189 | * open peer links when we detect compatible mesh peers. |
| 2109 | * | 2190 | * |
| 2110 | * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames | 2191 | * @NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES: the number of action frames |
| 2111 | * containing a PREQ that an MP can send to a particular destination (path | 2192 | * containing a PREQ that an MP can send to a particular destination (path |
| 2112 | * target) | 2193 | * target) |
| 2113 | * | 2194 | * |
| 2114 | * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths | 2195 | * @NL80211_MESHCONF_PATH_REFRESH_TIME: how frequently to refresh mesh paths |
| 2115 | * (in milliseconds) | 2196 | * (in milliseconds) |
| 2116 | * | 2197 | * |
| 2117 | * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait | 2198 | * @NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT: minimum length of time to wait |
| 2118 | * until giving up on a path discovery (in milliseconds) | 2199 | * until giving up on a path discovery (in milliseconds) |
| 2119 | * | 2200 | * |
| 2120 | * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh | 2201 | * @NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT: The time (in TUs) for which mesh |
| 2121 | * points receiving a PREQ shall consider the forwarding information from the | 2202 | * points receiving a PREQ shall consider the forwarding information from |
| 2122 | * root to be valid. (TU = time unit) | 2203 | * the root to be valid. (TU = time unit) |
| 2123 | * | 2204 | * |
| 2124 | * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in | 2205 | * @NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL: The minimum interval of time (in |
| 2125 | * TUs) during which an MP can send only one action frame containing a PREQ | 2206 | * TUs) during which an MP can send only one action frame containing a PREQ |
| 2126 | * reference element | 2207 | * reference element |
| 2127 | * | 2208 | * |
| 2128 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) | 2209 | * @NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME: The interval of time (in TUs) |
| 2129 | * that it takes for an HWMP information element to propagate across the mesh | 2210 | * that it takes for an HWMP information element to propagate across the |
| 2211 | * mesh | ||
| 2130 | * | 2212 | * |
| 2131 | * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not | 2213 | * @NL80211_MESHCONF_HWMP_ROOTMODE: whether root mode is enabled or not |
| 2132 | * | 2214 | * |
| 2133 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a | 2215 | * @NL80211_MESHCONF_ELEMENT_TTL: specifies the value of TTL field set at a |
| 2134 | * source mesh point for path selection elements. | 2216 | * source mesh point for path selection elements. |
| 2135 | * | 2217 | * |
| 2136 | * @NL80211_MESHCONF_HWMP_RANN_INTERVAL: The interval of time (in TUs) between | 2218 | * @NL80211_MESHCONF_HWMP_RANN_INTERVAL: The interval of time (in TUs) between |
| 2137 | * root announcements are transmitted. | 2219 | * root announcements are transmitted. |
| 2138 | * | 2220 | * |
| 2139 | * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has | 2221 | * @NL80211_MESHCONF_GATE_ANNOUNCEMENTS: Advertise that this mesh station has |
| 2140 | * access to a broader network beyond the MBSS. This is done via Root | 2222 | * access to a broader network beyond the MBSS. This is done via Root |
| 2141 | * Announcement frames. | 2223 | * Announcement frames. |
| 2142 | * | 2224 | * |
| 2143 | * @NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL: The minimum interval of time (in | 2225 | * @NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL: The minimum interval of time (in |
| 2144 | * TUs) during which a mesh STA can send only one Action frame containing a | 2226 | * TUs) during which a mesh STA can send only one Action frame containing a |
| 2145 | * PERR element. | 2227 | * PERR element. |
| 2146 | * | 2228 | * |
| 2147 | * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding | 2229 | * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding |
| 2148 | * or forwarding entity (default is TRUE - forwarding entity) | 2230 | * or forwarding entity (default is TRUE - forwarding entity) |
| 2149 | * | 2231 | * |
| 2150 | * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the | 2232 | * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the |
| 2151 | * threshold for average signal strength of candidate station to establish | 2233 | * threshold for average signal strength of candidate station to establish |
| 2152 | * a peer link. | 2234 | * a peer link. |
| 2153 | * | ||
| 2154 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | ||
| 2155 | * | 2235 | * |
| 2156 | * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors | 2236 | * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors |
| 2157 | * to synchronize to for 11s default synchronization method (see 11C.12.2.2) | 2237 | * to synchronize to for 11s default synchronization method |
| 2238 | * (see 11C.12.2.2) | ||
| 2158 | * | 2239 | * |
| 2159 | * @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode. | 2240 | * @NL80211_MESHCONF_HT_OPMODE: set mesh HT protection mode. |
| 2160 | * | 2241 | * |
| 2242 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | ||
| 2243 | * | ||
| 2244 | * @NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT: The time (in TUs) for | ||
| 2245 | * which mesh STAs receiving a proactive PREQ shall consider the forwarding | ||
| 2246 | * information to the root mesh STA to be valid. | ||
| 2247 | * | ||
| 2248 | * @NL80211_MESHCONF_HWMP_ROOT_INTERVAL: The interval of time (in TUs) between | ||
| 2249 | * proactive PREQs are transmitted. | ||
| 2250 | * | ||
| 2251 | * @NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL: The minimum interval of time | ||
| 2252 | * (in TUs) during which a mesh STA can send only one Action frame | ||
| 2253 | * containing a PREQ element for root path confirmation. | ||
| 2254 | * | ||
| 2161 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 2255 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
| 2162 | */ | 2256 | */ |
| 2163 | enum nl80211_meshconf_params { | 2257 | enum nl80211_meshconf_params { |
| @@ -2184,6 +2278,9 @@ enum nl80211_meshconf_params { | |||
| 2184 | NL80211_MESHCONF_RSSI_THRESHOLD, | 2278 | NL80211_MESHCONF_RSSI_THRESHOLD, |
| 2185 | NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, | 2279 | NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, |
| 2186 | NL80211_MESHCONF_HT_OPMODE, | 2280 | NL80211_MESHCONF_HT_OPMODE, |
| 2281 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, | ||
| 2282 | NL80211_MESHCONF_HWMP_ROOT_INTERVAL, | ||
| 2283 | NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, | ||
| 2187 | 2284 | ||
| 2188 | /* keep last */ | 2285 | /* keep last */ |
| 2189 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 2286 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
| @@ -2199,34 +2296,36 @@ enum nl80211_meshconf_params { | |||
| 2199 | * @__NL80211_MESH_SETUP_INVALID: Internal use | 2296 | * @__NL80211_MESH_SETUP_INVALID: Internal use |
| 2200 | * | 2297 | * |
| 2201 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a | 2298 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL: Enable this option to use a |
| 2202 | * vendor specific path selection algorithm or disable it to use the default | 2299 | * vendor specific path selection algorithm or disable it to use the |
| 2203 | * HWMP. | 2300 | * default HWMP. |
| 2204 | * | 2301 | * |
| 2205 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a | 2302 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC: Enable this option to use a |
| 2206 | * vendor specific path metric or disable it to use the default Airtime | 2303 | * vendor specific path metric or disable it to use the default Airtime |
| 2207 | * metric. | 2304 | * metric. |
| 2208 | * | 2305 | * |
| 2209 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a | 2306 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a |
| 2210 | * robust security network ie, or a vendor specific information element that | 2307 | * robust security network ie, or a vendor specific information element |
| 2211 | * vendors will use to identify the path selection methods and metrics in use. | 2308 | * that vendors will use to identify the path selection methods and |
| 2309 | * metrics in use. | ||
| 2212 | * | 2310 | * |
| 2213 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication | 2311 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication |
| 2214 | * daemon will be authenticating mesh candidates. | 2312 | * daemon will be authenticating mesh candidates. |
| 2215 | * | 2313 | * |
| 2216 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication | 2314 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication |
| 2217 | * daemon will be securing peer link frames. AMPE is a secured version of Mesh | 2315 | * daemon will be securing peer link frames. AMPE is a secured version of |
| 2218 | * Peering Management (MPM) and is implemented with the assistance of a | 2316 | * Mesh Peering Management (MPM) and is implemented with the assistance of |
| 2219 | * userspace daemon. When this flag is set, the kernel will send peer | 2317 | * a userspace daemon. When this flag is set, the kernel will send peer |
| 2220 | * management frames to a userspace daemon that will implement AMPE | 2318 | * management frames to a userspace daemon that will implement AMPE |
| 2221 | * functionality (security capabilities selection, key confirmation, and key | 2319 | * functionality (security capabilities selection, key confirmation, and |
| 2222 | * management). When the flag is unset (default), the kernel can autonomously | 2320 | * key management). When the flag is unset (default), the kernel can |
| 2223 | * complete (unsecured) mesh peering without the need of a userspace daemon. | 2321 | * autonomously complete (unsecured) mesh peering without the need of a |
| 2224 | * | 2322 | * userspace daemon. |
| 2225 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | ||
| 2226 | * | 2323 | * |
| 2227 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a | 2324 | * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a |
| 2228 | * vendor specific synchronization method or disable it to use the default | 2325 | * vendor specific synchronization method or disable it to use the default |
| 2229 | * neighbor offset synchronization | 2326 | * neighbor offset synchronization |
| 2327 | * | ||
| 2328 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | ||
| 2230 | * | 2329 | * |
| 2231 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 2330 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
| 2232 | */ | 2331 | */ |
| @@ -2490,12 +2589,19 @@ enum nl80211_tx_rate_attributes { | |||
| 2490 | * enum nl80211_band - Frequency band | 2589 | * enum nl80211_band - Frequency band |
| 2491 | * @NL80211_BAND_2GHZ: 2.4 GHz ISM band | 2590 | * @NL80211_BAND_2GHZ: 2.4 GHz ISM band |
| 2492 | * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) | 2591 | * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) |
| 2592 | * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz) | ||
| 2493 | */ | 2593 | */ |
| 2494 | enum nl80211_band { | 2594 | enum nl80211_band { |
| 2495 | NL80211_BAND_2GHZ, | 2595 | NL80211_BAND_2GHZ, |
| 2496 | NL80211_BAND_5GHZ, | 2596 | NL80211_BAND_5GHZ, |
| 2597 | NL80211_BAND_60GHZ, | ||
| 2497 | }; | 2598 | }; |
| 2498 | 2599 | ||
| 2600 | /** | ||
| 2601 | * enum nl80211_ps_state - powersave state | ||
| 2602 | * @NL80211_PS_DISABLED: powersave is disabled | ||
| 2603 | * @NL80211_PS_ENABLED: powersave is enabled | ||
| 2604 | */ | ||
| 2499 | enum nl80211_ps_state { | 2605 | enum nl80211_ps_state { |
| 2500 | NL80211_PS_DISABLED, | 2606 | NL80211_PS_DISABLED, |
| 2501 | NL80211_PS_ENABLED, | 2607 | NL80211_PS_ENABLED, |
| @@ -2513,6 +2619,17 @@ enum nl80211_ps_state { | |||
| 2513 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event | 2619 | * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event |
| 2514 | * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many | 2620 | * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many |
| 2515 | * consecutive packets were not acknowledged by the peer | 2621 | * consecutive packets were not acknowledged by the peer |
| 2622 | * @NL80211_ATTR_CQM_TXE_RATE: TX error rate in %. Minimum % of TX failures | ||
| 2623 | * during the given %NL80211_ATTR_CQM_TXE_INTVL before an | ||
| 2624 | * %NL80211_CMD_NOTIFY_CQM with reported %NL80211_ATTR_CQM_TXE_RATE and | ||
| 2625 | * %NL80211_ATTR_CQM_TXE_PKTS is generated. | ||
| 2626 | * @NL80211_ATTR_CQM_TXE_PKTS: number of attempted packets in a given | ||
| 2627 | * %NL80211_ATTR_CQM_TXE_INTVL before %NL80211_ATTR_CQM_TXE_RATE is | ||
| 2628 | * checked. | ||
| 2629 | * @NL80211_ATTR_CQM_TXE_INTVL: interval in seconds. Specifies the periodic | ||
| 2630 | * interval in which %NL80211_ATTR_CQM_TXE_PKTS and | ||
| 2631 | * %NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an | ||
| 2632 | * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting. | ||
| 2516 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal | 2633 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal |
| 2517 | * @NL80211_ATTR_CQM_MAX: highest key attribute | 2634 | * @NL80211_ATTR_CQM_MAX: highest key attribute |
| 2518 | */ | 2635 | */ |
| @@ -2522,6 +2639,9 @@ enum nl80211_attr_cqm { | |||
| 2522 | NL80211_ATTR_CQM_RSSI_HYST, | 2639 | NL80211_ATTR_CQM_RSSI_HYST, |
| 2523 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, | 2640 | NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT, |
| 2524 | NL80211_ATTR_CQM_PKT_LOSS_EVENT, | 2641 | NL80211_ATTR_CQM_PKT_LOSS_EVENT, |
| 2642 | NL80211_ATTR_CQM_TXE_RATE, | ||
| 2643 | NL80211_ATTR_CQM_TXE_PKTS, | ||
| 2644 | NL80211_ATTR_CQM_TXE_INTVL, | ||
| 2525 | 2645 | ||
| 2526 | /* keep last */ | 2646 | /* keep last */ |
| 2527 | __NL80211_ATTR_CQM_AFTER_LAST, | 2647 | __NL80211_ATTR_CQM_AFTER_LAST, |
| @@ -2534,10 +2654,14 @@ enum nl80211_attr_cqm { | |||
| 2534 | * configured threshold | 2654 | * configured threshold |
| 2535 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the | 2655 | * @NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the |
| 2536 | * configured threshold | 2656 | * configured threshold |
| 2657 | * @NL80211_CQM_RSSI_BEACON_LOSS_EVENT: The device experienced beacon loss. | ||
| 2658 | * (Note that deauth/disassoc will still follow if the AP is not | ||
| 2659 | * available. This event might get used as roaming event, etc.) | ||
| 2537 | */ | 2660 | */ |
| 2538 | enum nl80211_cqm_rssi_threshold_event { | 2661 | enum nl80211_cqm_rssi_threshold_event { |
| 2539 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | 2662 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, |
| 2540 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | 2663 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, |
| 2664 | NL80211_CQM_RSSI_BEACON_LOSS_EVENT, | ||
| 2541 | }; | 2665 | }; |
| 2542 | 2666 | ||
| 2543 | 2667 | ||
| @@ -2867,11 +2991,15 @@ enum nl80211_ap_sme_features { | |||
| 2867 | * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates. | 2991 | * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates. |
| 2868 | * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up | 2992 | * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up |
| 2869 | * the connected inactive stations in AP mode. | 2993 | * the connected inactive stations in AP mode. |
| 2994 | * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested | ||
| 2995 | * to work properly to suppport receiving regulatory hints from | ||
| 2996 | * cellular base stations. | ||
| 2870 | */ | 2997 | */ |
| 2871 | enum nl80211_feature_flags { | 2998 | enum nl80211_feature_flags { |
| 2872 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 2999 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
| 2873 | NL80211_FEATURE_HT_IBSS = 1 << 1, | 3000 | NL80211_FEATURE_HT_IBSS = 1 << 1, |
| 2874 | NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, | 3001 | NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2, |
| 3002 | NL80211_FEATURE_CELL_BASE_REG_HINTS = 1 << 3, | ||
| 2875 | }; | 3003 | }; |
| 2876 | 3004 | ||
| 2877 | /** | 3005 | /** |
diff --git a/include/linux/nl802154.h b/include/linux/nl802154.h index 5a3db3aa5f17..fd4f2d1cdf6c 100644 --- a/include/linux/nl802154.h +++ b/include/linux/nl802154.h | |||
| @@ -130,18 +130,8 @@ enum { | |||
| 130 | enum { | 130 | enum { |
| 131 | __IEEE802154_DEV_INVALID = -1, | 131 | __IEEE802154_DEV_INVALID = -1, |
| 132 | 132 | ||
| 133 | /* TODO: | 133 | IEEE802154_DEV_WPAN, |
| 134 | * Nowadays three device types supported by this stack at linux-zigbee | 134 | IEEE802154_DEV_MONITOR, |
| 135 | * project: WPAN = 0, MONITOR = 1 and SMAC = 2. | ||
| 136 | * | ||
| 137 | * Since this stack implementation exists many years, it's definitely | ||
| 138 | * bad idea to change the assigned values due to they are already used | ||
| 139 | * by third-party userspace software like: iz-tools, wireshark... | ||
| 140 | * | ||
| 141 | * Currently only monitor device is added and initialized by '1' for | ||
| 142 | * compatibility. | ||
| 143 | */ | ||
| 144 | IEEE802154_DEV_MONITOR = 1, | ||
| 145 | 135 | ||
| 146 | __IEEE802154_DEV_MAX, | 136 | __IEEE802154_DEV_MAX, |
| 147 | }; | 137 | }; |
diff --git a/include/linux/phy.h b/include/linux/phy.h index c291cae8ce32..93b3cf77f564 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
| @@ -243,6 +243,15 @@ enum phy_state { | |||
| 243 | PHY_RESUMING | 243 | PHY_RESUMING |
| 244 | }; | 244 | }; |
| 245 | 245 | ||
| 246 | /** | ||
| 247 | * struct phy_c45_device_ids - 802.3-c45 Device Identifiers | ||
| 248 | * @devices_in_package: Bit vector of devices present. | ||
| 249 | * @device_ids: The device identifer for each present device. | ||
| 250 | */ | ||
| 251 | struct phy_c45_device_ids { | ||
| 252 | u32 devices_in_package; | ||
| 253 | u32 device_ids[8]; | ||
| 254 | }; | ||
| 246 | 255 | ||
| 247 | /* phy_device: An instance of a PHY | 256 | /* phy_device: An instance of a PHY |
| 248 | * | 257 | * |
| @@ -250,6 +259,8 @@ enum phy_state { | |||
| 250 | * bus: Pointer to the bus this PHY is on | 259 | * bus: Pointer to the bus this PHY is on |
| 251 | * dev: driver model device structure for this PHY | 260 | * dev: driver model device structure for this PHY |
| 252 | * phy_id: UID for this device found during discovery | 261 | * phy_id: UID for this device found during discovery |
| 262 | * c45_ids: 802.3-c45 Device Identifers if is_c45. | ||
| 263 | * is_c45: Set to true if this phy uses clause 45 addressing. | ||
| 253 | * state: state of the PHY for management purposes | 264 | * state: state of the PHY for management purposes |
| 254 | * dev_flags: Device-specific flags used by the PHY driver. | 265 | * dev_flags: Device-specific flags used by the PHY driver. |
| 255 | * addr: Bus address of PHY | 266 | * addr: Bus address of PHY |
| @@ -285,6 +296,9 @@ struct phy_device { | |||
| 285 | 296 | ||
| 286 | u32 phy_id; | 297 | u32 phy_id; |
| 287 | 298 | ||
| 299 | struct phy_c45_device_ids c45_ids; | ||
| 300 | bool is_c45; | ||
| 301 | |||
| 288 | enum phy_state state; | 302 | enum phy_state state; |
| 289 | 303 | ||
| 290 | u32 dev_flags; | 304 | u32 dev_flags; |
| @@ -412,6 +426,12 @@ struct phy_driver { | |||
| 412 | /* Clears up any memory if needed */ | 426 | /* Clears up any memory if needed */ |
| 413 | void (*remove)(struct phy_device *phydev); | 427 | void (*remove)(struct phy_device *phydev); |
| 414 | 428 | ||
| 429 | /* Returns true if this is a suitable driver for the given | ||
| 430 | * phydev. If NULL, matching is based on phy_id and | ||
| 431 | * phy_id_mask. | ||
| 432 | */ | ||
| 433 | int (*match_phy_device)(struct phy_device *phydev); | ||
| 434 | |||
| 415 | /* Handles ethtool queries for hardware time stamping. */ | 435 | /* Handles ethtool queries for hardware time stamping. */ |
| 416 | int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti); | 436 | int (*ts_info)(struct phy_device *phydev, struct ethtool_ts_info *ti); |
| 417 | 437 | ||
| @@ -480,7 +500,9 @@ static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) | |||
| 480 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | 500 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); |
| 481 | } | 501 | } |
| 482 | 502 | ||
| 483 | struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | 503 | struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id, |
| 504 | bool is_c45, struct phy_c45_device_ids *c45_ids); | ||
| 505 | struct phy_device *get_phy_device(struct mii_bus *bus, int addr, bool is_c45); | ||
| 484 | int phy_device_register(struct phy_device *phy); | 506 | int phy_device_register(struct phy_device *phy); |
| 485 | int phy_init_hw(struct phy_device *phydev); | 507 | int phy_init_hw(struct phy_device *phydev); |
| 486 | struct phy_device * phy_attach(struct net_device *dev, | 508 | struct phy_device * phy_attach(struct net_device *dev, |
| @@ -511,7 +533,9 @@ int genphy_read_status(struct phy_device *phydev); | |||
| 511 | int genphy_suspend(struct phy_device *phydev); | 533 | int genphy_suspend(struct phy_device *phydev); |
| 512 | int genphy_resume(struct phy_device *phydev); | 534 | int genphy_resume(struct phy_device *phydev); |
| 513 | void phy_driver_unregister(struct phy_driver *drv); | 535 | void phy_driver_unregister(struct phy_driver *drv); |
| 536 | void phy_drivers_unregister(struct phy_driver *drv, int n); | ||
| 514 | int phy_driver_register(struct phy_driver *new_driver); | 537 | int phy_driver_register(struct phy_driver *new_driver); |
| 538 | int phy_drivers_register(struct phy_driver *new_driver, int n); | ||
| 515 | void phy_state_machine(struct work_struct *work); | 539 | void phy_state_machine(struct work_struct *work); |
| 516 | void phy_start_machine(struct phy_device *phydev, | 540 | void phy_start_machine(struct phy_device *phydev, |
| 517 | void (*handler)(struct net_device *)); | 541 | void (*handler)(struct net_device *)); |
| @@ -532,6 +556,11 @@ int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, | |||
| 532 | int (*run)(struct phy_device *)); | 556 | int (*run)(struct phy_device *)); |
| 533 | int phy_scan_fixups(struct phy_device *phydev); | 557 | int phy_scan_fixups(struct phy_device *phydev); |
| 534 | 558 | ||
| 559 | int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable); | ||
| 560 | int phy_get_eee_err(struct phy_device *phydev); | ||
| 561 | int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data); | ||
| 562 | int phy_ethtool_get_eee(struct phy_device *phydev, struct ethtool_eee *data); | ||
| 563 | |||
| 535 | int __init mdio_bus_init(void); | 564 | int __init mdio_bus_init(void); |
| 536 | void mdio_bus_exit(void); | 565 | void mdio_bus_exit(void); |
| 537 | 566 | ||
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index defbde203d07..082eafaf026b 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
| @@ -451,8 +451,10 @@ enum { | |||
| 451 | #define TCF_EM_U32 3 | 451 | #define TCF_EM_U32 3 |
| 452 | #define TCF_EM_META 4 | 452 | #define TCF_EM_META 4 |
| 453 | #define TCF_EM_TEXT 5 | 453 | #define TCF_EM_TEXT 5 |
| 454 | #define TCF_EM_VLAN 6 | 454 | #define TCF_EM_VLAN 6 |
| 455 | #define TCF_EM_MAX 6 | 455 | #define TCF_EM_CANID 7 |
| 456 | #define TCF_EM_IPSET 8 | ||
| 457 | #define TCF_EM_MAX 8 | ||
| 456 | 458 | ||
| 457 | enum { | 459 | enum { |
| 458 | TCF_EM_PROG_TC | 460 | TCF_EM_PROG_TC |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 2c1de8982c85..db71c4ad8624 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
| @@ -612,12 +612,6 @@ struct tcamsg { | |||
| 612 | #include <linux/mutex.h> | 612 | #include <linux/mutex.h> |
| 613 | #include <linux/netdevice.h> | 613 | #include <linux/netdevice.h> |
| 614 | 614 | ||
| 615 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | ||
| 616 | { | ||
| 617 | int len = strlen(str) + 1; | ||
| 618 | return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); | ||
| 619 | } | ||
| 620 | |||
| 621 | extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); | 615 | extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); |
| 622 | extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid); | 616 | extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid); |
| 623 | extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, | 617 | extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, |
| @@ -625,124 +619,7 @@ extern void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, | |||
| 625 | extern void rtnl_set_sk_err(struct net *net, u32 group, int error); | 619 | extern void rtnl_set_sk_err(struct net *net, u32 group, int error); |
| 626 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); | 620 | extern int rtnetlink_put_metrics(struct sk_buff *skb, u32 *metrics); |
| 627 | extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, | 621 | extern int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, |
| 628 | u32 id, u32 ts, u32 tsage, long expires, | 622 | u32 id, long expires, u32 error); |
| 629 | u32 error); | ||
| 630 | |||
| 631 | extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data); | ||
| 632 | |||
| 633 | #define RTA_PUT(skb, attrtype, attrlen, data) \ | ||
| 634 | ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \ | ||
| 635 | goto rtattr_failure; \ | ||
| 636 | __rta_fill(skb, attrtype, attrlen, data); }) | ||
| 637 | |||
| 638 | #define RTA_APPEND(skb, attrlen, data) \ | ||
| 639 | ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ | ||
| 640 | goto rtattr_failure; \ | ||
| 641 | memcpy(skb_put(skb, attrlen), data, attrlen); }) | ||
| 642 | |||
| 643 | #define RTA_PUT_NOHDR(skb, attrlen, data) \ | ||
| 644 | ({ RTA_APPEND(skb, RTA_ALIGN(attrlen), data); \ | ||
| 645 | memset(skb_tail_pointer(skb) - (RTA_ALIGN(attrlen) - attrlen), 0, \ | ||
| 646 | RTA_ALIGN(attrlen) - attrlen); }) | ||
| 647 | |||
| 648 | #define RTA_PUT_U8(skb, attrtype, value) \ | ||
| 649 | ({ u8 _tmp = (value); \ | ||
| 650 | RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); }) | ||
| 651 | |||
| 652 | #define RTA_PUT_U16(skb, attrtype, value) \ | ||
| 653 | ({ u16 _tmp = (value); \ | ||
| 654 | RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); }) | ||
| 655 | |||
| 656 | #define RTA_PUT_U32(skb, attrtype, value) \ | ||
| 657 | ({ u32 _tmp = (value); \ | ||
| 658 | RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); }) | ||
| 659 | |||
| 660 | #define RTA_PUT_U64(skb, attrtype, value) \ | ||
| 661 | ({ u64 _tmp = (value); \ | ||
| 662 | RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); }) | ||
| 663 | |||
| 664 | #define RTA_PUT_SECS(skb, attrtype, value) \ | ||
| 665 | RTA_PUT_U64(skb, attrtype, (value) / HZ) | ||
| 666 | |||
| 667 | #define RTA_PUT_MSECS(skb, attrtype, value) \ | ||
| 668 | RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value)) | ||
| 669 | |||
| 670 | #define RTA_PUT_STRING(skb, attrtype, value) \ | ||
| 671 | RTA_PUT(skb, attrtype, strlen(value) + 1, value) | ||
| 672 | |||
| 673 | #define RTA_PUT_FLAG(skb, attrtype) \ | ||
| 674 | RTA_PUT(skb, attrtype, 0, NULL); | ||
| 675 | |||
| 676 | #define RTA_NEST(skb, type) \ | ||
| 677 | ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \ | ||
| 678 | RTA_PUT(skb, type, 0, NULL); \ | ||
| 679 | __start; }) | ||
| 680 | |||
| 681 | #define RTA_NEST_END(skb, start) \ | ||
| 682 | ({ (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | ||
| 683 | (skb)->len; }) | ||
| 684 | |||
| 685 | #define RTA_NEST_COMPAT(skb, type, attrlen, data) \ | ||
| 686 | ({ struct rtattr *__start = (struct rtattr *)skb_tail_pointer(skb); \ | ||
| 687 | RTA_PUT(skb, type, attrlen, data); \ | ||
| 688 | RTA_NEST(skb, type); \ | ||
| 689 | __start; }) | ||
| 690 | |||
| 691 | #define RTA_NEST_COMPAT_END(skb, start) \ | ||
| 692 | ({ struct rtattr *__nest = (void *)(start) + NLMSG_ALIGN((start)->rta_len); \ | ||
| 693 | (start)->rta_len = skb_tail_pointer(skb) - (unsigned char *)(start); \ | ||
| 694 | RTA_NEST_END(skb, __nest); \ | ||
| 695 | (skb)->len; }) | ||
| 696 | |||
| 697 | #define RTA_NEST_CANCEL(skb, start) \ | ||
| 698 | ({ if (start) \ | ||
| 699 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | ||
| 700 | -1; }) | ||
| 701 | |||
| 702 | #define RTA_GET_U8(rta) \ | ||
| 703 | ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) \ | ||
| 704 | goto rtattr_failure; \ | ||
| 705 | *(u8 *) RTA_DATA(rta); }) | ||
| 706 | |||
| 707 | #define RTA_GET_U16(rta) \ | ||
| 708 | ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) \ | ||
| 709 | goto rtattr_failure; \ | ||
| 710 | *(u16 *) RTA_DATA(rta); }) | ||
| 711 | |||
| 712 | #define RTA_GET_U32(rta) \ | ||
| 713 | ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) \ | ||
| 714 | goto rtattr_failure; \ | ||
| 715 | *(u32 *) RTA_DATA(rta); }) | ||
| 716 | |||
| 717 | #define RTA_GET_U64(rta) \ | ||
| 718 | ({ u64 _tmp; \ | ||
| 719 | if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) \ | ||
| 720 | goto rtattr_failure; \ | ||
| 721 | memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); \ | ||
| 722 | _tmp; }) | ||
| 723 | |||
| 724 | #define RTA_GET_FLAG(rta) (!!(rta)) | ||
| 725 | |||
| 726 | #define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ) | ||
| 727 | #define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta))) | ||
| 728 | |||
| 729 | static inline struct rtattr * | ||
| 730 | __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) | ||
| 731 | { | ||
| 732 | struct rtattr *rta; | ||
| 733 | int size = RTA_LENGTH(attrlen); | ||
| 734 | |||
| 735 | rta = (struct rtattr*)skb_put(skb, RTA_ALIGN(size)); | ||
| 736 | rta->rta_type = attrtype; | ||
| 737 | rta->rta_len = size; | ||
| 738 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | ||
| 739 | return rta; | ||
| 740 | } | ||
| 741 | |||
| 742 | #define __RTA_PUT(skb, attrtype, attrlen) \ | ||
| 743 | ({ if (unlikely(skb_tailroom(skb) < (int)RTA_SPACE(attrlen))) \ | ||
| 744 | goto rtattr_failure; \ | ||
| 745 | __rta_reserve(skb, attrtype, attrlen); }) | ||
| 746 | 623 | ||
| 747 | extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change); | 624 | extern void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change); |
| 748 | 625 | ||
| @@ -794,13 +671,6 @@ extern void __rtnl_unlock(void); | |||
| 794 | } \ | 671 | } \ |
| 795 | } while(0) | 672 | } while(0) |
| 796 | 673 | ||
| 797 | static inline u32 rtm_get_table(struct rtattr **rta, u8 table) | ||
| 798 | { | ||
| 799 | return RTA_GET_U32(rta[RTA_TABLE-1]); | ||
| 800 | rtattr_failure: | ||
| 801 | return table; | ||
| 802 | } | ||
| 803 | |||
| 804 | extern int ndo_dflt_fdb_dump(struct sk_buff *skb, | 674 | extern int ndo_dflt_fdb_dump(struct sk_buff *skb, |
| 805 | struct netlink_callback *cb, | 675 | struct netlink_callback *cb, |
| 806 | struct net_device *dev, | 676 | struct net_device *dev, |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 642cb7355df3..d205c4be7f5b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1667,6 +1667,22 @@ static inline void skb_orphan(struct sk_buff *skb) | |||
| 1667 | } | 1667 | } |
| 1668 | 1668 | ||
| 1669 | /** | 1669 | /** |
| 1670 | * skb_orphan_frags - orphan the frags contained in a buffer | ||
| 1671 | * @skb: buffer to orphan frags from | ||
| 1672 | * @gfp_mask: allocation mask for replacement pages | ||
| 1673 | * | ||
| 1674 | * For each frag in the SKB which needs a destructor (i.e. has an | ||
| 1675 | * owner) create a copy of that frag and release the original | ||
| 1676 | * page by calling the destructor. | ||
| 1677 | */ | ||
| 1678 | static inline int skb_orphan_frags(struct sk_buff *skb, gfp_t gfp_mask) | ||
| 1679 | { | ||
| 1680 | if (likely(!(skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY))) | ||
| 1681 | return 0; | ||
| 1682 | return skb_copy_ubufs(skb, gfp_mask); | ||
| 1683 | } | ||
| 1684 | |||
| 1685 | /** | ||
| 1670 | * __skb_queue_purge - empty a list | 1686 | * __skb_queue_purge - empty a list |
| 1671 | * @list: list to empty | 1687 | * @list: list to empty |
| 1672 | * | 1688 | * |
diff --git a/include/linux/snmp.h b/include/linux/snmp.h index 2e68f5ba0389..00bc189cb395 100644 --- a/include/linux/snmp.h +++ b/include/linux/snmp.h | |||
| @@ -208,7 +208,6 @@ enum | |||
| 208 | LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */ | 208 | LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */ |
| 209 | LINUX_MIB_TCPDSACKRECV, /* TCPDSACKRecv */ | 209 | LINUX_MIB_TCPDSACKRECV, /* TCPDSACKRecv */ |
| 210 | LINUX_MIB_TCPDSACKOFORECV, /* TCPDSACKOfoRecv */ | 210 | LINUX_MIB_TCPDSACKOFORECV, /* TCPDSACKOfoRecv */ |
| 211 | LINUX_MIB_TCPABORTONSYN, /* TCPAbortOnSyn */ | ||
| 212 | LINUX_MIB_TCPABORTONDATA, /* TCPAbortOnData */ | 211 | LINUX_MIB_TCPABORTONDATA, /* TCPAbortOnData */ |
| 213 | LINUX_MIB_TCPABORTONCLOSE, /* TCPAbortOnClose */ | 212 | LINUX_MIB_TCPABORTONCLOSE, /* TCPAbortOnClose */ |
| 214 | LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */ | 213 | LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */ |
| @@ -233,7 +232,13 @@ enum | |||
| 233 | LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */ | 232 | LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */ |
| 234 | LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */ | 233 | LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */ |
| 235 | LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */ | 234 | LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */ |
| 236 | LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */ | 235 | LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */ |
| 236 | LINUX_MIB_TCPOFOQUEUE, /* TCPOFOQueue */ | ||
| 237 | LINUX_MIB_TCPOFODROP, /* TCPOFODrop */ | ||
| 238 | LINUX_MIB_TCPOFOMERGE, /* TCPOFOMerge */ | ||
| 239 | LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */ | ||
| 240 | LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */ | ||
| 241 | LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */ | ||
| 237 | __LINUX_MIB_MAX | 242 | __LINUX_MIB_MAX |
| 238 | }; | 243 | }; |
| 239 | 244 | ||
diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h index db4bae78bda9..e3e395acc2fd 100644 --- a/include/linux/sock_diag.h +++ b/include/linux/sock_diag.h | |||
| @@ -18,6 +18,7 @@ enum { | |||
| 18 | SK_MEMINFO_FWD_ALLOC, | 18 | SK_MEMINFO_FWD_ALLOC, |
| 19 | SK_MEMINFO_WMEM_QUEUED, | 19 | SK_MEMINFO_WMEM_QUEUED, |
| 20 | SK_MEMINFO_OPTMEM, | 20 | SK_MEMINFO_OPTMEM, |
| 21 | SK_MEMINFO_BACKLOG, | ||
| 21 | 22 | ||
| 22 | SK_MEMINFO_VARS, | 23 | SK_MEMINFO_VARS, |
| 23 | }; | 24 | }; |
| @@ -43,6 +44,5 @@ void sock_diag_save_cookie(void *sk, __u32 *cookie); | |||
| 43 | 44 | ||
| 44 | int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); | 45 | int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); |
| 45 | 46 | ||
| 46 | extern struct sock *sock_diag_nlsk; | ||
| 47 | #endif /* KERNEL */ | 47 | #endif /* KERNEL */ |
| 48 | #endif | 48 | #endif |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 25d6322fb635..ba7b2e817cfa 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -268,6 +268,7 @@ struct ucred { | |||
| 268 | #define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */ | 268 | #define MSG_SENDPAGE_NOTLAST 0x20000 /* sendpage() internal : not the last page */ |
| 269 | #define MSG_EOF MSG_FIN | 269 | #define MSG_EOF MSG_FIN |
| 270 | 270 | ||
| 271 | #define MSG_FASTOPEN 0x20000000 /* Send data in TCP SYN */ | ||
| 271 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file | 272 | #define MSG_CMSG_CLOEXEC 0x40000000 /* Set close_on_exit for file |
| 272 | descriptor received through | 273 | descriptor received through |
| 273 | SCM_RIGHTS */ | 274 | SCM_RIGHTS */ |
diff --git a/include/linux/spi/at86rf230.h b/include/linux/spi/at86rf230.h new file mode 100644 index 000000000000..b2b1afbb3202 --- /dev/null +++ b/include/linux/spi/at86rf230.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | * AT86RF230/RF231 driver | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009-2012 Siemens AG | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 | ||
| 8 | * as published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License along | ||
| 16 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 18 | * | ||
| 19 | * Written by: | ||
| 20 | * Dmitry Eremin-Solenikov <dmitry.baryshkov@siemens.com> | ||
| 21 | */ | ||
| 22 | #ifndef AT86RF230_H | ||
| 23 | #define AT86RF230_H | ||
| 24 | |||
| 25 | struct at86rf230_platform_data { | ||
| 26 | int rstn; | ||
| 27 | int slp_tr; | ||
| 28 | int dig2; | ||
| 29 | }; | ||
| 30 | |||
| 31 | #endif | ||
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index bc14bd738ade..bb674c02f306 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -243,6 +243,7 @@ struct ssb_bus_ops { | |||
| 243 | #define SSB_DEV_MINI_MACPHY 0x823 | 243 | #define SSB_DEV_MINI_MACPHY 0x823 |
| 244 | #define SSB_DEV_ARM_1176 0x824 | 244 | #define SSB_DEV_ARM_1176 0x824 |
| 245 | #define SSB_DEV_ARM_7TDMI 0x825 | 245 | #define SSB_DEV_ARM_7TDMI 0x825 |
| 246 | #define SSB_DEV_ARM_CM3 0x82A | ||
| 246 | 247 | ||
| 247 | /* Vendor-ID values */ | 248 | /* Vendor-ID values */ |
| 248 | #define SSB_VENDOR_BROADCOM 0x4243 | 249 | #define SSB_VENDOR_BROADCOM 0x4243 |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 5f359dbfcdce..eb125a4c30b3 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
| @@ -243,6 +243,16 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb) | |||
| 243 | return (tcp_hdr(skb)->doff - 5) * 4; | 243 | return (tcp_hdr(skb)->doff - 5) * 4; |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | /* TCP Fast Open */ | ||
| 247 | #define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */ | ||
| 248 | #define TCP_FASTOPEN_COOKIE_MAX 16 /* Max Fast Open Cookie size in bytes */ | ||
| 249 | |||
| 250 | /* TCP Fast Open Cookie as stored in memory */ | ||
| 251 | struct tcp_fastopen_cookie { | ||
| 252 | s8 len; | ||
| 253 | u8 val[TCP_FASTOPEN_COOKIE_MAX]; | ||
| 254 | }; | ||
| 255 | |||
| 246 | /* This defines a selective acknowledgement block. */ | 256 | /* This defines a selective acknowledgement block. */ |
| 247 | struct tcp_sack_block_wire { | 257 | struct tcp_sack_block_wire { |
| 248 | __be32 start_seq; | 258 | __be32 start_seq; |
| @@ -339,6 +349,9 @@ struct tcp_sock { | |||
| 339 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ | 349 | u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */ |
| 340 | u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ | 350 | u32 lsndtime; /* timestamp of last sent data packet (for restart window) */ |
| 341 | 351 | ||
| 352 | struct list_head tsq_node; /* anchor in tsq_tasklet.head list */ | ||
| 353 | unsigned long tsq_flags; | ||
| 354 | |||
| 342 | /* Data for direct copy to user */ | 355 | /* Data for direct copy to user */ |
| 343 | struct { | 356 | struct { |
| 344 | struct sk_buff_head prequeue; | 357 | struct sk_buff_head prequeue; |
| @@ -373,7 +386,9 @@ struct tcp_sock { | |||
| 373 | unused : 1; | 386 | unused : 1; |
| 374 | u8 repair_queue; | 387 | u8 repair_queue; |
| 375 | u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ | 388 | u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */ |
| 376 | early_retrans_delayed:1; /* Delayed ER timer installed */ | 389 | early_retrans_delayed:1, /* Delayed ER timer installed */ |
| 390 | syn_data:1, /* SYN includes data */ | ||
| 391 | syn_fastopen:1; /* SYN includes Fast Open option */ | ||
| 377 | 392 | ||
| 378 | /* RTT measurement */ | 393 | /* RTT measurement */ |
| 379 | u32 srtt; /* smoothed round trip time << 3 */ | 394 | u32 srtt; /* smoothed round trip time << 3 */ |
| @@ -478,6 +493,9 @@ struct tcp_sock { | |||
| 478 | u32 probe_seq_start; | 493 | u32 probe_seq_start; |
| 479 | u32 probe_seq_end; | 494 | u32 probe_seq_end; |
| 480 | } mtu_probe; | 495 | } mtu_probe; |
| 496 | u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG | ||
| 497 | * while socket was owned by user. | ||
| 498 | */ | ||
| 481 | 499 | ||
| 482 | #ifdef CONFIG_TCP_MD5SIG | 500 | #ifdef CONFIG_TCP_MD5SIG |
| 483 | /* TCP AF-Specific parts; only used by MD5 Signature support so far */ | 501 | /* TCP AF-Specific parts; only used by MD5 Signature support so far */ |
| @@ -487,6 +505,9 @@ struct tcp_sock { | |||
| 487 | struct tcp_md5sig_info __rcu *md5sig_info; | 505 | struct tcp_md5sig_info __rcu *md5sig_info; |
| 488 | #endif | 506 | #endif |
| 489 | 507 | ||
| 508 | /* TCP fastopen related information */ | ||
| 509 | struct tcp_fastopen_request *fastopen_req; | ||
| 510 | |||
| 490 | /* When the cookie options are generated and exchanged, then this | 511 | /* When the cookie options are generated and exchanged, then this |
| 491 | * object holds a reference to them (cookie_values->kref). Also | 512 | * object holds a reference to them (cookie_values->kref). Also |
| 492 | * contains related tcp_cookie_transactions fields. | 513 | * contains related tcp_cookie_transactions fields. |
| @@ -494,6 +515,17 @@ struct tcp_sock { | |||
| 494 | struct tcp_cookie_values *cookie_values; | 515 | struct tcp_cookie_values *cookie_values; |
| 495 | }; | 516 | }; |
| 496 | 517 | ||
| 518 | enum tsq_flags { | ||
| 519 | TSQ_THROTTLED, | ||
| 520 | TSQ_QUEUED, | ||
| 521 | TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */ | ||
| 522 | TCP_WRITE_TIMER_DEFERRED, /* tcp_write_timer() found socket was owned */ | ||
| 523 | TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */ | ||
| 524 | TCP_MTU_REDUCED_DEFERRED, /* tcp_v{4|6}_err() could not call | ||
| 525 | * tcp_v{4|6}_mtu_reduced() | ||
| 526 | */ | ||
| 527 | }; | ||
| 528 | |||
| 497 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 529 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) |
| 498 | { | 530 | { |
| 499 | return (struct tcp_sock *)sk; | 531 | return (struct tcp_sock *)sk; |
| @@ -507,7 +539,7 @@ struct tcp_timewait_sock { | |||
| 507 | u32 tw_ts_recent; | 539 | u32 tw_ts_recent; |
| 508 | long tw_ts_recent_stamp; | 540 | long tw_ts_recent_stamp; |
| 509 | #ifdef CONFIG_TCP_MD5SIG | 541 | #ifdef CONFIG_TCP_MD5SIG |
| 510 | struct tcp_md5sig_key *tw_md5_key; | 542 | struct tcp_md5sig_key *tw_md5_key; |
| 511 | #endif | 543 | #endif |
| 512 | /* Few sockets in timewait have cookies; in that case, then this | 544 | /* Few sockets in timewait have cookies; in that case, then this |
| 513 | * object holds a reference to them (tw_cookie_values->kref). | 545 | * object holds a reference to them (tw_cookie_values->kref). |
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h index 9730b0e51e46..c98928420100 100644 --- a/include/linux/tipc_config.h +++ b/include/linux/tipc_config.h | |||
| @@ -102,8 +102,8 @@ | |||
| 102 | #define TIPC_CMD_SET_LINK_TOL 0x4107 /* tx link_config, rx none */ | 102 | #define TIPC_CMD_SET_LINK_TOL 0x4107 /* tx link_config, rx none */ |
| 103 | #define TIPC_CMD_SET_LINK_PRI 0x4108 /* tx link_config, rx none */ | 103 | #define TIPC_CMD_SET_LINK_PRI 0x4108 /* tx link_config, rx none */ |
| 104 | #define TIPC_CMD_SET_LINK_WINDOW 0x4109 /* tx link_config, rx none */ | 104 | #define TIPC_CMD_SET_LINK_WINDOW 0x4109 /* tx link_config, rx none */ |
| 105 | #define TIPC_CMD_SET_LOG_SIZE 0x410A /* tx unsigned, rx none */ | 105 | #define TIPC_CMD_SET_LOG_SIZE 0x410A /* obsoleted */ |
| 106 | #define TIPC_CMD_DUMP_LOG 0x410B /* tx none, rx ultra_string */ | 106 | #define TIPC_CMD_DUMP_LOG 0x410B /* obsoleted */ |
| 107 | #define TIPC_CMD_RESET_LINK_STATS 0x410C /* tx link_name, rx none */ | 107 | #define TIPC_CMD_RESET_LINK_STATS 0x410C /* tx link_name, rx none */ |
| 108 | 108 | ||
| 109 | /* | 109 | /* |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 76f439647c4b..f87cf622317f 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
| @@ -66,9 +66,8 @@ struct usbnet { | |||
| 66 | # define EVENT_STS_SPLIT 3 | 66 | # define EVENT_STS_SPLIT 3 |
| 67 | # define EVENT_LINK_RESET 4 | 67 | # define EVENT_LINK_RESET 4 |
| 68 | # define EVENT_RX_PAUSED 5 | 68 | # define EVENT_RX_PAUSED 5 |
| 69 | # define EVENT_DEV_WAKING 6 | 69 | # define EVENT_DEV_ASLEEP 6 |
| 70 | # define EVENT_DEV_ASLEEP 7 | 70 | # define EVENT_DEV_OPEN 7 |
| 71 | # define EVENT_DEV_OPEN 8 | ||
| 72 | }; | 71 | }; |
| 73 | 72 | ||
| 74 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 73 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
