aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-04-22 09:31:43 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-22 09:31:43 -0400
commita42c74ee608a424342ef7069ccddf196d873040c (patch)
tree75adfb9f5e06ebb7c7d5d5e5a5408fa0d6d504b9 /include
parent97990a060e6757f48b931a3946b17c1c4362c3fb (diff)
parent9b383672452bb1097124c76fcb4903e0021f6baf (diff)
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/bcma/bcma.h55
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h6
-rw-r--r--include/linux/bcma/bcma_regs.h1
-rw-r--r--include/linux/hardirq.h2
-rw-r--r--include/linux/netfilter/ipset/ip_set_ahash.h4
-rw-r--r--include/linux/platform_data/brcmfmac-sdio.h124
-rw-r--r--include/linux/smpboot.h4
-rw-r--r--include/linux/socket.h1
-rw-r--r--include/linux/ssb/ssb.h60
-rw-r--r--include/linux/ssb/ssb_regs.h10
-rw-r--r--include/net/bluetooth/bluetooth.h12
-rw-r--r--include/net/bluetooth/hci.h21
-rw-r--r--include/net/bluetooth/hci_core.h28
-rw-r--r--include/net/bluetooth/rfcomm.h6
-rw-r--r--include/net/tcp.h4
-rw-r--r--include/uapi/linux/nfc.h16
16 files changed, 326 insertions, 28 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index e0ce311011c0..f14a98a79c9d 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -134,6 +134,7 @@ struct bcma_host_ops {
134#define BCMA_CORE_I2S 0x834 134#define BCMA_CORE_I2S 0x834
135#define BCMA_CORE_SDR_DDR1_MEM_CTL 0x835 /* SDR/DDR1 memory controller core */ 135#define BCMA_CORE_SDR_DDR1_MEM_CTL 0x835 /* SDR/DDR1 memory controller core */
136#define BCMA_CORE_SHIM 0x837 /* SHIM component in ubus/6362 */ 136#define BCMA_CORE_SHIM 0x837 /* SHIM component in ubus/6362 */
137#define BCMA_CORE_ARM_CR4 0x83e
137#define BCMA_CORE_DEFAULT 0xFFF 138#define BCMA_CORE_DEFAULT 0xFFF
138 139
139#define BCMA_MAX_NR_CORES 16 140#define BCMA_MAX_NR_CORES 16
@@ -173,6 +174,60 @@ struct bcma_host_ops {
173#define BCMA_CHIP_ID_BCM53572 53572 174#define BCMA_CHIP_ID_BCM53572 53572
174#define BCMA_PKG_ID_BCM47188 9 175#define BCMA_PKG_ID_BCM47188 9
175 176
177/* Board types (on PCI usually equals to the subsystem dev id) */
178/* BCM4313 */
179#define BCMA_BOARD_TYPE_BCM94313BU 0X050F
180#define BCMA_BOARD_TYPE_BCM94313HM 0X0510
181#define BCMA_BOARD_TYPE_BCM94313EPA 0X0511
182#define BCMA_BOARD_TYPE_BCM94313HMG 0X051C
183/* BCM4716 */
184#define BCMA_BOARD_TYPE_BCM94716NR2 0X04CD
185/* BCM43224 */
186#define BCMA_BOARD_TYPE_BCM943224X21 0X056E
187#define BCMA_BOARD_TYPE_BCM943224X21_FCC 0X00D1
188#define BCMA_BOARD_TYPE_BCM943224X21B 0X00E9
189#define BCMA_BOARD_TYPE_BCM943224M93 0X008B
190#define BCMA_BOARD_TYPE_BCM943224M93A 0X0090
191#define BCMA_BOARD_TYPE_BCM943224X16 0X0093
192#define BCMA_BOARD_TYPE_BCM94322X9 0X008D
193#define BCMA_BOARD_TYPE_BCM94322M35E 0X008E
194/* BCM43228 */
195#define BCMA_BOARD_TYPE_BCM943228BU8 0X0540
196#define BCMA_BOARD_TYPE_BCM943228BU9 0X0541
197#define BCMA_BOARD_TYPE_BCM943228BU 0X0542
198#define BCMA_BOARD_TYPE_BCM943227HM4L 0X0543
199#define BCMA_BOARD_TYPE_BCM943227HMB 0X0544
200#define BCMA_BOARD_TYPE_BCM943228HM4L 0X0545
201#define BCMA_BOARD_TYPE_BCM943228SD 0X0573
202/* BCM4331 */
203#define BCMA_BOARD_TYPE_BCM94331X19 0X00D6
204#define BCMA_BOARD_TYPE_BCM94331X28 0X00E4
205#define BCMA_BOARD_TYPE_BCM94331X28B 0X010E
206#define BCMA_BOARD_TYPE_BCM94331PCIEBT3AX 0X00E4
207#define BCMA_BOARD_TYPE_BCM94331X12_2G 0X00EC
208#define BCMA_BOARD_TYPE_BCM94331X12_5G 0X00ED
209#define BCMA_BOARD_TYPE_BCM94331X29B 0X00EF
210#define BCMA_BOARD_TYPE_BCM94331CSAX 0X00EF
211#define BCMA_BOARD_TYPE_BCM94331X19C 0X00F5
212#define BCMA_BOARD_TYPE_BCM94331X33 0X00F4
213#define BCMA_BOARD_TYPE_BCM94331BU 0X0523
214#define BCMA_BOARD_TYPE_BCM94331S9BU 0X0524
215#define BCMA_BOARD_TYPE_BCM94331MC 0X0525
216#define BCMA_BOARD_TYPE_BCM94331MCI 0X0526
217#define BCMA_BOARD_TYPE_BCM94331PCIEBT4 0X0527
218#define BCMA_BOARD_TYPE_BCM94331HM 0X0574
219#define BCMA_BOARD_TYPE_BCM94331PCIEDUAL 0X059B
220#define BCMA_BOARD_TYPE_BCM94331MCH5 0X05A9
221#define BCMA_BOARD_TYPE_BCM94331CS 0X05C6
222#define BCMA_BOARD_TYPE_BCM94331CD 0X05DA
223/* BCM53572 */
224#define BCMA_BOARD_TYPE_BCM953572BU 0X058D
225#define BCMA_BOARD_TYPE_BCM953572NR2 0X058E
226#define BCMA_BOARD_TYPE_BCM947188NR2 0X058F
227#define BCMA_BOARD_TYPE_BCM953572SDRNR2 0X0590
228/* BCM43142 */
229#define BCMA_BOARD_TYPE_BCM943142HM 0X05E0
230
176struct bcma_device { 231struct bcma_device {
177 struct bcma_bus *bus; 232 struct bcma_bus *bus;
178 struct bcma_device_id id; 233 struct bcma_device_id id;
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 8390c474f69a..b8b09eac60a4 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -104,6 +104,7 @@
104#define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */ 104#define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */
105#define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ 105#define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */
106#define BCMA_CC_CHIPST_5357_NAND_BOOT BIT(4) /* NAND boot, valid for CC rev 38 and/or BCM5357 */ 106#define BCMA_CC_CHIPST_5357_NAND_BOOT BIT(4) /* NAND boot, valid for CC rev 38 and/or BCM5357 */
107#define BCMA_CC_CHIPST_4360_XTAL_40MZ 0x00000001
107#define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ 108#define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */
108#define BCMA_CC_JCMD_START 0x80000000 109#define BCMA_CC_JCMD_START 0x80000000
109#define BCMA_CC_JCMD_BUSY 0x80000000 110#define BCMA_CC_JCMD_BUSY 0x80000000
@@ -315,6 +316,9 @@
315#define BCMA_CC_PMU_CTL 0x0600 /* PMU control */ 316#define BCMA_CC_PMU_CTL 0x0600 /* PMU control */
316#define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */ 317#define BCMA_CC_PMU_CTL_ILP_DIV 0xFFFF0000 /* ILP div mask */
317#define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16 318#define BCMA_CC_PMU_CTL_ILP_DIV_SHIFT 16
319#define BCMA_CC_PMU_CTL_RES 0x00006000 /* reset control mask */
320#define BCMA_CC_PMU_CTL_RES_SHIFT 13
321#define BCMA_CC_PMU_CTL_RES_RELOAD 0x2 /* reload POR values */
318#define BCMA_CC_PMU_CTL_PLL_UPD 0x00000400 322#define BCMA_CC_PMU_CTL_PLL_UPD 0x00000400
319#define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */ 323#define BCMA_CC_PMU_CTL_NOILPONW 0x00000200 /* No ILP on wait */
320#define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */ 324#define BCMA_CC_PMU_CTL_HTREQEN 0x00000100 /* HT req enable */
@@ -607,6 +611,8 @@ void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
607 611
608extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks); 612extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
609 613
614extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc);
615
610void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value); 616void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value);
611 617
612u32 bcma_chipco_irq_status(struct bcma_drv_cc *cc, u32 mask); 618u32 bcma_chipco_irq_status(struct bcma_drv_cc *cc, u32 mask);
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h
index 7e8104bb7a7e..917dcd7965e7 100644
--- a/include/linux/bcma/bcma_regs.h
+++ b/include/linux/bcma/bcma_regs.h
@@ -37,6 +37,7 @@
37#define BCMA_IOST_BIST_DONE 0x8000 37#define BCMA_IOST_BIST_DONE 0x8000
38#define BCMA_RESET_CTL 0x0800 38#define BCMA_RESET_CTL 0x0800
39#define BCMA_RESET_CTL_RESET 0x0001 39#define BCMA_RESET_CTL_RESET 0x0001
40#define BCMA_RESET_ST 0x0804
40 41
41/* BCMA PCI config space registers. */ 42/* BCMA PCI config space registers. */
42#define BCMA_PCI_PMCSR 0x44 43#define BCMA_PCI_PMCSR 0x44
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 29eb805ea4a6..c1d6555d2567 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -118,10 +118,8 @@
118 118
119#ifdef CONFIG_PREEMPT_COUNT 119#ifdef CONFIG_PREEMPT_COUNT
120# define preemptible() (preempt_count() == 0 && !irqs_disabled()) 120# define preemptible() (preempt_count() == 0 && !irqs_disabled())
121# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
122#else 121#else
123# define preemptible() 0 122# define preemptible() 0
124# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
125#endif 123#endif
126 124
127#if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS) 125#if defined(CONFIG_SMP) || defined(CONFIG_GENERIC_HARDIRQS)
diff --git a/include/linux/netfilter/ipset/ip_set_ahash.h b/include/linux/netfilter/ipset/ip_set_ahash.h
index ef9acd3c8450..01d25e6fc792 100644
--- a/include/linux/netfilter/ipset/ip_set_ahash.h
+++ b/include/linux/netfilter/ipset/ip_set_ahash.h
@@ -854,6 +854,8 @@ type_pf_tresize(struct ip_set *set, bool retried)
854retry: 854retry:
855 ret = 0; 855 ret = 0;
856 htable_bits++; 856 htable_bits++;
857 pr_debug("attempt to resize set %s from %u to %u, t %p\n",
858 set->name, orig->htable_bits, htable_bits, orig);
857 if (!htable_bits) { 859 if (!htable_bits) {
858 /* In case we have plenty of memory :-) */ 860 /* In case we have plenty of memory :-) */
859 pr_warning("Cannot increase the hashsize of set %s further\n", 861 pr_warning("Cannot increase the hashsize of set %s further\n",
@@ -873,7 +875,7 @@ retry:
873 data = ahash_tdata(n, j); 875 data = ahash_tdata(n, j);
874 m = hbucket(t, HKEY(data, h->initval, htable_bits)); 876 m = hbucket(t, HKEY(data, h->initval, htable_bits));
875 ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), 0, 877 ret = type_pf_elem_tadd(m, data, AHASH_MAX(h), 0,
876 type_pf_data_timeout(data)); 878 ip_set_timeout_get(type_pf_data_timeout(data)));
877 if (ret < 0) { 879 if (ret < 0) {
878 read_unlock_bh(&set->lock); 880 read_unlock_bh(&set->lock);
879 ahash_destroy(t); 881 ahash_destroy(t);
diff --git a/include/linux/platform_data/brcmfmac-sdio.h b/include/linux/platform_data/brcmfmac-sdio.h
new file mode 100644
index 000000000000..1ade657d5fc1
--- /dev/null
+++ b/include/linux/platform_data/brcmfmac-sdio.h
@@ -0,0 +1,124 @@
1/*
2 * Copyright (c) 2013 Broadcom Corporation
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#ifndef _LINUX_BRCMFMAC_PLATFORM_H
18#define _LINUX_BRCMFMAC_PLATFORM_H
19
20/*
21 * Platform specific driver functions and data. Through the platform specific
22 * device data functions can be provided to help the brcmfmac driver to
23 * operate with the device in combination with the used platform.
24 *
25 * Use the platform data in the following (similar) way:
26 *
27 *
28#include <brcmfmac_platform.h>
29
30
31static void brcmfmac_power_on(void)
32{
33}
34
35static void brcmfmac_power_off(void)
36{
37}
38
39static void brcmfmac_reset(void)
40{
41}
42
43static struct brcmfmac_sdio_platform_data brcmfmac_sdio_pdata = {
44 .power_on = brcmfmac_power_on,
45 .power_off = brcmfmac_power_off,
46 .reset = brcmfmac_reset
47};
48
49static struct platform_device brcmfmac_device = {
50 .name = BRCMFMAC_SDIO_PDATA_NAME,
51 .id = PLATFORM_DEVID_NONE,
52 .dev.platform_data = &brcmfmac_sdio_pdata
53};
54
55void __init brcmfmac_init_pdata(void)
56{
57 brcmfmac_sdio_pdata.oob_irq_supported = true;
58 brcmfmac_sdio_pdata.oob_irq_nr = gpio_to_irq(GPIO_BRCMF_SDIO_OOB);
59 brcmfmac_sdio_pdata.oob_irq_flags = IORESOURCE_IRQ |
60 IORESOURCE_IRQ_HIGHLEVEL;
61 platform_device_register(&brcmfmac_device);
62}
63 *
64 *
65 * Note: the brcmfmac can be loaded as module or be statically built-in into
66 * the kernel. If built-in then do note that it uses module_init (and
67 * module_exit) routines which equal device_initcall. So if you intend to
68 * create a module with the platform specific data for the brcmfmac and have
69 * it built-in to the kernel then use a higher initcall then device_initcall
70 * (see init.h). If this is not done then brcmfmac will load without problems
71 * but will not pickup the platform data.
72 *
73 * When the driver does not "detect" platform driver data then it will continue
74 * without reporting anything and just assume there is no data needed. Which is
75 * probably true for most platforms.
76 *
77 * Explanation of the platform_data fields:
78 *
79 * drive_strength: is the preferred drive_strength to be used for the SDIO
80 * pins. If 0 then a default value will be used. This is the target drive
81 * strength, the exact drive strength which will be used depends on the
82 * capabilities of the device.
83 *
84 * oob_irq_supported: does the board have support for OOB interrupts. SDIO
85 * in-band interrupts are relatively slow and for having less overhead on
86 * interrupt processing an out of band interrupt can be used. If the HW
87 * supports this then enable this by setting this field to true and configure
88 * the oob related fields.
89 *
90 * oob_irq_nr, oob_irq_flags: the OOB interrupt information. The values are
91 * used for registering the irq using request_irq function.
92 *
93 * power_on: This function is called by the brcmfmac when the module gets
94 * loaded. This can be particularly useful for low power devices. The platform
95 * spcific routine may for example decide to power up the complete device.
96 * If there is no use-case for this function then provide NULL.
97 *
98 * power_off: This function is called by the brcmfmac when the module gets
99 * unloaded. At this point the device can be powered down or otherwise be reset.
100 * So if an actual power_off is not supported but reset is then reset the device
101 * when this function gets called. This can be particularly useful for low power
102 * devices. If there is no use-case for this function (either power-down or
103 * reset) then provide NULL.
104 *
105 * reset: This function can get called if the device communication broke down.
106 * This functionality is particularly useful in case of SDIO type devices. It is
107 * possible to reset a dongle via sdio data interface, but it requires that
108 * this is fully functional. This function is chip/module specific and this
109 * function should return only after the complete reset has completed.
110 */
111
112#define BRCMFMAC_SDIO_PDATA_NAME "brcmfmac_sdio"
113
114struct brcmfmac_sdio_platform_data {
115 unsigned int drive_strength;
116 bool oob_irq_supported;
117 unsigned int oob_irq_nr;
118 unsigned long oob_irq_flags;
119 void (*power_on)(void);
120 void (*power_off)(void);
121 void (*reset)(void);
122};
123
124#endif /* _LINUX_BRCMFMAC_PLATFORM_H */
diff --git a/include/linux/smpboot.h b/include/linux/smpboot.h
index c65dee059913..13e929679550 100644
--- a/include/linux/smpboot.h
+++ b/include/linux/smpboot.h
@@ -24,6 +24,9 @@ struct smpboot_thread_data;
24 * parked (cpu offline) 24 * parked (cpu offline)
25 * @unpark: Optional unpark function, called when the thread is 25 * @unpark: Optional unpark function, called when the thread is
26 * unparked (cpu online) 26 * unparked (cpu online)
27 * @pre_unpark: Optional unpark function, called before the thread is
28 * unparked (cpu online). This is not guaranteed to be
29 * called on the target cpu of the thread. Careful!
27 * @selfparking: Thread is not parked by the park function. 30 * @selfparking: Thread is not parked by the park function.
28 * @thread_comm: The base name of the thread 31 * @thread_comm: The base name of the thread
29 */ 32 */
@@ -37,6 +40,7 @@ struct smp_hotplug_thread {
37 void (*cleanup)(unsigned int cpu, bool online); 40 void (*cleanup)(unsigned int cpu, bool online);
38 void (*park)(unsigned int cpu); 41 void (*park)(unsigned int cpu);
39 void (*unpark)(unsigned int cpu); 42 void (*unpark)(unsigned int cpu);
43 void (*pre_unpark)(unsigned int cpu);
40 bool selfparking; 44 bool selfparking;
41 const char *thread_comm; 45 const char *thread_comm;
42}; 46};
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 2b9f74b0ffea..428c37a1f95c 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -298,6 +298,7 @@ struct ucred {
298#define SOL_IUCV 277 298#define SOL_IUCV 277
299#define SOL_CAIF 278 299#define SOL_CAIF 278
300#define SOL_ALG 279 300#define SOL_ALG 279
301#define SOL_NFC 280
301 302
302/* IPX options */ 303/* IPX options */
303#define IPX_TYPE 1 304#define IPX_TYPE 1
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 22958d68ecfe..c64999fd1660 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -26,9 +26,9 @@ struct ssb_sprom_core_pwr_info {
26 26
27struct ssb_sprom { 27struct ssb_sprom {
28 u8 revision; 28 u8 revision;
29 u8 il0mac[6]; /* MAC address for 802.11b/g */ 29 u8 il0mac[6] __aligned(sizeof(u16)); /* MAC address for 802.11b/g */
30 u8 et0mac[6]; /* MAC address for Ethernet */ 30 u8 et0mac[6] __aligned(sizeof(u16)); /* MAC address for Ethernet */
31 u8 et1mac[6]; /* MAC address for 802.11a */ 31 u8 et1mac[6] __aligned(sizeof(u16)); /* MAC address for 802.11a */
32 u8 et0phyaddr; /* MII address for enet0 */ 32 u8 et0phyaddr; /* MII address for enet0 */
33 u8 et1phyaddr; /* MII address for enet1 */ 33 u8 et1phyaddr; /* MII address for enet1 */
34 u8 et0mdcport; /* MDIO for enet0 */ 34 u8 et0mdcport; /* MDIO for enet0 */
@@ -340,13 +340,61 @@ enum ssb_bustype {
340#define SSB_BOARDVENDOR_DELL 0x1028 /* Dell */ 340#define SSB_BOARDVENDOR_DELL 0x1028 /* Dell */
341#define SSB_BOARDVENDOR_HP 0x0E11 /* HP */ 341#define SSB_BOARDVENDOR_HP 0x0E11 /* HP */
342/* board_type */ 342/* board_type */
343#define SSB_BOARD_BCM94301CB 0x0406
344#define SSB_BOARD_BCM94301MP 0x0407
345#define SSB_BOARD_BU4309 0x040A
346#define SSB_BOARD_BCM94309CB 0x040B
347#define SSB_BOARD_BCM4309MP 0x040C
348#define SSB_BOARD_BU4306 0x0416
343#define SSB_BOARD_BCM94306MP 0x0418 349#define SSB_BOARD_BCM94306MP 0x0418
344#define SSB_BOARD_BCM4309G 0x0421 350#define SSB_BOARD_BCM4309G 0x0421
345#define SSB_BOARD_BCM4306CB 0x0417 351#define SSB_BOARD_BCM4306CB 0x0417
346#define SSB_BOARD_BCM4309MP 0x040C 352#define SSB_BOARD_BCM94306PC 0x0425 /* pcmcia 3.3v 4306 card */
353#define SSB_BOARD_BCM94306CBSG 0x042B /* with SiGe PA */
354#define SSB_BOARD_PCSG94306 0x042D /* with SiGe PA */
355#define SSB_BOARD_BU4704SD 0x042E /* with sdram */
356#define SSB_BOARD_BCM94704AGR 0x042F /* dual 11a/11g Router */
357#define SSB_BOARD_BCM94308MP 0x0430 /* 11a-only minipci */
358#define SSB_BOARD_BU4318 0x0447
359#define SSB_BOARD_CB4318 0x0448
360#define SSB_BOARD_MPG4318 0x0449
347#define SSB_BOARD_MP4318 0x044A 361#define SSB_BOARD_MP4318 0x044A
348#define SSB_BOARD_BU4306 0x0416 362#define SSB_BOARD_SD4318 0x044B
349#define SSB_BOARD_BU4309 0x040A 363#define SSB_BOARD_BCM94306P 0x044C /* with SiGe */
364#define SSB_BOARD_BCM94303MP 0x044E
365#define SSB_BOARD_BCM94306MPM 0x0450
366#define SSB_BOARD_BCM94306MPL 0x0453
367#define SSB_BOARD_PC4303 0x0454 /* pcmcia */
368#define SSB_BOARD_BCM94306MPLNA 0x0457
369#define SSB_BOARD_BCM94306MPH 0x045B
370#define SSB_BOARD_BCM94306PCIV 0x045C
371#define SSB_BOARD_BCM94318MPGH 0x0463
372#define SSB_BOARD_BU4311 0x0464
373#define SSB_BOARD_BCM94311MC 0x0465
374#define SSB_BOARD_BCM94311MCAG 0x0466
375/* 4321 boards */
376#define SSB_BOARD_BU4321 0x046B
377#define SSB_BOARD_BU4321E 0x047C
378#define SSB_BOARD_MP4321 0x046C
379#define SSB_BOARD_CB2_4321 0x046D
380#define SSB_BOARD_CB2_4321_AG 0x0066
381#define SSB_BOARD_MC4321 0x046E
382/* 4325 boards */
383#define SSB_BOARD_BCM94325DEVBU 0x0490
384#define SSB_BOARD_BCM94325BGABU 0x0491
385#define SSB_BOARD_BCM94325SDGWB 0x0492
386#define SSB_BOARD_BCM94325SDGMDL 0x04AA
387#define SSB_BOARD_BCM94325SDGMDL2 0x04C6
388#define SSB_BOARD_BCM94325SDGMDL3 0x04C9
389#define SSB_BOARD_BCM94325SDABGWBA 0x04E1
390/* 4322 boards */
391#define SSB_BOARD_BCM94322MC 0x04A4
392#define SSB_BOARD_BCM94322USB 0x04A8 /* dualband */
393#define SSB_BOARD_BCM94322HM 0x04B0
394#define SSB_BOARD_BCM94322USB2D 0x04Bf /* single band discrete front end */
395/* 4312 boards */
396#define SSB_BOARD_BU4312 0x048A
397#define SSB_BOARD_BCM4312MCGSG 0x04B5
350/* chip_package */ 398/* chip_package */
351#define SSB_CHIPPACK_BCM4712S 1 /* Small 200pin 4712 */ 399#define SSB_CHIPPACK_BCM4712S 1 /* Small 200pin 4712 */
352#define SSB_CHIPPACK_BCM4712M 2 /* Medium 225pin 4712 */ 400#define SSB_CHIPPACK_BCM4712M 2 /* Medium 225pin 4712 */
diff --git a/include/linux/ssb/ssb_regs.h b/include/linux/ssb/ssb_regs.h
index 6ecfa02ddbac..3a7256955b10 100644
--- a/include/linux/ssb/ssb_regs.h
+++ b/include/linux/ssb/ssb_regs.h
@@ -289,11 +289,11 @@
289#define SSB_SPROM4_ETHPHY_ET1A_SHIFT 5 289#define SSB_SPROM4_ETHPHY_ET1A_SHIFT 5
290#define SSB_SPROM4_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */ 290#define SSB_SPROM4_ETHPHY_ET0M (1<<14) /* MDIO for enet0 */
291#define SSB_SPROM4_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */ 291#define SSB_SPROM4_ETHPHY_ET1M (1<<15) /* MDIO for enet1 */
292#define SSB_SPROM4_ANTAVAIL 0x005D /* Antenna available bitfields */ 292#define SSB_SPROM4_ANTAVAIL 0x005C /* Antenna available bitfields */
293#define SSB_SPROM4_ANTAVAIL_A 0x00FF /* A-PHY bitfield */ 293#define SSB_SPROM4_ANTAVAIL_BG 0x00FF /* B-PHY and G-PHY bitfield */
294#define SSB_SPROM4_ANTAVAIL_A_SHIFT 0 294#define SSB_SPROM4_ANTAVAIL_BG_SHIFT 0
295#define SSB_SPROM4_ANTAVAIL_BG 0xFF00 /* B-PHY and G-PHY bitfield */ 295#define SSB_SPROM4_ANTAVAIL_A 0xFF00 /* A-PHY bitfield */
296#define SSB_SPROM4_ANTAVAIL_BG_SHIFT 8 296#define SSB_SPROM4_ANTAVAIL_A_SHIFT 8
297#define SSB_SPROM4_AGAIN01 0x005E /* Antenna Gain (in dBm Q5.2) */ 297#define SSB_SPROM4_AGAIN01 0x005E /* Antenna Gain (in dBm Q5.2) */
298#define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */ 298#define SSB_SPROM4_AGAIN0 0x00FF /* Antenna 0 */
299#define SSB_SPROM4_AGAIN0_SHIFT 0 299#define SSB_SPROM4_AGAIN0_SHIFT 0
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 9531beee09b5..ed6e9552252e 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -232,7 +232,7 @@ struct bt_sock_list {
232}; 232};
233 233
234int bt_sock_register(int proto, const struct net_proto_family *ops); 234int bt_sock_register(int proto, const struct net_proto_family *ops);
235int bt_sock_unregister(int proto); 235void bt_sock_unregister(int proto);
236void bt_sock_link(struct bt_sock_list *l, struct sock *s); 236void bt_sock_link(struct bt_sock_list *l, struct sock *s);
237void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); 237void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
238int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 238int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
@@ -260,12 +260,22 @@ struct l2cap_ctrl {
260 __u8 retries; 260 __u8 retries;
261}; 261};
262 262
263struct hci_dev;
264
265typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status);
266
267struct hci_req_ctrl {
268 bool start;
269 hci_req_complete_t complete;
270};
271
263struct bt_skb_cb { 272struct bt_skb_cb {
264 __u8 pkt_type; 273 __u8 pkt_type;
265 __u8 incoming; 274 __u8 incoming;
266 __u16 expect; 275 __u16 expect;
267 __u8 force_active; 276 __u8 force_active;
268 struct l2cap_ctrl control; 277 struct l2cap_ctrl control;
278 struct hci_req_ctrl req;
269}; 279};
270#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb)) 280#define bt_cb(skb) ((struct bt_skb_cb *)((skb)->cb))
271 281
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 7f12c25f1fca..b3308927a0a1 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -119,10 +119,16 @@ enum {
119 HCI_CONNECTABLE, 119 HCI_CONNECTABLE,
120 HCI_DISCOVERABLE, 120 HCI_DISCOVERABLE,
121 HCI_LINK_SECURITY, 121 HCI_LINK_SECURITY,
122 HCI_PENDING_CLASS,
123 HCI_PERIODIC_INQ, 122 HCI_PERIODIC_INQ,
123 HCI_FAST_CONNECTABLE,
124}; 124};
125 125
126/* A mask for the flags that are supposed to remain when a reset happens
127 * or the HCI device is closed.
128 */
129#define HCI_PERSISTENT_MASK (BIT(HCI_LE_SCAN) | BIT(HCI_PERIODIC_INQ) | \
130 BIT(HCI_FAST_CONNECTABLE))
131
126/* HCI ioctl defines */ 132/* HCI ioctl defines */
127#define HCIDEVUP _IOW('H', 201, int) 133#define HCIDEVUP _IOW('H', 201, int)
128#define HCIDEVDOWN _IOW('H', 202, int) 134#define HCIDEVDOWN _IOW('H', 202, int)
@@ -881,12 +887,25 @@ struct hci_rp_read_data_block_size {
881 __le16 num_blocks; 887 __le16 num_blocks;
882} __packed; 888} __packed;
883 889
890#define HCI_OP_READ_PAGE_SCAN_ACTIVITY 0x0c1b
891struct hci_rp_read_page_scan_activity {
892 __u8 status;
893 __le16 interval;
894 __le16 window;
895} __packed;
896
884#define HCI_OP_WRITE_PAGE_SCAN_ACTIVITY 0x0c1c 897#define HCI_OP_WRITE_PAGE_SCAN_ACTIVITY 0x0c1c
885struct hci_cp_write_page_scan_activity { 898struct hci_cp_write_page_scan_activity {
886 __le16 interval; 899 __le16 interval;
887 __le16 window; 900 __le16 window;
888} __packed; 901} __packed;
889 902
903#define HCI_OP_READ_PAGE_SCAN_TYPE 0x0c46
904struct hci_rp_read_page_scan_type {
905 __u8 status;
906 __u8 type;
907} __packed;
908
890#define HCI_OP_WRITE_PAGE_SCAN_TYPE 0x0c47 909#define HCI_OP_WRITE_PAGE_SCAN_TYPE 0x0c47
891 #define PAGE_SCAN_TYPE_STANDARD 0x00 910 #define PAGE_SCAN_TYPE_STANDARD 0x00
892 #define PAGE_SCAN_TYPE_INTERLACED 0x01 911 #define PAGE_SCAN_TYPE_INTERLACED 0x01
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 90cf75afcb02..358a6983d3bb 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -165,6 +165,10 @@ struct hci_dev {
165 __u16 voice_setting; 165 __u16 voice_setting;
166 __u8 io_capability; 166 __u8 io_capability;
167 __s8 inq_tx_power; 167 __s8 inq_tx_power;
168 __u16 page_scan_interval;
169 __u16 page_scan_window;
170 __u8 page_scan_type;
171
168 __u16 devid_source; 172 __u16 devid_source;
169 __u16 devid_vendor; 173 __u16 devid_vendor;
170 __u16 devid_product; 174 __u16 devid_product;
@@ -248,8 +252,6 @@ struct hci_dev {
248 __u32 req_status; 252 __u32 req_status;
249 __u32 req_result; 253 __u32 req_result;
250 254
251 __u16 init_last_cmd;
252
253 struct list_head mgmt_pending; 255 struct list_head mgmt_pending;
254 256
255 struct discovery_state discovery; 257 struct discovery_state discovery;
@@ -574,7 +576,7 @@ static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
574 return NULL; 576 return NULL;
575} 577}
576 578
577void hci_acl_disconn(struct hci_conn *conn, __u8 reason); 579void hci_disconnect(struct hci_conn *conn, __u8 reason);
578void hci_setup_sync(struct hci_conn *conn, __u16 handle); 580void hci_setup_sync(struct hci_conn *conn, __u16 handle);
579void hci_sco_setup(struct hci_conn *conn, __u8 status); 581void hci_sco_setup(struct hci_conn *conn, __u8 status);
580 582
@@ -742,8 +744,6 @@ int hci_add_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 *hash,
742 u8 *randomizer); 744 u8 *randomizer);
743int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr); 745int hci_remove_remote_oob_data(struct hci_dev *hdev, bdaddr_t *bdaddr);
744 746
745int hci_update_ad(struct hci_dev *hdev);
746
747void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); 747void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
748 748
749int hci_recv_frame(struct sk_buff *skb); 749int hci_recv_frame(struct sk_buff *skb);
@@ -1041,6 +1041,22 @@ static inline u16 eir_append_data(u8 *eir, u16 eir_len, u8 type, u8 *data,
1041int hci_register_cb(struct hci_cb *hcb); 1041int hci_register_cb(struct hci_cb *hcb);
1042int hci_unregister_cb(struct hci_cb *hcb); 1042int hci_unregister_cb(struct hci_cb *hcb);
1043 1043
1044struct hci_request {
1045 struct hci_dev *hdev;
1046 struct sk_buff_head cmd_q;
1047
1048 /* If something goes wrong when building the HCI request, the error
1049 * value is stored in this field.
1050 */
1051 int err;
1052};
1053
1054void hci_req_init(struct hci_request *req, struct hci_dev *hdev);
1055int hci_req_run(struct hci_request *req, hci_req_complete_t complete);
1056void hci_req_add(struct hci_request *req, u16 opcode, u32 plen, void *param);
1057void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status);
1058void hci_req_cmd_status(struct hci_dev *hdev, u16 opcode, u8 status);
1059
1044int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param); 1060int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param);
1045void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags); 1061void hci_send_acl(struct hci_chan *chan, struct sk_buff *skb, __u16 flags);
1046void hci_send_sco(struct hci_conn *conn, struct sk_buff *skb); 1062void hci_send_sco(struct hci_conn *conn, struct sk_buff *skb);
@@ -1153,7 +1169,7 @@ struct hci_sec_filter {
1153#define hci_req_lock(d) mutex_lock(&d->req_lock) 1169#define hci_req_lock(d) mutex_lock(&d->req_lock)
1154#define hci_req_unlock(d) mutex_unlock(&d->req_lock) 1170#define hci_req_unlock(d) mutex_unlock(&d->req_lock)
1155 1171
1156void hci_req_complete(struct hci_dev *hdev, __u16 cmd, int result); 1172void hci_update_ad(struct hci_request *req);
1157 1173
1158void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max, 1174void hci_le_conn_update(struct hci_conn *conn, u16 min, u16 max,
1159 u16 latency, u16 to_multiplier); 1175 u16 latency, u16 to_multiplier);
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index e2e3ecad1008..7afd4199d6b6 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -158,7 +158,6 @@ struct rfcomm_session {
158 struct timer_list timer; 158 struct timer_list timer;
159 unsigned long state; 159 unsigned long state;
160 unsigned long flags; 160 unsigned long flags;
161 atomic_t refcnt;
162 int initiator; 161 int initiator;
163 162
164 /* Default DLC parameters */ 163 /* Default DLC parameters */
@@ -276,11 +275,6 @@ static inline void rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
276void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src, 275void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src,
277 bdaddr_t *dst); 276 bdaddr_t *dst);
278 277
279static inline void rfcomm_session_hold(struct rfcomm_session *s)
280{
281 atomic_inc(&s->refcnt);
282}
283
284/* ---- RFCOMM sockets ---- */ 278/* ---- RFCOMM sockets ---- */
285struct sockaddr_rc { 279struct sockaddr_rc {
286 sa_family_t rc_family; 280 sa_family_t rc_family;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 23f2e98d4b65..cf0694d4ad60 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1045,6 +1045,10 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb)
1045 if (sysctl_tcp_low_latency || !tp->ucopy.task) 1045 if (sysctl_tcp_low_latency || !tp->ucopy.task)
1046 return false; 1046 return false;
1047 1047
1048 if (skb->len <= tcp_hdrlen(skb) &&
1049 skb_queue_len(&tp->ucopy.prequeue) == 0)
1050 return false;
1051
1048 __skb_queue_tail(&tp->ucopy.prequeue, skb); 1052 __skb_queue_tail(&tp->ucopy.prequeue, skb);
1049 tp->ucopy.memory += skb->truesize; 1053 tp->ucopy.memory += skb->truesize;
1050 if (tp->ucopy.memory > sk->sk_rcvbuf) { 1054 if (tp->ucopy.memory > sk->sk_rcvbuf) {
diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
index 7969f46f1bb3..7440bc81a04b 100644
--- a/include/uapi/linux/nfc.h
+++ b/include/uapi/linux/nfc.h
@@ -90,6 +90,8 @@ enum nfc_commands {
90 NFC_CMD_LLC_SET_PARAMS, 90 NFC_CMD_LLC_SET_PARAMS,
91 NFC_CMD_ENABLE_SE, 91 NFC_CMD_ENABLE_SE,
92 NFC_CMD_DISABLE_SE, 92 NFC_CMD_DISABLE_SE,
93 NFC_CMD_LLC_SDREQ,
94 NFC_EVENT_LLC_SDRES,
93/* private: internal use only */ 95/* private: internal use only */
94 __NFC_CMD_AFTER_LAST 96 __NFC_CMD_AFTER_LAST
95}; 97};
@@ -140,11 +142,21 @@ enum nfc_attrs {
140 NFC_ATTR_LLC_PARAM_RW, 142 NFC_ATTR_LLC_PARAM_RW,
141 NFC_ATTR_LLC_PARAM_MIUX, 143 NFC_ATTR_LLC_PARAM_MIUX,
142 NFC_ATTR_SE, 144 NFC_ATTR_SE,
145 NFC_ATTR_LLC_SDP,
143/* private: internal use only */ 146/* private: internal use only */
144 __NFC_ATTR_AFTER_LAST 147 __NFC_ATTR_AFTER_LAST
145}; 148};
146#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1) 149#define NFC_ATTR_MAX (__NFC_ATTR_AFTER_LAST - 1)
147 150
151enum nfc_sdp_attr {
152 NFC_SDP_ATTR_UNSPEC,
153 NFC_SDP_ATTR_URI,
154 NFC_SDP_ATTR_SAP,
155/* private: internal use only */
156 __NFC_SDP_ATTR_AFTER_LAST
157};
158#define NFC_SDP_ATTR_MAX (__NFC_SDP_ATTR_AFTER_LAST - 1)
159
148#define NFC_DEVICE_NAME_MAXSIZE 8 160#define NFC_DEVICE_NAME_MAXSIZE 8
149#define NFC_NFCID1_MAXSIZE 10 161#define NFC_NFCID1_MAXSIZE 10
150#define NFC_SENSB_RES_MAXSIZE 12 162#define NFC_SENSB_RES_MAXSIZE 12
@@ -220,4 +232,8 @@ struct sockaddr_nfc_llcp {
220#define NFC_LLCP_DIRECTION_RX 0x00 232#define NFC_LLCP_DIRECTION_RX 0x00
221#define NFC_LLCP_DIRECTION_TX 0x01 233#define NFC_LLCP_DIRECTION_TX 0x01
222 234
235/* socket option names */
236#define NFC_LLCP_RW 0
237#define NFC_LLCP_MIUX 1
238
223#endif /*__LINUX_NFC_H */ 239#endif /*__LINUX_NFC_H */