aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-s3c2410/uncompress.h22
-rw-r--r--include/asm-arm/hardware/scoop.h10
-rw-r--r--include/linux/if_ppp.h7
-rw-r--r--include/linux/ppp-comp.h9
-rw-r--r--include/linux/proc_fs.h1
-rw-r--r--include/linux/sysctl.h3
-rw-r--r--include/net/bluetooth/bluetooth.h4
-rw-r--r--include/net/bluetooth/hci.h116
-rw-r--r--include/net/bluetooth/hci_core.h9
-rw-r--r--include/net/bluetooth/rfcomm.h2
-rw-r--r--include/net/ipv6.h67
-rw-r--r--include/net/sock.h20
12 files changed, 181 insertions, 89 deletions
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h
index d7a4a8354fa..ddd1578a7ee 100644
--- a/include/asm-arm/arch-s3c2410/uncompress.h
+++ b/include/asm-arm/arch-s3c2410/uncompress.h
@@ -116,6 +116,8 @@ putstr(const char *ptr)
116 } 116 }
117} 117}
118 118
119#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0)
120
119/* CONFIG_S3C2410_BOOT_WATCHDOG 121/* CONFIG_S3C2410_BOOT_WATCHDOG
120 * 122 *
121 * Simple boot-time watchdog setup, to reboot the system if there is 123 * Simple boot-time watchdog setup, to reboot the system if there is
@@ -126,8 +128,6 @@ putstr(const char *ptr)
126 128
127#define WDOG_COUNT (0xff00) 129#define WDOG_COUNT (0xff00)
128 130
129#define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0)
130
131static inline void arch_decomp_wdog(void) 131static inline void arch_decomp_wdog(void)
132{ 132{
133 __raw_writel(WDOG_COUNT, S3C2410_WTCNT); 133 __raw_writel(WDOG_COUNT, S3C2410_WTCNT);
@@ -145,6 +145,24 @@ static void arch_decomp_wdog_start(void)
145#define arch_decomp_wdog() 145#define arch_decomp_wdog()
146#endif 146#endif
147 147
148#ifdef CONFIG_S3C2410_BOOT_ERROR_RESET
149
150static void arch_decomp_error(const char *x)
151{
152 putstr("\n\n");
153 putstr(x);
154 putstr("\n\n -- System resetting\n");
155
156 __raw_writel(0x4000, S3C2410_WTDAT);
157 __raw_writel(0x4000, S3C2410_WTCNT);
158 __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON);
159
160 while(1);
161}
162
163#define arch_error arch_decomp_error
164#endif
165
148static void error(char *err); 166static void error(char *err);
149 167
150static void 168static void
diff --git a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h
index a8f1013930e..d37bf744326 100644
--- a/include/asm-arm/hardware/scoop.h
+++ b/include/asm-arm/hardware/scoop.h
@@ -52,8 +52,14 @@ struct scoop_pcmcia_dev {
52 unsigned char keep_rd; 52 unsigned char keep_rd;
53}; 53};
54 54
55extern int scoop_num; 55struct scoop_pcmcia_config {
56extern struct scoop_pcmcia_dev *scoop_devs; 56 struct scoop_pcmcia_dev *devs;
57 int num_devs;
58 void (*pcmcia_init)(void);
59 void (*power_ctrl)(struct device *scoop, unsigned short cpr, int nr);
60};
61
62extern struct scoop_pcmcia_config *platform_scoop_config;
57 63
58void reset_scoop(struct device *dev); 64void reset_scoop(struct device *dev);
59unsigned short set_scoop_gpio(struct device *dev, unsigned short bit); 65unsigned short set_scoop_gpio(struct device *dev, unsigned short bit);
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index 572aff7daa2..768372f07ca 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -21,7 +21,7 @@
21 */ 21 */
22 22
23/* 23/*
24 * ==FILEVERSION 20000724== 24 * ==FILEVERSION 20050812==
25 * 25 *
26 * NOTE TO MAINTAINERS: 26 * NOTE TO MAINTAINERS:
27 * If you modify this file at all, please set the above date. 27 * If you modify this file at all, please set the above date.
@@ -35,6 +35,8 @@
35#ifndef _IF_PPP_H_ 35#ifndef _IF_PPP_H_
36#define _IF_PPP_H_ 36#define _IF_PPP_H_
37 37
38#include <linux/compiler.h>
39
38/* 40/*
39 * Packet sizes 41 * Packet sizes
40 */ 42 */
@@ -70,7 +72,8 @@
70#define SC_LOG_RAWIN 0x00080000 /* log all chars received */ 72#define SC_LOG_RAWIN 0x00080000 /* log all chars received */
71#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */ 73#define SC_LOG_FLUSH 0x00100000 /* log all chars flushed */
72#define SC_SYNC 0x00200000 /* synchronous serial mode */ 74#define SC_SYNC 0x00200000 /* synchronous serial mode */
73#define SC_MASK 0x0f200fff /* bits that user can change */ 75#define SC_MUST_COMP 0x00400000 /* no uncompressed packets may be sent or received */
76#define SC_MASK 0x0f600fff /* bits that user can change */
74 77
75/* state bits */ 78/* state bits */
76#define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */ 79#define SC_XMIT_BUSY 0x10000000 /* (used by isdn_ppp?) */
diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h
index 7227e653b3b..e86a7a5cf35 100644
--- a/include/linux/ppp-comp.h
+++ b/include/linux/ppp-comp.h
@@ -111,6 +111,8 @@ struct compressor {
111 111
112 /* Used in locking compressor modules */ 112 /* Used in locking compressor modules */
113 struct module *owner; 113 struct module *owner;
114 /* Extra skb space needed by the compressor algorithm */
115 unsigned int comp_extra;
114}; 116};
115 117
116/* 118/*
@@ -191,6 +193,13 @@ struct compressor {
191#define DEFLATE_CHK_SEQUENCE 0 193#define DEFLATE_CHK_SEQUENCE 0
192 194
193/* 195/*
196 * Definitions for MPPE.
197 */
198
199#define CI_MPPE 18 /* config option for MPPE */
200#define CILEN_MPPE 6 /* length of config option */
201
202/*
194 * Definitions for other, as yet unsupported, compression methods. 203 * Definitions for other, as yet unsupported, compression methods.
195 */ 204 */
196 205
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 65ceeaa3065..74488e49166 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -66,6 +66,7 @@ struct proc_dir_entry {
66 write_proc_t *write_proc; 66 write_proc_t *write_proc;
67 atomic_t count; /* use count */ 67 atomic_t count; /* use count */
68 int deleted; /* delete flag */ 68 int deleted; /* delete flag */
69 void *set;
69}; 70};
70 71
71struct kcore_list { 72struct kcore_list {
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index fc8e367f671..fc131d6602b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -24,6 +24,7 @@
24#include <linux/compiler.h> 24#include <linux/compiler.h>
25 25
26struct file; 26struct file;
27struct completion;
27 28
28#define CTL_MAXNAME 10 /* how many path components do we allow in a 29#define CTL_MAXNAME 10 /* how many path components do we allow in a
29 call to sysctl? In other words, what is 30 call to sysctl? In other words, what is
@@ -925,6 +926,8 @@ struct ctl_table_header
925{ 926{
926 ctl_table *ctl_table; 927 ctl_table *ctl_table;
927 struct list_head ctl_entry; 928 struct list_head ctl_entry;
929 int used;
930 struct completion *unregistering;
928}; 931};
929 932
930struct ctl_table_header * register_sysctl_table(ctl_table * table, 933struct ctl_table_header * register_sysctl_table(ctl_table * table,
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index e42d728b162..911ceb5cd26 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -57,8 +57,6 @@
57#define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg) 57#define BT_DBG(fmt, arg...) printk(KERN_INFO "%s: " fmt "\n" , __FUNCTION__ , ## arg)
58#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg) 58#define BT_ERR(fmt, arg...) printk(KERN_ERR "%s: " fmt "\n" , __FUNCTION__ , ## arg)
59 59
60extern struct proc_dir_entry *proc_bt;
61
62/* Connection and socket states */ 60/* Connection and socket states */
63enum { 61enum {
64 BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */ 62 BT_CONNECTED = 1, /* Equal to TCP_ESTABLISHED to make net code happy */
@@ -177,4 +175,6 @@ extern int hci_sock_cleanup(void);
177extern int bt_sysfs_init(void); 175extern int bt_sysfs_init(void);
178extern void bt_sysfs_cleanup(void); 176extern void bt_sysfs_cleanup(void);
179 177
178extern struct class bt_class;
179
180#endif /* __BLUETOOTH_H */ 180#endif /* __BLUETOOTH_H */
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index fa2d12b0579..b06a2d2f63d 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -184,10 +184,10 @@ enum {
184struct hci_rp_read_loc_version { 184struct hci_rp_read_loc_version {
185 __u8 status; 185 __u8 status;
186 __u8 hci_ver; 186 __u8 hci_ver;
187 __u16 hci_rev; 187 __le16 hci_rev;
188 __u8 lmp_ver; 188 __u8 lmp_ver;
189 __u16 manufacturer; 189 __le16 manufacturer;
190 __u16 lmp_subver; 190 __le16 lmp_subver;
191} __attribute__ ((packed)); 191} __attribute__ ((packed));
192 192
193#define OCF_READ_LOCAL_FEATURES 0x0003 193#define OCF_READ_LOCAL_FEATURES 0x0003
@@ -199,10 +199,10 @@ struct hci_rp_read_loc_features {
199#define OCF_READ_BUFFER_SIZE 0x0005 199#define OCF_READ_BUFFER_SIZE 0x0005
200struct hci_rp_read_buffer_size { 200struct hci_rp_read_buffer_size {
201 __u8 status; 201 __u8 status;
202 __u16 acl_mtu; 202 __le16 acl_mtu;
203 __u8 sco_mtu; 203 __u8 sco_mtu;
204 __u16 acl_max_pkt; 204 __le16 acl_max_pkt;
205 __u16 sco_max_pkt; 205 __le16 sco_max_pkt;
206} __attribute__ ((packed)); 206} __attribute__ ((packed));
207 207
208#define OCF_READ_BD_ADDR 0x0009 208#define OCF_READ_BD_ADDR 0x0009
@@ -267,21 +267,21 @@ struct hci_cp_write_dev_class {
267 267
268#define OCF_READ_VOICE_SETTING 0x0025 268#define OCF_READ_VOICE_SETTING 0x0025
269struct hci_rp_read_voice_setting { 269struct hci_rp_read_voice_setting {
270 __u8 status; 270 __u8 status;
271 __u16 voice_setting; 271 __le16 voice_setting;
272} __attribute__ ((packed)); 272} __attribute__ ((packed));
273 273
274#define OCF_WRITE_VOICE_SETTING 0x0026 274#define OCF_WRITE_VOICE_SETTING 0x0026
275struct hci_cp_write_voice_setting { 275struct hci_cp_write_voice_setting {
276 __u16 voice_setting; 276 __le16 voice_setting;
277} __attribute__ ((packed)); 277} __attribute__ ((packed));
278 278
279#define OCF_HOST_BUFFER_SIZE 0x0033 279#define OCF_HOST_BUFFER_SIZE 0x0033
280struct hci_cp_host_buffer_size { 280struct hci_cp_host_buffer_size {
281 __u16 acl_mtu; 281 __le16 acl_mtu;
282 __u8 sco_mtu; 282 __u8 sco_mtu;
283 __u16 acl_max_pkt; 283 __le16 acl_max_pkt;
284 __u16 sco_max_pkt; 284 __le16 sco_max_pkt;
285} __attribute__ ((packed)); 285} __attribute__ ((packed));
286 286
287/* Link Control */ 287/* Link Control */
@@ -289,10 +289,10 @@ struct hci_cp_host_buffer_size {
289#define OCF_CREATE_CONN 0x0005 289#define OCF_CREATE_CONN 0x0005
290struct hci_cp_create_conn { 290struct hci_cp_create_conn {
291 bdaddr_t bdaddr; 291 bdaddr_t bdaddr;
292 __u16 pkt_type; 292 __le16 pkt_type;
293 __u8 pscan_rep_mode; 293 __u8 pscan_rep_mode;
294 __u8 pscan_mode; 294 __u8 pscan_mode;
295 __u16 clock_offset; 295 __le16 clock_offset;
296 __u8 role_switch; 296 __u8 role_switch;
297} __attribute__ ((packed)); 297} __attribute__ ((packed));
298 298
@@ -310,14 +310,14 @@ struct hci_cp_reject_conn_req {
310 310
311#define OCF_DISCONNECT 0x0006 311#define OCF_DISCONNECT 0x0006
312struct hci_cp_disconnect { 312struct hci_cp_disconnect {
313 __u16 handle; 313 __le16 handle;
314 __u8 reason; 314 __u8 reason;
315} __attribute__ ((packed)); 315} __attribute__ ((packed));
316 316
317#define OCF_ADD_SCO 0x0007 317#define OCF_ADD_SCO 0x0007
318struct hci_cp_add_sco { 318struct hci_cp_add_sco {
319 __u16 handle; 319 __le16 handle;
320 __u16 pkt_type; 320 __le16 pkt_type;
321} __attribute__ ((packed)); 321} __attribute__ ((packed));
322 322
323#define OCF_INQUIRY 0x0001 323#define OCF_INQUIRY 0x0001
@@ -354,56 +354,56 @@ struct hci_cp_pin_code_neg_reply {
354 354
355#define OCF_CHANGE_CONN_PTYPE 0x000F 355#define OCF_CHANGE_CONN_PTYPE 0x000F
356struct hci_cp_change_conn_ptype { 356struct hci_cp_change_conn_ptype {
357 __u16 handle; 357 __le16 handle;
358 __u16 pkt_type; 358 __le16 pkt_type;
359} __attribute__ ((packed)); 359} __attribute__ ((packed));
360 360
361#define OCF_AUTH_REQUESTED 0x0011 361#define OCF_AUTH_REQUESTED 0x0011
362struct hci_cp_auth_requested { 362struct hci_cp_auth_requested {
363 __u16 handle; 363 __le16 handle;
364} __attribute__ ((packed)); 364} __attribute__ ((packed));
365 365
366#define OCF_SET_CONN_ENCRYPT 0x0013 366#define OCF_SET_CONN_ENCRYPT 0x0013
367struct hci_cp_set_conn_encrypt { 367struct hci_cp_set_conn_encrypt {
368 __u16 handle; 368 __le16 handle;
369 __u8 encrypt; 369 __u8 encrypt;
370} __attribute__ ((packed)); 370} __attribute__ ((packed));
371 371
372#define OCF_CHANGE_CONN_LINK_KEY 0x0015 372#define OCF_CHANGE_CONN_LINK_KEY 0x0015
373struct hci_cp_change_conn_link_key { 373struct hci_cp_change_conn_link_key {
374 __u16 handle; 374 __le16 handle;
375} __attribute__ ((packed)); 375} __attribute__ ((packed));
376 376
377#define OCF_READ_REMOTE_FEATURES 0x001B 377#define OCF_READ_REMOTE_FEATURES 0x001B
378struct hci_cp_read_rmt_features { 378struct hci_cp_read_rmt_features {
379 __u16 handle; 379 __le16 handle;
380} __attribute__ ((packed)); 380} __attribute__ ((packed));
381 381
382#define OCF_READ_REMOTE_VERSION 0x001D 382#define OCF_READ_REMOTE_VERSION 0x001D
383struct hci_cp_read_rmt_version { 383struct hci_cp_read_rmt_version {
384 __u16 handle; 384 __le16 handle;
385} __attribute__ ((packed)); 385} __attribute__ ((packed));
386 386
387/* Link Policy */ 387/* Link Policy */
388#define OGF_LINK_POLICY 0x02 388#define OGF_LINK_POLICY 0x02
389#define OCF_ROLE_DISCOVERY 0x0009 389#define OCF_ROLE_DISCOVERY 0x0009
390struct hci_cp_role_discovery { 390struct hci_cp_role_discovery {
391 __u16 handle; 391 __le16 handle;
392} __attribute__ ((packed)); 392} __attribute__ ((packed));
393struct hci_rp_role_discovery { 393struct hci_rp_role_discovery {
394 __u8 status; 394 __u8 status;
395 __u16 handle; 395 __le16 handle;
396 __u8 role; 396 __u8 role;
397} __attribute__ ((packed)); 397} __attribute__ ((packed));
398 398
399#define OCF_READ_LINK_POLICY 0x000C 399#define OCF_READ_LINK_POLICY 0x000C
400struct hci_cp_read_link_policy { 400struct hci_cp_read_link_policy {
401 __u16 handle; 401 __le16 handle;
402} __attribute__ ((packed)); 402} __attribute__ ((packed));
403struct hci_rp_read_link_policy { 403struct hci_rp_read_link_policy {
404 __u8 status; 404 __u8 status;
405 __u16 handle; 405 __le16 handle;
406 __u16 policy; 406 __le16 policy;
407} __attribute__ ((packed)); 407} __attribute__ ((packed));
408 408
409#define OCF_SWITCH_ROLE 0x000B 409#define OCF_SWITCH_ROLE 0x000B
@@ -414,12 +414,12 @@ struct hci_cp_switch_role {
414 414
415#define OCF_WRITE_LINK_POLICY 0x000D 415#define OCF_WRITE_LINK_POLICY 0x000D
416struct hci_cp_write_link_policy { 416struct hci_cp_write_link_policy {
417 __u16 handle; 417 __le16 handle;
418 __u16 policy; 418 __le16 policy;
419} __attribute__ ((packed)); 419} __attribute__ ((packed));
420struct hci_rp_write_link_policy { 420struct hci_rp_write_link_policy {
421 __u8 status; 421 __u8 status;
422 __u16 handle; 422 __le16 handle;
423} __attribute__ ((packed)); 423} __attribute__ ((packed));
424 424
425/* Status params */ 425/* Status params */
@@ -441,7 +441,7 @@ struct inquiry_info {
441 __u8 pscan_period_mode; 441 __u8 pscan_period_mode;
442 __u8 pscan_mode; 442 __u8 pscan_mode;
443 __u8 dev_class[3]; 443 __u8 dev_class[3];
444 __u16 clock_offset; 444 __le16 clock_offset;
445} __attribute__ ((packed)); 445} __attribute__ ((packed));
446 446
447#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 447#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22
@@ -450,7 +450,7 @@ struct inquiry_info_with_rssi {
450 __u8 pscan_rep_mode; 450 __u8 pscan_rep_mode;
451 __u8 pscan_period_mode; 451 __u8 pscan_period_mode;
452 __u8 dev_class[3]; 452 __u8 dev_class[3];
453 __u16 clock_offset; 453 __le16 clock_offset;
454 __s8 rssi; 454 __s8 rssi;
455} __attribute__ ((packed)); 455} __attribute__ ((packed));
456struct inquiry_info_with_rssi_and_pscan_mode { 456struct inquiry_info_with_rssi_and_pscan_mode {
@@ -459,7 +459,7 @@ struct inquiry_info_with_rssi_and_pscan_mode {
459 __u8 pscan_period_mode; 459 __u8 pscan_period_mode;
460 __u8 pscan_mode; 460 __u8 pscan_mode;
461 __u8 dev_class[3]; 461 __u8 dev_class[3];
462 __u16 clock_offset; 462 __le16 clock_offset;
463 __s8 rssi; 463 __s8 rssi;
464} __attribute__ ((packed)); 464} __attribute__ ((packed));
465 465
@@ -469,7 +469,7 @@ struct extended_inquiry_info {
469 __u8 pscan_rep_mode; 469 __u8 pscan_rep_mode;
470 __u8 pscan_period_mode; 470 __u8 pscan_period_mode;
471 __u8 dev_class[3]; 471 __u8 dev_class[3];
472 __u16 clock_offset; 472 __le16 clock_offset;
473 __s8 rssi; 473 __s8 rssi;
474 __u8 data[240]; 474 __u8 data[240];
475} __attribute__ ((packed)); 475} __attribute__ ((packed));
@@ -477,7 +477,7 @@ struct extended_inquiry_info {
477#define HCI_EV_CONN_COMPLETE 0x03 477#define HCI_EV_CONN_COMPLETE 0x03
478struct hci_ev_conn_complete { 478struct hci_ev_conn_complete {
479 __u8 status; 479 __u8 status;
480 __u16 handle; 480 __le16 handle;
481 bdaddr_t bdaddr; 481 bdaddr_t bdaddr;
482 __u8 link_type; 482 __u8 link_type;
483 __u8 encr_mode; 483 __u8 encr_mode;
@@ -493,27 +493,27 @@ struct hci_ev_conn_request {
493#define HCI_EV_DISCONN_COMPLETE 0x05 493#define HCI_EV_DISCONN_COMPLETE 0x05
494struct hci_ev_disconn_complete { 494struct hci_ev_disconn_complete {
495 __u8 status; 495 __u8 status;
496 __u16 handle; 496 __le16 handle;
497 __u8 reason; 497 __u8 reason;
498} __attribute__ ((packed)); 498} __attribute__ ((packed));
499 499
500#define HCI_EV_AUTH_COMPLETE 0x06 500#define HCI_EV_AUTH_COMPLETE 0x06
501struct hci_ev_auth_complete { 501struct hci_ev_auth_complete {
502 __u8 status; 502 __u8 status;
503 __u16 handle; 503 __le16 handle;
504} __attribute__ ((packed)); 504} __attribute__ ((packed));
505 505
506#define HCI_EV_ENCRYPT_CHANGE 0x08 506#define HCI_EV_ENCRYPT_CHANGE 0x08
507struct hci_ev_encrypt_change { 507struct hci_ev_encrypt_change {
508 __u8 status; 508 __u8 status;
509 __u16 handle; 509 __le16 handle;
510 __u8 encrypt; 510 __u8 encrypt;
511} __attribute__ ((packed)); 511} __attribute__ ((packed));
512 512
513#define HCI_EV_CHANGE_CONN_LINK_KEY_COMPLETE 0x09 513#define HCI_EV_CHANGE_CONN_LINK_KEY_COMPLETE 0x09
514struct hci_ev_change_conn_link_key_complete { 514struct hci_ev_change_conn_link_key_complete {
515 __u8 status; 515 __u8 status;
516 __u16 handle; 516 __le16 handle;
517} __attribute__ ((packed)); 517} __attribute__ ((packed));
518 518
519#define HCI_EV_QOS_SETUP_COMPLETE 0x0D 519#define HCI_EV_QOS_SETUP_COMPLETE 0x0D
@@ -526,21 +526,21 @@ struct hci_qos {
526} __attribute__ ((packed)); 526} __attribute__ ((packed));
527struct hci_ev_qos_setup_complete { 527struct hci_ev_qos_setup_complete {
528 __u8 status; 528 __u8 status;
529 __u16 handle; 529 __le16 handle;
530 struct hci_qos qos; 530 struct hci_qos qos;
531} __attribute__ ((packed)); 531} __attribute__ ((packed));
532 532
533#define HCI_EV_CMD_COMPLETE 0x0E 533#define HCI_EV_CMD_COMPLETE 0x0E
534struct hci_ev_cmd_complete { 534struct hci_ev_cmd_complete {
535 __u8 ncmd; 535 __u8 ncmd;
536 __u16 opcode; 536 __le16 opcode;
537} __attribute__ ((packed)); 537} __attribute__ ((packed));
538 538
539#define HCI_EV_CMD_STATUS 0x0F 539#define HCI_EV_CMD_STATUS 0x0F
540struct hci_ev_cmd_status { 540struct hci_ev_cmd_status {
541 __u8 status; 541 __u8 status;
542 __u8 ncmd; 542 __u8 ncmd;
543 __u16 opcode; 543 __le16 opcode;
544} __attribute__ ((packed)); 544} __attribute__ ((packed));
545 545
546#define HCI_EV_NUM_COMP_PKTS 0x13 546#define HCI_EV_NUM_COMP_PKTS 0x13
@@ -559,9 +559,9 @@ struct hci_ev_role_change {
559#define HCI_EV_MODE_CHANGE 0x14 559#define HCI_EV_MODE_CHANGE 0x14
560struct hci_ev_mode_change { 560struct hci_ev_mode_change {
561 __u8 status; 561 __u8 status;
562 __u16 handle; 562 __le16 handle;
563 __u8 mode; 563 __u8 mode;
564 __u16 interval; 564 __le16 interval;
565} __attribute__ ((packed)); 565} __attribute__ ((packed));
566 566
567#define HCI_EV_PIN_CODE_REQ 0x16 567#define HCI_EV_PIN_CODE_REQ 0x16
@@ -584,24 +584,24 @@ struct hci_ev_link_key_notify {
584#define HCI_EV_RMT_FEATURES 0x0B 584#define HCI_EV_RMT_FEATURES 0x0B
585struct hci_ev_rmt_features { 585struct hci_ev_rmt_features {
586 __u8 status; 586 __u8 status;
587 __u16 handle; 587 __le16 handle;
588 __u8 features[8]; 588 __u8 features[8];
589} __attribute__ ((packed)); 589} __attribute__ ((packed));
590 590
591#define HCI_EV_RMT_VERSION 0x0C 591#define HCI_EV_RMT_VERSION 0x0C
592struct hci_ev_rmt_version { 592struct hci_ev_rmt_version {
593 __u8 status; 593 __u8 status;
594 __u16 handle; 594 __le16 handle;
595 __u8 lmp_ver; 595 __u8 lmp_ver;
596 __u16 manufacturer; 596 __le16 manufacturer;
597 __u16 lmp_subver; 597 __le16 lmp_subver;
598} __attribute__ ((packed)); 598} __attribute__ ((packed));
599 599
600#define HCI_EV_CLOCK_OFFSET 0x01C 600#define HCI_EV_CLOCK_OFFSET 0x01C
601struct hci_ev_clock_offset { 601struct hci_ev_clock_offset {
602 __u8 status; 602 __u8 status;
603 __u16 handle; 603 __le16 handle;
604 __u16 clock_offset; 604 __le16 clock_offset;
605} __attribute__ ((packed)); 605} __attribute__ ((packed));
606 606
607#define HCI_EV_PSCAN_REP_MODE 0x20 607#define HCI_EV_PSCAN_REP_MODE 0x20
@@ -638,7 +638,7 @@ struct hci_ev_si_security {
638#define HCI_SCO_HDR_SIZE 3 638#define HCI_SCO_HDR_SIZE 3
639 639
640struct hci_command_hdr { 640struct hci_command_hdr {
641 __u16 opcode; /* OCF & OGF */ 641 __le16 opcode; /* OCF & OGF */
642 __u8 plen; 642 __u8 plen;
643} __attribute__ ((packed)); 643} __attribute__ ((packed));
644 644
@@ -648,22 +648,22 @@ struct hci_event_hdr {
648} __attribute__ ((packed)); 648} __attribute__ ((packed));
649 649
650struct hci_acl_hdr { 650struct hci_acl_hdr {
651 __u16 handle; /* Handle & Flags(PB, BC) */ 651 __le16 handle; /* Handle & Flags(PB, BC) */
652 __u16 dlen; 652 __le16 dlen;
653} __attribute__ ((packed)); 653} __attribute__ ((packed));
654 654
655struct hci_sco_hdr { 655struct hci_sco_hdr {
656 __u16 handle; 656 __le16 handle;
657 __u8 dlen; 657 __u8 dlen;
658} __attribute__ ((packed)); 658} __attribute__ ((packed));
659 659
660/* Command opcode pack/unpack */ 660/* Command opcode pack/unpack */
661#define hci_opcode_pack(ogf, ocf) (__u16)((ocf & 0x03ff)|(ogf << 10)) 661#define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10))
662#define hci_opcode_ogf(op) (op >> 10) 662#define hci_opcode_ogf(op) (op >> 10)
663#define hci_opcode_ocf(op) (op & 0x03ff) 663#define hci_opcode_ocf(op) (op & 0x03ff)
664 664
665/* ACL handle and flags pack/unpack */ 665/* ACL handle and flags pack/unpack */
666#define hci_handle_pack(h, f) (__u16)((h & 0x0fff)|(f << 12)) 666#define hci_handle_pack(h, f) (__u16) ((h & 0x0fff)|(f << 12))
667#define hci_handle(h) (h & 0x0fff) 667#define hci_handle(h) (h & 0x0fff)
668#define hci_flags(h) (h >> 12) 668#define hci_flags(h) (h >> 12)
669 669
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 7f933f30207..bb9f81dc872 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -25,7 +25,6 @@
25#ifndef __HCI_CORE_H 25#ifndef __HCI_CORE_H
26#define __HCI_CORE_H 26#define __HCI_CORE_H
27 27
28#include <linux/proc_fs.h>
29#include <net/bluetooth/hci.h> 28#include <net/bluetooth/hci.h>
30 29
31/* HCI upper protocols */ 30/* HCI upper protocols */
@@ -34,8 +33,6 @@
34 33
35#define HCI_INIT_TIMEOUT (HZ * 10) 34#define HCI_INIT_TIMEOUT (HZ * 10)
36 35
37extern struct proc_dir_entry *proc_bt_hci;
38
39/* HCI Core structures */ 36/* HCI Core structures */
40 37
41struct inquiry_data { 38struct inquiry_data {
@@ -44,7 +41,7 @@ struct inquiry_data {
44 __u8 pscan_period_mode; 41 __u8 pscan_period_mode;
45 __u8 pscan_mode; 42 __u8 pscan_mode;
46 __u8 dev_class[3]; 43 __u8 dev_class[3];
47 __u16 clock_offset; 44 __le16 clock_offset;
48 __s8 rssi; 45 __s8 rssi;
49}; 46};
50 47
@@ -126,10 +123,6 @@ struct hci_dev {
126 123
127 atomic_t promisc; 124 atomic_t promisc;
128 125
129#ifdef CONFIG_PROC_FS
130 struct proc_dir_entry *proc;
131#endif
132
133 struct class_device class_dev; 126 struct class_device class_dev;
134 127
135 struct module *owner; 128 struct module *owner;
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index e656be7c001..bbfac86734e 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -351,6 +351,4 @@ int rfcomm_dev_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
351int rfcomm_init_ttys(void); 351int rfcomm_init_ttys(void);
352void rfcomm_cleanup_ttys(void); 352void rfcomm_cleanup_ttys(void);
353 353
354extern struct proc_dir_entry *proc_bt_rfcomm;
355
356#endif /* __RFCOMM_H */ 354#endif /* __RFCOMM_H */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 65ec86678a0..6addb4d464d 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -252,12 +252,25 @@ typedef int (*inet_getfrag_t) (const void *data,
252 char *, 252 char *,
253 unsigned int, unsigned int); 253 unsigned int, unsigned int);
254 254
255 255extern int __ipv6_addr_type(const struct in6_addr *addr);
256extern int ipv6_addr_type(const struct in6_addr *addr); 256static inline int ipv6_addr_type(const struct in6_addr *addr)
257{
258 return __ipv6_addr_type(addr) & 0xffff;
259}
257 260
258static inline int ipv6_addr_scope(const struct in6_addr *addr) 261static inline int ipv6_addr_scope(const struct in6_addr *addr)
259{ 262{
260 return ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK; 263 return __ipv6_addr_type(addr) & IPV6_ADDR_SCOPE_MASK;
264}
265
266static inline int __ipv6_addr_src_scope(int type)
267{
268 return (type == IPV6_ADDR_ANY ? __IPV6_ADDR_SCOPE_INVALID : (type >> 16));
269}
270
271static inline int ipv6_addr_src_scope(const struct in6_addr *addr)
272{
273 return __ipv6_addr_src_scope(__ipv6_addr_type(addr));
261} 274}
262 275
263static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2) 276static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2)
@@ -341,6 +354,54 @@ static inline int ipv6_addr_any(const struct in6_addr *a)
341} 354}
342 355
343/* 356/*
357 * find the first different bit between two addresses
358 * length of address must be a multiple of 32bits
359 */
360static inline int __ipv6_addr_diff(const void *token1, const void *token2, int addrlen)
361{
362 const __u32 *a1 = token1, *a2 = token2;
363 int i;
364
365 addrlen >>= 2;
366
367 for (i = 0; i < addrlen; i++) {
368 __u32 xb = a1[i] ^ a2[i];
369 if (xb) {
370 int j = 31;
371
372 xb = ntohl(xb);
373 while ((xb & (1 << j)) == 0)
374 j--;
375
376 return (i * 32 + 31 - j);
377 }
378 }
379
380 /*
381 * we should *never* get to this point since that
382 * would mean the addrs are equal
383 *
384 * However, we do get to it 8) And exacly, when
385 * addresses are equal 8)
386 *
387 * ip route add 1111::/128 via ...
388 * ip route add 1111::/64 via ...
389 * and we are here.
390 *
391 * Ideally, this function should stop comparison
392 * at prefix length. It does not, but it is still OK,
393 * if returned value is greater than prefix length.
394 * --ANK (980803)
395 */
396 return (addrlen << 5);
397}
398
399static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2)
400{
401 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
402}
403
404/*
344 * Prototypes exported by ipv6 405 * Prototypes exported by ipv6
345 */ 406 */
346 407
diff --git a/include/net/sock.h b/include/net/sock.h
index e0498bd3600..ff13c4cc287 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -461,16 +461,16 @@ static inline void sk_stream_free_skb(struct sock *sk, struct sk_buff *skb)
461} 461}
462 462
463/* The per-socket spinlock must be held here. */ 463/* The per-socket spinlock must be held here. */
464#define sk_add_backlog(__sk, __skb) \ 464static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
465do { if (!(__sk)->sk_backlog.tail) { \ 465{
466 (__sk)->sk_backlog.head = \ 466 if (!sk->sk_backlog.tail) {
467 (__sk)->sk_backlog.tail = (__skb); \ 467 sk->sk_backlog.head = sk->sk_backlog.tail = skb;
468 } else { \ 468 } else {
469 ((__sk)->sk_backlog.tail)->next = (__skb); \ 469 sk->sk_backlog.tail->next = skb;
470 (__sk)->sk_backlog.tail = (__skb); \ 470 sk->sk_backlog.tail = skb;
471 } \ 471 }
472 (__skb)->next = NULL; \ 472 skb->next = NULL;
473} while(0) 473}
474 474
475#define sk_wait_event(__sk, __timeo, __condition) \ 475#define sk_wait_event(__sk, __timeo, __condition) \
476({ int rc; \ 476({ int rc; \