aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-09-06 11:05:28 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-09-06 11:05:28 -0400
commit00b14825eead7dd748d15ce6519726d06b3ee0d5 (patch)
treee771e6dcde53b65a1d438dfabbe8cb4e7402e334 /include
parent882a7c69d3c605bfacf32e19033447dc70204d45 (diff)
parenta4881cc45a3fab4488e16c4934e149cfa620f1a9 (diff)
Merge remote-tracking branch 'wireless-next/master' into mac80211-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h111
-rw-r--r--include/linux/bcma/bcma_regs.h4
-rw-r--r--include/linux/ssb/ssb_driver_chipcommon.h4
-rw-r--r--include/net/bluetooth/bluetooth.h10
-rw-r--r--include/net/bluetooth/hci.h11
-rw-r--r--include/net/bluetooth/hci_core.h22
-rw-r--r--include/net/bluetooth/l2cap.h17
-rw-r--r--include/net/bluetooth/smp.h8
-rw-r--r--include/net/inet_sock.h9
-rw-r--r--include/net/ip_fib.h6
-rw-r--r--include/net/netns/ipv4.h2
-rw-r--r--include/net/route.h3
12 files changed, 168 insertions, 39 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 3c80885fa829..9810d4b29abf 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -94,6 +94,7 @@
94#define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */ 94#define BCMA_CC_CHIPST_4706_SFLASH_TYPE BIT(2) /* 0: 8b-p/ST-s flash, 1: 16b-p/Atmal-s flash */
95#define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */ 95#define BCMA_CC_CHIPST_4706_MIPS_BENDIAN BIT(3) /* 0: little, 1: big endian */
96#define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */ 96#define BCMA_CC_CHIPST_4706_PCIE1_DISABLE BIT(5) /* PCIE1 enable strap pin */
97#define BCMA_CC_CHIPST_5357_NAND_BOOT BIT(4) /* NAND boot, valid for CC rev 38 and/or BCM5357 */
97#define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */ 98#define BCMA_CC_JCMD 0x0030 /* Rev >= 10 only */
98#define BCMA_CC_JCMD_START 0x80000000 99#define BCMA_CC_JCMD_START 0x80000000
99#define BCMA_CC_JCMD_BUSY 0x80000000 100#define BCMA_CC_JCMD_BUSY 0x80000000
@@ -260,6 +261,29 @@
260#define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004 261#define BCMA_CC_SROM_CONTROL_SIZE_16K 0x00000004
261#define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1 262#define BCMA_CC_SROM_CONTROL_SIZE_SHIFT 1
262#define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001 263#define BCMA_CC_SROM_CONTROL_PRESENT 0x00000001
264/* Block 0x140 - 0x190 registers are chipset specific */
265#define BCMA_CC_4706_FLASHSCFG 0x18C /* Flash struct configuration */
266#define BCMA_CC_4706_FLASHSCFG_MASK 0x000000ff
267#define BCMA_CC_4706_FLASHSCFG_SF1 0x00000001 /* 2nd serial flash present */
268#define BCMA_CC_4706_FLASHSCFG_PF1 0x00000002 /* 2nd parallel flash present */
269#define BCMA_CC_4706_FLASHSCFG_SF1_TYPE 0x00000004 /* 2nd serial flash type : 0 : ST, 1 : Atmel */
270#define BCMA_CC_4706_FLASHSCFG_NF1 0x00000008 /* 2nd NAND flash present */
271#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_MASK 0x000000f0
272#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_4MB 0x00000010 /* 4MB */
273#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_8MB 0x00000020 /* 8MB */
274#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_16MB 0x00000030 /* 16MB */
275#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_32MB 0x00000040 /* 32MB */
276#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_64MB 0x00000050 /* 64MB */
277#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_128MB 0x00000060 /* 128MB */
278#define BCMA_CC_4706_FLASHSCFG_1ST_MADDR_SEG_256MB 0x00000070 /* 256MB */
279/* NAND flash registers for BCM4706 (corerev = 31) */
280#define BCMA_CC_NFLASH_CTL 0x01A0
281#define BCMA_CC_NFLASH_CTL_ERR 0x08000000
282#define BCMA_CC_NFLASH_CONF 0x01A4
283#define BCMA_CC_NFLASH_COL_ADDR 0x01A8
284#define BCMA_CC_NFLASH_ROW_ADDR 0x01AC
285#define BCMA_CC_NFLASH_DATA 0x01B0
286#define BCMA_CC_NFLASH_WAITCNT0 0x01B4
263/* 0x1E0 is defined as shared BCMA_CLKCTLST */ 287/* 0x1E0 is defined as shared BCMA_CLKCTLST */
264#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */ 288#define BCMA_CC_HW_WORKAROUND 0x01E4 /* Hardware workaround (rev >= 20) */
265#define BCMA_CC_UART0_DATA 0x0300 289#define BCMA_CC_UART0_DATA 0x0300
@@ -319,6 +343,60 @@
319#define BCMA_CC_PLLCTL_ADDR 0x0660 343#define BCMA_CC_PLLCTL_ADDR 0x0660
320#define BCMA_CC_PLLCTL_DATA 0x0664 344#define BCMA_CC_PLLCTL_DATA 0x0664
321#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */ 345#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
346/* NAND flash MLC controller registers (corerev >= 38) */
347#define BCMA_CC_NAND_REVISION 0x0C00
348#define BCMA_CC_NAND_CMD_START 0x0C04
349#define BCMA_CC_NAND_CMD_ADDR_X 0x0C08
350#define BCMA_CC_NAND_CMD_ADDR 0x0C0C
351#define BCMA_CC_NAND_CMD_END_ADDR 0x0C10
352#define BCMA_CC_NAND_CS_NAND_SELECT 0x0C14
353#define BCMA_CC_NAND_CS_NAND_XOR 0x0C18
354#define BCMA_CC_NAND_SPARE_RD0 0x0C20
355#define BCMA_CC_NAND_SPARE_RD4 0x0C24
356#define BCMA_CC_NAND_SPARE_RD8 0x0C28
357#define BCMA_CC_NAND_SPARE_RD12 0x0C2C
358#define BCMA_CC_NAND_SPARE_WR0 0x0C30
359#define BCMA_CC_NAND_SPARE_WR4 0x0C34
360#define BCMA_CC_NAND_SPARE_WR8 0x0C38
361#define BCMA_CC_NAND_SPARE_WR12 0x0C3C
362#define BCMA_CC_NAND_ACC_CONTROL 0x0C40
363#define BCMA_CC_NAND_CONFIG 0x0C48
364#define BCMA_CC_NAND_TIMING_1 0x0C50
365#define BCMA_CC_NAND_TIMING_2 0x0C54
366#define BCMA_CC_NAND_SEMAPHORE 0x0C58
367#define BCMA_CC_NAND_DEVID 0x0C60
368#define BCMA_CC_NAND_DEVID_X 0x0C64
369#define BCMA_CC_NAND_BLOCK_LOCK_STATUS 0x0C68
370#define BCMA_CC_NAND_INTFC_STATUS 0x0C6C
371#define BCMA_CC_NAND_ECC_CORR_ADDR_X 0x0C70
372#define BCMA_CC_NAND_ECC_CORR_ADDR 0x0C74
373#define BCMA_CC_NAND_ECC_UNC_ADDR_X 0x0C78
374#define BCMA_CC_NAND_ECC_UNC_ADDR 0x0C7C
375#define BCMA_CC_NAND_READ_ERROR_COUNT 0x0C80
376#define BCMA_CC_NAND_CORR_STAT_THRESHOLD 0x0C84
377#define BCMA_CC_NAND_READ_ADDR_X 0x0C90
378#define BCMA_CC_NAND_READ_ADDR 0x0C94
379#define BCMA_CC_NAND_PAGE_PROGRAM_ADDR_X 0x0C98
380#define BCMA_CC_NAND_PAGE_PROGRAM_ADDR 0x0C9C
381#define BCMA_CC_NAND_COPY_BACK_ADDR_X 0x0CA0
382#define BCMA_CC_NAND_COPY_BACK_ADDR 0x0CA4
383#define BCMA_CC_NAND_BLOCK_ERASE_ADDR_X 0x0CA8
384#define BCMA_CC_NAND_BLOCK_ERASE_ADDR 0x0CAC
385#define BCMA_CC_NAND_INV_READ_ADDR_X 0x0CB0
386#define BCMA_CC_NAND_INV_READ_ADDR 0x0CB4
387#define BCMA_CC_NAND_BLK_WR_PROTECT 0x0CC0
388#define BCMA_CC_NAND_ACC_CONTROL_CS1 0x0CD0
389#define BCMA_CC_NAND_CONFIG_CS1 0x0CD4
390#define BCMA_CC_NAND_TIMING_1_CS1 0x0CD8
391#define BCMA_CC_NAND_TIMING_2_CS1 0x0CDC
392#define BCMA_CC_NAND_SPARE_RD16 0x0D30
393#define BCMA_CC_NAND_SPARE_RD20 0x0D34
394#define BCMA_CC_NAND_SPARE_RD24 0x0D38
395#define BCMA_CC_NAND_SPARE_RD28 0x0D3C
396#define BCMA_CC_NAND_CACHE_ADDR 0x0D40
397#define BCMA_CC_NAND_CACHE_DATA 0x0D44
398#define BCMA_CC_NAND_CTRL_CONFIG 0x0D48
399#define BCMA_CC_NAND_CTRL_STATUS 0x0D4C
322 400
323/* Divider allocation in 4716/47162/5356 */ 401/* Divider allocation in 4716/47162/5356 */
324#define BCMA_CC_PMU5_MAINPLL_CPU 1 402#define BCMA_CC_PMU5_MAINPLL_CPU 1
@@ -409,6 +487,13 @@
409/* 4313 Chip specific ChipControl register bits */ 487/* 4313 Chip specific ChipControl register bits */
410#define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */ 488#define BCMA_CCTRL_4313_12MA_LED_DRIVE 0x00000007 /* 12 mA drive strengh for later 4313 */
411 489
490/* BCM5357 ChipControl register bits */
491#define BCMA_CHIPCTL_5357_EXTPA BIT(14)
492#define BCMA_CHIPCTL_5357_ANT_MUX_2O3 BIT(15)
493#define BCMA_CHIPCTL_5357_NFLASH BIT(16)
494#define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18)
495#define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19)
496
412/* Data for the PMU, if available. 497/* Data for the PMU, if available.
413 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU) 498 * Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
414 */ 499 */
@@ -424,6 +509,26 @@ struct bcma_pflash {
424 u32 window_size; 509 u32 window_size;
425}; 510};
426 511
512#ifdef CONFIG_BCMA_SFLASH
513struct bcma_sflash {
514 bool present;
515 u32 window;
516 u32 blocksize;
517 u16 numblocks;
518 u32 size;
519};
520#endif
521
522#ifdef CONFIG_BCMA_NFLASH
523struct mtd_info;
524
525struct bcma_nflash {
526 bool present;
527
528 struct mtd_info *mtd;
529};
530#endif
531
427struct bcma_serial_port { 532struct bcma_serial_port {
428 void *regs; 533 void *regs;
429 unsigned long clockspeed; 534 unsigned long clockspeed;
@@ -444,6 +549,12 @@ struct bcma_drv_cc {
444 struct bcma_chipcommon_pmu pmu; 549 struct bcma_chipcommon_pmu pmu;
445#ifdef CONFIG_BCMA_DRIVER_MIPS 550#ifdef CONFIG_BCMA_DRIVER_MIPS
446 struct bcma_pflash pflash; 551 struct bcma_pflash pflash;
552#ifdef CONFIG_BCMA_SFLASH
553 struct bcma_sflash sflash;
554#endif
555#ifdef CONFIG_BCMA_NFLASH
556 struct bcma_nflash nflash;
557#endif
447 558
448 int nr_serial_ports; 559 int nr_serial_ports;
449 struct bcma_serial_port serial_ports[4]; 560 struct bcma_serial_port serial_ports[4];
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h
index 5a71d5719640..6c9cb93ae3de 100644
--- a/include/linux/bcma/bcma_regs.h
+++ b/include/linux/bcma/bcma_regs.h
@@ -11,11 +11,13 @@
11#define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */ 11#define BCMA_CLKCTLST_HAVEHTREQ 0x00000010 /* HT available request */
12#define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */ 12#define BCMA_CLKCTLST_HWCROFF 0x00000020 /* Force HW clock request off */
13#define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */ 13#define BCMA_CLKCTLST_EXTRESREQ 0x00000700 /* Mask of external resource requests */
14#define BCMA_CLKCTLST_EXTRESREQ_SHIFT 8
14#define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */ 15#define BCMA_CLKCTLST_HAVEALP 0x00010000 /* ALP available */
15#define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */ 16#define BCMA_CLKCTLST_HAVEHT 0x00020000 /* HT available */
16#define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */ 17#define BCMA_CLKCTLST_BP_ON_ALP 0x00040000 /* RO: running on ALP clock */
17#define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */ 18#define BCMA_CLKCTLST_BP_ON_HT 0x00080000 /* RO: running on HT clock */
18#define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */ 19#define BCMA_CLKCTLST_EXTRESST 0x07000000 /* Mask of external resource status */
20#define BCMA_CLKCTLST_EXTRESST_SHIFT 24
19/* Is there any BCM4328 on BCMA bus? */ 21/* Is there any BCM4328 on BCMA bus? */
20#define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */ 22#define BCMA_CLKCTLST_4328A0_HAVEHT 0x00010000 /* 4328a0 has reversed bits */
21#define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */ 23#define BCMA_CLKCTLST_4328A0_HAVEALP 0x00020000 /* 4328a0 has reversed bits */
@@ -83,4 +85,6 @@
83 * (2 ZettaBytes), high 32 bits 85 * (2 ZettaBytes), high 32 bits
84 */ 86 */
85 87
88#define BCMA_SFLASH 0x1c000000
89
86#endif /* LINUX_BCMA_REGS_H_ */ 90#endif /* LINUX_BCMA_REGS_H_ */
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
index 1a6b0045b06b..c2b02a5c86ae 100644
--- a/include/linux/ssb/ssb_driver_chipcommon.h
+++ b/include/linux/ssb/ssb_driver_chipcommon.h
@@ -504,7 +504,9 @@
504#define SSB_CHIPCO_FLASHCTL_ST_SE 0x02D8 /* Sector Erase */ 504#define SSB_CHIPCO_FLASHCTL_ST_SE 0x02D8 /* Sector Erase */
505#define SSB_CHIPCO_FLASHCTL_ST_BE 0x00C7 /* Bulk Erase */ 505#define SSB_CHIPCO_FLASHCTL_ST_BE 0x00C7 /* Bulk Erase */
506#define SSB_CHIPCO_FLASHCTL_ST_DP 0x00B9 /* Deep Power-down */ 506#define SSB_CHIPCO_FLASHCTL_ST_DP 0x00B9 /* Deep Power-down */
507#define SSB_CHIPCO_FLASHCTL_ST_RSIG 0x03AB /* Read Electronic Signature */ 507#define SSB_CHIPCO_FLASHCTL_ST_RES 0x03AB /* Read Electronic Signature */
508#define SSB_CHIPCO_FLASHCTL_ST_CSA 0x1000 /* Keep chip select asserted */
509#define SSB_CHIPCO_FLASHCTL_ST_SSE 0x0220 /* Sub-sector Erase */
508 510
509/* Status register bits for ST flashes */ 511/* Status register bits for ST flashes */
510#define SSB_CHIPCO_FLASHSTA_ST_WIP 0x01 /* Write In Progress */ 512#define SSB_CHIPCO_FLASHSTA_ST_WIP 0x01 /* Write In Progress */
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 565d4bee1e49..ede036977ae8 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -27,6 +27,7 @@
27 27
28#include <linux/poll.h> 28#include <linux/poll.h>
29#include <net/sock.h> 29#include <net/sock.h>
30#include <linux/seq_file.h>
30 31
31#ifndef AF_BLUETOOTH 32#ifndef AF_BLUETOOTH
32#define AF_BLUETOOTH 31 33#define AF_BLUETOOTH 31
@@ -202,6 +203,10 @@ enum {
202struct bt_sock_list { 203struct bt_sock_list {
203 struct hlist_head head; 204 struct hlist_head head;
204 rwlock_t lock; 205 rwlock_t lock;
206#ifdef CONFIG_PROC_FS
207 struct file_operations fops;
208 int (* custom_seq_show)(struct seq_file *, void *);
209#endif
205}; 210};
206 211
207int bt_sock_register(int proto, const struct net_proto_family *ops); 212int bt_sock_register(int proto, const struct net_proto_family *ops);
@@ -292,6 +297,11 @@ extern void hci_sock_cleanup(void);
292extern int bt_sysfs_init(void); 297extern int bt_sysfs_init(void);
293extern void bt_sysfs_cleanup(void); 298extern void bt_sysfs_cleanup(void);
294 299
300extern int bt_procfs_init(struct module* module, struct net *net, const char *name,
301 struct bt_sock_list* sk_list,
302 int (* seq_show)(struct seq_file *, void *));
303extern void bt_procfs_cleanup(struct net *net, const char *name);
304
295extern struct dentry *bt_debugfs; 305extern struct dentry *bt_debugfs;
296 306
297int l2cap_init(void); 307int l2cap_init(void);
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ccd723e0f783..23cf413e2acf 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -62,6 +62,15 @@
62/* First BR/EDR Controller shall have ID = 0 */ 62/* First BR/EDR Controller shall have ID = 0 */
63#define HCI_BREDR_ID 0 63#define HCI_BREDR_ID 0
64 64
65/* AMP controller status */
66#define AMP_CTRL_POWERED_DOWN 0x00
67#define AMP_CTRL_BLUETOOTH_ONLY 0x01
68#define AMP_CTRL_NO_CAPACITY 0x02
69#define AMP_CTRL_LOW_CAPACITY 0x03
70#define AMP_CTRL_MEDIUM_CAPACITY 0x04
71#define AMP_CTRL_HIGH_CAPACITY 0x05
72#define AMP_CTRL_FULL_CAPACITY 0x06
73
65/* HCI device quirks */ 74/* HCI device quirks */
66enum { 75enum {
67 HCI_QUIRK_RESET_ON_CLOSE, 76 HCI_QUIRK_RESET_ON_CLOSE,
@@ -1295,6 +1304,8 @@ struct hci_ev_num_comp_blocks {
1295} __packed; 1304} __packed;
1296 1305
1297/* Low energy meta events */ 1306/* Low energy meta events */
1307#define LE_CONN_ROLE_MASTER 0x00
1308
1298#define HCI_EV_LE_CONN_COMPLETE 0x01 1309#define HCI_EV_LE_CONN_COMPLETE 0x01
1299struct hci_ev_le_conn_complete { 1310struct hci_ev_le_conn_complete {
1300 __u8 status; 1311 __u8 status;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 475b8c04ba52..41d943926d2c 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -115,12 +115,6 @@ struct oob_data {
115 u8 randomizer[16]; 115 u8 randomizer[16];
116}; 116};
117 117
118struct adv_entry {
119 struct list_head list;
120 bdaddr_t bdaddr;
121 u8 bdaddr_type;
122};
123
124struct le_scan_params { 118struct le_scan_params {
125 u8 type; 119 u8 type;
126 u16 interval; 120 u16 interval;
@@ -356,16 +350,16 @@ extern rwlock_t hci_cb_list_lock;
356 350
357/* ----- HCI interface to upper protocols ----- */ 351/* ----- HCI interface to upper protocols ----- */
358extern int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); 352extern int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);
359extern int l2cap_connect_cfm(struct hci_conn *hcon, u8 status); 353extern void l2cap_connect_cfm(struct hci_conn *hcon, u8 status);
360extern int l2cap_disconn_ind(struct hci_conn *hcon); 354extern int l2cap_disconn_ind(struct hci_conn *hcon);
361extern int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason); 355extern void l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason);
362extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt); 356extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt);
363extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, 357extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb,
364 u16 flags); 358 u16 flags);
365 359
366extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); 360extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);
367extern int sco_connect_cfm(struct hci_conn *hcon, __u8 status); 361extern void sco_connect_cfm(struct hci_conn *hcon, __u8 status);
368extern int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason); 362extern void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason);
369extern int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb); 363extern int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb);
370 364
371/* ----- Inquiry cache ----- */ 365/* ----- Inquiry cache ----- */
@@ -587,8 +581,7 @@ void hci_conn_put_device(struct hci_conn *conn);
587 581
588static inline void hci_conn_hold(struct hci_conn *conn) 582static inline void hci_conn_hold(struct hci_conn *conn)
589{ 583{
590 BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt), 584 BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));
591 atomic_read(&conn->refcnt) + 1);
592 585
593 atomic_inc(&conn->refcnt); 586 atomic_inc(&conn->refcnt);
594 cancel_delayed_work(&conn->disc_work); 587 cancel_delayed_work(&conn->disc_work);
@@ -596,8 +589,7 @@ static inline void hci_conn_hold(struct hci_conn *conn)
596 589
597static inline void hci_conn_put(struct hci_conn *conn) 590static inline void hci_conn_put(struct hci_conn *conn)
598{ 591{
599 BT_DBG("hcon %p refcnt %d -> %d", conn, atomic_read(&conn->refcnt), 592 BT_DBG("hcon %p orig refcnt %d", conn, atomic_read(&conn->refcnt));
600 atomic_read(&conn->refcnt) - 1);
601 593
602 if (atomic_dec_and_test(&conn->refcnt)) { 594 if (atomic_dec_and_test(&conn->refcnt)) {
603 unsigned long timeo; 595 unsigned long timeo;
@@ -1056,7 +1048,7 @@ int mgmt_discovering(struct hci_dev *hdev, u8 discovering);
1056int mgmt_interleaved_discovery(struct hci_dev *hdev); 1048int mgmt_interleaved_discovery(struct hci_dev *hdev);
1057int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 1049int mgmt_device_blocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
1058int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type); 1050int mgmt_device_unblocked(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type);
1059 1051bool mgmt_valid_hdev(struct hci_dev *hdev);
1060int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent); 1052int mgmt_new_ltk(struct hci_dev *hdev, struct smp_ltk *key, u8 persistent);
1061 1053
1062/* HCI info for socket */ 1054/* HCI info for socket */
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index a7679f8913d2..d206296137e2 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -671,20 +671,8 @@ enum {
671 L2CAP_EV_RECV_FRAME, 671 L2CAP_EV_RECV_FRAME,
672}; 672};
673 673
674static inline void l2cap_chan_hold(struct l2cap_chan *c) 674void l2cap_chan_hold(struct l2cap_chan *c);
675{ 675void l2cap_chan_put(struct l2cap_chan *c);
676 BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
677
678 atomic_inc(&c->refcnt);
679}
680
681static inline void l2cap_chan_put(struct l2cap_chan *c)
682{
683 BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
684
685 if (atomic_dec_and_test(&c->refcnt))
686 kfree(c);
687}
688 676
689static inline void l2cap_chan_lock(struct l2cap_chan *chan) 677static inline void l2cap_chan_lock(struct l2cap_chan *chan)
690{ 678{
@@ -771,7 +759,6 @@ int l2cap_add_scid(struct l2cap_chan *chan, __u16 scid);
771 759
772struct l2cap_chan *l2cap_chan_create(void); 760struct l2cap_chan *l2cap_chan_create(void);
773void l2cap_chan_close(struct l2cap_chan *chan, int reason); 761void l2cap_chan_close(struct l2cap_chan *chan, int reason);
774void l2cap_chan_destroy(struct l2cap_chan *chan);
775int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, 762int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
776 bdaddr_t *dst, u8 dst_type); 763 bdaddr_t *dst, u8 dst_type);
777int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len, 764int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
diff --git a/include/net/bluetooth/smp.h b/include/net/bluetooth/smp.h
index ca356a734920..50993a531d45 100644
--- a/include/net/bluetooth/smp.h
+++ b/include/net/bluetooth/smp.h
@@ -108,8 +108,8 @@ struct smp_cmd_security_req {
108#define SMP_CONFIRM_FAILED 0x04 108#define SMP_CONFIRM_FAILED 0x04
109#define SMP_PAIRING_NOTSUPP 0x05 109#define SMP_PAIRING_NOTSUPP 0x05
110#define SMP_ENC_KEY_SIZE 0x06 110#define SMP_ENC_KEY_SIZE 0x06
111#define SMP_CMD_NOTSUPP 0x07 111#define SMP_CMD_NOTSUPP 0x07
112#define SMP_UNSPECIFIED 0x08 112#define SMP_UNSPECIFIED 0x08
113#define SMP_REPEATED_ATTEMPTS 0x09 113#define SMP_REPEATED_ATTEMPTS 0x09
114 114
115#define SMP_MIN_ENC_KEY_SIZE 7 115#define SMP_MIN_ENC_KEY_SIZE 7
@@ -123,8 +123,8 @@ struct smp_chan {
123 struct l2cap_conn *conn; 123 struct l2cap_conn *conn;
124 u8 preq[7]; /* SMP Pairing Request */ 124 u8 preq[7]; /* SMP Pairing Request */
125 u8 prsp[7]; /* SMP Pairing Response */ 125 u8 prsp[7]; /* SMP Pairing Response */
126 u8 prnd[16]; /* SMP Pairing Random (local) */ 126 u8 prnd[16]; /* SMP Pairing Random (local) */
127 u8 rrnd[16]; /* SMP Pairing Random (remote) */ 127 u8 rrnd[16]; /* SMP Pairing Random (remote) */
128 u8 pcnf[16]; /* SMP Pairing Confirm */ 128 u8 pcnf[16]; /* SMP Pairing Confirm */
129 u8 tk[16]; /* SMP Temporary Key */ 129 u8 tk[16]; /* SMP Temporary Key */
130 u8 enc_key_size; 130 u8 enc_key_size;
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 613cfa401672..83b567fe1941 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -249,4 +249,13 @@ static inline __u8 inet_sk_flowi_flags(const struct sock *sk)
249 return flags; 249 return flags;
250} 250}
251 251
252static inline void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb)
253{
254 struct dst_entry *dst = skb_dst(skb);
255
256 dst_hold(dst);
257 sk->sk_rx_dst = dst;
258 inet_sk(sk)->rx_dst_ifindex = skb->skb_iif;
259}
260
252#endif /* _INET_SOCK_H */ 261#endif /* _INET_SOCK_H */
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index e69c3a47153d..926142ed8d7a 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -21,6 +21,7 @@
21#include <linux/rcupdate.h> 21#include <linux/rcupdate.h>
22#include <net/fib_rules.h> 22#include <net/fib_rules.h>
23#include <net/inetpeer.h> 23#include <net/inetpeer.h>
24#include <linux/percpu.h>
24 25
25struct fib_config { 26struct fib_config {
26 u8 fc_dst_len; 27 u8 fc_dst_len;
@@ -54,6 +55,7 @@ struct fib_nh_exception {
54 u32 fnhe_pmtu; 55 u32 fnhe_pmtu;
55 __be32 fnhe_gw; 56 __be32 fnhe_gw;
56 unsigned long fnhe_expires; 57 unsigned long fnhe_expires;
58 struct rtable __rcu *fnhe_rth;
57 unsigned long fnhe_stamp; 59 unsigned long fnhe_stamp;
58}; 60};
59 61
@@ -81,8 +83,8 @@ struct fib_nh {
81 __be32 nh_gw; 83 __be32 nh_gw;
82 __be32 nh_saddr; 84 __be32 nh_saddr;
83 int nh_saddr_genid; 85 int nh_saddr_genid;
84 struct rtable *nh_rth_output; 86 struct rtable __rcu * __percpu *nh_pcpu_rth_output;
85 struct rtable *nh_rth_input; 87 struct rtable __rcu *nh_rth_input;
86 struct fnhe_hash_bucket *nh_exceptions; 88 struct fnhe_hash_bucket *nh_exceptions;
87}; 89};
88 90
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 0ffb8e31f3cd..1474dd65c66f 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -61,8 +61,6 @@ struct netns_ipv4 {
61 int sysctl_icmp_ratelimit; 61 int sysctl_icmp_ratelimit;
62 int sysctl_icmp_ratemask; 62 int sysctl_icmp_ratemask;
63 int sysctl_icmp_errors_use_inbound_ifaddr; 63 int sysctl_icmp_errors_use_inbound_ifaddr;
64 int sysctl_rt_cache_rebuild_count;
65 int current_rt_cache_rebuild_count;
66 64
67 unsigned int sysctl_ping_group_range[2]; 65 unsigned int sysctl_ping_group_range[2];
68 long sysctl_tcp_mem[3]; 66 long sysctl_tcp_mem[3];
diff --git a/include/net/route.h b/include/net/route.h
index 8c52bc6f1c90..776a27f1ab78 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -57,6 +57,8 @@ struct rtable {
57 57
58 /* Miscellaneous cached information */ 58 /* Miscellaneous cached information */
59 u32 rt_pmtu; 59 u32 rt_pmtu;
60
61 struct list_head rt_uncached;
60}; 62};
61 63
62static inline bool rt_is_input_route(const struct rtable *rt) 64static inline bool rt_is_input_route(const struct rtable *rt)
@@ -107,6 +109,7 @@ extern struct ip_rt_acct __percpu *ip_rt_acct;
107struct in_device; 109struct in_device;
108extern int ip_rt_init(void); 110extern int ip_rt_init(void);
109extern void rt_cache_flush(struct net *net, int how); 111extern void rt_cache_flush(struct net *net, int how);
112extern void rt_flush_dev(struct net_device *dev);
110extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp); 113extern struct rtable *__ip_route_output_key(struct net *, struct flowi4 *flp);
111extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, 114extern struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp,
112 struct sock *sk); 115 struct sock *sk);