diff options
Diffstat (limited to 'include/linux')
31 files changed, 1568 insertions, 172 deletions
diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h index b847fc7b93f9..60a7c49dcb49 100644 --- a/include/linux/ath9k_platform.h +++ b/include/linux/ath9k_platform.h | |||
@@ -23,6 +23,13 @@ | |||
23 | 23 | ||
24 | struct ath9k_platform_data { | 24 | struct ath9k_platform_data { |
25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; | 25 | u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS]; |
26 | u8 *macaddr; | ||
27 | |||
28 | int led_pin; | ||
29 | u32 gpio_mask; | ||
30 | u32 gpio_val; | ||
31 | |||
32 | bool is_clk_25mhz; | ||
26 | }; | 33 | }; |
27 | 34 | ||
28 | #endif /* _LINUX_ATH9K_PLATFORM_H */ | 35 | #endif /* _LINUX_ATH9K_PLATFORM_H */ |
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h new file mode 100644 index 000000000000..08763e4e848f --- /dev/null +++ b/include/linux/bcma/bcma.h | |||
@@ -0,0 +1,224 @@ | |||
1 | #ifndef LINUX_BCMA_H_ | ||
2 | #define LINUX_BCMA_H_ | ||
3 | |||
4 | #include <linux/pci.h> | ||
5 | #include <linux/mod_devicetable.h> | ||
6 | |||
7 | #include <linux/bcma/bcma_driver_chipcommon.h> | ||
8 | #include <linux/bcma/bcma_driver_pci.h> | ||
9 | |||
10 | #include "bcma_regs.h" | ||
11 | |||
12 | struct bcma_device; | ||
13 | struct bcma_bus; | ||
14 | |||
15 | enum bcma_hosttype { | ||
16 | BCMA_HOSTTYPE_NONE, | ||
17 | BCMA_HOSTTYPE_PCI, | ||
18 | BCMA_HOSTTYPE_SDIO, | ||
19 | }; | ||
20 | |||
21 | struct bcma_chipinfo { | ||
22 | u16 id; | ||
23 | u8 rev; | ||
24 | u8 pkg; | ||
25 | }; | ||
26 | |||
27 | struct bcma_host_ops { | ||
28 | u8 (*read8)(struct bcma_device *core, u16 offset); | ||
29 | u16 (*read16)(struct bcma_device *core, u16 offset); | ||
30 | u32 (*read32)(struct bcma_device *core, u16 offset); | ||
31 | void (*write8)(struct bcma_device *core, u16 offset, u8 value); | ||
32 | void (*write16)(struct bcma_device *core, u16 offset, u16 value); | ||
33 | void (*write32)(struct bcma_device *core, u16 offset, u32 value); | ||
34 | /* Agent ops */ | ||
35 | u32 (*aread32)(struct bcma_device *core, u16 offset); | ||
36 | void (*awrite32)(struct bcma_device *core, u16 offset, u32 value); | ||
37 | }; | ||
38 | |||
39 | /* Core manufacturers */ | ||
40 | #define BCMA_MANUF_ARM 0x43B | ||
41 | #define BCMA_MANUF_MIPS 0x4A7 | ||
42 | #define BCMA_MANUF_BCM 0x4BF | ||
43 | |||
44 | /* Core class values. */ | ||
45 | #define BCMA_CL_SIM 0x0 | ||
46 | #define BCMA_CL_EROM 0x1 | ||
47 | #define BCMA_CL_CORESIGHT 0x9 | ||
48 | #define BCMA_CL_VERIF 0xB | ||
49 | #define BCMA_CL_OPTIMO 0xD | ||
50 | #define BCMA_CL_GEN 0xE | ||
51 | #define BCMA_CL_PRIMECELL 0xF | ||
52 | |||
53 | /* Core-ID values. */ | ||
54 | #define BCMA_CORE_OOB_ROUTER 0x367 /* Out of band */ | ||
55 | #define BCMA_CORE_INVALID 0x700 | ||
56 | #define BCMA_CORE_CHIPCOMMON 0x800 | ||
57 | #define BCMA_CORE_ILINE20 0x801 | ||
58 | #define BCMA_CORE_SRAM 0x802 | ||
59 | #define BCMA_CORE_SDRAM 0x803 | ||
60 | #define BCMA_CORE_PCI 0x804 | ||
61 | #define BCMA_CORE_MIPS 0x805 | ||
62 | #define BCMA_CORE_ETHERNET 0x806 | ||
63 | #define BCMA_CORE_V90 0x807 | ||
64 | #define BCMA_CORE_USB11_HOSTDEV 0x808 | ||
65 | #define BCMA_CORE_ADSL 0x809 | ||
66 | #define BCMA_CORE_ILINE100 0x80A | ||
67 | #define BCMA_CORE_IPSEC 0x80B | ||
68 | #define BCMA_CORE_UTOPIA 0x80C | ||
69 | #define BCMA_CORE_PCMCIA 0x80D | ||
70 | #define BCMA_CORE_INTERNAL_MEM 0x80E | ||
71 | #define BCMA_CORE_MEMC_SDRAM 0x80F | ||
72 | #define BCMA_CORE_OFDM 0x810 | ||
73 | #define BCMA_CORE_EXTIF 0x811 | ||
74 | #define BCMA_CORE_80211 0x812 | ||
75 | #define BCMA_CORE_PHY_A 0x813 | ||
76 | #define BCMA_CORE_PHY_B 0x814 | ||
77 | #define BCMA_CORE_PHY_G 0x815 | ||
78 | #define BCMA_CORE_MIPS_3302 0x816 | ||
79 | #define BCMA_CORE_USB11_HOST 0x817 | ||
80 | #define BCMA_CORE_USB11_DEV 0x818 | ||
81 | #define BCMA_CORE_USB20_HOST 0x819 | ||
82 | #define BCMA_CORE_USB20_DEV 0x81A | ||
83 | #define BCMA_CORE_SDIO_HOST 0x81B | ||
84 | #define BCMA_CORE_ROBOSWITCH 0x81C | ||
85 | #define BCMA_CORE_PARA_ATA 0x81D | ||
86 | #define BCMA_CORE_SATA_XORDMA 0x81E | ||
87 | #define BCMA_CORE_ETHERNET_GBIT 0x81F | ||
88 | #define BCMA_CORE_PCIE 0x820 | ||
89 | #define BCMA_CORE_PHY_N 0x821 | ||
90 | #define BCMA_CORE_SRAM_CTL 0x822 | ||
91 | #define BCMA_CORE_MINI_MACPHY 0x823 | ||
92 | #define BCMA_CORE_ARM_1176 0x824 | ||
93 | #define BCMA_CORE_ARM_7TDMI 0x825 | ||
94 | #define BCMA_CORE_PHY_LP 0x826 | ||
95 | #define BCMA_CORE_PMU 0x827 | ||
96 | #define BCMA_CORE_PHY_SSN 0x828 | ||
97 | #define BCMA_CORE_SDIO_DEV 0x829 | ||
98 | #define BCMA_CORE_ARM_CM3 0x82A | ||
99 | #define BCMA_CORE_PHY_HT 0x82B | ||
100 | #define BCMA_CORE_MIPS_74K 0x82C | ||
101 | #define BCMA_CORE_MAC_GBIT 0x82D | ||
102 | #define BCMA_CORE_DDR12_MEM_CTL 0x82E | ||
103 | #define BCMA_CORE_PCIE_RC 0x82F /* PCIe Root Complex */ | ||
104 | #define BCMA_CORE_OCP_OCP_BRIDGE 0x830 | ||
105 | #define BCMA_CORE_SHARED_COMMON 0x831 | ||
106 | #define BCMA_CORE_OCP_AHB_BRIDGE 0x832 | ||
107 | #define BCMA_CORE_SPI_HOST 0x833 | ||
108 | #define BCMA_CORE_I2S 0x834 | ||
109 | #define BCMA_CORE_SDR_DDR1_MEM_CTL 0x835 /* SDR/DDR1 memory controller core */ | ||
110 | #define BCMA_CORE_SHIM 0x837 /* SHIM component in ubus/6362 */ | ||
111 | #define BCMA_CORE_DEFAULT 0xFFF | ||
112 | |||
113 | #define BCMA_MAX_NR_CORES 16 | ||
114 | |||
115 | struct bcma_device { | ||
116 | struct bcma_bus *bus; | ||
117 | struct bcma_device_id id; | ||
118 | |||
119 | struct device dev; | ||
120 | bool dev_registered; | ||
121 | |||
122 | u8 core_index; | ||
123 | |||
124 | u32 addr; | ||
125 | u32 wrap; | ||
126 | |||
127 | void *drvdata; | ||
128 | struct list_head list; | ||
129 | }; | ||
130 | |||
131 | static inline void *bcma_get_drvdata(struct bcma_device *core) | ||
132 | { | ||
133 | return core->drvdata; | ||
134 | } | ||
135 | static inline void bcma_set_drvdata(struct bcma_device *core, void *drvdata) | ||
136 | { | ||
137 | core->drvdata = drvdata; | ||
138 | } | ||
139 | |||
140 | struct bcma_driver { | ||
141 | const char *name; | ||
142 | const struct bcma_device_id *id_table; | ||
143 | |||
144 | int (*probe)(struct bcma_device *dev); | ||
145 | void (*remove)(struct bcma_device *dev); | ||
146 | int (*suspend)(struct bcma_device *dev, pm_message_t state); | ||
147 | int (*resume)(struct bcma_device *dev); | ||
148 | void (*shutdown)(struct bcma_device *dev); | ||
149 | |||
150 | struct device_driver drv; | ||
151 | }; | ||
152 | extern | ||
153 | int __bcma_driver_register(struct bcma_driver *drv, struct module *owner); | ||
154 | static inline int bcma_driver_register(struct bcma_driver *drv) | ||
155 | { | ||
156 | return __bcma_driver_register(drv, THIS_MODULE); | ||
157 | } | ||
158 | extern void bcma_driver_unregister(struct bcma_driver *drv); | ||
159 | |||
160 | struct bcma_bus { | ||
161 | /* The MMIO area. */ | ||
162 | void __iomem *mmio; | ||
163 | |||
164 | const struct bcma_host_ops *ops; | ||
165 | |||
166 | enum bcma_hosttype hosttype; | ||
167 | union { | ||
168 | /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ | ||
169 | struct pci_dev *host_pci; | ||
170 | /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */ | ||
171 | struct sdio_func *host_sdio; | ||
172 | }; | ||
173 | |||
174 | struct bcma_chipinfo chipinfo; | ||
175 | |||
176 | struct bcma_device *mapped_core; | ||
177 | struct list_head cores; | ||
178 | u8 nr_cores; | ||
179 | |||
180 | struct bcma_drv_cc drv_cc; | ||
181 | struct bcma_drv_pci drv_pci; | ||
182 | }; | ||
183 | |||
184 | extern inline u32 bcma_read8(struct bcma_device *core, u16 offset) | ||
185 | { | ||
186 | return core->bus->ops->read8(core, offset); | ||
187 | } | ||
188 | extern inline u32 bcma_read16(struct bcma_device *core, u16 offset) | ||
189 | { | ||
190 | return core->bus->ops->read16(core, offset); | ||
191 | } | ||
192 | extern inline u32 bcma_read32(struct bcma_device *core, u16 offset) | ||
193 | { | ||
194 | return core->bus->ops->read32(core, offset); | ||
195 | } | ||
196 | extern inline | ||
197 | void bcma_write8(struct bcma_device *core, u16 offset, u32 value) | ||
198 | { | ||
199 | core->bus->ops->write8(core, offset, value); | ||
200 | } | ||
201 | extern inline | ||
202 | void bcma_write16(struct bcma_device *core, u16 offset, u32 value) | ||
203 | { | ||
204 | core->bus->ops->write16(core, offset, value); | ||
205 | } | ||
206 | extern inline | ||
207 | void bcma_write32(struct bcma_device *core, u16 offset, u32 value) | ||
208 | { | ||
209 | core->bus->ops->write32(core, offset, value); | ||
210 | } | ||
211 | extern inline u32 bcma_aread32(struct bcma_device *core, u16 offset) | ||
212 | { | ||
213 | return core->bus->ops->aread32(core, offset); | ||
214 | } | ||
215 | extern inline | ||
216 | void bcma_awrite32(struct bcma_device *core, u16 offset, u32 value) | ||
217 | { | ||
218 | core->bus->ops->awrite32(core, offset, value); | ||
219 | } | ||
220 | |||
221 | extern bool bcma_core_is_enabled(struct bcma_device *core); | ||
222 | extern int bcma_core_enable(struct bcma_device *core, u32 flags); | ||
223 | |||
224 | #endif /* LINUX_BCMA_H_ */ | ||
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h new file mode 100644 index 000000000000..083c3b6cd5ce --- /dev/null +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
@@ -0,0 +1,302 @@ | |||
1 | #ifndef LINUX_BCMA_DRIVER_CC_H_ | ||
2 | #define LINUX_BCMA_DRIVER_CC_H_ | ||
3 | |||
4 | /** ChipCommon core registers. **/ | ||
5 | #define BCMA_CC_ID 0x0000 | ||
6 | #define BCMA_CC_ID_ID 0x0000FFFF | ||
7 | #define BCMA_CC_ID_ID_SHIFT 0 | ||
8 | #define BCMA_CC_ID_REV 0x000F0000 | ||
9 | #define BCMA_CC_ID_REV_SHIFT 16 | ||
10 | #define BCMA_CC_ID_PKG 0x00F00000 | ||
11 | #define BCMA_CC_ID_PKG_SHIFT 20 | ||
12 | #define BCMA_CC_ID_NRCORES 0x0F000000 | ||
13 | #define BCMA_CC_ID_NRCORES_SHIFT 24 | ||
14 | #define BCMA_CC_ID_TYPE 0xF0000000 | ||
15 | #define BCMA_CC_ID_TYPE_SHIFT 28 | ||
16 | #define BCMA_CC_CAP 0x0004 /* Capabilities */ | ||
17 | #define BCMA_CC_CAP_NRUART 0x00000003 /* # of UARTs */ | ||
18 | #define BCMA_CC_CAP_MIPSEB 0x00000004 /* MIPS in BigEndian Mode */ | ||
19 | #define BCMA_CC_CAP_UARTCLK 0x00000018 /* UART clock select */ | ||
20 | #define BCMA_CC_CAP_UARTCLK_INT 0x00000008 /* UARTs are driven by internal divided clock */ | ||
21 | #define BCMA_CC_CAP_UARTGPIO 0x00000020 /* UARTs on GPIO 15-12 */ | ||
22 | #define BCMA_CC_CAP_EXTBUS 0x000000C0 /* External buses present */ | ||
23 | #define BCMA_CC_CAP_FLASHT 0x00000700 /* Flash Type */ | ||
24 | #define BCMA_CC_FLASHT_NONE 0x00000000 /* No flash */ | ||
25 | #define BCMA_CC_FLASHT_STSER 0x00000100 /* ST serial flash */ | ||
26 | #define BCMA_CC_FLASHT_ATSER 0x00000200 /* Atmel serial flash */ | ||
27 | #define BCMA_CC_FLASHT_PARA 0x00000700 /* Parallel flash */ | ||
28 | #define BCMA_CC_CAP_PLLT 0x00038000 /* PLL Type */ | ||
29 | #define BCMA_PLLTYPE_NONE 0x00000000 | ||
30 | #define BCMA_PLLTYPE_1 0x00010000 /* 48Mhz base, 3 dividers */ | ||
31 | #define BCMA_PLLTYPE_2 0x00020000 /* 48Mhz, 4 dividers */ | ||
32 | #define BCMA_PLLTYPE_3 0x00030000 /* 25Mhz, 2 dividers */ | ||
33 | #define BCMA_PLLTYPE_4 0x00008000 /* 48Mhz, 4 dividers */ | ||
34 | #define BCMA_PLLTYPE_5 0x00018000 /* 25Mhz, 4 dividers */ | ||
35 | #define BCMA_PLLTYPE_6 0x00028000 /* 100/200 or 120/240 only */ | ||
36 | #define BCMA_PLLTYPE_7 0x00038000 /* 25Mhz, 4 dividers */ | ||
37 | #define BCMA_CC_CAP_PCTL 0x00040000 /* Power Control */ | ||
38 | #define BCMA_CC_CAP_OTPS 0x00380000 /* OTP size */ | ||
39 | #define BCMA_CC_CAP_OTPS_SHIFT 19 | ||
40 | #define BCMA_CC_CAP_OTPS_BASE 5 | ||
41 | #define BCMA_CC_CAP_JTAGM 0x00400000 /* JTAG master present */ | ||
42 | #define BCMA_CC_CAP_BROM 0x00800000 /* Internal boot ROM active */ | ||
43 | #define BCMA_CC_CAP_64BIT 0x08000000 /* 64-bit Backplane */ | ||
44 | #define BCMA_CC_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */ | ||
45 | #define BCMA_CC_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */ | ||
46 | #define BCMA_CC_CAP_SPROM 0x40000000 /* SPROM present */ | ||
47 | #define BCMA_CC_CORECTL 0x0008 | ||
48 | #define BCMA_CC_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ | ||
49 | #define BCMA_CC_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ | ||
50 | #define BCMA_CC_CORECTL_UARTCLKEN 0x00000008 /* UART clock enable (rev >= 21) */ | ||
51 | #define BCMA_CC_BIST 0x000C | ||
52 | #define BCMA_CC_OTPS 0x0010 /* OTP status */ | ||
53 | #define BCMA_CC_OTPS_PROGFAIL 0x80000000 | ||
54 | #define BCMA_CC_OTPS_PROTECT 0x00000007 | ||
55 | #define BCMA_CC_OTPS_HW_PROTECT 0x00000001 | ||
56 | #define BCMA_CC_OTPS_SW_PROTECT 0x00000002 | ||
57 | #define BCMA_CC_OTPS_CID_PROTECT 0x00000004 | ||
58 | #define BCMA_CC_OTPC 0x0014 /* OTP control */ | ||
59 | #define BCMA_CC_OTPC_RECWAIT 0xFF000000 | ||
60 | #define BCMA_CC_OTPC_PROGWAIT 0x00FFFF00 | ||
61 | #define BCMA_CC_OTPC_PRW_SHIFT 8 | ||
62 | #define BCMA_CC_OTPC_MAXFAIL 0x00000038 | ||
63 | #define BCMA_CC_OTPC_VSEL 0x00000006 | ||
64 | #define BCMA_CC_OTPC_SELVL 0x00000001 | ||
65 | #define BCMA_CC_OTPP 0x0018 /* OTP prog */ | ||
66 | #define BCMA_CC_OTPP_COL 0x000000FF | ||
67 | #define BCMA_CC_OTPP_ROW 0x0000FF00 | ||
68 | #define BCMA_CC_OTPP_ROW_SHIFT 8 | ||
69 | #define BCMA_CC_OTPP_READERR 0x10000000 | ||
70 | #define BCMA_CC_OTPP_VALUE 0x20000000 | ||
71 | #define BCMA_CC_OTPP_READ 0x40000000 | ||
72 | #define BCMA_CC_OTPP_START 0x80000000 | ||
73 | #define BCMA_CC_OTPP_BUSY 0x80000000 | ||
74 | #define BCMA_CC_IRQSTAT 0x0020 | ||
75 | #define BCMA_CC_IRQMASK 0x0024 | ||
76 | #define BCMA_CC_IRQ_GPIO 0x00000001 /* gpio intr */ | ||
77 | #define BCMA_CC_IRQ_EXT 0x00000002 /* ro: ext intr pin (corerev >= 3) */ | ||
78 | #define BCMA_CC_IRQ_WDRESET 0x80000000 /* watchdog reset occurred */ | ||
79 | #define BCMA_CC_CHIPCTL 0x0028 /* Rev >= 11 only */ | ||
80 | #define BCMA_CC_CHIPSTAT 0x002C /* Rev >= 11 only */ | ||
81 | #define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ | ||
82 | #define BCMA_CC_JCMD_START 0x80000000 | ||
83 | #define BCMA_CC_JCMD_BUSY 0x80000000 | ||
84 | #define BCMA_CC_JCMD_PAUSE 0x40000000 | ||
85 | #define BCMA_CC_JCMD0_ACC_MASK 0x0000F000 | ||
86 | #define BCMA_CC_JCMD0_ACC_IRDR 0x00000000 | ||
87 | #define BCMA_CC_JCMD0_ACC_DR 0x00001000 | ||
88 | #define BCMA_CC_JCMD0_ACC_IR 0x00002000 | ||
89 | #define BCMA_CC_JCMD0_ACC_RESET 0x00003000 | ||
90 | #define BCMA_CC_JCMD0_ACC_IRPDR 0x00004000 | ||
91 | #define BCMA_CC_JCMD0_ACC_PDR 0x00005000 | ||
92 | #define BCMA_CC_JCMD0_IRW_MASK 0x00000F00 | ||
93 | #define BCMA_CC_JCMD_ACC_MASK 0x000F0000 /* Changes for corerev 11 */ | ||
94 | #define BCMA_CC_JCMD_ACC_IRDR 0x00000000 | ||
95 | #define BCMA_CC_JCMD_ACC_DR 0x00010000 | ||
96 | #define BCMA_CC_JCMD_ACC_IR 0x00020000 | ||
97 | #define BCMA_CC_JCMD_ACC_RESET 0x00030000 | ||
98 | #define BCMA_CC_JCMD_ACC_IRPDR 0x00040000 | ||
99 | #define BCMA_CC_JCMD_ACC_PDR 0x00050000 | ||
100 | #define BCMA_CC_JCMD_IRW_MASK 0x00001F00 | ||
101 | #define BCMA_CC_JCMD_IRW_SHIFT 8 | ||
102 | #define BCMA_CC_JCMD_DRW_MASK 0x0000003F | ||
103 | #define BCMA_CC_JIR 0x0034 /* Rev >= 10 only */ | ||
104 | #define BCMA_CC_JDR 0x0038 /* Rev >= 10 only */ | ||
105 | #define BCMA_CC_JCTL 0x003C /* Rev >= 10 only */ | ||
106 | #define BCMA_CC_JCTL_FORCE_CLK 4 /* Force clock */ | ||
107 | #define BCMA_CC_JCTL_EXT_EN 2 /* Enable external targets */ | ||
108 | #define BCMA_CC_JCTL_EN 1 /* Enable Jtag master */ | ||
109 | #define BCMA_CC_FLASHCTL 0x0040 | ||
110 | #define BCMA_CC_FLASHCTL_START 0x80000000 | ||
111 | #define BCMA_CC_FLASHCTL_BUSY BCMA_CC_FLASHCTL_START | ||
112 | #define BCMA_CC_FLASHADDR 0x0044 | ||
113 | #define BCMA_CC_FLASHDATA 0x0048 | ||
114 | #define BCMA_CC_BCAST_ADDR 0x0050 | ||
115 | #define BCMA_CC_BCAST_DATA 0x0054 | ||
116 | #define BCMA_CC_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | ||
117 | #define BCMA_CC_GPIOPULLDOWN 0x005C /* Rev >= 20 only */ | ||
118 | #define BCMA_CC_GPIOIN 0x0060 | ||
119 | #define BCMA_CC_GPIOOUT 0x0064 | ||
120 | #define BCMA_CC_GPIOOUTEN 0x0068 | ||
121 | #define BCMA_CC_GPIOCTL 0x006C | ||
122 | #define BCMA_CC_GPIOPOL 0x0070 | ||
123 | #define BCMA_CC_GPIOIRQ 0x0074 | ||
124 | #define BCMA_CC_WATCHDOG 0x0080 | ||
125 | #define BCMA_CC_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ | ||
126 | #define BCMA_CC_GPIOTIMER_OFFTIME 0x0000FFFF | ||
127 | #define BCMA_CC_GPIOTIMER_OFFTIME_SHIFT 0 | ||
128 | #define BCMA_CC_GPIOTIMER_ONTIME 0xFFFF0000 | ||
129 | #define BCMA_CC_GPIOTIMER_ONTIME_SHIFT 16 | ||
130 | #define BCMA_CC_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ | ||
131 | #define BCMA_CC_CLOCK_N 0x0090 | ||
132 | #define BCMA_CC_CLOCK_SB 0x0094 | ||
133 | #define BCMA_CC_CLOCK_PCI 0x0098 | ||
134 | #define BCMA_CC_CLOCK_M2 0x009C | ||
135 | #define BCMA_CC_CLOCK_MIPS 0x00A0 | ||
136 | #define BCMA_CC_CLKDIV 0x00A4 /* Rev >= 3 only */ | ||
137 | #define BCMA_CC_CLKDIV_SFLASH 0x0F000000 | ||
138 | #define BCMA_CC_CLKDIV_SFLASH_SHIFT 24 | ||
139 | #define BCMA_CC_CLKDIV_OTP 0x000F0000 | ||
140 | #define BCMA_CC_CLKDIV_OTP_SHIFT 16 | ||
141 | #define BCMA_CC_CLKDIV_JTAG 0x00000F00 | ||
142 | #define BCMA_CC_CLKDIV_JTAG_SHIFT 8 | ||
143 | #define BCMA_CC_CLKDIV_UART 0x000000FF | ||
144 | #define BCMA_CC_CAP_EXT 0x00AC /* Capabilities */ | ||
145 | #define BCMA_CC_PLLONDELAY 0x00B0 /* Rev >= 4 only */ | ||
146 | #define BCMA_CC_FREFSELDELAY 0x00B4 /* Rev >= 4 only */ | ||
147 | #define BCMA_CC_SLOWCLKCTL 0x00B8 /* 6 <= Rev <= 9 only */ | ||
148 | #define BCMA_CC_SLOWCLKCTL_SRC 0x00000007 /* slow clock source mask */ | ||
149 | #define BCMA_CC_SLOWCLKCTL_SRC_LPO 0x00000000 /* source of slow clock is LPO */ | ||
150 | #define BCMA_CC_SLOWCLKCTL_SRC_XTAL 0x00000001 /* source of slow clock is crystal */ | ||
151 | #define BCMA_CC_SLOECLKCTL_SRC_PCI 0x00000002 /* source of slow clock is PCI */ | ||
152 | #define BCMA_CC_SLOWCLKCTL_LPOFREQ 0x00000200 /* LPOFreqSel, 1: 160Khz, 0: 32KHz */ | ||
153 | #define BCMA_CC_SLOWCLKCTL_LPOPD 0x00000400 /* LPOPowerDown, 1: LPO is disabled, 0: LPO is enabled */ | ||
154 | #define BCMA_CC_SLOWCLKCTL_FSLOW 0x00000800 /* ForceSlowClk, 1: sb/cores running on slow clock, 0: power logic control */ | ||
155 | #define BCMA_CC_SLOWCLKCTL_IPLL 0x00001000 /* IgnorePllOffReq, 1/0: power logic ignores/honors PLL clock disable requests from core */ | ||
156 | #define BCMA_CC_SLOWCLKCTL_ENXTAL 0x00002000 /* XtalControlEn, 1/0: power logic does/doesn't disable crystal when appropriate */ | ||
157 | #define BCMA_CC_SLOWCLKCTL_XTALPU 0x00004000 /* XtalPU (RO), 1/0: crystal running/disabled */ | ||
158 | #define BCMA_CC_SLOWCLKCTL_CLKDIV 0xFFFF0000 /* ClockDivider (SlowClk = 1/(4+divisor)) */ | ||
159 | #define BCMA_CC_SLOWCLKCTL_CLKDIV_SHIFT 16 | ||
160 | #define BCMA_CC_SYSCLKCTL 0x00C0 /* Rev >= 3 only */ | ||
161 | #define BCMA_CC_SYSCLKCTL_IDLPEN 0x00000001 /* ILPen: Enable Idle Low Power */ | ||
162 | #define BCMA_CC_SYSCLKCTL_ALPEN 0x00000002 /* ALPen: Enable Active Low Power */ | ||
163 | #define BCMA_CC_SYSCLKCTL_PLLEN 0x00000004 /* ForcePLLOn */ | ||
164 | #define BCMA_CC_SYSCLKCTL_FORCEALP 0x00000008 /* Force ALP (or HT if ALPen is not set */ | ||
165 | #define BCMA_CC_SYSCLKCTL_FORCEHT 0x00000010 /* Force HT */ | ||
166 | #define BCMA_CC_SYSCLKCTL_CLKDIV 0xFFFF0000 /* ClkDiv (ILP = 1/(4+divisor)) */ | ||
167 | #define BCMA_CC_SYSCLKCTL_CLKDIV_SHIFT 16 | ||
168 | #define BCMA_CC_CLKSTSTR 0x00C4 /* Rev >= 3 only */ | ||
169 | #define BCMA_CC_EROM 0x00FC | ||
170 | #define BCMA_CC_PCMCIA_CFG 0x0100 | ||
171 | #define BCMA_CC_PCMCIA_MEMWAIT 0x0104 | ||
172 | #define BCMA_CC_PCMCIA_ATTRWAIT 0x0108 | ||
173 | #define BCMA_CC_PCMCIA_IOWAIT 0x010C | ||
174 | #define BCMA_CC_IDE_CFG 0x0110 | ||
175 | #define BCMA_CC_IDE_MEMWAIT 0x0114 | ||
176 | #define BCMA_CC_IDE_ATTRWAIT 0x0118 | ||
177 | #define BCMA_CC_IDE_IOWAIT 0x011C | ||
178 | #define BCMA_CC_PROG_CFG 0x0120 | ||
179 | #define BCMA_CC_PROG_WAITCNT 0x0124 | ||
180 | #define BCMA_CC_FLASH_CFG 0x0128 | ||
181 | #define BCMA_CC_FLASH_WAITCNT 0x012C | ||
182 | #define BCMA_CC_CLKCTLST 0x01E0 /* Clock control and status (rev >= 20) */ | ||
183 | #define BCMA_CC_CLKCTLST_FORCEALP 0x00000001 /* Force ALP request */ | ||
184 | #define BCMA_CC_CLKCTLST_FORCEHT 0x00000002 /* Force HT request */ | ||
185 | #define BCMA_CC_CLKCTLST_FORCEILP 0x00000004 /* Force ILP request */ | ||
186 | #define BCMA_CC_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | ||
187 | #define BCMA_CC_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | ||
188 | #define BCMA_CC_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | ||
189 | #define BCMA_CC_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | ||
190 | #define BCMA_CC_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | ||
191 | #define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | ||
192 | #define BCMA_CC_UART0_DATA 0x0300 | ||
193 | #define BCMA_CC_UART0_IMR 0x0304 | ||
194 | #define BCMA_CC_UART0_FCR 0x0308 | ||
195 | #define BCMA_CC_UART0_LCR 0x030C | ||
196 | #define BCMA_CC_UART0_MCR 0x0310 | ||
197 | #define BCMA_CC_UART0_LSR 0x0314 | ||
198 | #define BCMA_CC_UART0_MSR 0x0318 | ||
199 | #define BCMA_CC_UART0_SCRATCH 0x031C | ||
200 | #define BCMA_CC_UART1_DATA 0x0400 | ||
201 | #define BCMA_CC_UART1_IMR 0x0404 | ||
202 | #define BCMA_CC_UART1_FCR 0x0408 | ||
203 | #define BCMA_CC_UART1_LCR 0x040C | ||
204 | #define BCMA_CC_UART1_MCR 0x0410 | ||
205 | #define BCMA_CC_UART1_LSR 0x0414 | ||
206 | #define BCMA_CC_UART1_MSR 0x0418 | ||
207 | #define BCMA_CC_UART1_SCRATCH 0x041C | ||
208 | /* PMU registers (rev >= 20) */ | ||
209 | #define BCMA_CC_PMU_CTL 0x0600 /* PMU control */ | ||
210 | #define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ | ||
211 | #define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16 | ||
212 | #define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ | ||
213 | #define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ | ||
214 | #define BCMA_CC_PMU_CTL_ALPREQEN 0x00000080 /* ALP req enable */ | ||
215 | #define BCMA_CC_PMU_CTL_XTALFREQ 0x0000007C /* Crystal freq */ | ||
216 | #define BCMA_CC_PMU_CTL_XTALFREQ_SHIFT 2 | ||
217 | #define BCMA_CC_PMU_CTL_ILPDIVEN 0x00000002 /* ILP div enable */ | ||
218 | #define BCMA_CC_PMU_CTL_LPOSEL 0x00000001 /* LPO sel */ | ||
219 | #define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */ | ||
220 | #define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */ | ||
221 | #define BCMA_CC_PMU_STAT 0x0608 /* PMU status */ | ||
222 | #define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */ | ||
223 | #define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */ | ||
224 | #define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */ | ||
225 | #define BCMA_CC_PMU_STAT_HAVEHT 0x00000004 /* HT available */ | ||
226 | #define BCMA_CC_PMU_STAT_RESINIT 0x00000003 /* Res init */ | ||
227 | #define BCMA_CC_PMU_RES_STAT 0x060C /* PMU res status */ | ||
228 | #define BCMA_CC_PMU_RES_PEND 0x0610 /* PMU res pending */ | ||
229 | #define BCMA_CC_PMU_TIMER 0x0614 /* PMU timer */ | ||
230 | #define BCMA_CC_PMU_MINRES_MSK 0x0618 /* PMU min res mask */ | ||
231 | #define BCMA_CC_PMU_MAXRES_MSK 0x061C /* PMU max res mask */ | ||
232 | #define BCMA_CC_PMU_RES_TABSEL 0x0620 /* PMU res table sel */ | ||
233 | #define BCMA_CC_PMU_RES_DEPMSK 0x0624 /* PMU res dep mask */ | ||
234 | #define BCMA_CC_PMU_RES_UPDNTM 0x0628 /* PMU res updown timer */ | ||
235 | #define BCMA_CC_PMU_RES_TIMER 0x062C /* PMU res timer */ | ||
236 | #define BCMA_CC_PMU_CLKSTRETCH 0x0630 /* PMU clockstretch */ | ||
237 | #define BCMA_CC_PMU_WATCHDOG 0x0634 /* PMU watchdog */ | ||
238 | #define BCMA_CC_PMU_RES_REQTS 0x0640 /* PMU res req timer sel */ | ||
239 | #define BCMA_CC_PMU_RES_REQT 0x0644 /* PMU res req timer */ | ||
240 | #define BCMA_CC_PMU_RES_REQM 0x0648 /* PMU res req mask */ | ||
241 | #define BCMA_CC_CHIPCTL_ADDR 0x0650 | ||
242 | #define BCMA_CC_CHIPCTL_DATA 0x0654 | ||
243 | #define BCMA_CC_REGCTL_ADDR 0x0658 | ||
244 | #define BCMA_CC_REGCTL_DATA 0x065C | ||
245 | #define BCMA_CC_PLLCTL_ADDR 0x0660 | ||
246 | #define BCMA_CC_PLLCTL_DATA 0x0664 | ||
247 | |||
248 | /* Data for the PMU, if available. | ||
249 | * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) | ||
250 | */ | ||
251 | struct bcma_chipcommon_pmu { | ||
252 | u8 rev; /* PMU revision */ | ||
253 | u32 crystalfreq; /* The active crystal frequency (in kHz) */ | ||
254 | }; | ||
255 | |||
256 | struct bcma_drv_cc { | ||
257 | struct bcma_device *core; | ||
258 | u32 status; | ||
259 | u32 capabilities; | ||
260 | u32 capabilities_ext; | ||
261 | /* Fast Powerup Delay constant */ | ||
262 | u16 fast_pwrup_delay; | ||
263 | struct bcma_chipcommon_pmu pmu; | ||
264 | }; | ||
265 | |||
266 | /* Register access */ | ||
267 | #define bcma_cc_read32(cc, offset) \ | ||
268 | bcma_read32((cc)->core, offset) | ||
269 | #define bcma_cc_write32(cc, offset, val) \ | ||
270 | bcma_write32((cc)->core, offset, val) | ||
271 | |||
272 | #define bcma_cc_mask32(cc, offset, mask) \ | ||
273 | bcma_cc_write32(cc, offset, bcma_cc_read32(cc, offset) & (mask)) | ||
274 | #define bcma_cc_set32(cc, offset, set) \ | ||
275 | bcma_cc_write32(cc, offset, bcma_cc_read32(cc, offset) | (set)) | ||
276 | #define bcma_cc_maskset32(cc, offset, mask, set) \ | ||
277 | bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set)) | ||
278 | |||
279 | extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); | ||
280 | |||
281 | extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); | ||
282 | extern void bcma_chipco_resume(struct bcma_drv_cc *cc); | ||
283 | |||
284 | extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, | ||
285 | u32 ticks); | ||
286 | |||
287 | void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
288 | |||
289 | u32 bcma_chipco_irq_status(struct bcma_drv_cc *cc, u32 mask); | ||
290 | |||
291 | /* Chipcommon GPIO pin access. */ | ||
292 | u32 bcma_chipco_gpio_in(struct bcma_drv_cc *cc, u32 mask); | ||
293 | u32 bcma_chipco_gpio_out(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
294 | u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
295 | u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
296 | u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
297 | u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
298 | |||
299 | /* PMU support */ | ||
300 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); | ||
301 | |||
302 | #endif /* LINUX_BCMA_DRIVER_CC_H_ */ | ||
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h new file mode 100644 index 000000000000..b7e191cf00ec --- /dev/null +++ b/include/linux/bcma/bcma_driver_pci.h | |||
@@ -0,0 +1,89 @@ | |||
1 | #ifndef LINUX_BCMA_DRIVER_PCI_H_ | ||
2 | #define LINUX_BCMA_DRIVER_PCI_H_ | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct pci_dev; | ||
7 | |||
8 | /** PCI core registers. **/ | ||
9 | #define BCMA_CORE_PCI_CTL 0x0000 /* PCI Control */ | ||
10 | #define BCMA_CORE_PCI_CTL_RST_OE 0x00000001 /* PCI_RESET Output Enable */ | ||
11 | #define BCMA_CORE_PCI_CTL_RST 0x00000002 /* PCI_RESET driven out to pin */ | ||
12 | #define BCMA_CORE_PCI_CTL_CLK_OE 0x00000004 /* Clock gate Output Enable */ | ||
13 | #define BCMA_CORE_PCI_CTL_CLK 0x00000008 /* Gate for clock driven out to pin */ | ||
14 | #define BCMA_CORE_PCI_ARBCTL 0x0010 /* PCI Arbiter Control */ | ||
15 | #define BCMA_CORE_PCI_ARBCTL_INTERN 0x00000001 /* Use internal arbiter */ | ||
16 | #define BCMA_CORE_PCI_ARBCTL_EXTERN 0x00000002 /* Use external arbiter */ | ||
17 | #define BCMA_CORE_PCI_ARBCTL_PARKID 0x00000006 /* Mask, selects which agent is parked on an idle bus */ | ||
18 | #define BCMA_CORE_PCI_ARBCTL_PARKID_LAST 0x00000000 /* Last requestor */ | ||
19 | #define BCMA_CORE_PCI_ARBCTL_PARKID_4710 0x00000002 /* 4710 */ | ||
20 | #define BCMA_CORE_PCI_ARBCTL_PARKID_EXT0 0x00000004 /* External requestor 0 */ | ||
21 | #define BCMA_CORE_PCI_ARBCTL_PARKID_EXT1 0x00000006 /* External requestor 1 */ | ||
22 | #define BCMA_CORE_PCI_ISTAT 0x0020 /* Interrupt status */ | ||
23 | #define BCMA_CORE_PCI_ISTAT_INTA 0x00000001 /* PCI INTA# */ | ||
24 | #define BCMA_CORE_PCI_ISTAT_INTB 0x00000002 /* PCI INTB# */ | ||
25 | #define BCMA_CORE_PCI_ISTAT_SERR 0x00000004 /* PCI SERR# (write to clear) */ | ||
26 | #define BCMA_CORE_PCI_ISTAT_PERR 0x00000008 /* PCI PERR# (write to clear) */ | ||
27 | #define BCMA_CORE_PCI_ISTAT_PME 0x00000010 /* PCI PME# */ | ||
28 | #define BCMA_CORE_PCI_IMASK 0x0024 /* Interrupt mask */ | ||
29 | #define BCMA_CORE_PCI_IMASK_INTA 0x00000001 /* PCI INTA# */ | ||
30 | #define BCMA_CORE_PCI_IMASK_INTB 0x00000002 /* PCI INTB# */ | ||
31 | #define BCMA_CORE_PCI_IMASK_SERR 0x00000004 /* PCI SERR# */ | ||
32 | #define BCMA_CORE_PCI_IMASK_PERR 0x00000008 /* PCI PERR# */ | ||
33 | #define BCMA_CORE_PCI_IMASK_PME 0x00000010 /* PCI PME# */ | ||
34 | #define BCMA_CORE_PCI_MBOX 0x0028 /* Backplane to PCI Mailbox */ | ||
35 | #define BCMA_CORE_PCI_MBOX_F0_0 0x00000100 /* PCI function 0, INT 0 */ | ||
36 | #define BCMA_CORE_PCI_MBOX_F0_1 0x00000200 /* PCI function 0, INT 1 */ | ||
37 | #define BCMA_CORE_PCI_MBOX_F1_0 0x00000400 /* PCI function 1, INT 0 */ | ||
38 | #define BCMA_CORE_PCI_MBOX_F1_1 0x00000800 /* PCI function 1, INT 1 */ | ||
39 | #define BCMA_CORE_PCI_MBOX_F2_0 0x00001000 /* PCI function 2, INT 0 */ | ||
40 | #define BCMA_CORE_PCI_MBOX_F2_1 0x00002000 /* PCI function 2, INT 1 */ | ||
41 | #define BCMA_CORE_PCI_MBOX_F3_0 0x00004000 /* PCI function 3, INT 0 */ | ||
42 | #define BCMA_CORE_PCI_MBOX_F3_1 0x00008000 /* PCI function 3, INT 1 */ | ||
43 | #define BCMA_CORE_PCI_BCAST_ADDR 0x0050 /* Backplane Broadcast Address */ | ||
44 | #define BCMA_CORE_PCI_BCAST_ADDR_MASK 0x000000FF | ||
45 | #define BCMA_CORE_PCI_BCAST_DATA 0x0054 /* Backplane Broadcast Data */ | ||
46 | #define BCMA_CORE_PCI_GPIO_IN 0x0060 /* rev >= 2 only */ | ||
47 | #define BCMA_CORE_PCI_GPIO_OUT 0x0064 /* rev >= 2 only */ | ||
48 | #define BCMA_CORE_PCI_GPIO_ENABLE 0x0068 /* rev >= 2 only */ | ||
49 | #define BCMA_CORE_PCI_GPIO_CTL 0x006C /* rev >= 2 only */ | ||
50 | #define BCMA_CORE_PCI_SBTOPCI0 0x0100 /* Backplane to PCI translation 0 (sbtopci0) */ | ||
51 | #define BCMA_CORE_PCI_SBTOPCI0_MASK 0xFC000000 | ||
52 | #define BCMA_CORE_PCI_SBTOPCI1 0x0104 /* Backplane to PCI translation 1 (sbtopci1) */ | ||
53 | #define BCMA_CORE_PCI_SBTOPCI1_MASK 0xFC000000 | ||
54 | #define BCMA_CORE_PCI_SBTOPCI2 0x0108 /* Backplane to PCI translation 2 (sbtopci2) */ | ||
55 | #define BCMA_CORE_PCI_SBTOPCI2_MASK 0xC0000000 | ||
56 | #define BCMA_CORE_PCI_PCICFG0 0x0400 /* PCI config space 0 (rev >= 8) */ | ||
57 | #define BCMA_CORE_PCI_PCICFG1 0x0500 /* PCI config space 1 (rev >= 8) */ | ||
58 | #define BCMA_CORE_PCI_PCICFG2 0x0600 /* PCI config space 2 (rev >= 8) */ | ||
59 | #define BCMA_CORE_PCI_PCICFG3 0x0700 /* PCI config space 3 (rev >= 8) */ | ||
60 | #define BCMA_CORE_PCI_SPROM(wordoffset) (0x0800 + ((wordoffset) * 2)) /* SPROM shadow area (72 bytes) */ | ||
61 | |||
62 | /* SBtoPCIx */ | ||
63 | #define BCMA_CORE_PCI_SBTOPCI_MEM 0x00000000 | ||
64 | #define BCMA_CORE_PCI_SBTOPCI_IO 0x00000001 | ||
65 | #define BCMA_CORE_PCI_SBTOPCI_CFG0 0x00000002 | ||
66 | #define BCMA_CORE_PCI_SBTOPCI_CFG1 0x00000003 | ||
67 | #define BCMA_CORE_PCI_SBTOPCI_PREF 0x00000004 /* Prefetch enable */ | ||
68 | #define BCMA_CORE_PCI_SBTOPCI_BURST 0x00000008 /* Burst enable */ | ||
69 | #define BCMA_CORE_PCI_SBTOPCI_MRM 0x00000020 /* Memory Read Multiple */ | ||
70 | #define BCMA_CORE_PCI_SBTOPCI_RC 0x00000030 /* Read Command mask (rev >= 11) */ | ||
71 | #define BCMA_CORE_PCI_SBTOPCI_RC_READ 0x00000000 /* Memory read */ | ||
72 | #define BCMA_CORE_PCI_SBTOPCI_RC_READL 0x00000010 /* Memory read line */ | ||
73 | #define BCMA_CORE_PCI_SBTOPCI_RC_READM 0x00000020 /* Memory read multiple */ | ||
74 | |||
75 | /* PCIcore specific boardflags */ | ||
76 | #define BCMA_CORE_PCI_BFL_NOPCI 0x00000400 /* Board leaves PCI floating */ | ||
77 | |||
78 | struct bcma_drv_pci { | ||
79 | struct bcma_device *core; | ||
80 | u8 setup_done:1; | ||
81 | }; | ||
82 | |||
83 | /* Register access */ | ||
84 | #define pcicore_read32(pc, offset) bcma_read32((pc)->core, offset) | ||
85 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | ||
86 | |||
87 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); | ||
88 | |||
89 | #endif /* LINUX_BCMA_DRIVER_PCI_H_ */ | ||
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h new file mode 100644 index 000000000000..f82d88a960ce --- /dev/null +++ b/include/linux/bcma/bcma_regs.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef LINUX_BCMA_REGS_H_ | ||
2 | #define LINUX_BCMA_REGS_H_ | ||
3 | |||
4 | /* Agent registers (common for every core) */ | ||
5 | #define BCMA_IOCTL 0x0408 | ||
6 | #define BCMA_IOCTL_CLK 0x0001 | ||
7 | #define BCMA_IOCTL_FGC 0x0002 | ||
8 | #define BCMA_IOCTL_CORE_BITS 0x3FFC | ||
9 | #define BCMA_IOCTL_PME_EN 0x4000 | ||
10 | #define BCMA_IOCTL_BIST_EN 0x8000 | ||
11 | #define BCMA_RESET_CTL 0x0800 | ||
12 | #define BCMA_RESET_CTL_RESET 0x0001 | ||
13 | |||
14 | /* BCMA PCI config space registers. */ | ||
15 | #define BCMA_PCI_PMCSR 0x44 | ||
16 | #define BCMA_PCI_PE 0x100 | ||
17 | #define BCMA_PCI_BAR0_WIN 0x80 /* Backplane address space 0 */ | ||
18 | #define BCMA_PCI_BAR1_WIN 0x84 /* Backplane address space 1 */ | ||
19 | #define BCMA_PCI_SPROMCTL 0x88 /* SPROM control */ | ||
20 | #define BCMA_PCI_SPROMCTL_WE 0x10 /* SPROM write enable */ | ||
21 | #define BCMA_PCI_BAR1_CONTROL 0x8c /* Address space 1 burst control */ | ||
22 | #define BCMA_PCI_IRQS 0x90 /* PCI interrupts */ | ||
23 | #define BCMA_PCI_IRQMASK 0x94 /* PCI IRQ control and mask (pcirev >= 6 only) */ | ||
24 | #define BCMA_PCI_BACKPLANE_IRQS 0x98 /* Backplane Interrupts */ | ||
25 | #define BCMA_PCI_BAR0_WIN2 0xAC | ||
26 | #define BCMA_PCI_GPIO_IN 0xB0 /* GPIO Input (pcirev >= 3 only) */ | ||
27 | #define BCMA_PCI_GPIO_OUT 0xB4 /* GPIO Output (pcirev >= 3 only) */ | ||
28 | #define BCMA_PCI_GPIO_OUT_ENABLE 0xB8 /* GPIO Output Enable/Disable (pcirev >= 3 only) */ | ||
29 | #define BCMA_PCI_GPIO_SCS 0x10 /* PCI config space bit 4 for 4306c0 slow clock source */ | ||
30 | #define BCMA_PCI_GPIO_HWRAD 0x20 /* PCI config space GPIO 13 for hw radio disable */ | ||
31 | #define BCMA_PCI_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ | ||
32 | #define BCMA_PCI_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ | ||
33 | |||
34 | #endif /* LINUX_BCMA_REGS_H_ */ | ||
diff --git a/include/linux/can/core.h b/include/linux/can/core.h index 6f70a6d3a16e..5ce6b5d62ecc 100644 --- a/include/linux/can/core.h +++ b/include/linux/can/core.h | |||
@@ -44,8 +44,8 @@ struct can_proto { | |||
44 | 44 | ||
45 | /* function prototypes for the CAN networklayer core (af_can.c) */ | 45 | /* function prototypes for the CAN networklayer core (af_can.c) */ |
46 | 46 | ||
47 | extern int can_proto_register(struct can_proto *cp); | 47 | extern int can_proto_register(const struct can_proto *cp); |
48 | extern void can_proto_unregister(struct can_proto *cp); | 48 | extern void can_proto_unregister(const struct can_proto *cp); |
49 | 49 | ||
50 | extern int can_rx_register(struct net_device *dev, canid_t can_id, | 50 | extern int can_rx_register(struct net_device *dev, canid_t can_id, |
51 | canid_t mask, | 51 | canid_t mask, |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index dc80d8294247..c6a850ab2ec5 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -24,7 +24,10 @@ struct ethtool_cmd { | |||
24 | __u32 cmd; | 24 | __u32 cmd; |
25 | __u32 supported; /* Features this interface supports */ | 25 | __u32 supported; /* Features this interface supports */ |
26 | __u32 advertising; /* Features this interface advertises */ | 26 | __u32 advertising; /* Features this interface advertises */ |
27 | __u16 speed; /* The forced speed, 10Mb, 100Mb, gigabit */ | 27 | __u16 speed; /* The forced speed (lower bits) in |
28 | * Mbps. Please use | ||
29 | * ethtool_cmd_speed()/_set() to | ||
30 | * access it */ | ||
28 | __u8 duplex; /* Duplex, half or full */ | 31 | __u8 duplex; /* Duplex, half or full */ |
29 | __u8 port; /* Which connector port */ | 32 | __u8 port; /* Which connector port */ |
30 | __u8 phy_address; | 33 | __u8 phy_address; |
@@ -33,7 +36,10 @@ struct ethtool_cmd { | |||
33 | __u8 mdio_support; | 36 | __u8 mdio_support; |
34 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ | 37 | __u32 maxtxpkt; /* Tx pkts before generating tx int */ |
35 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ | 38 | __u32 maxrxpkt; /* Rx pkts before generating rx int */ |
36 | __u16 speed_hi; | 39 | __u16 speed_hi; /* The forced speed (upper |
40 | * bits) in Mbps. Please use | ||
41 | * ethtool_cmd_speed()/_set() to | ||
42 | * access it */ | ||
37 | __u8 eth_tp_mdix; | 43 | __u8 eth_tp_mdix; |
38 | __u8 reserved2; | 44 | __u8 reserved2; |
39 | __u32 lp_advertising; /* Features the link partner advertises */ | 45 | __u32 lp_advertising; /* Features the link partner advertises */ |
@@ -41,14 +47,14 @@ struct ethtool_cmd { | |||
41 | }; | 47 | }; |
42 | 48 | ||
43 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, | 49 | static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep, |
44 | __u32 speed) | 50 | __u32 speed) |
45 | { | 51 | { |
46 | 52 | ||
47 | ep->speed = (__u16)speed; | 53 | ep->speed = (__u16)speed; |
48 | ep->speed_hi = (__u16)(speed >> 16); | 54 | ep->speed_hi = (__u16)(speed >> 16); |
49 | } | 55 | } |
50 | 56 | ||
51 | static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep) | 57 | static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep) |
52 | { | 58 | { |
53 | return (ep->speed_hi << 16) | ep->speed; | 59 | return (ep->speed_hi << 16) | ep->speed; |
54 | } | 60 | } |
@@ -229,6 +235,34 @@ struct ethtool_ringparam { | |||
229 | __u32 tx_pending; | 235 | __u32 tx_pending; |
230 | }; | 236 | }; |
231 | 237 | ||
238 | /** | ||
239 | * struct ethtool_channels - configuring number of network channel | ||
240 | * @cmd: ETHTOOL_{G,S}CHANNELS | ||
241 | * @max_rx: Read only. Maximum number of receive channel the driver support. | ||
242 | * @max_tx: Read only. Maximum number of transmit channel the driver support. | ||
243 | * @max_other: Read only. Maximum number of other channel the driver support. | ||
244 | * @max_combined: Read only. Maximum number of combined channel the driver | ||
245 | * support. Set of queues RX, TX or other. | ||
246 | * @rx_count: Valid values are in the range 1 to the max_rx. | ||
247 | * @tx_count: Valid values are in the range 1 to the max_tx. | ||
248 | * @other_count: Valid values are in the range 1 to the max_other. | ||
249 | * @combined_count: Valid values are in the range 1 to the max_combined. | ||
250 | * | ||
251 | * This can be used to configure RX, TX and other channels. | ||
252 | */ | ||
253 | |||
254 | struct ethtool_channels { | ||
255 | __u32 cmd; | ||
256 | __u32 max_rx; | ||
257 | __u32 max_tx; | ||
258 | __u32 max_other; | ||
259 | __u32 max_combined; | ||
260 | __u32 rx_count; | ||
261 | __u32 tx_count; | ||
262 | __u32 other_count; | ||
263 | __u32 combined_count; | ||
264 | }; | ||
265 | |||
232 | /* for configuring link flow control parameters */ | 266 | /* for configuring link flow control parameters */ |
233 | struct ethtool_pauseparam { | 267 | struct ethtool_pauseparam { |
234 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ | 268 | __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ |
@@ -380,27 +414,42 @@ struct ethtool_usrip4_spec { | |||
380 | __u8 proto; | 414 | __u8 proto; |
381 | }; | 415 | }; |
382 | 416 | ||
417 | union ethtool_flow_union { | ||
418 | struct ethtool_tcpip4_spec tcp_ip4_spec; | ||
419 | struct ethtool_tcpip4_spec udp_ip4_spec; | ||
420 | struct ethtool_tcpip4_spec sctp_ip4_spec; | ||
421 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
422 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
423 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
424 | struct ethhdr ether_spec; | ||
425 | __u8 hdata[60]; | ||
426 | }; | ||
427 | |||
428 | struct ethtool_flow_ext { | ||
429 | __be16 vlan_etype; | ||
430 | __be16 vlan_tci; | ||
431 | __be32 data[2]; | ||
432 | }; | ||
433 | |||
383 | /** | 434 | /** |
384 | * struct ethtool_rx_flow_spec - specification for RX flow filter | 435 | * struct ethtool_rx_flow_spec - specification for RX flow filter |
385 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW | 436 | * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW |
386 | * @h_u: Flow fields to match (dependent on @flow_type) | 437 | * @h_u: Flow fields to match (dependent on @flow_type) |
387 | * @m_u: Masks for flow field bits to be ignored | 438 | * @h_ext: Additional fields to match |
439 | * @m_u: Masks for flow field bits to be matched | ||
440 | * @m_ext: Masks for additional field bits to be matched | ||
441 | * Note, all additional fields must be ignored unless @flow_type | ||
442 | * includes the %FLOW_EXT flag. | ||
388 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC | 443 | * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC |
389 | * if packets should be discarded | 444 | * if packets should be discarded |
390 | * @location: Index of filter in hardware table | 445 | * @location: Index of filter in hardware table |
391 | */ | 446 | */ |
392 | struct ethtool_rx_flow_spec { | 447 | struct ethtool_rx_flow_spec { |
393 | __u32 flow_type; | 448 | __u32 flow_type; |
394 | union { | 449 | union ethtool_flow_union h_u; |
395 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 450 | struct ethtool_flow_ext h_ext; |
396 | struct ethtool_tcpip4_spec udp_ip4_spec; | 451 | union ethtool_flow_union m_u; |
397 | struct ethtool_tcpip4_spec sctp_ip4_spec; | 452 | struct ethtool_flow_ext m_ext; |
398 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
399 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
400 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
401 | struct ethhdr ether_spec; | ||
402 | __u8 hdata[72]; | ||
403 | } h_u, m_u; | ||
404 | __u64 ring_cookie; | 453 | __u64 ring_cookie; |
405 | __u32 location; | 454 | __u32 location; |
406 | }; | 455 | }; |
@@ -458,16 +507,10 @@ struct ethtool_rxnfc { | |||
458 | 507 | ||
459 | struct compat_ethtool_rx_flow_spec { | 508 | struct compat_ethtool_rx_flow_spec { |
460 | u32 flow_type; | 509 | u32 flow_type; |
461 | union { | 510 | union ethtool_flow_union h_u; |
462 | struct ethtool_tcpip4_spec tcp_ip4_spec; | 511 | struct ethtool_flow_ext h_ext; |
463 | struct ethtool_tcpip4_spec udp_ip4_spec; | 512 | union ethtool_flow_union m_u; |
464 | struct ethtool_tcpip4_spec sctp_ip4_spec; | 513 | struct ethtool_flow_ext m_ext; |
465 | struct ethtool_ah_espip4_spec ah_ip4_spec; | ||
466 | struct ethtool_ah_espip4_spec esp_ip4_spec; | ||
467 | struct ethtool_usrip4_spec usr_ip4_spec; | ||
468 | struct ethhdr ether_spec; | ||
469 | u8 hdata[72]; | ||
470 | } h_u, m_u; | ||
471 | compat_u64 ring_cookie; | 514 | compat_u64 ring_cookie; |
472 | u32 location; | 515 | u32 location; |
473 | }; | 516 | }; |
@@ -558,6 +601,26 @@ struct ethtool_flash { | |||
558 | char data[ETHTOOL_FLASH_MAX_FILENAME]; | 601 | char data[ETHTOOL_FLASH_MAX_FILENAME]; |
559 | }; | 602 | }; |
560 | 603 | ||
604 | /** | ||
605 | * struct ethtool_dump - used for retrieving, setting device dump | ||
606 | * @cmd: Command number - %ETHTOOL_GET_DUMP_FLAG, %ETHTOOL_GET_DUMP_DATA, or | ||
607 | * %ETHTOOL_SET_DUMP | ||
608 | * @version: FW version of the dump, filled in by driver | ||
609 | * @flag: driver dependent flag for dump setting, filled in by driver during | ||
610 | * get and filled in by ethtool for set operation | ||
611 | * @len: length of dump data, used as the length of the user buffer on entry to | ||
612 | * %ETHTOOL_GET_DUMP_DATA and this is returned as dump length by driver | ||
613 | * for %ETHTOOL_GET_DUMP_FLAG command | ||
614 | * @data: data collected for get dump data operation | ||
615 | */ | ||
616 | struct ethtool_dump { | ||
617 | __u32 cmd; | ||
618 | __u32 version; | ||
619 | __u32 flag; | ||
620 | __u32 len; | ||
621 | __u8 data[0]; | ||
622 | }; | ||
623 | |||
561 | /* for returning and changing feature sets */ | 624 | /* for returning and changing feature sets */ |
562 | 625 | ||
563 | /** | 626 | /** |
@@ -663,6 +726,22 @@ struct ethtool_rx_ntuple_list { | |||
663 | unsigned int count; | 726 | unsigned int count; |
664 | }; | 727 | }; |
665 | 728 | ||
729 | /** | ||
730 | * enum ethtool_phys_id_state - indicator state for physical identification | ||
731 | * @ETHTOOL_ID_INACTIVE: Physical ID indicator should be deactivated | ||
732 | * @ETHTOOL_ID_ACTIVE: Physical ID indicator should be activated | ||
733 | * @ETHTOOL_ID_ON: LED should be turned on (used iff %ETHTOOL_ID_ACTIVE | ||
734 | * is not supported) | ||
735 | * @ETHTOOL_ID_OFF: LED should be turned off (used iff %ETHTOOL_ID_ACTIVE | ||
736 | * is not supported) | ||
737 | */ | ||
738 | enum ethtool_phys_id_state { | ||
739 | ETHTOOL_ID_INACTIVE, | ||
740 | ETHTOOL_ID_ACTIVE, | ||
741 | ETHTOOL_ID_ON, | ||
742 | ETHTOOL_ID_OFF | ||
743 | }; | ||
744 | |||
666 | struct net_device; | 745 | struct net_device; |
667 | 746 | ||
668 | /* Some generic methods drivers may use in their ethtool_ops */ | 747 | /* Some generic methods drivers may use in their ethtool_ops */ |
@@ -683,63 +762,131 @@ void ethtool_ntuple_flush(struct net_device *dev); | |||
683 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); | 762 | bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported); |
684 | 763 | ||
685 | /** | 764 | /** |
686 | * ðtool_ops - Alter and report network device settings | 765 | * struct ethtool_ops - optional netdev operations |
687 | * get_settings: Get device-specific settings | 766 | * @get_settings: Get various device settings including Ethernet link |
688 | * set_settings: Set device-specific settings | 767 | * settings. The @cmd parameter is expected to have been cleared |
689 | * get_drvinfo: Report driver information | 768 | * before get_settings is called. Returns a negative error code or |
690 | * get_regs: Get device registers | 769 | * zero. |
691 | * get_wol: Report whether Wake-on-Lan is enabled | 770 | * @set_settings: Set various device settings including Ethernet link |
692 | * set_wol: Turn Wake-on-Lan on or off | 771 | * settings. Returns a negative error code or zero. |
693 | * get_msglevel: Report driver message level | 772 | * @get_drvinfo: Report driver/device information. Should only set the |
694 | * set_msglevel: Set driver message level | 773 | * @driver, @version, @fw_version and @bus_info fields. If not |
695 | * nway_reset: Restart autonegotiation | 774 | * implemented, the @driver and @bus_info fields will be filled in |
696 | * get_link: Get link status | 775 | * according to the netdev's parent device. |
697 | * get_eeprom: Read data from the device EEPROM | 776 | * @get_regs_len: Get buffer length required for @get_regs |
698 | * set_eeprom: Write data to the device EEPROM | 777 | * @get_regs: Get device registers |
699 | * get_coalesce: Get interrupt coalescing parameters | 778 | * @get_wol: Report whether Wake-on-Lan is enabled |
700 | * set_coalesce: Set interrupt coalescing parameters | 779 | * @set_wol: Turn Wake-on-Lan on or off. Returns a negative error code |
701 | * get_ringparam: Report ring sizes | 780 | * or zero. |
702 | * set_ringparam: Set ring sizes | 781 | * @get_msglevel: Report driver message level. This should be the value |
703 | * get_pauseparam: Report pause parameters | 782 | * of the @msg_enable field used by netif logging functions. |
704 | * set_pauseparam: Set pause parameters | 783 | * @set_msglevel: Set driver message level |
705 | * get_rx_csum: Report whether receive checksums are turned on or off | 784 | * @nway_reset: Restart autonegotiation. Returns a negative error code |
706 | * set_rx_csum: Turn receive checksum on or off | 785 | * or zero. |
707 | * get_tx_csum: Report whether transmit checksums are turned on or off | 786 | * @get_link: Report whether physical link is up. Will only be called if |
708 | * set_tx_csum: Turn transmit checksums on or off | 787 | * the netdev is up. Should usually be set to ethtool_op_get_link(), |
709 | * get_sg: Report whether scatter-gather is enabled | 788 | * which uses netif_carrier_ok(). |
710 | * set_sg: Turn scatter-gather on or off | 789 | * @get_eeprom: Read data from the device EEPROM. |
711 | * get_tso: Report whether TCP segmentation offload is enabled | ||
712 | * set_tso: Turn TCP segmentation offload on or off | ||
713 | * get_ufo: Report whether UDP fragmentation offload is enabled | ||
714 | * set_ufo: Turn UDP fragmentation offload on or off | ||
715 | * self_test: Run specified self-tests | ||
716 | * get_strings: Return a set of strings that describe the requested objects | ||
717 | * phys_id: Identify the device | ||
718 | * get_stats: Return statistics about the device | ||
719 | * get_flags: get 32-bit flags bitmap | ||
720 | * set_flags: set 32-bit flags bitmap | ||
721 | * | ||
722 | * Description: | ||
723 | * | ||
724 | * get_settings: | ||
725 | * @get_settings is passed an ðtool_cmd to fill in. It returns | ||
726 | * an negative errno or zero. | ||
727 | * | ||
728 | * set_settings: | ||
729 | * @set_settings is passed an ðtool_cmd and should attempt to set | ||
730 | * all the settings this device supports. It may return an error value | ||
731 | * if something goes wrong (otherwise 0). | ||
732 | * | ||
733 | * get_eeprom: | ||
734 | * Should fill in the magic field. Don't need to check len for zero | 790 | * Should fill in the magic field. Don't need to check len for zero |
735 | * or wraparound. Fill in the data argument with the eeprom values | 791 | * or wraparound. Fill in the data argument with the eeprom values |
736 | * from offset to offset + len. Update len to the amount read. | 792 | * from offset to offset + len. Update len to the amount read. |
737 | * Returns an error or zero. | 793 | * Returns an error or zero. |
738 | * | 794 | * @set_eeprom: Write data to the device EEPROM. |
739 | * set_eeprom: | ||
740 | * Should validate the magic field. Don't need to check len for zero | 795 | * Should validate the magic field. Don't need to check len for zero |
741 | * or wraparound. Update len to the amount written. Returns an error | 796 | * or wraparound. Update len to the amount written. Returns an error |
742 | * or zero. | 797 | * or zero. |
798 | * @get_coalesce: Get interrupt coalescing parameters. Returns a negative | ||
799 | * error code or zero. | ||
800 | * @set_coalesce: Set interrupt coalescing parameters. Returns a negative | ||
801 | * error code or zero. | ||
802 | * @get_ringparam: Report ring sizes | ||
803 | * @set_ringparam: Set ring sizes. Returns a negative error code or zero. | ||
804 | * @get_pauseparam: Report pause parameters | ||
805 | * @set_pauseparam: Set pause parameters. Returns a negative error code | ||
806 | * or zero. | ||
807 | * @get_rx_csum: Deprecated in favour of the netdev feature %NETIF_F_RXCSUM. | ||
808 | * Report whether receive checksums are turned on or off. | ||
809 | * @set_rx_csum: Deprecated in favour of generic netdev features. Turn | ||
810 | * receive checksum on or off. Returns a negative error code or zero. | ||
811 | * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums | ||
812 | * are turned on or off. | ||
813 | * @set_tx_csum: Deprecated in favour of generic netdev features. Turn | ||
814 | * transmit checksums on or off. Returns a egative error code or zero. | ||
815 | * @get_sg: Deprecated as redundant. Report whether scatter-gather is | ||
816 | * enabled. | ||
817 | * @set_sg: Deprecated in favour of generic netdev features. Turn | ||
818 | * scatter-gather on or off. Returns a negative error code or zero. | ||
819 | * @get_tso: Deprecated as redundant. Report whether TCP segmentation | ||
820 | * offload is enabled. | ||
821 | * @set_tso: Deprecated in favour of generic netdev features. Turn TCP | ||
822 | * segmentation offload on or off. Returns a negative error code or zero. | ||
823 | * @self_test: Run specified self-tests | ||
824 | * @get_strings: Return a set of strings that describe the requested objects | ||
825 | * @set_phys_id: Identify the physical devices, e.g. by flashing an LED | ||
826 | * attached to it. The implementation may update the indicator | ||
827 | * asynchronously or synchronously, but in either case it must return | ||
828 | * quickly. It is initially called with the argument %ETHTOOL_ID_ACTIVE, | ||
829 | * and must either activate asynchronous updates and return zero, return | ||
830 | * a negative error or return a positive frequency for synchronous | ||
831 | * indication (e.g. 1 for one on/off cycle per second). If it returns | ||
832 | * a frequency then it will be called again at intervals with the | ||
833 | * argument %ETHTOOL_ID_ON or %ETHTOOL_ID_OFF and should set the state of | ||
834 | * the indicator accordingly. Finally, it is called with the argument | ||
835 | * %ETHTOOL_ID_INACTIVE and must deactivate the indicator. Returns a | ||
836 | * negative error code or zero. | ||
837 | * @get_ethtool_stats: Return extended statistics about the device. | ||
838 | * This is only useful if the device maintains statistics not | ||
839 | * included in &struct rtnl_link_stats64. | ||
840 | * @begin: Function to be called before any other operation. Returns a | ||
841 | * negative error code or zero. | ||
842 | * @complete: Function to be called after any other operation except | ||
843 | * @begin. Will be called even if the other operation failed. | ||
844 | * @get_ufo: Deprecated as redundant. Report whether UDP fragmentation | ||
845 | * offload is enabled. | ||
846 | * @set_ufo: Deprecated in favour of generic netdev features. Turn UDP | ||
847 | * fragmentation offload on or off. Returns a negative error code or zero. | ||
848 | * @get_flags: Deprecated as redundant. Report features included in | ||
849 | * &enum ethtool_flags that are enabled. | ||
850 | * @set_flags: Deprecated in favour of generic netdev features. Turn | ||
851 | * features included in &enum ethtool_flags on or off. Returns a | ||
852 | * negative error code or zero. | ||
853 | * @get_priv_flags: Report driver-specific feature flags. | ||
854 | * @set_priv_flags: Set driver-specific feature flags. Returns a negative | ||
855 | * error code or zero. | ||
856 | * @get_sset_count: Get number of strings that @get_strings will write. | ||
857 | * @get_rxnfc: Get RX flow classification rules. Returns a negative | ||
858 | * error code or zero. | ||
859 | * @set_rxnfc: Set RX flow classification rules. Returns a negative | ||
860 | * error code or zero. | ||
861 | * @flash_device: Write a firmware image to device's flash memory. | ||
862 | * Returns a negative error code or zero. | ||
863 | * @reset: Reset (part of) the device, as specified by a bitmask of | ||
864 | * flags from &enum ethtool_reset_flags. Returns a negative | ||
865 | * error code or zero. | ||
866 | * @set_rx_ntuple: Set an RX n-tuple rule. Returns a negative error code | ||
867 | * or zero. | ||
868 | * @get_rx_ntuple: Deprecated. | ||
869 | * @get_rxfh_indir: Get the contents of the RX flow hash indirection table. | ||
870 | * Returns a negative error code or zero. | ||
871 | * @set_rxfh_indir: Set the contents of the RX flow hash indirection table. | ||
872 | * Returns a negative error code or zero. | ||
873 | * @get_channels: Get number of channels. | ||
874 | * @set_channels: Set number of channels. Returns a negative error code or | ||
875 | * zero. | ||
876 | * @get_dump_flag: Get dump flag indicating current dump length, version, | ||
877 | * and flag of the device. | ||
878 | * @get_dump_data: Get dump data. | ||
879 | * @set_dump: Set dump specific flags to the device. | ||
880 | * | ||
881 | * All operations are optional (i.e. the function pointer may be set | ||
882 | * to %NULL) and callers must take this into account. Callers must | ||
883 | * hold the RTNL, except that for @get_drvinfo the caller may or may | ||
884 | * not hold the RTNL. | ||
885 | * | ||
886 | * See the structures used by these operations for further documentation. | ||
887 | * | ||
888 | * See &struct net_device and &struct net_device_ops for documentation | ||
889 | * of the generic netdev features interface. | ||
743 | */ | 890 | */ |
744 | struct ethtool_ops { | 891 | struct ethtool_ops { |
745 | int (*get_settings)(struct net_device *, struct ethtool_cmd *); | 892 | int (*get_settings)(struct net_device *, struct ethtool_cmd *); |
@@ -778,7 +925,7 @@ struct ethtool_ops { | |||
778 | int (*set_tso)(struct net_device *, u32); | 925 | int (*set_tso)(struct net_device *, u32); |
779 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); | 926 | void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); |
780 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); | 927 | void (*get_strings)(struct net_device *, u32 stringset, u8 *); |
781 | int (*phys_id)(struct net_device *, u32); | 928 | int (*set_phys_id)(struct net_device *, enum ethtool_phys_id_state); |
782 | void (*get_ethtool_stats)(struct net_device *, | 929 | void (*get_ethtool_stats)(struct net_device *, |
783 | struct ethtool_stats *, u64 *); | 930 | struct ethtool_stats *, u64 *); |
784 | int (*begin)(struct net_device *); | 931 | int (*begin)(struct net_device *); |
@@ -802,6 +949,13 @@ struct ethtool_ops { | |||
802 | struct ethtool_rxfh_indir *); | 949 | struct ethtool_rxfh_indir *); |
803 | int (*set_rxfh_indir)(struct net_device *, | 950 | int (*set_rxfh_indir)(struct net_device *, |
804 | const struct ethtool_rxfh_indir *); | 951 | const struct ethtool_rxfh_indir *); |
952 | void (*get_channels)(struct net_device *, struct ethtool_channels *); | ||
953 | int (*set_channels)(struct net_device *, struct ethtool_channels *); | ||
954 | int (*get_dump_flag)(struct net_device *, struct ethtool_dump *); | ||
955 | int (*get_dump_data)(struct net_device *, | ||
956 | struct ethtool_dump *, void *); | ||
957 | int (*set_dump)(struct net_device *, struct ethtool_dump *); | ||
958 | |||
805 | }; | 959 | }; |
806 | #endif /* __KERNEL__ */ | 960 | #endif /* __KERNEL__ */ |
807 | 961 | ||
@@ -870,6 +1024,11 @@ struct ethtool_ops { | |||
870 | 1024 | ||
871 | #define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ | 1025 | #define ETHTOOL_GFEATURES 0x0000003a /* Get device offload settings */ |
872 | #define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ | 1026 | #define ETHTOOL_SFEATURES 0x0000003b /* Change device offload settings */ |
1027 | #define ETHTOOL_GCHANNELS 0x0000003c /* Get no of channels */ | ||
1028 | #define ETHTOOL_SCHANNELS 0x0000003d /* Set no of channels */ | ||
1029 | #define ETHTOOL_SET_DUMP 0x0000003e /* Set dump settings */ | ||
1030 | #define ETHTOOL_GET_DUMP_FLAG 0x0000003f /* Get dump settings */ | ||
1031 | #define ETHTOOL_GET_DUMP_DATA 0x00000040 /* Get dump data */ | ||
873 | 1032 | ||
874 | /* compatibility with older code */ | 1033 | /* compatibility with older code */ |
875 | #define SPARC_ETH_GSET ETHTOOL_GSET | 1034 | #define SPARC_ETH_GSET ETHTOOL_GSET |
@@ -897,6 +1056,8 @@ struct ethtool_ops { | |||
897 | #define SUPPORTED_10000baseKX4_Full (1 << 18) | 1056 | #define SUPPORTED_10000baseKX4_Full (1 << 18) |
898 | #define SUPPORTED_10000baseKR_Full (1 << 19) | 1057 | #define SUPPORTED_10000baseKR_Full (1 << 19) |
899 | #define SUPPORTED_10000baseR_FEC (1 << 20) | 1058 | #define SUPPORTED_10000baseR_FEC (1 << 20) |
1059 | #define SUPPORTED_20000baseMLD2_Full (1 << 21) | ||
1060 | #define SUPPORTED_20000baseKR2_Full (1 << 22) | ||
900 | 1061 | ||
901 | /* Indicates what features are advertised by the interface. */ | 1062 | /* Indicates what features are advertised by the interface. */ |
902 | #define ADVERTISED_10baseT_Half (1 << 0) | 1063 | #define ADVERTISED_10baseT_Half (1 << 0) |
@@ -920,6 +1081,8 @@ struct ethtool_ops { | |||
920 | #define ADVERTISED_10000baseKX4_Full (1 << 18) | 1081 | #define ADVERTISED_10000baseKX4_Full (1 << 18) |
921 | #define ADVERTISED_10000baseKR_Full (1 << 19) | 1082 | #define ADVERTISED_10000baseKR_Full (1 << 19) |
922 | #define ADVERTISED_10000baseR_FEC (1 << 20) | 1083 | #define ADVERTISED_10000baseR_FEC (1 << 20) |
1084 | #define ADVERTISED_20000baseMLD2_Full (1 << 21) | ||
1085 | #define ADVERTISED_20000baseKR2_Full (1 << 22) | ||
923 | 1086 | ||
924 | /* The following are all involved in forcing a particular link | 1087 | /* The following are all involved in forcing a particular link |
925 | * mode for the device for setting things. When getting the | 1088 | * mode for the device for setting things. When getting the |
@@ -992,6 +1155,8 @@ struct ethtool_ops { | |||
992 | #define IPV4_FLOW 0x10 /* hash only */ | 1155 | #define IPV4_FLOW 0x10 /* hash only */ |
993 | #define IPV6_FLOW 0x11 /* hash only */ | 1156 | #define IPV6_FLOW 0x11 /* hash only */ |
994 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ | 1157 | #define ETHER_FLOW 0x12 /* spec only (ether_spec) */ |
1158 | /* Flag to enable additional fields in struct ethtool_rx_flow_spec */ | ||
1159 | #define FLOW_EXT 0x80000000 | ||
995 | 1160 | ||
996 | /* L3-L4 network traffic flow hash options */ | 1161 | /* L3-L4 network traffic flow hash options */ |
997 | #define RXH_L2DA (1 << 1) | 1162 | #define RXH_L2DA (1 << 1) |
diff --git a/include/linux/filter.h b/include/linux/filter.h index 45266b75409a..4609b85e559d 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h | |||
@@ -135,6 +135,8 @@ struct sk_filter | |||
135 | { | 135 | { |
136 | atomic_t refcnt; | 136 | atomic_t refcnt; |
137 | unsigned int len; /* Number of filter blocks */ | 137 | unsigned int len; /* Number of filter blocks */ |
138 | unsigned int (*bpf_func)(const struct sk_buff *skb, | ||
139 | const struct sock_filter *filter); | ||
138 | struct rcu_head rcu; | 140 | struct rcu_head rcu; |
139 | struct sock_filter insns[0]; | 141 | struct sock_filter insns[0]; |
140 | }; | 142 | }; |
@@ -153,6 +155,80 @@ extern unsigned int sk_run_filter(const struct sk_buff *skb, | |||
153 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); | 155 | extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); |
154 | extern int sk_detach_filter(struct sock *sk); | 156 | extern int sk_detach_filter(struct sock *sk); |
155 | extern int sk_chk_filter(struct sock_filter *filter, int flen); | 157 | extern int sk_chk_filter(struct sock_filter *filter, int flen); |
158 | |||
159 | #ifdef CONFIG_BPF_JIT | ||
160 | extern void bpf_jit_compile(struct sk_filter *fp); | ||
161 | extern void bpf_jit_free(struct sk_filter *fp); | ||
162 | #define SK_RUN_FILTER(FILTER, SKB) (*FILTER->bpf_func)(SKB, FILTER->insns) | ||
163 | #else | ||
164 | static inline void bpf_jit_compile(struct sk_filter *fp) | ||
165 | { | ||
166 | } | ||
167 | static inline void bpf_jit_free(struct sk_filter *fp) | ||
168 | { | ||
169 | } | ||
170 | #define SK_RUN_FILTER(FILTER, SKB) sk_run_filter(SKB, FILTER->insns) | ||
171 | #endif | ||
172 | |||
173 | enum { | ||
174 | BPF_S_RET_K = 1, | ||
175 | BPF_S_RET_A, | ||
176 | BPF_S_ALU_ADD_K, | ||
177 | BPF_S_ALU_ADD_X, | ||
178 | BPF_S_ALU_SUB_K, | ||
179 | BPF_S_ALU_SUB_X, | ||
180 | BPF_S_ALU_MUL_K, | ||
181 | BPF_S_ALU_MUL_X, | ||
182 | BPF_S_ALU_DIV_X, | ||
183 | BPF_S_ALU_AND_K, | ||
184 | BPF_S_ALU_AND_X, | ||
185 | BPF_S_ALU_OR_K, | ||
186 | BPF_S_ALU_OR_X, | ||
187 | BPF_S_ALU_LSH_K, | ||
188 | BPF_S_ALU_LSH_X, | ||
189 | BPF_S_ALU_RSH_K, | ||
190 | BPF_S_ALU_RSH_X, | ||
191 | BPF_S_ALU_NEG, | ||
192 | BPF_S_LD_W_ABS, | ||
193 | BPF_S_LD_H_ABS, | ||
194 | BPF_S_LD_B_ABS, | ||
195 | BPF_S_LD_W_LEN, | ||
196 | BPF_S_LD_W_IND, | ||
197 | BPF_S_LD_H_IND, | ||
198 | BPF_S_LD_B_IND, | ||
199 | BPF_S_LD_IMM, | ||
200 | BPF_S_LDX_W_LEN, | ||
201 | BPF_S_LDX_B_MSH, | ||
202 | BPF_S_LDX_IMM, | ||
203 | BPF_S_MISC_TAX, | ||
204 | BPF_S_MISC_TXA, | ||
205 | BPF_S_ALU_DIV_K, | ||
206 | BPF_S_LD_MEM, | ||
207 | BPF_S_LDX_MEM, | ||
208 | BPF_S_ST, | ||
209 | BPF_S_STX, | ||
210 | BPF_S_JMP_JA, | ||
211 | BPF_S_JMP_JEQ_K, | ||
212 | BPF_S_JMP_JEQ_X, | ||
213 | BPF_S_JMP_JGE_K, | ||
214 | BPF_S_JMP_JGE_X, | ||
215 | BPF_S_JMP_JGT_K, | ||
216 | BPF_S_JMP_JGT_X, | ||
217 | BPF_S_JMP_JSET_K, | ||
218 | BPF_S_JMP_JSET_X, | ||
219 | /* Ancillary data */ | ||
220 | BPF_S_ANC_PROTOCOL, | ||
221 | BPF_S_ANC_PKTTYPE, | ||
222 | BPF_S_ANC_IFINDEX, | ||
223 | BPF_S_ANC_NLATTR, | ||
224 | BPF_S_ANC_NLATTR_NEST, | ||
225 | BPF_S_ANC_MARK, | ||
226 | BPF_S_ANC_QUEUE, | ||
227 | BPF_S_ANC_HATYPE, | ||
228 | BPF_S_ANC_RXHASH, | ||
229 | BPF_S_ANC_CPU, | ||
230 | }; | ||
231 | |||
156 | #endif /* __KERNEL__ */ | 232 | #endif /* __KERNEL__ */ |
157 | 233 | ||
158 | #endif /* __LINUX_FILTER_H__ */ | 234 | #endif /* __LINUX_FILTER_H__ */ |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 2d1c6117d92c..b2eee5879883 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -884,6 +884,15 @@ struct ieee80211_ht_cap { | |||
884 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 | 884 | #define IEEE80211_HT_CAP_40MHZ_INTOLERANT 0x4000 |
885 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 | 885 | #define IEEE80211_HT_CAP_LSIG_TXOP_PROT 0x8000 |
886 | 886 | ||
887 | /* 802.11n HT extended capabilities masks (for extended_ht_cap_info) */ | ||
888 | #define IEEE80211_HT_EXT_CAP_PCO 0x0001 | ||
889 | #define IEEE80211_HT_EXT_CAP_PCO_TIME 0x0006 | ||
890 | #define IEEE80211_HT_EXT_CAP_PCO_TIME_SHIFT 1 | ||
891 | #define IEEE80211_HT_EXT_CAP_MCS_FB 0x0300 | ||
892 | #define IEEE80211_HT_EXT_CAP_MCS_FB_SHIFT 8 | ||
893 | #define IEEE80211_HT_EXT_CAP_HTC_SUP 0x0400 | ||
894 | #define IEEE80211_HT_EXT_CAP_RD_RESPONDER 0x0800 | ||
895 | |||
887 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ | 896 | /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */ |
888 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 | 897 | #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03 |
889 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C | 898 | #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C |
@@ -993,6 +1002,11 @@ struct ieee80211_ht_info { | |||
993 | 1002 | ||
994 | #define WLAN_CAPABILITY_ESS (1<<0) | 1003 | #define WLAN_CAPABILITY_ESS (1<<0) |
995 | #define WLAN_CAPABILITY_IBSS (1<<1) | 1004 | #define WLAN_CAPABILITY_IBSS (1<<1) |
1005 | |||
1006 | /* A mesh STA sets the ESS and IBSS capability bits to zero */ | ||
1007 | #define WLAN_CAPABILITY_IS_MBSS(cap) \ | ||
1008 | (!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS))) | ||
1009 | |||
996 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) | 1010 | #define WLAN_CAPABILITY_CF_POLLABLE (1<<2) |
997 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) | 1011 | #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) |
998 | #define WLAN_CAPABILITY_PRIVACY (1<<4) | 1012 | #define WLAN_CAPABILITY_PRIVACY (1<<4) |
@@ -1252,9 +1266,8 @@ enum ieee80211_category { | |||
1252 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, | 1266 | WLAN_CATEGORY_MULTIHOP_ACTION = 14, |
1253 | WLAN_CATEGORY_SELF_PROTECTED = 15, | 1267 | WLAN_CATEGORY_SELF_PROTECTED = 15, |
1254 | WLAN_CATEGORY_WMM = 17, | 1268 | WLAN_CATEGORY_WMM = 17, |
1255 | /* TODO: remove MESH_PLINK and MESH_PATH_SEL after */ | 1269 | /* TODO: remove MESH_PATH_SEL after mesh is updated |
1256 | /* mesh is updated to current 802.11s draft */ | 1270 | * to current 802.11s draft */ |
1257 | WLAN_CATEGORY_MESH_PLINK = 30, | ||
1258 | WLAN_CATEGORY_MESH_PATH_SEL = 32, | 1271 | WLAN_CATEGORY_MESH_PATH_SEL = 32, |
1259 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, | 1272 | WLAN_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, |
1260 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, | 1273 | WLAN_CATEGORY_VENDOR_SPECIFIC = 127, |
@@ -1507,6 +1520,7 @@ static inline bool ieee80211_is_robust_mgmt_frame(struct ieee80211_hdr *hdr) | |||
1507 | category = ((u8 *) hdr) + 24; | 1520 | category = ((u8 *) hdr) + 24; |
1508 | return *category != WLAN_CATEGORY_PUBLIC && | 1521 | return *category != WLAN_CATEGORY_PUBLIC && |
1509 | *category != WLAN_CATEGORY_HT && | 1522 | *category != WLAN_CATEGORY_HT && |
1523 | *category != WLAN_CATEGORY_SELF_PROTECTED && | ||
1510 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; | 1524 | *category != WLAN_CATEGORY_VENDOR_SPECIFIC; |
1511 | } | 1525 | } |
1512 | 1526 | ||
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index be69043d2896..0f1325d98295 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h | |||
@@ -136,6 +136,7 @@ int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); | |||
136 | extern struct ctl_table ether_table[]; | 136 | extern struct ctl_table ether_table[]; |
137 | #endif | 137 | #endif |
138 | 138 | ||
139 | int mac_pton(const char *s, u8 *mac); | ||
139 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); | 140 | extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len); |
140 | 141 | ||
141 | #endif | 142 | #endif |
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 635e1faec412..290bd8ac94cf 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -86,7 +86,6 @@ struct vlan_group { | |||
86 | * the vlan is attached to. | 86 | * the vlan is attached to. |
87 | */ | 87 | */ |
88 | unsigned int nr_vlans; | 88 | unsigned int nr_vlans; |
89 | int killall; | ||
90 | struct hlist_node hlist; /* linked list */ | 89 | struct hlist_node hlist; /* linked list */ |
91 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; | 90 | struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; |
92 | struct rcu_head rcu; | 91 | struct rcu_head rcu; |
@@ -132,7 +131,8 @@ extern u16 vlan_dev_vlan_id(const struct net_device *dev); | |||
132 | 131 | ||
133 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | 132 | extern int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, |
134 | u16 vlan_tci, int polling); | 133 | u16 vlan_tci, int polling); |
135 | extern bool vlan_hwaccel_do_receive(struct sk_buff **skb); | 134 | extern bool vlan_do_receive(struct sk_buff **skb); |
135 | extern struct sk_buff *vlan_untag(struct sk_buff *skb); | ||
136 | extern gro_result_t | 136 | extern gro_result_t |
137 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 137 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
138 | unsigned int vlan_tci, struct sk_buff *skb); | 138 | unsigned int vlan_tci, struct sk_buff *skb); |
@@ -166,13 +166,18 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp, | |||
166 | return NET_XMIT_SUCCESS; | 166 | return NET_XMIT_SUCCESS; |
167 | } | 167 | } |
168 | 168 | ||
169 | static inline bool vlan_hwaccel_do_receive(struct sk_buff **skb) | 169 | static inline bool vlan_do_receive(struct sk_buff **skb) |
170 | { | 170 | { |
171 | if ((*skb)->vlan_tci & VLAN_VID_MASK) | 171 | if ((*skb)->vlan_tci & VLAN_VID_MASK) |
172 | (*skb)->pkt_type = PACKET_OTHERHOST; | 172 | (*skb)->pkt_type = PACKET_OTHERHOST; |
173 | return false; | 173 | return false; |
174 | } | 174 | } |
175 | 175 | ||
176 | static inline struct sk_buff *vlan_untag(struct sk_buff *skb) | ||
177 | { | ||
178 | return skb; | ||
179 | } | ||
180 | |||
176 | static inline gro_result_t | 181 | static inline gro_result_t |
177 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, | 182 | vlan_gro_receive(struct napi_struct *napi, struct vlan_group *grp, |
178 | unsigned int vlan_tci, struct sk_buff *skb) | 183 | unsigned int vlan_tci, struct sk_buff *skb) |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 48c007dae476..ae28e93fd072 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -382,6 +382,23 @@ struct ssb_device_id { | |||
382 | #define SSB_ANY_ID 0xFFFF | 382 | #define SSB_ANY_ID 0xFFFF |
383 | #define SSB_ANY_REV 0xFF | 383 | #define SSB_ANY_REV 0xFF |
384 | 384 | ||
385 | /* Broadcom's specific AMBA core, see drivers/bcma/ */ | ||
386 | struct bcma_device_id { | ||
387 | __u16 manuf; | ||
388 | __u16 id; | ||
389 | __u8 rev; | ||
390 | __u8 class; | ||
391 | }; | ||
392 | #define BCMA_CORE(_manuf, _id, _rev, _class) \ | ||
393 | { .manuf = _manuf, .id = _id, .rev = _rev, .class = _class, } | ||
394 | #define BCMA_CORETABLE_END \ | ||
395 | { 0, }, | ||
396 | |||
397 | #define BCMA_ANY_MANUF 0xFFFF | ||
398 | #define BCMA_ANY_ID 0xFFFF | ||
399 | #define BCMA_ANY_REV 0xFF | ||
400 | #define BCMA_ANY_CLASS 0xFF | ||
401 | |||
385 | struct virtio_device_id { | 402 | struct virtio_device_id { |
386 | __u32 device; | 403 | __u32 device; |
387 | __u32 vendor; | 404 | __u32 vendor; |
diff --git a/include/linux/mroute.h b/include/linux/mroute.h index b21d567692b2..46caaf44339d 100644 --- a/include/linux/mroute.h +++ b/include/linux/mroute.h | |||
@@ -244,6 +244,7 @@ struct mfc_cache { | |||
244 | #ifdef __KERNEL__ | 244 | #ifdef __KERNEL__ |
245 | struct rtmsg; | 245 | struct rtmsg; |
246 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, | 246 | extern int ipmr_get_route(struct net *net, struct sk_buff *skb, |
247 | __be32 saddr, __be32 daddr, | ||
247 | struct rtmsg *rtm, int nowait); | 248 | struct rtmsg *rtm, int nowait); |
248 | #endif | 249 | #endif |
249 | 250 | ||
diff --git a/include/linux/net.h b/include/linux/net.h index 94de83c0f877..1da55e9b6f01 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -42,6 +42,7 @@ | |||
42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ | 42 | #define SYS_RECVMSG 17 /* sys_recvmsg(2) */ |
43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ | 43 | #define SYS_ACCEPT4 18 /* sys_accept4(2) */ |
44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ | 44 | #define SYS_RECVMMSG 19 /* sys_recvmmsg(2) */ |
45 | #define SYS_SENDMMSG 20 /* sys_sendmmsg(2) */ | ||
45 | 46 | ||
46 | typedef enum { | 47 | typedef enum { |
47 | SS_FREE = 0, /* not allocated */ | 48 | SS_FREE = 0, /* not allocated */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0249fe7e3872..ca333e79e10f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1020,9 +1020,6 @@ struct net_device { | |||
1020 | * part of the usual set specified in Space.c. | 1020 | * part of the usual set specified in Space.c. |
1021 | */ | 1021 | */ |
1022 | 1022 | ||
1023 | unsigned char if_port; /* Selectable AUI, TP,..*/ | ||
1024 | unsigned char dma; /* DMA channel */ | ||
1025 | |||
1026 | unsigned long state; | 1023 | unsigned long state; |
1027 | 1024 | ||
1028 | struct list_head dev_list; | 1025 | struct list_head dev_list; |
@@ -1035,7 +1032,7 @@ struct net_device { | |||
1035 | u32 hw_features; | 1032 | u32 hw_features; |
1036 | /* user-requested features */ | 1033 | /* user-requested features */ |
1037 | u32 wanted_features; | 1034 | u32 wanted_features; |
1038 | /* VLAN feature mask */ | 1035 | /* mask of features inheritable by VLAN devices */ |
1039 | u32 vlan_features; | 1036 | u32 vlan_features; |
1040 | 1037 | ||
1041 | /* Net device feature bits; if you change something, | 1038 | /* Net device feature bits; if you change something, |
@@ -1066,6 +1063,8 @@ struct net_device { | |||
1066 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ | 1063 | #define NETIF_F_NTUPLE (1 << 27) /* N-tuple filters supported */ |
1067 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ | 1064 | #define NETIF_F_RXHASH (1 << 28) /* Receive hashing offload */ |
1068 | #define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */ | 1065 | #define NETIF_F_RXCSUM (1 << 29) /* Receive checksumming offload */ |
1066 | #define NETIF_F_NOCACHE_COPY (1 << 30) /* Use no-cache copyfromuser */ | ||
1067 | #define NETIF_F_LOOPBACK (1 << 31) /* Enable loopback */ | ||
1069 | 1068 | ||
1070 | /* Segmentation offload features */ | 1069 | /* Segmentation offload features */ |
1071 | #define NETIF_F_GSO_SHIFT 16 | 1070 | #define NETIF_F_GSO_SHIFT 16 |
@@ -1079,9 +1078,9 @@ struct net_device { | |||
1079 | 1078 | ||
1080 | /* Features valid for ethtool to change */ | 1079 | /* Features valid for ethtool to change */ |
1081 | /* = all defined minus driver/device-class-related */ | 1080 | /* = all defined minus driver/device-class-related */ |
1082 | #define NETIF_F_NEVER_CHANGE (NETIF_F_HIGHDMA | NETIF_F_VLAN_CHALLENGED | \ | 1081 | #define NETIF_F_NEVER_CHANGE (NETIF_F_VLAN_CHALLENGED | \ |
1083 | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) | 1082 | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL) |
1084 | #define NETIF_F_ETHTOOL_BITS (0x3f3fffff & ~NETIF_F_NEVER_CHANGE) | 1083 | #define NETIF_F_ETHTOOL_BITS (0xff3fffff & ~NETIF_F_NEVER_CHANGE) |
1085 | 1084 | ||
1086 | /* List of features with software fallbacks. */ | 1085 | /* List of features with software fallbacks. */ |
1087 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ | 1086 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | \ |
@@ -1095,9 +1094,14 @@ struct net_device { | |||
1095 | 1094 | ||
1096 | #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) | 1095 | #define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_TSO_ECN) |
1097 | 1096 | ||
1097 | #define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FCOE_MTU | \ | ||
1098 | NETIF_F_FSO) | ||
1099 | |||
1098 | #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ | 1100 | #define NETIF_F_ALL_TX_OFFLOADS (NETIF_F_ALL_CSUM | NETIF_F_SG | \ |
1099 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ | 1101 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | \ |
1100 | NETIF_F_SCTP_CSUM | NETIF_F_FCOE_CRC) | 1102 | NETIF_F_HIGHDMA | \ |
1103 | NETIF_F_SCTP_CSUM | \ | ||
1104 | NETIF_F_ALL_FCOE) | ||
1101 | 1105 | ||
1102 | /* | 1106 | /* |
1103 | * If one device supports one of these features, then enable them | 1107 | * If one device supports one of these features, then enable them |
@@ -1105,7 +1109,12 @@ struct net_device { | |||
1105 | */ | 1109 | */ |
1106 | #define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \ | 1110 | #define NETIF_F_ONE_FOR_ALL (NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ROBUST | \ |
1107 | NETIF_F_SG | NETIF_F_HIGHDMA | \ | 1111 | NETIF_F_SG | NETIF_F_HIGHDMA | \ |
1108 | NETIF_F_FRAGLIST) | 1112 | NETIF_F_FRAGLIST | NETIF_F_VLAN_CHALLENGED) |
1113 | /* | ||
1114 | * If one device doesn't support one of these features, then disable it | ||
1115 | * for all in netdev_increment_features. | ||
1116 | */ | ||
1117 | #define NETIF_F_ALL_FOR_ALL (NETIF_F_NOCACHE_COPY | NETIF_F_FSO) | ||
1109 | 1118 | ||
1110 | /* changeable features with no special hardware requirements */ | 1119 | /* changeable features with no special hardware requirements */ |
1111 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) | 1120 | #define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO) |
@@ -1134,13 +1143,16 @@ struct net_device { | |||
1134 | const struct header_ops *header_ops; | 1143 | const struct header_ops *header_ops; |
1135 | 1144 | ||
1136 | unsigned int flags; /* interface flags (a la BSD) */ | 1145 | unsigned int flags; /* interface flags (a la BSD) */ |
1146 | unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ | ||
1137 | unsigned short gflags; | 1147 | unsigned short gflags; |
1138 | unsigned int priv_flags; /* Like 'flags' but invisible to userspace. */ | ||
1139 | unsigned short padded; /* How much padding added by alloc_netdev() */ | 1148 | unsigned short padded; /* How much padding added by alloc_netdev() */ |
1140 | 1149 | ||
1141 | unsigned char operstate; /* RFC2863 operstate */ | 1150 | unsigned char operstate; /* RFC2863 operstate */ |
1142 | unsigned char link_mode; /* mapping policy to operstate */ | 1151 | unsigned char link_mode; /* mapping policy to operstate */ |
1143 | 1152 | ||
1153 | unsigned char if_port; /* Selectable AUI, TP,..*/ | ||
1154 | unsigned char dma; /* DMA channel */ | ||
1155 | |||
1144 | unsigned int mtu; /* interface MTU value */ | 1156 | unsigned int mtu; /* interface MTU value */ |
1145 | unsigned short type; /* interface hardware type */ | 1157 | unsigned short type; /* interface hardware type */ |
1146 | unsigned short hard_header_len; /* hardware hdr length */ | 1158 | unsigned short hard_header_len; /* hardware hdr length */ |
@@ -1281,7 +1293,9 @@ struct net_device { | |||
1281 | NETREG_UNREGISTERED, /* completed unregister todo */ | 1293 | NETREG_UNREGISTERED, /* completed unregister todo */ |
1282 | NETREG_RELEASED, /* called free_netdev */ | 1294 | NETREG_RELEASED, /* called free_netdev */ |
1283 | NETREG_DUMMY, /* dummy device for NAPI poll */ | 1295 | NETREG_DUMMY, /* dummy device for NAPI poll */ |
1284 | } reg_state:16; | 1296 | } reg_state:8; |
1297 | |||
1298 | bool dismantle; /* device is going do be freed */ | ||
1285 | 1299 | ||
1286 | enum { | 1300 | enum { |
1287 | RTNL_LINK_INITIALIZED, | 1301 | RTNL_LINK_INITIALIZED, |
@@ -2513,6 +2527,7 @@ extern struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | |||
2513 | extern int netdev_max_backlog; | 2527 | extern int netdev_max_backlog; |
2514 | extern int netdev_tstamp_prequeue; | 2528 | extern int netdev_tstamp_prequeue; |
2515 | extern int weight_p; | 2529 | extern int weight_p; |
2530 | extern int bpf_jit_enable; | ||
2516 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); | 2531 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); |
2517 | extern int netdev_set_bond_master(struct net_device *dev, | 2532 | extern int netdev_set_bond_master(struct net_device *dev, |
2518 | struct net_device *master); | 2533 | struct net_device *master); |
@@ -2550,7 +2565,9 @@ static inline u32 netdev_get_wanted_features(struct net_device *dev) | |||
2550 | } | 2565 | } |
2551 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); | 2566 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); |
2552 | u32 netdev_fix_features(struct net_device *dev, u32 features); | 2567 | u32 netdev_fix_features(struct net_device *dev, u32 features); |
2568 | int __netdev_update_features(struct net_device *dev); | ||
2553 | void netdev_update_features(struct net_device *dev); | 2569 | void netdev_update_features(struct net_device *dev); |
2570 | void netdev_change_features(struct net_device *dev); | ||
2554 | 2571 | ||
2555 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2572 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2556 | struct net_device *dev); | 2573 | struct net_device *dev); |
@@ -2588,13 +2605,8 @@ static inline int netif_is_bond_slave(struct net_device *dev) | |||
2588 | 2605 | ||
2589 | extern struct pernet_operations __net_initdata loopback_net_ops; | 2606 | extern struct pernet_operations __net_initdata loopback_net_ops; |
2590 | 2607 | ||
2591 | static inline int dev_ethtool_get_settings(struct net_device *dev, | 2608 | int dev_ethtool_get_settings(struct net_device *dev, |
2592 | struct ethtool_cmd *cmd) | 2609 | struct ethtool_cmd *cmd); |
2593 | { | ||
2594 | if (!dev->ethtool_ops || !dev->ethtool_ops->get_settings) | ||
2595 | return -EOPNOTSUPP; | ||
2596 | return dev->ethtool_ops->get_settings(dev, cmd); | ||
2597 | } | ||
2598 | 2610 | ||
2599 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) | 2611 | static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) |
2600 | { | 2612 | { |
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 5aebd170f899..90d09300e954 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h | |||
@@ -22,7 +22,9 @@ static inline bool ip_set_proto_with_ports(u8 proto) | |||
22 | { | 22 | { |
23 | switch (proto) { | 23 | switch (proto) { |
24 | case IPPROTO_TCP: | 24 | case IPPROTO_TCP: |
25 | case IPPROTO_SCTP: | ||
25 | case IPPROTO_UDP: | 26 | case IPPROTO_UDP: |
27 | case IPPROTO_UDPLITE: | ||
26 | return true; | 28 | return true; |
27 | } | 29 | } |
28 | return false; | 30 | return false; |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 37219525ff6f..32cddf78b13e 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -456,72 +456,60 @@ extern void xt_proto_fini(struct net *net, u_int8_t af); | |||
456 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); | 456 | extern struct xt_table_info *xt_alloc_table_info(unsigned int size); |
457 | extern void xt_free_table_info(struct xt_table_info *info); | 457 | extern void xt_free_table_info(struct xt_table_info *info); |
458 | 458 | ||
459 | /* | 459 | /** |
460 | * Per-CPU spinlock associated with per-cpu table entries, and | 460 | * xt_recseq - recursive seqcount for netfilter use |
461 | * with a counter for the "reading" side that allows a recursive | 461 | * |
462 | * reader to avoid taking the lock and deadlocking. | 462 | * Packet processing changes the seqcount only if no recursion happened |
463 | * | 463 | * get_counters() can use read_seqcount_begin()/read_seqcount_retry(), |
464 | * "reading" is used by ip/arp/ip6 tables rule processing which runs per-cpu. | 464 | * because we use the normal seqcount convention : |
465 | * It needs to ensure that the rules are not being changed while the packet | 465 | * Low order bit set to 1 if a writer is active. |
466 | * is being processed. In some cases, the read lock will be acquired | ||
467 | * twice on the same CPU; this is okay because of the count. | ||
468 | * | ||
469 | * "writing" is used when reading counters. | ||
470 | * During replace any readers that are using the old tables have to complete | ||
471 | * before freeing the old table. This is handled by the write locking | ||
472 | * necessary for reading the counters. | ||
473 | */ | 466 | */ |
474 | struct xt_info_lock { | 467 | DECLARE_PER_CPU(seqcount_t, xt_recseq); |
475 | seqlock_t lock; | ||
476 | unsigned char readers; | ||
477 | }; | ||
478 | DECLARE_PER_CPU(struct xt_info_lock, xt_info_locks); | ||
479 | 468 | ||
480 | /* | 469 | /** |
481 | * Note: we need to ensure that preemption is disabled before acquiring | 470 | * xt_write_recseq_begin - start of a write section |
482 | * the per-cpu-variable, so we do it as a two step process rather than | ||
483 | * using "spin_lock_bh()". | ||
484 | * | ||
485 | * We _also_ need to disable bottom half processing before updating our | ||
486 | * nesting count, to make sure that the only kind of re-entrancy is this | ||
487 | * code being called by itself: since the count+lock is not an atomic | ||
488 | * operation, we can allow no races. | ||
489 | * | 471 | * |
490 | * _Only_ that special combination of being per-cpu and never getting | 472 | * Begin packet processing : all readers must wait the end |
491 | * re-entered asynchronously means that the count is safe. | 473 | * 1) Must be called with preemption disabled |
474 | * 2) softirqs must be disabled too (or we should use irqsafe_cpu_add()) | ||
475 | * Returns : | ||
476 | * 1 if no recursion on this cpu | ||
477 | * 0 if recursion detected | ||
492 | */ | 478 | */ |
493 | static inline void xt_info_rdlock_bh(void) | 479 | static inline unsigned int xt_write_recseq_begin(void) |
494 | { | 480 | { |
495 | struct xt_info_lock *lock; | 481 | unsigned int addend; |
496 | 482 | ||
497 | local_bh_disable(); | 483 | /* |
498 | lock = &__get_cpu_var(xt_info_locks); | 484 | * Low order bit of sequence is set if we already |
499 | if (likely(!lock->readers++)) | 485 | * called xt_write_recseq_begin(). |
500 | write_seqlock(&lock->lock); | 486 | */ |
501 | } | 487 | addend = (__this_cpu_read(xt_recseq.sequence) + 1) & 1; |
502 | 488 | ||
503 | static inline void xt_info_rdunlock_bh(void) | 489 | /* |
504 | { | 490 | * This is kind of a write_seqcount_begin(), but addend is 0 or 1 |
505 | struct xt_info_lock *lock = &__get_cpu_var(xt_info_locks); | 491 | * We dont check addend value to avoid a test and conditional jump, |
492 | * since addend is most likely 1 | ||
493 | */ | ||
494 | __this_cpu_add(xt_recseq.sequence, addend); | ||
495 | smp_wmb(); | ||
506 | 496 | ||
507 | if (likely(!--lock->readers)) | 497 | return addend; |
508 | write_sequnlock(&lock->lock); | ||
509 | local_bh_enable(); | ||
510 | } | 498 | } |
511 | 499 | ||
512 | /* | 500 | /** |
513 | * The "writer" side needs to get exclusive access to the lock, | 501 | * xt_write_recseq_end - end of a write section |
514 | * regardless of readers. This must be called with bottom half | 502 | * @addend: return value from previous xt_write_recseq_begin() |
515 | * processing (and thus also preemption) disabled. | 503 | * |
504 | * End packet processing : all readers can proceed | ||
505 | * 1) Must be called with preemption disabled | ||
506 | * 2) softirqs must be disabled too (or we should use irqsafe_cpu_add()) | ||
516 | */ | 507 | */ |
517 | static inline void xt_info_wrlock(unsigned int cpu) | 508 | static inline void xt_write_recseq_end(unsigned int addend) |
518 | { | ||
519 | write_seqlock(&per_cpu(xt_info_locks, cpu).lock); | ||
520 | } | ||
521 | |||
522 | static inline void xt_info_wrunlock(unsigned int cpu) | ||
523 | { | 509 | { |
524 | write_sequnlock(&per_cpu(xt_info_locks, cpu).lock); | 510 | /* this is kind of a write_seqcount_end(), but addend is 0 or 1 */ |
511 | smp_wmb(); | ||
512 | __this_cpu_add(xt_recseq.sequence, addend); | ||
525 | } | 513 | } |
526 | 514 | ||
527 | /* | 515 | /* |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index bbfa1093f606..c7ccaae15af6 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -77,6 +77,39 @@ | |||
77 | */ | 77 | */ |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * DOC: Virtual interface / concurrency capabilities | ||
81 | * | ||
82 | * Some devices are able to operate with virtual MACs, they can have | ||
83 | * more than one virtual interface. The capability handling for this | ||
84 | * is a bit complex though, as there may be a number of restrictions | ||
85 | * on the types of concurrency that are supported. | ||
86 | * | ||
87 | * To start with, each device supports the interface types listed in | ||
88 | * the %NL80211_ATTR_SUPPORTED_IFTYPES attribute, but by listing the | ||
89 | * types there no concurrency is implied. | ||
90 | * | ||
91 | * Once concurrency is desired, more attributes must be observed: | ||
92 | * To start with, since some interface types are purely managed in | ||
93 | * software, like the AP-VLAN type in mac80211 for example, there's | ||
94 | * an additional list of these, they can be added at any time and | ||
95 | * are only restricted by some semantic restrictions (e.g. AP-VLAN | ||
96 | * cannot be added without a corresponding AP interface). This list | ||
97 | * is exported in the %NL80211_ATTR_SOFTWARE_IFTYPES attribute. | ||
98 | * | ||
99 | * Further, the list of supported combinations is exported. This is | ||
100 | * in the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute. Basically, | ||
101 | * it exports a list of "groups", and at any point in time the | ||
102 | * interfaces that are currently active must fall into any one of | ||
103 | * the advertised groups. Within each group, there are restrictions | ||
104 | * on the number of interfaces of different types that are supported | ||
105 | * and also the number of different channels, along with potentially | ||
106 | * some other restrictions. See &enum nl80211_if_combination_attrs. | ||
107 | * | ||
108 | * All together, these attributes define the concurrency of virtual | ||
109 | * interfaces that a given device supports. | ||
110 | */ | ||
111 | |||
112 | /** | ||
80 | * enum nl80211_commands - supported nl80211 commands | 113 | * enum nl80211_commands - supported nl80211 commands |
81 | * | 114 | * |
82 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors | 115 | * @NL80211_CMD_UNSPEC: unspecified command to catch errors |
@@ -203,6 +236,28 @@ | |||
203 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 236 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
204 | * partial scan results may be available | 237 | * partial scan results may be available |
205 | * | 238 | * |
239 | * @NL80211_CMD_START_SCHED_SCAN: start a scheduled scan at certain | ||
240 | * intervals, as specified by %NL80211_ATTR_SCHED_SCAN_INTERVAL. | ||
241 | * Like with normal scans, if SSIDs (%NL80211_ATTR_SCAN_SSIDS) | ||
242 | * are passed, they are used in the probe requests. For | ||
243 | * broadcast, a broadcast SSID must be passed (ie. an empty | ||
244 | * string). If no SSID is passed, no probe requests are sent and | ||
245 | * a passive scan is performed. %NL80211_ATTR_SCAN_FREQUENCIES, | ||
246 | * if passed, define which channels should be scanned; if not | ||
247 | * passed, all channels allowed for the current regulatory domain | ||
248 | * are used. Extra IEs can also be passed from the userspace by | ||
249 | * using the %NL80211_ATTR_IE attribute. | ||
250 | * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan | ||
251 | * @NL80211_CMD_SCHED_SCAN_RESULTS: indicates that there are scheduled scan | ||
252 | * results available. | ||
253 | * @NL80211_CMD_SCHED_SCAN_STOPPED: indicates that the scheduled scan has | ||
254 | * stopped. The driver may issue this event at any time during a | ||
255 | * scheduled scan. One reason for stopping the scan is if the hardware | ||
256 | * does not support starting an association or a normal scan while running | ||
257 | * a scheduled scan. This event is also sent when the | ||
258 | * %NL80211_CMD_STOP_SCHED_SCAN command is received or when the interface | ||
259 | * is brought down while a scheduled scan was running. | ||
260 | * | ||
206 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation | 261 | * @NL80211_CMD_GET_SURVEY: get survey resuls, e.g. channel occupation |
207 | * or noise level | 262 | * or noise level |
208 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to | 263 | * @NL80211_CMD_NEW_SURVEY_RESULTS: survey data notification (as a reply to |
@@ -410,6 +465,24 @@ | |||
410 | * notification. This event is used to indicate that an unprotected | 465 | * notification. This event is used to indicate that an unprotected |
411 | * disassociation frame was dropped when MFP is in use. | 466 | * disassociation frame was dropped when MFP is in use. |
412 | * | 467 | * |
468 | * @NL80211_CMD_NEW_PEER_CANDIDATE: Notification on the reception of a | ||
469 | * beacon or probe response from a compatible mesh peer. This is only | ||
470 | * sent while no station information (sta_info) exists for the new peer | ||
471 | * candidate and when @NL80211_MESH_SETUP_USERSPACE_AUTH is set. On | ||
472 | * reception of this notification, userspace may decide to create a new | ||
473 | * station (@NL80211_CMD_NEW_STATION). To stop this notification from | ||
474 | * reoccurring, the userspace authentication daemon may want to create the | ||
475 | * new station with the AUTHENTICATED flag unset and maybe change it later | ||
476 | * depending on the authentication result. | ||
477 | * | ||
478 | * @NL80211_CMD_GET_WOWLAN: get Wake-on-Wireless-LAN (WoWLAN) settings. | ||
479 | * @NL80211_CMD_SET_WOWLAN: set Wake-on-Wireless-LAN (WoWLAN) settings. | ||
480 | * Since wireless is more complex than wired ethernet, it supports | ||
481 | * various triggers. These triggers can be configured through this | ||
482 | * command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For | ||
483 | * more background information, see | ||
484 | * http://wireless.kernel.org/en/users/Documentation/WoWLAN. | ||
485 | * | ||
413 | * @NL80211_CMD_MAX: highest used command number | 486 | * @NL80211_CMD_MAX: highest used command number |
414 | * @__NL80211_CMD_AFTER_LAST: internal use | 487 | * @__NL80211_CMD_AFTER_LAST: internal use |
415 | */ | 488 | */ |
@@ -522,6 +595,16 @@ enum nl80211_commands { | |||
522 | NL80211_CMD_UNPROT_DEAUTHENTICATE, | 595 | NL80211_CMD_UNPROT_DEAUTHENTICATE, |
523 | NL80211_CMD_UNPROT_DISASSOCIATE, | 596 | NL80211_CMD_UNPROT_DISASSOCIATE, |
524 | 597 | ||
598 | NL80211_CMD_NEW_PEER_CANDIDATE, | ||
599 | |||
600 | NL80211_CMD_GET_WOWLAN, | ||
601 | NL80211_CMD_SET_WOWLAN, | ||
602 | |||
603 | NL80211_CMD_START_SCHED_SCAN, | ||
604 | NL80211_CMD_STOP_SCHED_SCAN, | ||
605 | NL80211_CMD_SCHED_SCAN_RESULTS, | ||
606 | NL80211_CMD_SCHED_SCAN_STOPPED, | ||
607 | |||
525 | /* add new commands above here */ | 608 | /* add new commands above here */ |
526 | 609 | ||
527 | /* used to define NL80211_CMD_MAX below */ | 610 | /* used to define NL80211_CMD_MAX below */ |
@@ -545,6 +628,7 @@ enum nl80211_commands { | |||
545 | /* source-level API compatibility */ | 628 | /* source-level API compatibility */ |
546 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG | 629 | #define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG |
547 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG | 630 | #define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG |
631 | #define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE | ||
548 | 632 | ||
549 | /** | 633 | /** |
550 | * enum nl80211_attrs - nl80211 netlink attributes | 634 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -886,6 +970,31 @@ enum nl80211_commands { | |||
886 | * changed once the mesh is active. | 970 | * changed once the mesh is active. |
887 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute | 971 | * @NL80211_ATTR_MESH_CONFIG: Mesh configuration parameters, a nested attribute |
888 | * containing attributes from &enum nl80211_meshconf_params. | 972 | * containing attributes from &enum nl80211_meshconf_params. |
973 | * @NL80211_ATTR_SUPPORT_MESH_AUTH: Currently, this means the underlying driver | ||
974 | * allows auth frames in a mesh to be passed to userspace for processing via | ||
975 | * the @NL80211_MESH_SETUP_USERSPACE_AUTH flag. | ||
976 | * @NL80211_ATTR_STA_PLINK_STATE: The state of a mesh peer link as | ||
977 | * defined in &enum nl80211_plink_state. Used when userspace is | ||
978 | * driving the peer link management state machine. | ||
979 | * @NL80211_MESH_SETUP_USERSPACE_AMPE must be enabled. | ||
980 | * | ||
981 | * @NL80211_ATTR_WOWLAN_SUPPORTED: indicates, as part of the wiphy capabilities, | ||
982 | * the supported WoWLAN triggers | ||
983 | * @NL80211_ATTR_WOWLAN_TRIGGERS: used by %NL80211_CMD_SET_WOWLAN to | ||
984 | * indicate which WoW triggers should be enabled. This is also | ||
985 | * used by %NL80211_CMD_GET_WOWLAN to get the currently enabled WoWLAN | ||
986 | * triggers. | ||
987 | |||
988 | * @NL80211_ATTR_SCHED_SCAN_INTERVAL: Interval between scheduled scan | ||
989 | * cycles, in msecs. | ||
990 | * | ||
991 | * @NL80211_ATTR_INTERFACE_COMBINATIONS: Nested attribute listing the supported | ||
992 | * interface combinations. In each nested item, it contains attributes | ||
993 | * defined in &enum nl80211_if_combination_attrs. | ||
994 | * @NL80211_ATTR_SOFTWARE_IFTYPES: Nested attribute (just like | ||
995 | * %NL80211_ATTR_SUPPORTED_IFTYPES) containing the interface types that | ||
996 | * are managed in software: interfaces of these types aren't subject to | ||
997 | * any restrictions in their number or combinations. | ||
889 | * | 998 | * |
890 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 999 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
891 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1000 | * @__NL80211_ATTR_AFTER_LAST: internal use |
@@ -1074,6 +1183,17 @@ enum nl80211_attrs { | |||
1074 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, | 1183 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, |
1075 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, | 1184 | NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, |
1076 | 1185 | ||
1186 | NL80211_ATTR_SUPPORT_MESH_AUTH, | ||
1187 | NL80211_ATTR_STA_PLINK_STATE, | ||
1188 | |||
1189 | NL80211_ATTR_WOWLAN_TRIGGERS, | ||
1190 | NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, | ||
1191 | |||
1192 | NL80211_ATTR_SCHED_SCAN_INTERVAL, | ||
1193 | |||
1194 | NL80211_ATTR_INTERFACE_COMBINATIONS, | ||
1195 | NL80211_ATTR_SOFTWARE_IFTYPES, | ||
1196 | |||
1077 | /* add attributes here, update the policy in nl80211.c */ | 1197 | /* add attributes here, update the policy in nl80211.c */ |
1078 | 1198 | ||
1079 | __NL80211_ATTR_AFTER_LAST, | 1199 | __NL80211_ATTR_AFTER_LAST, |
@@ -1126,7 +1246,9 @@ enum nl80211_attrs { | |||
1126 | * @NL80211_IFTYPE_ADHOC: independent BSS member | 1246 | * @NL80211_IFTYPE_ADHOC: independent BSS member |
1127 | * @NL80211_IFTYPE_STATION: managed BSS member | 1247 | * @NL80211_IFTYPE_STATION: managed BSS member |
1128 | * @NL80211_IFTYPE_AP: access point | 1248 | * @NL80211_IFTYPE_AP: access point |
1129 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points | 1249 | * @NL80211_IFTYPE_AP_VLAN: VLAN interface for access points; VLAN interfaces |
1250 | * are a bit special in that they must always be tied to a pre-existing | ||
1251 | * AP type interface. | ||
1130 | * @NL80211_IFTYPE_WDS: wireless distribution interface | 1252 | * @NL80211_IFTYPE_WDS: wireless distribution interface |
1131 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames | 1253 | * @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames |
1132 | * @NL80211_IFTYPE_MESH_POINT: mesh point | 1254 | * @NL80211_IFTYPE_MESH_POINT: mesh point |
@@ -1168,6 +1290,7 @@ enum nl80211_iftype { | |||
1168 | * with short barker preamble | 1290 | * with short barker preamble |
1169 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable | 1291 | * @NL80211_STA_FLAG_WME: station is WME/QoS capable |
1170 | * @NL80211_STA_FLAG_MFP: station uses management frame protection | 1292 | * @NL80211_STA_FLAG_MFP: station uses management frame protection |
1293 | * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated | ||
1171 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined | 1294 | * @NL80211_STA_FLAG_MAX: highest station flag number currently defined |
1172 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use | 1295 | * @__NL80211_STA_FLAG_AFTER_LAST: internal use |
1173 | */ | 1296 | */ |
@@ -1177,6 +1300,7 @@ enum nl80211_sta_flags { | |||
1177 | NL80211_STA_FLAG_SHORT_PREAMBLE, | 1300 | NL80211_STA_FLAG_SHORT_PREAMBLE, |
1178 | NL80211_STA_FLAG_WME, | 1301 | NL80211_STA_FLAG_WME, |
1179 | NL80211_STA_FLAG_MFP, | 1302 | NL80211_STA_FLAG_MFP, |
1303 | NL80211_STA_FLAG_AUTHENTICATED, | ||
1180 | 1304 | ||
1181 | /* keep last */ | 1305 | /* keep last */ |
1182 | __NL80211_STA_FLAG_AFTER_LAST, | 1306 | __NL80211_STA_FLAG_AFTER_LAST, |
@@ -1222,6 +1346,36 @@ enum nl80211_rate_info { | |||
1222 | }; | 1346 | }; |
1223 | 1347 | ||
1224 | /** | 1348 | /** |
1349 | * enum nl80211_sta_bss_param - BSS information collected by STA | ||
1350 | * | ||
1351 | * These attribute types are used with %NL80211_STA_INFO_BSS_PARAM | ||
1352 | * when getting information about the bitrate of a station. | ||
1353 | * | ||
1354 | * @__NL80211_STA_BSS_PARAM_INVALID: attribute number 0 is reserved | ||
1355 | * @NL80211_STA_BSS_PARAM_CTS_PROT: whether CTS protection is enabled (flag) | ||
1356 | * @NL80211_STA_BSS_PARAM_SHORT_PREAMBLE: whether short preamble is enabled | ||
1357 | * (flag) | ||
1358 | * @NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME: whether short slot time is enabled | ||
1359 | * (flag) | ||
1360 | * @NL80211_STA_BSS_PARAM_DTIM_PERIOD: DTIM period for beaconing (u8) | ||
1361 | * @NL80211_STA_BSS_PARAM_BEACON_INTERVAL: Beacon interval (u16) | ||
1362 | * @NL80211_STA_BSS_PARAM_MAX: highest sta_bss_param number currently defined | ||
1363 | * @__NL80211_STA_BSS_PARAM_AFTER_LAST: internal use | ||
1364 | */ | ||
1365 | enum nl80211_sta_bss_param { | ||
1366 | __NL80211_STA_BSS_PARAM_INVALID, | ||
1367 | NL80211_STA_BSS_PARAM_CTS_PROT, | ||
1368 | NL80211_STA_BSS_PARAM_SHORT_PREAMBLE, | ||
1369 | NL80211_STA_BSS_PARAM_SHORT_SLOT_TIME, | ||
1370 | NL80211_STA_BSS_PARAM_DTIM_PERIOD, | ||
1371 | NL80211_STA_BSS_PARAM_BEACON_INTERVAL, | ||
1372 | |||
1373 | /* keep last */ | ||
1374 | __NL80211_STA_BSS_PARAM_AFTER_LAST, | ||
1375 | NL80211_STA_BSS_PARAM_MAX = __NL80211_STA_BSS_PARAM_AFTER_LAST - 1 | ||
1376 | }; | ||
1377 | |||
1378 | /** | ||
1225 | * enum nl80211_sta_info - station information | 1379 | * enum nl80211_sta_info - station information |
1226 | * | 1380 | * |
1227 | * These attribute types are used with %NL80211_ATTR_STA_INFO | 1381 | * These attribute types are used with %NL80211_ATTR_STA_INFO |
@@ -1233,7 +1387,7 @@ enum nl80211_rate_info { | |||
1233 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) | 1387 | * @NL80211_STA_INFO_TX_BYTES: total transmitted bytes (u32, to this station) |
1234 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) | 1388 | * @NL80211_STA_INFO_SIGNAL: signal strength of last received PPDU (u8, dBm) |
1235 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute | 1389 | * @NL80211_STA_INFO_TX_BITRATE: current unicast tx rate, nested attribute |
1236 | * containing info as possible, see &enum nl80211_sta_info_txrate. | 1390 | * containing info as possible, see &enum nl80211_rate_info |
1237 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) | 1391 | * @NL80211_STA_INFO_RX_PACKETS: total received packet (u32, from this station) |
1238 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this | 1392 | * @NL80211_STA_INFO_TX_PACKETS: total transmitted packets (u32, to this |
1239 | * station) | 1393 | * station) |
@@ -1243,8 +1397,12 @@ enum nl80211_rate_info { | |||
1243 | * @NL80211_STA_INFO_LLID: the station's mesh LLID | 1397 | * @NL80211_STA_INFO_LLID: the station's mesh LLID |
1244 | * @NL80211_STA_INFO_PLID: the station's mesh PLID | 1398 | * @NL80211_STA_INFO_PLID: the station's mesh PLID |
1245 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station | 1399 | * @NL80211_STA_INFO_PLINK_STATE: peer link state for the station |
1400 | * (see %enum nl80211_plink_state) | ||
1246 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested | 1401 | * @NL80211_STA_INFO_RX_BITRATE: last unicast data frame rx rate, nested |
1247 | * attribute, like NL80211_STA_INFO_TX_BITRATE. | 1402 | * attribute, like NL80211_STA_INFO_TX_BITRATE. |
1403 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute | ||
1404 | * containing info as possible, see &enum nl80211_sta_bss_param | ||
1405 | * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected | ||
1248 | * @__NL80211_STA_INFO_AFTER_LAST: internal | 1406 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1249 | * @NL80211_STA_INFO_MAX: highest possible station info attribute | 1407 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1250 | */ | 1408 | */ |
@@ -1264,6 +1422,8 @@ enum nl80211_sta_info { | |||
1264 | NL80211_STA_INFO_TX_FAILED, | 1422 | NL80211_STA_INFO_TX_FAILED, |
1265 | NL80211_STA_INFO_SIGNAL_AVG, | 1423 | NL80211_STA_INFO_SIGNAL_AVG, |
1266 | NL80211_STA_INFO_RX_BITRATE, | 1424 | NL80211_STA_INFO_RX_BITRATE, |
1425 | NL80211_STA_INFO_BSS_PARAM, | ||
1426 | NL80211_STA_INFO_CONNECTED_TIME, | ||
1267 | 1427 | ||
1268 | /* keep last */ | 1428 | /* keep last */ |
1269 | __NL80211_STA_INFO_AFTER_LAST, | 1429 | __NL80211_STA_INFO_AFTER_LAST, |
@@ -1686,9 +1846,21 @@ enum nl80211_meshconf_params { | |||
1686 | * vendor specific path metric or disable it to use the default Airtime | 1846 | * vendor specific path metric or disable it to use the default Airtime |
1687 | * metric. | 1847 | * metric. |
1688 | * | 1848 | * |
1689 | * @NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE: A vendor specific information | 1849 | * @NL80211_MESH_SETUP_IE: Information elements for this mesh, for instance, a |
1690 | * element that vendors will use to identify the path selection methods and | 1850 | * robust security network ie, or a vendor specific information element that |
1691 | * metrics in use. | 1851 | * vendors will use to identify the path selection methods and metrics in use. |
1852 | * | ||
1853 | * @NL80211_MESH_SETUP_USERSPACE_AUTH: Enable this option if an authentication | ||
1854 | * daemon will be authenticating mesh candidates. | ||
1855 | * | ||
1856 | * @NL80211_MESH_SETUP_USERSPACE_AMPE: Enable this option if an authentication | ||
1857 | * daemon will be securing peer link frames. AMPE is a secured version of Mesh | ||
1858 | * Peering Management (MPM) and is implemented with the assistance of a | ||
1859 | * userspace daemon. When this flag is set, the kernel will send peer | ||
1860 | * management frames to a userspace daemon that will implement AMPE | ||
1861 | * functionality (security capabilities selection, key confirmation, and key | ||
1862 | * management). When the flag is unset (default), the kernel can autonomously | ||
1863 | * complete (unsecured) mesh peering without the need of a userspace daemon. | ||
1692 | * | 1864 | * |
1693 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number | 1865 | * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number |
1694 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use | 1866 | * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use |
@@ -1697,7 +1869,9 @@ enum nl80211_mesh_setup_params { | |||
1697 | __NL80211_MESH_SETUP_INVALID, | 1869 | __NL80211_MESH_SETUP_INVALID, |
1698 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, | 1870 | NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL, |
1699 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, | 1871 | NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC, |
1700 | NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE, | 1872 | NL80211_MESH_SETUP_IE, |
1873 | NL80211_MESH_SETUP_USERSPACE_AUTH, | ||
1874 | NL80211_MESH_SETUP_USERSPACE_AMPE, | ||
1701 | 1875 | ||
1702 | /* keep last */ | 1876 | /* keep last */ |
1703 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, | 1877 | __NL80211_MESH_SETUP_ATTR_AFTER_LAST, |
@@ -2002,4 +2176,189 @@ enum nl80211_tx_power_setting { | |||
2002 | NL80211_TX_POWER_FIXED, | 2176 | NL80211_TX_POWER_FIXED, |
2003 | }; | 2177 | }; |
2004 | 2178 | ||
2179 | /** | ||
2180 | * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute | ||
2181 | * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute | ||
2182 | * @NL80211_WOWLAN_PKTPAT_PATTERN: the pattern, values where the mask has | ||
2183 | * a zero bit are ignored | ||
2184 | * @NL80211_WOWLAN_PKTPAT_MASK: pattern mask, must be long enough to have | ||
2185 | * a bit for each byte in the pattern. The lowest-order bit corresponds | ||
2186 | * to the first byte of the pattern, but the bytes of the pattern are | ||
2187 | * in a little-endian-like format, i.e. the 9th byte of the pattern | ||
2188 | * corresponds to the lowest-order bit in the second byte of the mask. | ||
2189 | * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where | ||
2190 | * xx indicates "don't care") would be represented by a pattern of | ||
2191 | * twelve zero bytes, and a mask of "0xed,0x07". | ||
2192 | * Note that the pattern matching is done as though frames were not | ||
2193 | * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked | ||
2194 | * first (including SNAP header unpacking) and then matched. | ||
2195 | * @NUM_NL80211_WOWLAN_PKTPAT: number of attributes | ||
2196 | * @MAX_NL80211_WOWLAN_PKTPAT: max attribute number | ||
2197 | */ | ||
2198 | enum nl80211_wowlan_packet_pattern_attr { | ||
2199 | __NL80211_WOWLAN_PKTPAT_INVALID, | ||
2200 | NL80211_WOWLAN_PKTPAT_MASK, | ||
2201 | NL80211_WOWLAN_PKTPAT_PATTERN, | ||
2202 | |||
2203 | NUM_NL80211_WOWLAN_PKTPAT, | ||
2204 | MAX_NL80211_WOWLAN_PKTPAT = NUM_NL80211_WOWLAN_PKTPAT - 1, | ||
2205 | }; | ||
2206 | |||
2207 | /** | ||
2208 | * struct nl80211_wowlan_pattern_support - pattern support information | ||
2209 | * @max_patterns: maximum number of patterns supported | ||
2210 | * @min_pattern_len: minimum length of each pattern | ||
2211 | * @max_pattern_len: maximum length of each pattern | ||
2212 | * | ||
2213 | * This struct is carried in %NL80211_WOWLAN_TRIG_PKT_PATTERN when | ||
2214 | * that is part of %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED in the | ||
2215 | * capability information given by the kernel to userspace. | ||
2216 | */ | ||
2217 | struct nl80211_wowlan_pattern_support { | ||
2218 | __u32 max_patterns; | ||
2219 | __u32 min_pattern_len; | ||
2220 | __u32 max_pattern_len; | ||
2221 | } __attribute__((packed)); | ||
2222 | |||
2223 | /** | ||
2224 | * enum nl80211_wowlan_triggers - WoWLAN trigger definitions | ||
2225 | * @__NL80211_WOWLAN_TRIG_INVALID: invalid number for nested attributes | ||
2226 | * @NL80211_WOWLAN_TRIG_ANY: wake up on any activity, do not really put | ||
2227 | * the chip into a special state -- works best with chips that have | ||
2228 | * support for low-power operation already (flag) | ||
2229 | * @NL80211_WOWLAN_TRIG_DISCONNECT: wake up on disconnect, the way disconnect | ||
2230 | * is detected is implementation-specific (flag) | ||
2231 | * @NL80211_WOWLAN_TRIG_MAGIC_PKT: wake up on magic packet (6x 0xff, followed | ||
2232 | * by 16 repetitions of MAC addr, anywhere in payload) (flag) | ||
2233 | * @NL80211_WOWLAN_TRIG_PKT_PATTERN: wake up on the specified packet patterns | ||
2234 | * which are passed in an array of nested attributes, each nested attribute | ||
2235 | * defining a with attributes from &struct nl80211_wowlan_trig_pkt_pattern. | ||
2236 | * Each pattern defines a wakeup packet. The matching is done on the MSDU, | ||
2237 | * i.e. as though the packet was an 802.3 packet, so the pattern matching | ||
2238 | * is done after the packet is converted to the MSDU. | ||
2239 | * | ||
2240 | * In %NL80211_ATTR_WOWLAN_TRIGGERS_SUPPORTED, it is a binary attribute | ||
2241 | * carrying a &struct nl80211_wowlan_pattern_support. | ||
2242 | * @NUM_NL80211_WOWLAN_TRIG: number of wake on wireless triggers | ||
2243 | * @MAX_NL80211_WOWLAN_TRIG: highest wowlan trigger attribute number | ||
2244 | */ | ||
2245 | enum nl80211_wowlan_triggers { | ||
2246 | __NL80211_WOWLAN_TRIG_INVALID, | ||
2247 | NL80211_WOWLAN_TRIG_ANY, | ||
2248 | NL80211_WOWLAN_TRIG_DISCONNECT, | ||
2249 | NL80211_WOWLAN_TRIG_MAGIC_PKT, | ||
2250 | NL80211_WOWLAN_TRIG_PKT_PATTERN, | ||
2251 | |||
2252 | /* keep last */ | ||
2253 | NUM_NL80211_WOWLAN_TRIG, | ||
2254 | MAX_NL80211_WOWLAN_TRIG = NUM_NL80211_WOWLAN_TRIG - 1 | ||
2255 | }; | ||
2256 | |||
2257 | /** | ||
2258 | * enum nl80211_iface_limit_attrs - limit attributes | ||
2259 | * @NL80211_IFACE_LIMIT_UNSPEC: (reserved) | ||
2260 | * @NL80211_IFACE_LIMIT_MAX: maximum number of interfaces that | ||
2261 | * can be chosen from this set of interface types (u32) | ||
2262 | * @NL80211_IFACE_LIMIT_TYPES: nested attribute containing a | ||
2263 | * flag attribute for each interface type in this set | ||
2264 | * @NUM_NL80211_IFACE_LIMIT: number of attributes | ||
2265 | * @MAX_NL80211_IFACE_LIMIT: highest attribute number | ||
2266 | */ | ||
2267 | enum nl80211_iface_limit_attrs { | ||
2268 | NL80211_IFACE_LIMIT_UNSPEC, | ||
2269 | NL80211_IFACE_LIMIT_MAX, | ||
2270 | NL80211_IFACE_LIMIT_TYPES, | ||
2271 | |||
2272 | /* keep last */ | ||
2273 | NUM_NL80211_IFACE_LIMIT, | ||
2274 | MAX_NL80211_IFACE_LIMIT = NUM_NL80211_IFACE_LIMIT - 1 | ||
2275 | }; | ||
2276 | |||
2277 | /** | ||
2278 | * enum nl80211_if_combination_attrs -- interface combination attributes | ||
2279 | * | ||
2280 | * @NL80211_IFACE_COMB_UNSPEC: (reserved) | ||
2281 | * @NL80211_IFACE_COMB_LIMITS: Nested attributes containing the limits | ||
2282 | * for given interface types, see &enum nl80211_iface_limit_attrs. | ||
2283 | * @NL80211_IFACE_COMB_MAXNUM: u32 attribute giving the total number of | ||
2284 | * interfaces that can be created in this group. This number doesn't | ||
2285 | * apply to interfaces purely managed in software, which are listed | ||
2286 | * in a separate attribute %NL80211_ATTR_INTERFACES_SOFTWARE. | ||
2287 | * @NL80211_IFACE_COMB_STA_AP_BI_MATCH: flag attribute specifying that | ||
2288 | * beacon intervals within this group must be all the same even for | ||
2289 | * infrastructure and AP/GO combinations, i.e. the GO(s) must adopt | ||
2290 | * the infrastructure network's beacon interval. | ||
2291 | * @NL80211_IFACE_COMB_NUM_CHANNELS: u32 attribute specifying how many | ||
2292 | * different channels may be used within this group. | ||
2293 | * @NUM_NL80211_IFACE_COMB: number of attributes | ||
2294 | * @MAX_NL80211_IFACE_COMB: highest attribute number | ||
2295 | * | ||
2296 | * Examples: | ||
2297 | * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2 | ||
2298 | * => allows an AP and a STA that must match BIs | ||
2299 | * | ||
2300 | * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8 | ||
2301 | * => allows 8 of AP/GO | ||
2302 | * | ||
2303 | * numbers = [ #{STA} <= 2 ], channels = 2, max = 2 | ||
2304 | * => allows two STAs on different channels | ||
2305 | * | ||
2306 | * numbers = [ #{STA} <= 1, #{P2P-client,P2P-GO} <= 3 ], max = 4 | ||
2307 | * => allows a STA plus three P2P interfaces | ||
2308 | * | ||
2309 | * The list of these four possiblities could completely be contained | ||
2310 | * within the %NL80211_ATTR_INTERFACE_COMBINATIONS attribute to indicate | ||
2311 | * that any of these groups must match. | ||
2312 | * | ||
2313 | * "Combinations" of just a single interface will not be listed here, | ||
2314 | * a single interface of any valid interface type is assumed to always | ||
2315 | * be possible by itself. This means that implicitly, for each valid | ||
2316 | * interface type, the following group always exists: | ||
2317 | * numbers = [ #{<type>} <= 1 ], channels = 1, max = 1 | ||
2318 | */ | ||
2319 | enum nl80211_if_combination_attrs { | ||
2320 | NL80211_IFACE_COMB_UNSPEC, | ||
2321 | NL80211_IFACE_COMB_LIMITS, | ||
2322 | NL80211_IFACE_COMB_MAXNUM, | ||
2323 | NL80211_IFACE_COMB_STA_AP_BI_MATCH, | ||
2324 | NL80211_IFACE_COMB_NUM_CHANNELS, | ||
2325 | |||
2326 | /* keep last */ | ||
2327 | NUM_NL80211_IFACE_COMB, | ||
2328 | MAX_NL80211_IFACE_COMB = NUM_NL80211_IFACE_COMB - 1 | ||
2329 | }; | ||
2330 | |||
2331 | |||
2332 | /** | ||
2333 | * enum nl80211_plink_state - state of a mesh peer link finite state machine | ||
2334 | * | ||
2335 | * @NL80211_PLINK_LISTEN: initial state, considered the implicit | ||
2336 | * state of non existant mesh peer links | ||
2337 | * @NL80211_PLINK_OPN_SNT: mesh plink open frame has been sent to | ||
2338 | * this mesh peer | ||
2339 | * @NL80211_PLINK_OPN_RCVD: mesh plink open frame has been received | ||
2340 | * from this mesh peer | ||
2341 | * @NL80211_PLINK_CNF_RCVD: mesh plink confirm frame has been | ||
2342 | * received from this mesh peer | ||
2343 | * @NL80211_PLINK_ESTAB: mesh peer link is established | ||
2344 | * @NL80211_PLINK_HOLDING: mesh peer link is being closed or cancelled | ||
2345 | * @NL80211_PLINK_BLOCKED: all frames transmitted from this mesh | ||
2346 | * plink are discarded | ||
2347 | * @NUM_NL80211_PLINK_STATES: number of peer link states | ||
2348 | * @MAX_NL80211_PLINK_STATES: highest numerical value of plink states | ||
2349 | */ | ||
2350 | enum nl80211_plink_state { | ||
2351 | NL80211_PLINK_LISTEN, | ||
2352 | NL80211_PLINK_OPN_SNT, | ||
2353 | NL80211_PLINK_OPN_RCVD, | ||
2354 | NL80211_PLINK_CNF_RCVD, | ||
2355 | NL80211_PLINK_ESTAB, | ||
2356 | NL80211_PLINK_HOLDING, | ||
2357 | NL80211_PLINK_BLOCKED, | ||
2358 | |||
2359 | /* keep last */ | ||
2360 | NUM_NL80211_PLINK_STATES, | ||
2361 | MAX_NL80211_PLINK_STATES = NUM_NL80211_PLINK_STATES - 1 | ||
2362 | }; | ||
2363 | |||
2005 | #endif /* __LINUX_NL80211_H */ | 2364 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 3a02e0208575..c5336705921f 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -588,4 +588,19 @@ struct tc_sfb_xstats { | |||
588 | 588 | ||
589 | #define SFB_MAX_PROB 0xFFFF | 589 | #define SFB_MAX_PROB 0xFFFF |
590 | 590 | ||
591 | /* QFQ */ | ||
592 | enum { | ||
593 | TCA_QFQ_UNSPEC, | ||
594 | TCA_QFQ_WEIGHT, | ||
595 | TCA_QFQ_LMAX, | ||
596 | __TCA_QFQ_MAX | ||
597 | }; | ||
598 | |||
599 | #define TCA_QFQ_MAX (__TCA_QFQ_MAX - 1) | ||
600 | |||
601 | struct tc_qfq_stats { | ||
602 | __u32 weight; | ||
603 | __u32 lmax; | ||
604 | }; | ||
605 | |||
591 | #endif | 606 | #endif |
diff --git a/include/linux/rfkill-regulator.h b/include/linux/rfkill-regulator.h new file mode 100644 index 000000000000..aca36bc83315 --- /dev/null +++ b/include/linux/rfkill-regulator.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * rfkill-regulator.c - Regulator consumer driver for rfkill | ||
3 | * | ||
4 | * Copyright (C) 2009 Guiming Zhuo <gmzhuo@gmail.com> | ||
5 | * Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_RFKILL_REGULATOR_H | ||
14 | #define __LINUX_RFKILL_REGULATOR_H | ||
15 | |||
16 | /* | ||
17 | * Use "vrfkill" as supply id when declaring the regulator consumer: | ||
18 | * | ||
19 | * static struct regulator_consumer_supply pcap_regulator_V6_consumers [] = { | ||
20 | * { .dev_name = "rfkill-regulator.0", .supply = "vrfkill" }, | ||
21 | * }; | ||
22 | * | ||
23 | * If you have several regulator driven rfkill, you can append a numerical id to | ||
24 | * .dev_name as done above, and use the same id when declaring the platform | ||
25 | * device: | ||
26 | * | ||
27 | * static struct rfkill_regulator_platform_data ezx_rfkill_bt_data = { | ||
28 | * .name = "ezx-bluetooth", | ||
29 | * .type = RFKILL_TYPE_BLUETOOTH, | ||
30 | * }; | ||
31 | * | ||
32 | * static struct platform_device a910_rfkill = { | ||
33 | * .name = "rfkill-regulator", | ||
34 | * .id = 0, | ||
35 | * .dev = { | ||
36 | * .platform_data = &ezx_rfkill_bt_data, | ||
37 | * }, | ||
38 | * }; | ||
39 | */ | ||
40 | |||
41 | #include <linux/rfkill.h> | ||
42 | |||
43 | struct rfkill_regulator_platform_data { | ||
44 | char *name; /* the name for the rfkill switch */ | ||
45 | enum rfkill_type type; /* the type as specified in rfkill.h */ | ||
46 | }; | ||
47 | |||
48 | #endif /* __LINUX_RFKILL_REGULATOR_H */ | ||
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index d0ae90af0b40..79aafbbf430a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -391,8 +391,8 @@ struct sk_buff { | |||
391 | 391 | ||
392 | __u32 rxhash; | 392 | __u32 rxhash; |
393 | 393 | ||
394 | __u16 queue_mapping; | ||
394 | kmemcheck_bitfield_begin(flags2); | 395 | kmemcheck_bitfield_begin(flags2); |
395 | __u16 queue_mapping:16; | ||
396 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 396 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
397 | __u8 ndisc_nodetype:2; | 397 | __u8 ndisc_nodetype:2; |
398 | #endif | 398 | #endif |
diff --git a/include/linux/smsc911x.h b/include/linux/smsc911x.h index 7144e8aa1e41..4dde70e74822 100644 --- a/include/linux/smsc911x.h +++ b/include/linux/smsc911x.h | |||
@@ -29,6 +29,7 @@ struct smsc911x_platform_config { | |||
29 | unsigned int irq_polarity; | 29 | unsigned int irq_polarity; |
30 | unsigned int irq_type; | 30 | unsigned int irq_type; |
31 | unsigned int flags; | 31 | unsigned int flags; |
32 | unsigned int shift; | ||
32 | phy_interface_t phy_interface; | 33 | phy_interface_t phy_interface; |
33 | unsigned char mac[6]; | 34 | unsigned char mac[6]; |
34 | }; | 35 | }; |
diff --git a/include/linux/socket.h b/include/linux/socket.h index d2b5e982f079..4ef98e422fde 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -333,5 +333,7 @@ struct timespec; | |||
333 | 333 | ||
334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 334 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, |
335 | unsigned int flags, struct timespec *timeout); | 335 | unsigned int flags, struct timespec *timeout); |
336 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, | ||
337 | unsigned int vlen, unsigned int flags); | ||
336 | #endif /* not kernel and not glibc */ | 338 | #endif /* not kernel and not glibc */ |
337 | #endif /* _LINUX_SOCKET_H */ | 339 | #endif /* _LINUX_SOCKET_H */ |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 045f72ab5dfd..252e44821787 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
@@ -308,7 +308,7 @@ struct ssb_bus { | |||
308 | 308 | ||
309 | /* ID information about the Chip. */ | 309 | /* ID information about the Chip. */ |
310 | u16 chip_id; | 310 | u16 chip_id; |
311 | u16 chip_rev; | 311 | u8 chip_rev; |
312 | u16 sprom_offset; | 312 | u16 sprom_offset; |
313 | u16 sprom_size; /* number of words in sprom */ | 313 | u16 sprom_size; /* number of words in sprom */ |
314 | u8 chip_package; | 314 | u8 chip_package; |
@@ -520,6 +520,7 @@ extern int ssb_bus_may_powerdown(struct ssb_bus *bus); | |||
520 | * Otherwise static always-on powercontrol will be used. */ | 520 | * Otherwise static always-on powercontrol will be used. */ |
521 | extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); | 521 | extern int ssb_bus_powerup(struct ssb_bus *bus, bool dynamic_pctl); |
522 | 522 | ||
523 | extern void ssb_commit_settings(struct ssb_bus *bus); | ||
523 | 524 | ||
524 | /* Various helper functions */ | 525 | /* Various helper functions */ |
525 | extern u32 ssb_admatch_base(u32 adm); | 526 | extern u32 ssb_admatch_base(u32 adm); |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 2cdf249b4e5f..a08d693d8324 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
@@ -123,6 +123,8 @@ | |||
123 | #define SSB_CHIPCO_FLASHDATA 0x0048 | 123 | #define SSB_CHIPCO_FLASHDATA 0x0048 |
124 | #define SSB_CHIPCO_BCAST_ADDR 0x0050 | 124 | #define SSB_CHIPCO_BCAST_ADDR 0x0050 |
125 | #define SSB_CHIPCO_BCAST_DATA 0x0054 | 125 | #define SSB_CHIPCO_BCAST_DATA 0x0054 |
126 | #define SSB_CHIPCO_GPIOPULLUP 0x0058 /* Rev >= 20 only */ | ||
127 | #define SSB_CHIPCO_GPIOPULLDOWN 0x005C /* Rev >= 20 only */ | ||
126 | #define SSB_CHIPCO_GPIOIN 0x0060 | 128 | #define SSB_CHIPCO_GPIOIN 0x0060 |
127 | #define SSB_CHIPCO_GPIOOUT 0x0064 | 129 | #define SSB_CHIPCO_GPIOOUT 0x0064 |
128 | #define SSB_CHIPCO_GPIOOUTEN 0x0068 | 130 | #define SSB_CHIPCO_GPIOOUTEN 0x0068 |
@@ -131,6 +133,9 @@ | |||
131 | #define SSB_CHIPCO_GPIOIRQ 0x0074 | 133 | #define SSB_CHIPCO_GPIOIRQ 0x0074 |
132 | #define SSB_CHIPCO_WATCHDOG 0x0080 | 134 | #define SSB_CHIPCO_WATCHDOG 0x0080 |
133 | #define SSB_CHIPCO_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ | 135 | #define SSB_CHIPCO_GPIOTIMER 0x0088 /* LED powersave (corerev >= 16) */ |
136 | #define SSB_CHIPCO_GPIOTIMER_OFFTIME 0x0000FFFF | ||
137 | #define SSB_CHIPCO_GPIOTIMER_OFFTIME_SHIFT 0 | ||
138 | #define SSB_CHIPCO_GPIOTIMER_ONTIME 0xFFFF0000 | ||
134 | #define SSB_CHIPCO_GPIOTIMER_ONTIME_SHIFT 16 | 139 | #define SSB_CHIPCO_GPIOTIMER_ONTIME_SHIFT 16 |
135 | #define SSB_CHIPCO_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ | 140 | #define SSB_CHIPCO_GPIOTOUTM 0x008C /* LED powersave (corerev >= 16) */ |
136 | #define SSB_CHIPCO_CLOCK_N 0x0090 | 141 | #define SSB_CHIPCO_CLOCK_N 0x0090 |
@@ -189,8 +194,10 @@ | |||
189 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ | 194 | #define SSB_CHIPCO_CLKCTLST_HAVEALPREQ 0x00000008 /* ALP available request */ |
190 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ | 195 | #define SSB_CHIPCO_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ |
191 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ | 196 | #define SSB_CHIPCO_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ |
192 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00010000 /* HT available */ | 197 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00010000 /* ALP available */ |
193 | #define SSB_CHIPCO_CLKCTLST_HAVEALP 0x00020000 /* APL available */ | 198 | #define SSB_CHIPCO_CLKCTLST_HAVEHT 0x00020000 /* HT available */ |
199 | #define SSB_CHIPCO_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */ | ||
200 | #define SSB_CHIPCO_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */ | ||
194 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ | 201 | #define SSB_CHIPCO_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ |
195 | #define SSB_CHIPCO_UART0_DATA 0x0300 | 202 | #define SSB_CHIPCO_UART0_DATA 0x0300 |
196 | #define SSB_CHIPCO_UART0_IMR 0x0304 | 203 | #define SSB_CHIPCO_UART0_IMR 0x0304 |
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h index 402955ae48ce..efbf459d571c 100644 --- a/include/linux/ssb/ssb_regs.h +++ b/include/linux/ssb/ssb_regs.h | |||
@@ -97,7 +97,7 @@ | |||
97 | #define SSB_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ | 97 | #define SSB_INTVEC_ENET1 0x00000040 /* Enable interrupts for enet 1 */ |
98 | #define SSB_TMSLOW 0x0F98 /* SB Target State Low */ | 98 | #define SSB_TMSLOW 0x0F98 /* SB Target State Low */ |
99 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ | 99 | #define SSB_TMSLOW_RESET 0x00000001 /* Reset */ |
100 | #define SSB_TMSLOW_REJECT_22 0x00000002 /* Reject (Backplane rev 2.2) */ | 100 | #define SSB_TMSLOW_REJECT 0x00000002 /* Reject (Standard Backplane) */ |
101 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ | 101 | #define SSB_TMSLOW_REJECT_23 0x00000004 /* Reject (Backplane rev 2.3) */ |
102 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ | 102 | #define SSB_TMSLOW_CLOCK 0x00010000 /* Clock Enable */ |
103 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ | 103 | #define SSB_TMSLOW_FGC 0x00020000 /* Force Gated Clocks On */ |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index f29197a4b227..9529e49b0385 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #ifndef __STMMAC_PLATFORM_DATA | 26 | #ifndef __STMMAC_PLATFORM_DATA |
27 | #define __STMMAC_PLATFORM_DATA | 27 | #define __STMMAC_PLATFORM_DATA |
28 | 28 | ||
29 | #include <linux/platform_device.h> | ||
30 | |||
29 | /* platform data for platform device structure's platform_data field */ | 31 | /* platform data for platform device structure's platform_data field */ |
30 | 32 | ||
31 | /* Private data for the STM on-board ethernet driver */ | 33 | /* Private data for the STM on-board ethernet driver */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 83ecc1749ef6..ab71447d0c5a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -610,6 +610,8 @@ asmlinkage long sys_send(int, void __user *, size_t, unsigned); | |||
610 | asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, | 610 | asmlinkage long sys_sendto(int, void __user *, size_t, unsigned, |
611 | struct sockaddr __user *, int); | 611 | struct sockaddr __user *, int); |
612 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); | 612 | asmlinkage long sys_sendmsg(int fd, struct msghdr __user *msg, unsigned flags); |
613 | asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg, | ||
614 | unsigned int vlen, unsigned flags); | ||
613 | asmlinkage long sys_recv(int, void __user *, size_t, unsigned); | 615 | asmlinkage long sys_recv(int, void __user *, size_t, unsigned); |
614 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, | 616 | asmlinkage long sys_recvfrom(int, void __user *, size_t, unsigned, |
615 | struct sockaddr __user *, int __user *); | 617 | struct sockaddr __user *, int __user *); |
diff --git a/include/linux/tipc.h b/include/linux/tipc.h index a5b994a204d2..f2d90091cc20 100644 --- a/include/linux/tipc.h +++ b/include/linux/tipc.h | |||
@@ -101,7 +101,7 @@ static inline unsigned int tipc_node(__u32 addr) | |||
101 | * Limiting values for messages | 101 | * Limiting values for messages |
102 | */ | 102 | */ |
103 | 103 | ||
104 | #define TIPC_MAX_USER_MSG_SIZE 66000 | 104 | #define TIPC_MAX_USER_MSG_SIZE 66000U |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Message importance levels | 107 | * Message importance levels |
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 05ef52861988..88fceb718c77 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -256,6 +256,8 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ | |||
256 | #define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001 | 256 | #define FLAG_RNDIS_PHYM_NOT_WIRELESS 0x0001 |
257 | #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 | 257 | #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 |
258 | 258 | ||
259 | /* Flags for driver_info::data */ | ||
260 | #define RNDIS_DRIVER_DATA_POLL_STATUS 1 /* poll status before control */ | ||
259 | 261 | ||
260 | extern void rndis_status(struct usbnet *dev, struct urb *urb); | 262 | extern void rndis_status(struct usbnet *dev, struct urb *urb); |
261 | extern int | 263 | extern int |
diff --git a/include/linux/wl12xx.h b/include/linux/wl12xx.h index bebb8efea0a6..4b697395326e 100644 --- a/include/linux/wl12xx.h +++ b/include/linux/wl12xx.h | |||
@@ -24,12 +24,26 @@ | |||
24 | #ifndef _LINUX_WL12XX_H | 24 | #ifndef _LINUX_WL12XX_H |
25 | #define _LINUX_WL12XX_H | 25 | #define _LINUX_WL12XX_H |
26 | 26 | ||
27 | /* The board reference clock values */ | 27 | /* Reference clock values */ |
28 | enum { | 28 | enum { |
29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ | 29 | WL12XX_REFCLOCK_19 = 0, /* 19.2 MHz */ |
30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ | 30 | WL12XX_REFCLOCK_26 = 1, /* 26 MHz */ |
31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ | 31 | WL12XX_REFCLOCK_38 = 2, /* 38.4 MHz */ |
32 | WL12XX_REFCLOCK_54 = 3, /* 54 MHz */ | 32 | WL12XX_REFCLOCK_52 = 3, /* 52 MHz */ |
33 | WL12XX_REFCLOCK_38_XTAL = 4, /* 38.4 MHz, XTAL */ | ||
34 | WL12XX_REFCLOCK_26_XTAL = 5, /* 26 MHz, XTAL */ | ||
35 | }; | ||
36 | |||
37 | /* TCXO clock values */ | ||
38 | enum { | ||
39 | WL12XX_TCXOCLOCK_19_2 = 0, /* 19.2MHz */ | ||
40 | WL12XX_TCXOCLOCK_26 = 1, /* 26 MHz */ | ||
41 | WL12XX_TCXOCLOCK_38_4 = 2, /* 38.4MHz */ | ||
42 | WL12XX_TCXOCLOCK_52 = 3, /* 52 MHz */ | ||
43 | WL12XX_TCXOCLOCK_16_368 = 4, /* 16.368 MHz */ | ||
44 | WL12XX_TCXOCLOCK_32_736 = 5, /* 32.736 MHz */ | ||
45 | WL12XX_TCXOCLOCK_16_8 = 6, /* 16.8 MHz */ | ||
46 | WL12XX_TCXOCLOCK_33_6 = 7, /* 33.6 MHz */ | ||
33 | }; | 47 | }; |
34 | 48 | ||
35 | struct wl12xx_platform_data { | 49 | struct wl12xx_platform_data { |
@@ -38,8 +52,13 @@ struct wl12xx_platform_data { | |||
38 | int irq; | 52 | int irq; |
39 | bool use_eeprom; | 53 | bool use_eeprom; |
40 | int board_ref_clock; | 54 | int board_ref_clock; |
55 | int board_tcxo_clock; | ||
56 | unsigned long platform_quirks; | ||
41 | }; | 57 | }; |
42 | 58 | ||
59 | /* Platform does not support level trigger interrupts */ | ||
60 | #define WL12XX_PLATFORM_QUIRK_EDGE_IRQ BIT(0) | ||
61 | |||
43 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | 62 | #ifdef CONFIG_WL12XX_PLATFORM_DATA |
44 | 63 | ||
45 | int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); | 64 | int wl12xx_set_platform_data(const struct wl12xx_platform_data *data); |