aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/percpu.h4
-rw-r--r--include/asm-generic/vmlinux.lds.h15
-rw-r--r--include/drm/drm_edid.h38
-rw-r--r--include/linux/aio.h4
-rw-r--r--include/linux/bio.h22
-rw-r--r--include/linux/blkdev.h15
-rw-r--r--include/linux/connector.h6
-rw-r--r--include/linux/ethtool.h1
-rw-r--r--include/linux/eventfd.h35
-rw-r--r--include/linux/fb.h1
-rw-r--r--include/linux/fsnotify_backend.h2
-rw-r--r--include/linux/fuse.h36
-rw-r--r--include/linux/hrtimer.h5
-rw-r--r--include/linux/ide.h5
-rw-r--r--include/linux/ieee80211.h4
-rw-r--r--include/linux/if_ether.h4
-rw-r--r--include/linux/if_tun.h1
-rw-r--r--include/linux/ima.h6
-rw-r--r--include/linux/init_task.h3
-rw-r--r--include/linux/isdn/hdlc.h82
-rw-r--r--include/linux/kernel.h1
-rw-r--r--include/linux/kvm_host.h1
-rw-r--r--include/linux/leds-lp3944.h53
-rw-r--r--include/linux/leds.h14
-rw-r--r--include/linux/linkage.h9
-rw-r--r--include/linux/mISDNhw.h1
-rw-r--r--include/linux/mISDNif.h16
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/mmc/sdio_ids.h6
-rw-r--r--include/linux/net_dropmon.h1
-rw-r--r--include/linux/netdevice.h4
-rw-r--r--include/linux/nl80211.h148
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/percpu-defs.h3
-rw-r--r--include/linux/perf_counter.h46
-rw-r--r--include/linux/rfkill.h14
-rw-r--r--include/linux/sched.h16
-rw-r--r--include/linux/skbuff.h6
-rw-r--r--include/linux/spi/spi.h6
-rw-r--r--include/linux/spi/spidev.h2
-rw-r--r--include/linux/timer.h4
-rw-r--r--include/linux/tipc.h2
-rw-r--r--include/linux/usb/usbnet.h3
-rw-r--r--include/linux/wireless.h8
-rw-r--r--include/net/af_ieee802154.h (renamed from include/net/ieee802154/af_ieee802154.h)0
-rw-r--r--include/net/cfg80211.h478
-rw-r--r--include/net/genetlink.h66
-rw-r--r--include/net/ieee802154.h (renamed from include/net/ieee802154/mac_def.h)4
-rw-r--r--include/net/ieee802154/nl802154.h41
-rw-r--r--include/net/ieee802154_netdev.h (renamed from include/net/ieee802154/netdevice.h)0
-rw-r--r--include/net/ip6_fib.h6
-rw-r--r--include/net/ip_vs.h119
-rw-r--r--include/net/ipv6.h12
-rw-r--r--include/net/iw_handler.h2
-rw-r--r--include/net/mac80211.h71
-rw-r--r--include/net/net_namespace.h26
-rw-r--r--include/net/netns/x_tables.h3
-rw-r--r--include/net/nl802154.h117
-rw-r--r--include/net/phonet/pn_dev.h2
-rw-r--r--include/net/scm.h2
-rw-r--r--include/net/udp.h3
-rw-r--r--include/net/xfrm.h2
62 files changed, 1300 insertions, 310 deletions
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index d7d50d7ee51e..aa00800adacc 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -97,4 +97,8 @@ extern void setup_per_cpu_areas(void);
97#define PER_CPU_ATTRIBUTES 97#define PER_CPU_ATTRIBUTES
98#endif 98#endif
99 99
100#ifndef PER_CPU_DEF_ATTRIBUTES
101#define PER_CPU_DEF_ATTRIBUTES
102#endif
103
100#endif /* _ASM_GENERIC_PERCPU_H_ */ 104#endif /* _ASM_GENERIC_PERCPU_H_ */
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 92b73b6140ff..a553f1041cf1 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -191,7 +191,7 @@
191 . = ALIGN(align); \ 191 . = ALIGN(align); \
192 *(.data.cacheline_aligned) 192 *(.data.cacheline_aligned)
193 193
194#define INIT_TASK(align) \ 194#define INIT_TASK_DATA(align) \
195 . = ALIGN(align); \ 195 . = ALIGN(align); \
196 *(.data.init_task) 196 *(.data.init_task)
197 197
@@ -434,14 +434,15 @@
434/* 434/*
435 * Init task 435 * Init task
436 */ 436 */
437#define INIT_TASK_DATA(align) \ 437#define INIT_TASK_DATA_SECTION(align) \
438 . = ALIGN(align); \ 438 . = ALIGN(align); \
439 .data.init_task : { \ 439 .data.init_task : { \
440 INIT_TASK \ 440 INIT_TASK_DATA(align) \
441 } 441 }
442 442
443#ifdef CONFIG_CONSTRUCTORS 443#ifdef CONFIG_CONSTRUCTORS
444#define KERNEL_CTORS() VMLINUX_SYMBOL(__ctors_start) = .; \ 444#define KERNEL_CTORS() . = ALIGN(8); \
445 VMLINUX_SYMBOL(__ctors_start) = .; \
445 *(.ctors) \ 446 *(.ctors) \
446 VMLINUX_SYMBOL(__ctors_end) = .; 447 VMLINUX_SYMBOL(__ctors_end) = .;
447#else 448#else
@@ -704,15 +705,15 @@
704 * matches the requirment of PAGE_ALIGNED_DATA. 705 * matches the requirment of PAGE_ALIGNED_DATA.
705 * 706 *
706 * use 0 as page_align if page_aligned data is not used */ 707 * use 0 as page_align if page_aligned data is not used */
707#define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \ 708#define RW_DATA_SECTION(cacheline, pagealigned, inittask) \
708 . = ALIGN(PAGE_SIZE); \ 709 . = ALIGN(PAGE_SIZE); \
709 .data : AT(ADDR(.data) - LOAD_OFFSET) { \ 710 .data : AT(ADDR(.data) - LOAD_OFFSET) { \
710 INIT_TASK(inittask) \ 711 INIT_TASK_DATA(inittask) \
711 CACHELINE_ALIGNED_DATA(cacheline) \ 712 CACHELINE_ALIGNED_DATA(cacheline) \
712 READ_MOSTLY_DATA(cacheline) \ 713 READ_MOSTLY_DATA(cacheline) \
713 DATA_DATA \ 714 DATA_DATA \
714 CONSTRUCTORS \ 715 CONSTRUCTORS \
715 NOSAVE_DATA(nosave) \ 716 NOSAVE_DATA \
716 PAGE_ALIGNED_DATA(pagealigned) \ 717 PAGE_ALIGNED_DATA(pagealigned) \
717 } 718 }
718 719
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index c263e4d71754..7d6c9a2dfcbb 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -35,11 +35,11 @@ struct est_timings {
35} __attribute__((packed)); 35} __attribute__((packed));
36 36
37/* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */ 37/* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */
38#define EDID_TIMING_ASPECT_SHIFT 0 38#define EDID_TIMING_ASPECT_SHIFT 6
39#define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT) 39#define EDID_TIMING_ASPECT_MASK (0x3 << EDID_TIMING_ASPECT_SHIFT)
40 40
41/* need to add 60 */ 41/* need to add 60 */
42#define EDID_TIMING_VFREQ_SHIFT 2 42#define EDID_TIMING_VFREQ_SHIFT 0
43#define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT) 43#define EDID_TIMING_VFREQ_MASK (0x3f << EDID_TIMING_VFREQ_SHIFT)
44 44
45struct std_timing { 45struct std_timing {
@@ -47,11 +47,11 @@ struct std_timing {
47 u8 vfreq_aspect; 47 u8 vfreq_aspect;
48} __attribute__((packed)); 48} __attribute__((packed));
49 49
50#define DRM_EDID_PT_HSYNC_POSITIVE (1 << 6) 50#define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1)
51#define DRM_EDID_PT_VSYNC_POSITIVE (1 << 5) 51#define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2)
52#define DRM_EDID_PT_SEPARATE_SYNC (3 << 3) 52#define DRM_EDID_PT_SEPARATE_SYNC (3 << 3)
53#define DRM_EDID_PT_STEREO (1 << 2) 53#define DRM_EDID_PT_STEREO (1 << 5)
54#define DRM_EDID_PT_INTERLACED (1 << 1) 54#define DRM_EDID_PT_INTERLACED (1 << 7)
55 55
56/* If detailed data is pixel timing */ 56/* If detailed data is pixel timing */
57struct detailed_pixel_timing { 57struct detailed_pixel_timing {
@@ -93,7 +93,7 @@ struct detailed_data_monitor_range {
93} __attribute__((packed)); 93} __attribute__((packed));
94 94
95struct detailed_data_wpindex { 95struct detailed_data_wpindex {
96 u8 white_xy_lo; /* Upper 2 bits each */ 96 u8 white_yx_lo; /* Lower 2 bits each */
97 u8 white_x_hi; 97 u8 white_x_hi;
98 u8 white_y_hi; 98 u8 white_y_hi;
99 u8 gamma; /* need to divide by 100 then add 1 */ 99 u8 gamma; /* need to divide by 100 then add 1 */
@@ -135,21 +135,21 @@ struct detailed_timing {
135 } data; 135 } data;
136} __attribute__((packed)); 136} __attribute__((packed));
137 137
138#define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 7) 138#define DRM_EDID_INPUT_SERRATION_VSYNC (1 << 0)
139#define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 5) 139#define DRM_EDID_INPUT_SYNC_ON_GREEN (1 << 1)
140#define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 4) 140#define DRM_EDID_INPUT_COMPOSITE_SYNC (1 << 2)
141#define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3) 141#define DRM_EDID_INPUT_SEPARATE_SYNCS (1 << 3)
142#define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 2) 142#define DRM_EDID_INPUT_BLANK_TO_BLACK (1 << 4)
143#define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 1) 143#define DRM_EDID_INPUT_VIDEO_LEVEL (3 << 5)
144#define DRM_EDID_INPUT_DIGITAL (1 << 0) /* bits above must be zero if set */ 144#define DRM_EDID_INPUT_DIGITAL (1 << 7) /* bits below must be zero if set */
145 145
146#define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 7) 146#define DRM_EDID_FEATURE_DEFAULT_GTF (1 << 0)
147#define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 6) 147#define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1)
148#define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 5) 148#define DRM_EDID_FEATURE_STANDARD_COLOR (1 << 2)
149#define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */ 149#define DRM_EDID_FEATURE_DISPLAY_TYPE (3 << 3) /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */
150#define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 2) 150#define DRM_EDID_FEATURE_PM_ACTIVE_OFF (1 << 5)
151#define DRM_EDID_FEATURE_PM_SUSPEND (1 << 1) 151#define DRM_EDID_FEATURE_PM_SUSPEND (1 << 6)
152#define DRM_EDID_FEATURE_PM_STANDBY (1 << 0) 152#define DRM_EDID_FEATURE_PM_STANDBY (1 << 7)
153 153
154struct edid { 154struct edid {
155 u8 header[8]; 155 u8 header[8];
diff --git a/include/linux/aio.h b/include/linux/aio.h
index b16a957030f8..47f7d932a01d 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -121,9 +121,9 @@ struct kiocb {
121 121
122 /* 122 /*
123 * If the aio_resfd field of the userspace iocb is not zero, 123 * If the aio_resfd field of the userspace iocb is not zero,
124 * this is the underlying file* to deliver event to. 124 * this is the underlying eventfd context to deliver events to.
125 */ 125 */
126 struct file *ki_eventfd; 126 struct eventfd_ctx *ki_eventfd;
127}; 127};
128 128
129#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY) 129#define is_sync_kiocb(iocb) ((iocb)->ki_key == KIOCB_SYNC_KEY)
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 2a04eb54c0dd..2892b710771c 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -319,7 +319,6 @@ static inline int bio_has_allocated_vec(struct bio *bio)
319 */ 319 */
320struct bio_integrity_payload { 320struct bio_integrity_payload {
321 struct bio *bip_bio; /* parent bio */ 321 struct bio *bip_bio; /* parent bio */
322 struct bio_vec *bip_vec; /* integrity data vector */
323 322
324 sector_t bip_sector; /* virtual start sector */ 323 sector_t bip_sector; /* virtual start sector */
325 324
@@ -328,11 +327,12 @@ struct bio_integrity_payload {
328 327
329 unsigned int bip_size; 328 unsigned int bip_size;
330 329
331 unsigned short bip_pool; /* pool the ivec came from */ 330 unsigned short bip_slab; /* slab the bip came from */
332 unsigned short bip_vcnt; /* # of integrity bio_vecs */ 331 unsigned short bip_vcnt; /* # of integrity bio_vecs */
333 unsigned short bip_idx; /* current bip_vec index */ 332 unsigned short bip_idx; /* current bip_vec index */
334 333
335 struct work_struct bip_work; /* I/O completion */ 334 struct work_struct bip_work; /* I/O completion */
335 struct bio_vec bip_vec[0]; /* embedded bvec array */
336}; 336};
337#endif /* CONFIG_BLK_DEV_INTEGRITY */ 337#endif /* CONFIG_BLK_DEV_INTEGRITY */
338 338
@@ -430,6 +430,9 @@ struct bio_set {
430 unsigned int front_pad; 430 unsigned int front_pad;
431 431
432 mempool_t *bio_pool; 432 mempool_t *bio_pool;
433#if defined(CONFIG_BLK_DEV_INTEGRITY)
434 mempool_t *bio_integrity_pool;
435#endif
433 mempool_t *bvec_pool; 436 mempool_t *bvec_pool;
434}; 437};
435 438
@@ -634,8 +637,9 @@ static inline struct bio *bio_list_get(struct bio_list *bl)
634 637
635#define bio_integrity(bio) (bio->bi_integrity != NULL) 638#define bio_integrity(bio) (bio->bi_integrity != NULL)
636 639
640extern struct bio_integrity_payload *bio_integrity_alloc_bioset(struct bio *, gfp_t, unsigned int, struct bio_set *);
637extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int); 641extern struct bio_integrity_payload *bio_integrity_alloc(struct bio *, gfp_t, unsigned int);
638extern void bio_integrity_free(struct bio *); 642extern void bio_integrity_free(struct bio *, struct bio_set *);
639extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int); 643extern int bio_integrity_add_page(struct bio *, struct page *, unsigned int, unsigned int);
640extern int bio_integrity_enabled(struct bio *bio); 644extern int bio_integrity_enabled(struct bio *bio);
641extern int bio_integrity_set_tag(struct bio *, void *, unsigned int); 645extern int bio_integrity_set_tag(struct bio *, void *, unsigned int);
@@ -645,21 +649,27 @@ extern void bio_integrity_endio(struct bio *, int);
645extern void bio_integrity_advance(struct bio *, unsigned int); 649extern void bio_integrity_advance(struct bio *, unsigned int);
646extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); 650extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int);
647extern void bio_integrity_split(struct bio *, struct bio_pair *, int); 651extern void bio_integrity_split(struct bio *, struct bio_pair *, int);
648extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t); 652extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *);
653extern int bioset_integrity_create(struct bio_set *, int);
654extern void bioset_integrity_free(struct bio_set *);
655extern void bio_integrity_init(void);
649 656
650#else /* CONFIG_BLK_DEV_INTEGRITY */ 657#else /* CONFIG_BLK_DEV_INTEGRITY */
651 658
652#define bio_integrity(a) (0) 659#define bio_integrity(a) (0)
660#define bioset_integrity_create(a, b) (0)
653#define bio_integrity_prep(a) (0) 661#define bio_integrity_prep(a) (0)
654#define bio_integrity_enabled(a) (0) 662#define bio_integrity_enabled(a) (0)
655#define bio_integrity_clone(a, b, c) (0) 663#define bio_integrity_clone(a, b, c, d) (0)
656#define bio_integrity_free(a) do { } while (0) 664#define bioset_integrity_free(a) do { } while (0)
665#define bio_integrity_free(a, b) do { } while (0)
657#define bio_integrity_endio(a, b) do { } while (0) 666#define bio_integrity_endio(a, b) do { } while (0)
658#define bio_integrity_advance(a, b) do { } while (0) 667#define bio_integrity_advance(a, b) do { } while (0)
659#define bio_integrity_trim(a, b, c) do { } while (0) 668#define bio_integrity_trim(a, b, c) do { } while (0)
660#define bio_integrity_split(a, b, c) do { } while (0) 669#define bio_integrity_split(a, b, c) do { } while (0)
661#define bio_integrity_set_tag(a, b, c) do { } while (0) 670#define bio_integrity_set_tag(a, b, c) do { } while (0)
662#define bio_integrity_get_tag(a, b, c) do { } while (0) 671#define bio_integrity_get_tag(a, b, c) do { } while (0)
672#define bio_integrity_init(a) do { } while (0)
663 673
664#endif /* CONFIG_BLK_DEV_INTEGRITY */ 674#endif /* CONFIG_BLK_DEV_INTEGRITY */
665 675
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 8963d9149b5f..49ae07951d55 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -301,12 +301,6 @@ struct blk_queue_tag {
301#define BLK_SCSI_MAX_CMDS (256) 301#define BLK_SCSI_MAX_CMDS (256)
302#define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8)) 302#define BLK_SCSI_CMD_PER_LONG (BLK_SCSI_MAX_CMDS / (sizeof(long) * 8))
303 303
304struct blk_cmd_filter {
305 unsigned long read_ok[BLK_SCSI_CMD_PER_LONG];
306 unsigned long write_ok[BLK_SCSI_CMD_PER_LONG];
307 struct kobject kobj;
308};
309
310struct queue_limits { 304struct queue_limits {
311 unsigned long bounce_pfn; 305 unsigned long bounce_pfn;
312 unsigned long seg_boundary_mask; 306 unsigned long seg_boundary_mask;
@@ -445,7 +439,6 @@ struct request_queue
445#if defined(CONFIG_BLK_DEV_BSG) 439#if defined(CONFIG_BLK_DEV_BSG)
446 struct bsg_class_device bsg_dev; 440 struct bsg_class_device bsg_dev;
447#endif 441#endif
448 struct blk_cmd_filter cmd_filter;
449}; 442};
450 443
451#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */ 444#define QUEUE_FLAG_CLUSTER 0 /* cluster several segments into 1 */
@@ -998,13 +991,7 @@ static inline int sb_issue_discard(struct super_block *sb,
998 return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL); 991 return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_KERNEL);
999} 992}
1000 993
1001/* 994extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
1002* command filter functions
1003*/
1004extern int blk_verify_command(struct blk_cmd_filter *filter,
1005 unsigned char *cmd, fmode_t has_write_perm);
1006extern void blk_unregister_filter(struct gendisk *disk);
1007extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
1008 995
1009#define MAX_PHYS_SEGMENTS 128 996#define MAX_PHYS_SEGMENTS 128
1010#define MAX_HW_SEGMENTS 128 997#define MAX_HW_SEGMENTS 128
diff --git a/include/linux/connector.h b/include/linux/connector.h
index b68d27850d51..47ebf416f512 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -136,7 +136,7 @@ struct cn_callback_data {
136 void *ddata; 136 void *ddata;
137 137
138 void *callback_priv; 138 void *callback_priv;
139 void (*callback) (void *); 139 void (*callback) (struct cn_msg *);
140 140
141 void *free; 141 void *free;
142}; 142};
@@ -167,11 +167,11 @@ struct cn_dev {
167 struct cn_queue_dev *cbdev; 167 struct cn_queue_dev *cbdev;
168}; 168};
169 169
170int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); 170int cn_add_callback(struct cb_id *, char *, void (*callback) (struct cn_msg *));
171void cn_del_callback(struct cb_id *); 171void cn_del_callback(struct cb_id *);
172int cn_netlink_send(struct cn_msg *, u32, gfp_t); 172int cn_netlink_send(struct cn_msg *, u32, gfp_t);
173 173
174int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); 174int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(struct cn_msg *));
175void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); 175void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
176 176
177int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work); 177int queue_cn_work(struct cn_callback_entry *cbq, struct work_struct *work);
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 9b660bd2e2b3..90c4a3616d94 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -368,6 +368,7 @@ struct net_device;
368 368
369/* Some generic methods drivers may use in their ethtool_ops */ 369/* Some generic methods drivers may use in their ethtool_ops */
370u32 ethtool_op_get_link(struct net_device *dev); 370u32 ethtool_op_get_link(struct net_device *dev);
371u32 ethtool_op_get_rx_csum(struct net_device *dev);
371u32 ethtool_op_get_tx_csum(struct net_device *dev); 372u32 ethtool_op_get_tx_csum(struct net_device *dev);
372int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); 373int ethtool_op_set_tx_csum(struct net_device *dev, u32 data);
373int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); 374int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data);
diff --git a/include/linux/eventfd.h b/include/linux/eventfd.h
index f45a8ae5f828..3b85ba6479f4 100644
--- a/include/linux/eventfd.h
+++ b/include/linux/eventfd.h
@@ -8,10 +8,8 @@
8#ifndef _LINUX_EVENTFD_H 8#ifndef _LINUX_EVENTFD_H
9#define _LINUX_EVENTFD_H 9#define _LINUX_EVENTFD_H
10 10
11#ifdef CONFIG_EVENTFD
12
13/* For O_CLOEXEC and O_NONBLOCK */
14#include <linux/fcntl.h> 11#include <linux/fcntl.h>
12#include <linux/file.h>
15 13
16/* 14/*
17 * CAREFUL: Check include/asm-generic/fcntl.h when defining 15 * CAREFUL: Check include/asm-generic/fcntl.h when defining
@@ -27,16 +25,37 @@
27#define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK) 25#define EFD_SHARED_FCNTL_FLAGS (O_CLOEXEC | O_NONBLOCK)
28#define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE) 26#define EFD_FLAGS_SET (EFD_SHARED_FCNTL_FLAGS | EFD_SEMAPHORE)
29 27
28#ifdef CONFIG_EVENTFD
29
30struct eventfd_ctx *eventfd_ctx_get(struct eventfd_ctx *ctx);
31void eventfd_ctx_put(struct eventfd_ctx *ctx);
30struct file *eventfd_fget(int fd); 32struct file *eventfd_fget(int fd);
31int eventfd_signal(struct file *file, int n); 33struct eventfd_ctx *eventfd_ctx_fdget(int fd);
34struct eventfd_ctx *eventfd_ctx_fileget(struct file *file);
35int eventfd_signal(struct eventfd_ctx *ctx, int n);
32 36
33#else /* CONFIG_EVENTFD */ 37#else /* CONFIG_EVENTFD */
34 38
35#define eventfd_fget(fd) ERR_PTR(-ENOSYS) 39/*
36static inline int eventfd_signal(struct file *file, int n) 40 * Ugly ugly ugly error layer to support modules that uses eventfd but
37{ return 0; } 41 * pretend to work in !CONFIG_EVENTFD configurations. Namely, AIO.
42 */
43static inline struct eventfd_ctx *eventfd_ctx_fdget(int fd)
44{
45 return ERR_PTR(-ENOSYS);
46}
47
48static inline int eventfd_signal(struct eventfd_ctx *ctx, int n)
49{
50 return -ENOSYS;
51}
52
53static inline void eventfd_ctx_put(struct eventfd_ctx *ctx)
54{
55
56}
38 57
39#endif /* CONFIG_EVENTFD */ 58#endif
40 59
41#endif /* _LINUX_EVENTFD_H */ 60#endif /* _LINUX_EVENTFD_H */
42 61
diff --git a/include/linux/fb.h b/include/linux/fb.h
index dd68358996b7..f847df9e99b6 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -819,6 +819,7 @@ struct fb_info {
819 int node; 819 int node;
820 int flags; 820 int flags;
821 struct mutex lock; /* Lock for open/release/ioctl funcs */ 821 struct mutex lock; /* Lock for open/release/ioctl funcs */
822 struct mutex mm_lock; /* Lock for fb_mmap and smem_* fields */
822 struct fb_var_screeninfo var; /* Current var */ 823 struct fb_var_screeninfo var; /* Current var */
823 struct fb_fix_screeninfo fix; /* Current fix */ 824 struct fb_fix_screeninfo fix; /* Current fix */
824 struct fb_monspecs monspecs; /* Current Monitor specs */ 825 struct fb_monspecs monspecs; /* Current Monitor specs */
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 44848aa830dc..6c3de999fb34 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -280,7 +280,7 @@ static inline void __fsnotify_update_dcache_flags(struct dentry *dentry)
280 assert_spin_locked(&dentry->d_lock); 280 assert_spin_locked(&dentry->d_lock);
281 281
282 parent = dentry->d_parent; 282 parent = dentry->d_parent;
283 if (fsnotify_inode_watches_children(parent->d_inode)) 283 if (parent->d_inode && fsnotify_inode_watches_children(parent->d_inode))
284 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED; 284 dentry->d_flags |= DCACHE_FSNOTIFY_PARENT_WATCHED;
285 else 285 else
286 dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED; 286 dentry->d_flags &= ~DCACHE_FSNOTIFY_PARENT_WATCHED;
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index d41ed593f79f..cf593bf9fd32 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -25,6 +25,11 @@
25 * - add IOCTL message 25 * - add IOCTL message
26 * - add unsolicited notification support 26 * - add unsolicited notification support
27 * - add POLL message and NOTIFY_POLL notification 27 * - add POLL message and NOTIFY_POLL notification
28 *
29 * 7.12
30 * - add umask flag to input argument of open, mknod and mkdir
31 * - add notification messages for invalidation of inodes and
32 * directory entries
28 */ 33 */
29 34
30#ifndef _LINUX_FUSE_H 35#ifndef _LINUX_FUSE_H
@@ -36,7 +41,7 @@
36#define FUSE_KERNEL_VERSION 7 41#define FUSE_KERNEL_VERSION 7
37 42
38/** Minor version number of this interface */ 43/** Minor version number of this interface */
39#define FUSE_KERNEL_MINOR_VERSION 11 44#define FUSE_KERNEL_MINOR_VERSION 12
40 45
41/** The node ID of the root inode */ 46/** The node ID of the root inode */
42#define FUSE_ROOT_ID 1 47#define FUSE_ROOT_ID 1
@@ -112,6 +117,7 @@ struct fuse_file_lock {
112 * INIT request/reply flags 117 * INIT request/reply flags
113 * 118 *
114 * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." 119 * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".."
120 * FUSE_DONT_MASK: don't apply umask to file mode on create operations
115 */ 121 */
116#define FUSE_ASYNC_READ (1 << 0) 122#define FUSE_ASYNC_READ (1 << 0)
117#define FUSE_POSIX_LOCKS (1 << 1) 123#define FUSE_POSIX_LOCKS (1 << 1)
@@ -119,6 +125,7 @@ struct fuse_file_lock {
119#define FUSE_ATOMIC_O_TRUNC (1 << 3) 125#define FUSE_ATOMIC_O_TRUNC (1 << 3)
120#define FUSE_EXPORT_SUPPORT (1 << 4) 126#define FUSE_EXPORT_SUPPORT (1 << 4)
121#define FUSE_BIG_WRITES (1 << 5) 127#define FUSE_BIG_WRITES (1 << 5)
128#define FUSE_DONT_MASK (1 << 6)
122 129
123/** 130/**
124 * CUSE INIT request/reply flags 131 * CUSE INIT request/reply flags
@@ -224,6 +231,8 @@ enum fuse_opcode {
224 231
225enum fuse_notify_code { 232enum fuse_notify_code {
226 FUSE_NOTIFY_POLL = 1, 233 FUSE_NOTIFY_POLL = 1,
234 FUSE_NOTIFY_INVAL_INODE = 2,
235 FUSE_NOTIFY_INVAL_ENTRY = 3,
227 FUSE_NOTIFY_CODE_MAX, 236 FUSE_NOTIFY_CODE_MAX,
228}; 237};
229 238
@@ -262,14 +271,18 @@ struct fuse_attr_out {
262 struct fuse_attr attr; 271 struct fuse_attr attr;
263}; 272};
264 273
274#define FUSE_COMPAT_MKNOD_IN_SIZE 8
275
265struct fuse_mknod_in { 276struct fuse_mknod_in {
266 __u32 mode; 277 __u32 mode;
267 __u32 rdev; 278 __u32 rdev;
279 __u32 umask;
280 __u32 padding;
268}; 281};
269 282
270struct fuse_mkdir_in { 283struct fuse_mkdir_in {
271 __u32 mode; 284 __u32 mode;
272 __u32 padding; 285 __u32 umask;
273}; 286};
274 287
275struct fuse_rename_in { 288struct fuse_rename_in {
@@ -301,7 +314,14 @@ struct fuse_setattr_in {
301 314
302struct fuse_open_in { 315struct fuse_open_in {
303 __u32 flags; 316 __u32 flags;
317 __u32 unused;
318};
319
320struct fuse_create_in {
321 __u32 flags;
304 __u32 mode; 322 __u32 mode;
323 __u32 umask;
324 __u32 padding;
305}; 325};
306 326
307struct fuse_open_out { 327struct fuse_open_out {
@@ -508,4 +528,16 @@ struct fuse_dirent {
508#define FUSE_DIRENT_SIZE(d) \ 528#define FUSE_DIRENT_SIZE(d) \
509 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 529 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
510 530
531struct fuse_notify_inval_inode_out {
532 __u64 ino;
533 __s64 off;
534 __s64 len;
535};
536
537struct fuse_notify_inval_entry_out {
538 __u64 parent;
539 __u32 namelen;
540 __u32 padding;
541};
542
511#endif /* _LINUX_FUSE_H */ 543#endif /* _LINUX_FUSE_H */
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 7400900de94a..54648e625efd 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -21,6 +21,7 @@
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/wait.h> 22#include <linux/wait.h>
23#include <linux/percpu.h> 23#include <linux/percpu.h>
24#include <linux/timer.h>
24 25
25 26
26struct hrtimer_clock_base; 27struct hrtimer_clock_base;
@@ -447,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
447 448
448static inline void timer_stats_account_hrtimer(struct hrtimer *timer) 449static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
449{ 450{
451 if (likely(!timer->start_pid))
452 return;
450 timer_stats_update_stats(timer, timer->start_pid, timer->start_site, 453 timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
451 timer->function, timer->start_comm, 0); 454 timer->function, timer->start_comm, 0);
452} 455}
@@ -456,6 +459,8 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
456 459
457static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) 460static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
458{ 461{
462 if (likely(!timer_stats_active))
463 return;
459 __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); 464 __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0));
460} 465}
461 466
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 95c6e00a72e8..edc93a6d931d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1062,7 +1062,6 @@ int generic_ide_ioctl(ide_drive_t *, struct block_device *, unsigned, unsigned l
1062extern int ide_vlb_clk; 1062extern int ide_vlb_clk;
1063extern int ide_pci_clk; 1063extern int ide_pci_clk;
1064 1064
1065unsigned int ide_rq_bytes(struct request *);
1066int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int); 1065int ide_end_rq(ide_drive_t *, struct request *, int, unsigned int);
1067void ide_kill_rq(ide_drive_t *, struct request *); 1066void ide_kill_rq(ide_drive_t *, struct request *);
1068 1067
@@ -1361,7 +1360,6 @@ int ide_in_drive_list(u16 *, const struct drive_list_entry *);
1361#ifdef CONFIG_BLK_DEV_IDEDMA 1360#ifdef CONFIG_BLK_DEV_IDEDMA
1362int ide_dma_good_drive(ide_drive_t *); 1361int ide_dma_good_drive(ide_drive_t *);
1363int __ide_dma_bad_drive(ide_drive_t *); 1362int __ide_dma_bad_drive(ide_drive_t *);
1364int ide_id_dma_bug(ide_drive_t *);
1365 1363
1366u8 ide_find_dma_mode(ide_drive_t *, u8); 1364u8 ide_find_dma_mode(ide_drive_t *, u8);
1367 1365
@@ -1402,7 +1400,6 @@ void ide_dma_lost_irq(ide_drive_t *);
1402ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int); 1400ide_startstop_t ide_dma_timeout_retry(ide_drive_t *, int);
1403 1401
1404#else 1402#else
1405static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; }
1406static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } 1403static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; }
1407static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } 1404static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; }
1408static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; } 1405static inline void ide_dma_off_quietly(ide_drive_t *drive) { ; }
@@ -1422,6 +1419,7 @@ static inline void ide_dma_unmap_sg(ide_drive_t *drive,
1422 1419
1423#ifdef CONFIG_BLK_DEV_IDEACPI 1420#ifdef CONFIG_BLK_DEV_IDEACPI
1424int ide_acpi_init(void); 1421int ide_acpi_init(void);
1422bool ide_port_acpi(ide_hwif_t *hwif);
1425extern int ide_acpi_exec_tfs(ide_drive_t *drive); 1423extern int ide_acpi_exec_tfs(ide_drive_t *drive);
1426extern void ide_acpi_get_timing(ide_hwif_t *hwif); 1424extern void ide_acpi_get_timing(ide_hwif_t *hwif);
1427extern void ide_acpi_push_timing(ide_hwif_t *hwif); 1425extern void ide_acpi_push_timing(ide_hwif_t *hwif);
@@ -1430,6 +1428,7 @@ void ide_acpi_port_init_devices(ide_hwif_t *);
1430extern void ide_acpi_set_state(ide_hwif_t *hwif, int on); 1428extern void ide_acpi_set_state(ide_hwif_t *hwif, int on);
1431#else 1429#else
1432static inline int ide_acpi_init(void) { return 0; } 1430static inline int ide_acpi_init(void) { return 0; }
1431static inline bool ide_port_acpi(ide_hwif_t *hwif) { return 0; }
1433static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; } 1432static inline int ide_acpi_exec_tfs(ide_drive_t *drive) { return 0; }
1434static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; } 1433static inline void ide_acpi_get_timing(ide_hwif_t *hwif) { ; }
1435static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; } 1434static inline void ide_acpi_push_timing(ide_hwif_t *hwif) { ; }
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index a9173d5434d1..23343ab0bb03 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1196,6 +1196,10 @@ enum ieee80211_sa_query_action {
1196#define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 1196#define WLAN_CIPHER_SUITE_WEP104 0x000FAC05
1197#define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 1197#define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
1198 1198
1199/* AKM suite selectors */
1200#define WLAN_AKM_SUITE_8021X 0x000FAC01
1201#define WLAN_AKM_SUITE_PSK 0x000FAC02
1202
1199#define WLAN_MAX_KEY_LEN 32 1203#define WLAN_MAX_KEY_LEN 32
1200 1204
1201/** 1205/**
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
index 70fdba2bbf71..580b6004d00e 100644
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -139,10 +139,10 @@ extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
139/* 139/*
140 * Display a 6 byte device address (MAC) in a readable format. 140 * Display a 6 byte device address (MAC) in a readable format.
141 */ 141 */
142extern char *print_mac(char *buf, const unsigned char *addr); 142extern char *print_mac(char *buf, const unsigned char *addr) __deprecated;
143#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" 143#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
144#define MAC_BUF_SIZE 18 144#define MAC_BUF_SIZE 18
145#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE] __maybe_unused 145#define DECLARE_MAC_BUF(var) char var[MAC_BUF_SIZE]
146 146
147#endif 147#endif
148 148
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
index 915ba5789f0e..3f5fd523b49d 100644
--- a/include/linux/if_tun.h
+++ b/include/linux/if_tun.h
@@ -62,6 +62,7 @@
62#define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */ 62#define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */
63#define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */ 63#define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */
64#define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */ 64#define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */
65#define TUN_F_UFO 0x10 /* I can handle UFO packets */
65 66
66/* Protocol info prepended to the packets (when IFF_NO_PI is not set) */ 67/* Protocol info prepended to the packets (when IFF_NO_PI is not set) */
67#define TUN_PKT_STRIP 0x0001 68#define TUN_PKT_STRIP 0x0001
diff --git a/include/linux/ima.h b/include/linux/ima.h
index b1b827d091a9..0e3f2a4c25f6 100644
--- a/include/linux/ima.h
+++ b/include/linux/ima.h
@@ -24,6 +24,7 @@ extern int ima_path_check(struct path *path, int mask, int update_counts);
24extern void ima_file_free(struct file *file); 24extern void ima_file_free(struct file *file);
25extern int ima_file_mmap(struct file *file, unsigned long prot); 25extern int ima_file_mmap(struct file *file, unsigned long prot);
26extern void ima_counts_get(struct file *file); 26extern void ima_counts_get(struct file *file);
27extern void ima_counts_put(struct path *path, int mask);
27 28
28#else 29#else
29static inline int ima_bprm_check(struct linux_binprm *bprm) 30static inline int ima_bprm_check(struct linux_binprm *bprm)
@@ -60,5 +61,10 @@ static inline void ima_counts_get(struct file *file)
60{ 61{
61 return; 62 return;
62} 63}
64
65static inline void ima_counts_put(struct path *path, int mask)
66{
67 return;
68}
63#endif /* CONFIG_IMA_H */ 69#endif /* CONFIG_IMA_H */
64#endif /* _LINUX_IMA_H */ 70#endif /* _LINUX_IMA_H */
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 5368fbdc7801..7fc01b13be43 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -183,5 +183,8 @@ extern struct cred init_cred;
183 LIST_HEAD_INIT(cpu_timers[2]), \ 183 LIST_HEAD_INIT(cpu_timers[2]), \
184} 184}
185 185
186/* Attach to the init_task data structure for proper alignment */
187#define __init_task_data __attribute__((__section__(".data.init_task")))
188
186 189
187#endif 190#endif
diff --git a/include/linux/isdn/hdlc.h b/include/linux/isdn/hdlc.h
new file mode 100644
index 000000000000..4b3ecc40889a
--- /dev/null
+++ b/include/linux/isdn/hdlc.h
@@ -0,0 +1,82 @@
1/*
2 * hdlc.h -- General purpose ISDN HDLC decoder.
3 *
4 * Implementation of a HDLC decoder/encoder in software.
5 * Neccessary because some ISDN devices don't have HDLC
6 * controllers.
7 *
8 * Copyright (C)
9 * 2009 Karsten Keil <keil@b1-systems.de>
10 * 2002 Wolfgang Mües <wolfgang@iksw-muees.de>
11 * 2001 Frode Isaksen <fisaksen@bewan.com>
12 * 2001 Kai Germaschewski <kai.germaschewski@gmx.de>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */
28
29#ifndef __ISDNHDLC_H__
30#define __ISDNHDLC_H__
31
32struct isdnhdlc_vars {
33 int bit_shift;
34 int hdlc_bits1;
35 int data_bits;
36 int ffbit_shift; /* encoding only */
37 int state;
38 int dstpos;
39
40 u16 crc;
41
42 u8 cbin;
43 u8 shift_reg;
44 u8 ffvalue;
45
46 /* set if transferring data */
47 u32 data_received:1;
48 /* set if D channel (send idle instead of flags) */
49 u32 dchannel:1;
50 /* set if 56K adaptation */
51 u32 do_adapt56:1;
52 /* set if in closing phase (need to send CRC + flag) */
53 u32 do_closing:1;
54 /* set if data is bitreverse */
55 u32 do_bitreverse:1;
56};
57
58/* Feature Flags */
59#define HDLC_56KBIT 0x01
60#define HDLC_DCHANNEL 0x02
61#define HDLC_BITREVERSE 0x04
62
63/*
64 The return value from isdnhdlc_decode is
65 the frame length, 0 if no complete frame was decoded,
66 or a negative error number
67*/
68#define HDLC_FRAMING_ERROR 1
69#define HDLC_CRC_ERROR 2
70#define HDLC_LENGTH_ERROR 3
71
72extern void isdnhdlc_rcv_init(struct isdnhdlc_vars *hdlc, u32 features);
73
74extern int isdnhdlc_decode(struct isdnhdlc_vars *hdlc, const u8 *src,
75 int slen, int *count, u8 *dst, int dsize);
76
77extern void isdnhdlc_out_init(struct isdnhdlc_vars *hdlc, u32 features);
78
79extern int isdnhdlc_encode(struct isdnhdlc_vars *hdlc, const u8 *src,
80 u16 slen, int *count, u8 *dst, int dsize);
81
82#endif /* __ISDNHDLC_H__ */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index fac104e7186a..d6320a3e8def 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -303,6 +303,7 @@ extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in
303extern int panic_timeout; 303extern int panic_timeout;
304extern int panic_on_oops; 304extern int panic_on_oops;
305extern int panic_on_unrecovered_nmi; 305extern int panic_on_unrecovered_nmi;
306extern int panic_on_io_nmi;
306extern const char *print_tainted(void); 307extern const char *print_tainted(void);
307extern void add_taint(unsigned flag); 308extern void add_taint(unsigned flag);
308extern int test_taint(unsigned flag); 309extern int test_taint(unsigned flag);
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index aacc5449f586..16713dc672e4 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -125,6 +125,7 @@ struct kvm_kernel_irq_routing_entry {
125struct kvm { 125struct kvm {
126 struct mutex lock; /* protects the vcpus array and APIC accesses */ 126 struct mutex lock; /* protects the vcpus array and APIC accesses */
127 spinlock_t mmu_lock; 127 spinlock_t mmu_lock;
128 spinlock_t requests_lock;
128 struct rw_semaphore slots_lock; 129 struct rw_semaphore slots_lock;
129 struct mm_struct *mm; /* userspace tied to this vm */ 130 struct mm_struct *mm; /* userspace tied to this vm */
130 int nmemslots; 131 int nmemslots;
diff --git a/include/linux/leds-lp3944.h b/include/linux/leds-lp3944.h
new file mode 100644
index 000000000000..afc9f9fd70f5
--- /dev/null
+++ b/include/linux/leds-lp3944.h
@@ -0,0 +1,53 @@
1/*
2 * leds-lp3944.h - platform data structure for lp3944 led controller
3 *
4 * Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#ifndef __LINUX_LEDS_LP3944_H
13#define __LINUX_LEDS_LP3944_H
14
15#include <linux/leds.h>
16#include <linux/workqueue.h>
17
18#define LP3944_LED0 0
19#define LP3944_LED1 1
20#define LP3944_LED2 2
21#define LP3944_LED3 3
22#define LP3944_LED4 4
23#define LP3944_LED5 5
24#define LP3944_LED6 6
25#define LP3944_LED7 7
26#define LP3944_LEDS_MAX 8
27
28#define LP3944_LED_STATUS_MASK 0x03
29enum lp3944_status {
30 LP3944_LED_STATUS_OFF = 0x0,
31 LP3944_LED_STATUS_ON = 0x1,
32 LP3944_LED_STATUS_DIM0 = 0x2,
33 LP3944_LED_STATUS_DIM1 = 0x3
34};
35
36enum lp3944_type {
37 LP3944_LED_TYPE_NONE,
38 LP3944_LED_TYPE_LED,
39 LP3944_LED_TYPE_LED_INVERTED,
40};
41
42struct lp3944_led {
43 char *name;
44 enum lp3944_type type;
45 enum lp3944_status status;
46};
47
48struct lp3944_platform_data {
49 struct lp3944_led leds[LP3944_LEDS_MAX];
50 u8 leds_size;
51};
52
53#endif /* __LINUX_LEDS_LP3944_H */
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 376fe07732ea..d8bf9665e70c 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -45,7 +45,10 @@ struct led_classdev {
45 /* Get LED brightness level */ 45 /* Get LED brightness level */
46 enum led_brightness (*brightness_get)(struct led_classdev *led_cdev); 46 enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
47 47
48 /* Activate hardware accelerated blink */ 48 /* Activate hardware accelerated blink, delays are in
49 * miliseconds and if none is provided then a sensible default
50 * should be chosen. The call can adjust the timings if it can't
51 * match the values specified exactly. */
49 int (*blink_set)(struct led_classdev *led_cdev, 52 int (*blink_set)(struct led_classdev *led_cdev,
50 unsigned long *delay_on, 53 unsigned long *delay_on,
51 unsigned long *delay_off); 54 unsigned long *delay_off);
@@ -141,9 +144,14 @@ struct gpio_led {
141 const char *name; 144 const char *name;
142 const char *default_trigger; 145 const char *default_trigger;
143 unsigned gpio; 146 unsigned gpio;
144 u8 active_low : 1; 147 unsigned active_low : 1;
145 u8 retain_state_suspended : 1; 148 unsigned retain_state_suspended : 1;
149 unsigned default_state : 2;
150 /* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */
146}; 151};
152#define LEDS_GPIO_DEFSTATE_OFF 0
153#define LEDS_GPIO_DEFSTATE_ON 1
154#define LEDS_GPIO_DEFSTATE_KEEP 2
147 155
148struct gpio_led_platform_data { 156struct gpio_led_platform_data {
149 int num_leds; 157 int num_leds;
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index fee9e59649c1..691f59171c6c 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -22,6 +22,15 @@
22#define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) 22#define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE)
23 23
24/* 24/*
25 * For assembly routines.
26 *
27 * Note when using these that you must specify the appropriate
28 * alignment directives yourself
29 */
30#define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw"
31#define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw"
32
33/*
25 * This is used by architectures to keep arguments on the stack 34 * This is used by architectures to keep arguments on the stack
26 * untouched by the compiler by keeping them live until the end. 35 * untouched by the compiler by keeping them live until the end.
27 * The argument stack may be owned by the assembly-language 36 * The argument stack may be owned by the assembly-language
diff --git a/include/linux/mISDNhw.h b/include/linux/mISDNhw.h
index 7f9831da847f..4af841408fb5 100644
--- a/include/linux/mISDNhw.h
+++ b/include/linux/mISDNhw.h
@@ -168,6 +168,7 @@ struct bchannel {
168extern int mISDN_initdchannel(struct dchannel *, int, void *); 168extern int mISDN_initdchannel(struct dchannel *, int, void *);
169extern int mISDN_initbchannel(struct bchannel *, int); 169extern int mISDN_initbchannel(struct bchannel *, int);
170extern int mISDN_freedchannel(struct dchannel *); 170extern int mISDN_freedchannel(struct dchannel *);
171extern void mISDN_clear_bchannel(struct bchannel *);
171extern int mISDN_freebchannel(struct bchannel *); 172extern int mISDN_freebchannel(struct bchannel *);
172extern void queue_ch_frame(struct mISDNchannel *, u_int, 173extern void queue_ch_frame(struct mISDNchannel *, u_int,
173 int, struct sk_buff *); 174 int, struct sk_buff *);
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h
index 45100b39a7cf..536ca12442ca 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -37,7 +37,7 @@
37 */ 37 */
38#define MISDN_MAJOR_VERSION 1 38#define MISDN_MAJOR_VERSION 1
39#define MISDN_MINOR_VERSION 1 39#define MISDN_MINOR_VERSION 1
40#define MISDN_RELEASE 20 40#define MISDN_RELEASE 21
41 41
42/* primitives for information exchange 42/* primitives for information exchange
43 * generell format 43 * generell format
@@ -153,6 +153,18 @@
153#define HFC_VOL_CHANGE_RX 0x2602 153#define HFC_VOL_CHANGE_RX 0x2602
154#define HFC_SPL_LOOP_ON 0x2603 154#define HFC_SPL_LOOP_ON 0x2603
155#define HFC_SPL_LOOP_OFF 0x2604 155#define HFC_SPL_LOOP_OFF 0x2604
156/* for T30 FAX and analog modem */
157#define HW_MOD_FRM 0x4000
158#define HW_MOD_FRH 0x4001
159#define HW_MOD_FTM 0x4002
160#define HW_MOD_FTH 0x4003
161#define HW_MOD_FTS 0x4004
162#define HW_MOD_CONNECT 0x4010
163#define HW_MOD_OK 0x4011
164#define HW_MOD_NOCARR 0x4012
165#define HW_MOD_FCERROR 0x4013
166#define HW_MOD_READY 0x4014
167#define HW_MOD_LASTDATA 0x4015
156 168
157/* DSP_TONE_PATT_ON parameter */ 169/* DSP_TONE_PATT_ON parameter */
158#define TONE_OFF 0x0000 170#define TONE_OFF 0x0000
@@ -224,6 +236,8 @@
224#define ISDN_P_B_L2DTMF 0x24 236#define ISDN_P_B_L2DTMF 0x24
225#define ISDN_P_B_L2DSP 0x25 237#define ISDN_P_B_L2DSP 0x25
226#define ISDN_P_B_L2DSPHDLC 0x26 238#define ISDN_P_B_L2DSPHDLC 0x26
239#define ISDN_P_B_T30_FAX 0x27
240#define ISDN_P_B_MODEM_ASYNC 0x28
227 241
228#define OPTION_L2_PMX 1 242#define OPTION_L2_PMX 1
229#define OPTION_L2_PTP 2 243#define OPTION_L2_PTP 2
diff --git a/include/linux/mm.h b/include/linux/mm.h
index d006e93d5c93..ba3a7cb1eaa0 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -826,7 +826,7 @@ extern int make_pages_present(unsigned long addr, unsigned long end);
826extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write); 826extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
827 827
828int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, 828int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
829 unsigned long start, int len, int write, int force, 829 unsigned long start, int nr_pages, int write, int force,
830 struct page **pages, struct vm_area_struct **vmas); 830 struct page **pages, struct vm_area_struct **vmas);
831int get_user_pages_fast(unsigned long start, int nr_pages, int write, 831int get_user_pages_fast(unsigned long start, int nr_pages, int write,
832 struct page **pages); 832 struct page **pages);
diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
index 39751c8cde9c..2dbfb5a05994 100644
--- a/include/linux/mmc/sdio_ids.h
+++ b/include/linux/mmc/sdio_ids.h
@@ -22,6 +22,12 @@
22/* 22/*
23 * Vendors and devices. Sort key: vendor first, device next. 23 * Vendors and devices. Sort key: vendor first, device next.
24 */ 24 */
25#define SDIO_VENDOR_ID_INTEL 0x0089
26#define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX 0x1402
27#define SDIO_DEVICE_ID_INTEL_IWMC3200WIFI 0x1403
28#define SDIO_DEVICE_ID_INTEL_IWMC3200TOP 0x1404
29#define SDIO_DEVICE_ID_INTEL_IWMC3200GPS 0x1405
30#define SDIO_DEVICE_ID_INTEL_IWMC3200BT 0x1406
25 31
26#define SDIO_VENDOR_ID_MARVELL 0x02df 32#define SDIO_VENDOR_ID_MARVELL 0x02df
27#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103 33#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103
diff --git a/include/linux/net_dropmon.h b/include/linux/net_dropmon.h
index 3ceb0cc1bc78..2a739462caeb 100644
--- a/include/linux/net_dropmon.h
+++ b/include/linux/net_dropmon.h
@@ -3,7 +3,6 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/netlink.h> 5#include <linux/netlink.h>
6#include <linux/types.h>
7 6
8struct net_dm_drop_point { 7struct net_dm_drop_point {
9 __u8 pc[8]; 8 __u8 pc[8];
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d4a4d9867794..9f25ab2899de 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -72,10 +72,6 @@ struct wireless_dev;
72/* Backlog congestion levels */ 72/* Backlog congestion levels */
73#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ 73#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
74#define NET_RX_DROP 1 /* packet dropped */ 74#define NET_RX_DROP 1 /* packet dropped */
75#define NET_RX_CN_LOW 2 /* storm alert, just in case */
76#define NET_RX_CN_MOD 3 /* Storm on its way! */
77#define NET_RX_CN_HIGH 4 /* The storm is here */
78#define NET_RX_BAD 5 /* packet dropped due to kernel error */
79 75
80/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It 76/* NET_XMIT_CN is special. It does not guarantee that this packet is lost. It
81 * indicates that the device will soon be dropping packets, or already drops 77 * indicates that the device will soon be dropping packets, or already drops
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index dbea93b694e5..962e2232a074 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -242,6 +242,26 @@
242 * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is 242 * @NL80211_CMD_LEAVE_IBSS: Leave the IBSS -- no special arguments, the IBSS is
243 * determined by the network interface. 243 * determined by the network interface.
244 * 244 *
245 * @NL80211_CMD_TESTMODE: testmode command, takes a wiphy (or ifindex) attribute
246 * to identify the device, and the TESTDATA blob attribute to pass through
247 * to the driver.
248 *
249 * @NL80211_CMD_CONNECT: connection request and notification; this command
250 * requests to connect to a specified network but without separating
251 * auth and assoc steps. For this, you need to specify the SSID in a
252 * %NL80211_ATTR_SSID attribute, and can optionally specify the association
253 * IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
254 * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT.
255 * It is also sent as an event, with the BSSID and response IEs when the
256 * connection is established or failed to be established. This can be
257 * determined by the STATUS_CODE attribute.
258 * @NL80211_CMD_ROAM: request that the card roam (currently not implemented),
259 * sent as an event when the card/driver roamed by itself.
260 * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify
261 * userspace that a connection was dropped by the AP or due to other
262 * reasons, for this the %NL80211_ATTR_DISCONNECTED_BY_AP and
263 * %NL80211_ATTR_REASON_CODE attributes are used.
264 *
245 * @NL80211_CMD_MAX: highest used command number 265 * @NL80211_CMD_MAX: highest used command number
246 * @__NL80211_CMD_AFTER_LAST: internal use 266 * @__NL80211_CMD_AFTER_LAST: internal use
247 */ 267 */
@@ -310,6 +330,12 @@ enum nl80211_commands {
310 NL80211_CMD_JOIN_IBSS, 330 NL80211_CMD_JOIN_IBSS,
311 NL80211_CMD_LEAVE_IBSS, 331 NL80211_CMD_LEAVE_IBSS,
312 332
333 NL80211_CMD_TESTMODE,
334
335 NL80211_CMD_CONNECT,
336 NL80211_CMD_ROAM,
337 NL80211_CMD_DISCONNECT,
338
313 /* add new commands above here */ 339 /* add new commands above here */
314 340
315 /* used to define NL80211_CMD_MAX below */ 341 /* used to define NL80211_CMD_MAX below */
@@ -511,6 +537,42 @@ enum nl80211_commands {
511 * authorized by user space. Otherwise, port is marked authorized by 537 * authorized by user space. Otherwise, port is marked authorized by
512 * default in station mode. 538 * default in station mode.
513 * 539 *
540 * @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
541 * We recommend using nested, driver-specific attributes within this.
542 *
543 * @NL80211_ATTR_DISCONNECTED_BY_AP: A flag indicating that the DISCONNECT
544 * event was due to the AP disconnecting the station, and not due to
545 * a local disconnect request.
546 * @NL80211_ATTR_STATUS_CODE: StatusCode for the %NL80211_CMD_CONNECT
547 * event (u16)
548 * @NL80211_ATTR_PRIVACY: Flag attribute, used with connect(), indicating
549 * that protected APs should be used.
550 *
551 * @NL80211_ATTR_CIPHERS_PAIRWISE: Used with CONNECT and ASSOCIATE to
552 * indicate which unicast key ciphers will be used with the connection
553 * (an array of u32).
554 * @NL80211_ATTR_CIPHER_GROUP: Used with CONNECT and ASSOCIATE to indicate
555 * which group key cipher will be used with the connection (a u32).
556 * @NL80211_ATTR_WPA_VERSIONS: Used with CONNECT and ASSOCIATE to indicate
557 * which WPA version(s) the AP we want to associate with is using
558 * (a u32 with flags from &enum nl80211_wpa_versions).
559 * @NL80211_ATTR_AKM_SUITES: Used with CONNECT and ASSOCIATE to indicate
560 * which key management algorithm(s) to use (an array of u32).
561 *
562 * @NL80211_ATTR_REQ_IE: (Re)association request information elements as
563 * sent out by the card, for ROAM and successful CONNECT events.
564 * @NL80211_ATTR_RESP_IE: (Re)association response information elements as
565 * sent by peer, for ROAM and successful CONNECT events.
566 *
567 * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE
568 * commands to specify using a reassociate frame
569 *
570 * @NL80211_ATTR_KEY: key information in a nested attribute with
571 * %NL80211_KEY_* sub-attributes
572 * @NL80211_ATTR_KEYS: array of keys for static WEP keys for connect()
573 * and join_ibss(), key information is in a nested attribute each
574 * with %NL80211_KEY_* sub-attributes
575 *
514 * @NL80211_ATTR_MAX: highest attribute number currently defined 576 * @NL80211_ATTR_MAX: highest attribute number currently defined
515 * @__NL80211_ATTR_AFTER_LAST: internal use 577 * @__NL80211_ATTR_AFTER_LAST: internal use
516 */ 578 */
@@ -619,6 +681,26 @@ enum nl80211_attrs {
619 681
620 NL80211_ATTR_CONTROL_PORT, 682 NL80211_ATTR_CONTROL_PORT,
621 683
684 NL80211_ATTR_TESTDATA,
685
686 NL80211_ATTR_PRIVACY,
687
688 NL80211_ATTR_DISCONNECTED_BY_AP,
689 NL80211_ATTR_STATUS_CODE,
690
691 NL80211_ATTR_CIPHER_SUITES_PAIRWISE,
692 NL80211_ATTR_CIPHER_SUITE_GROUP,
693 NL80211_ATTR_WPA_VERSIONS,
694 NL80211_ATTR_AKM_SUITES,
695
696 NL80211_ATTR_REQ_IE,
697 NL80211_ATTR_RESP_IE,
698
699 NL80211_ATTR_PREV_BSSID,
700
701 NL80211_ATTR_KEY,
702 NL80211_ATTR_KEYS,
703
622 /* add attributes here, update the policy in nl80211.c */ 704 /* add attributes here, update the policy in nl80211.c */
623 705
624 __NL80211_ATTR_AFTER_LAST, 706 __NL80211_ATTR_AFTER_LAST,
@@ -629,6 +711,7 @@ enum nl80211_attrs {
629 * Allow user space programs to use #ifdef on new attributes by defining them 711 * Allow user space programs to use #ifdef on new attributes by defining them
630 * here 712 * here
631 */ 713 */
714#define NL80211_CMD_CONNECT NL80211_CMD_CONNECT
632#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY 715#define NL80211_ATTR_HT_CAPABILITY NL80211_ATTR_HT_CAPABILITY
633#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES 716#define NL80211_ATTR_BSS_BASIC_RATES NL80211_ATTR_BSS_BASIC_RATES
634#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS 717#define NL80211_ATTR_WIPHY_TXQ_PARAMS NL80211_ATTR_WIPHY_TXQ_PARAMS
@@ -642,6 +725,12 @@ enum nl80211_attrs {
642#define NL80211_ATTR_SSID NL80211_ATTR_SSID 725#define NL80211_ATTR_SSID NL80211_ATTR_SSID
643#define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE 726#define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE
644#define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE 727#define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE
728#define NL80211_ATTR_CIPHER_SUITES_PAIRWISE NL80211_ATTR_CIPHER_SUITES_PAIRWISE
729#define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP
730#define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS
731#define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES
732#define NL80211_ATTR_KEY NL80211_ATTR_KEY
733#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
645 734
646#define NL80211_MAX_SUPP_RATES 32 735#define NL80211_MAX_SUPP_RATES 32
647#define NL80211_MAX_SUPP_REG_RULES 32 736#define NL80211_MAX_SUPP_REG_RULES 32
@@ -650,6 +739,9 @@ enum nl80211_attrs {
650#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24 739#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
651#define NL80211_HT_CAPABILITY_LEN 26 740#define NL80211_HT_CAPABILITY_LEN 26
652 741
742#define NL80211_MAX_NR_CIPHER_SUITES 5
743#define NL80211_MAX_NR_AKM_SUITES 2
744
653/** 745/**
654 * enum nl80211_iftype - (virtual) interface types 746 * enum nl80211_iftype - (virtual) interface types
655 * 747 *
@@ -1168,6 +1260,7 @@ enum nl80211_channel_type {
1168 * in mBm (100 * dBm) (s32) 1260 * in mBm (100 * dBm) (s32)
1169 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon 1261 * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon
1170 * in unspecified units, scaled to 0..100 (u8) 1262 * in unspecified units, scaled to 0..100 (u8)
1263 * @NL80211_BSS_STATUS: status, if this BSS is "used"
1171 * @__NL80211_BSS_AFTER_LAST: internal 1264 * @__NL80211_BSS_AFTER_LAST: internal
1172 * @NL80211_BSS_MAX: highest BSS attribute 1265 * @NL80211_BSS_MAX: highest BSS attribute
1173 */ 1266 */
@@ -1181,6 +1274,7 @@ enum nl80211_bss {
1181 NL80211_BSS_INFORMATION_ELEMENTS, 1274 NL80211_BSS_INFORMATION_ELEMENTS,
1182 NL80211_BSS_SIGNAL_MBM, 1275 NL80211_BSS_SIGNAL_MBM,
1183 NL80211_BSS_SIGNAL_UNSPEC, 1276 NL80211_BSS_SIGNAL_UNSPEC,
1277 NL80211_BSS_STATUS,
1184 1278
1185 /* keep last */ 1279 /* keep last */
1186 __NL80211_BSS_AFTER_LAST, 1280 __NL80211_BSS_AFTER_LAST,
@@ -1188,18 +1282,37 @@ enum nl80211_bss {
1188}; 1282};
1189 1283
1190/** 1284/**
1285 * enum nl80211_bss_status - BSS "status"
1286 */
1287enum nl80211_bss_status {
1288 NL80211_BSS_STATUS_AUTHENTICATED,
1289 NL80211_BSS_STATUS_ASSOCIATED,
1290 NL80211_BSS_STATUS_IBSS_JOINED,
1291};
1292
1293/**
1191 * enum nl80211_auth_type - AuthenticationType 1294 * enum nl80211_auth_type - AuthenticationType
1192 * 1295 *
1193 * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication 1296 * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication
1194 * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) 1297 * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
1195 * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) 1298 * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
1196 * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) 1299 * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
1300 * @__NL80211_AUTHTYPE_NUM: internal
1301 * @NL80211_AUTHTYPE_MAX: maximum valid auth algorithm
1302 * @NL80211_AUTHTYPE_AUTOMATIC: determine automatically (if necessary by
1303 * trying multiple times); this is invalid in netlink -- leave out
1304 * the attribute for this on CONNECT commands.
1197 */ 1305 */
1198enum nl80211_auth_type { 1306enum nl80211_auth_type {
1199 NL80211_AUTHTYPE_OPEN_SYSTEM, 1307 NL80211_AUTHTYPE_OPEN_SYSTEM,
1200 NL80211_AUTHTYPE_SHARED_KEY, 1308 NL80211_AUTHTYPE_SHARED_KEY,
1201 NL80211_AUTHTYPE_FT, 1309 NL80211_AUTHTYPE_FT,
1202 NL80211_AUTHTYPE_NETWORK_EAP, 1310 NL80211_AUTHTYPE_NETWORK_EAP,
1311
1312 /* keep last */
1313 __NL80211_AUTHTYPE_NUM,
1314 NL80211_AUTHTYPE_MAX = __NL80211_AUTHTYPE_NUM - 1,
1315 NL80211_AUTHTYPE_AUTOMATIC
1203}; 1316};
1204 1317
1205/** 1318/**
@@ -1224,4 +1337,39 @@ enum nl80211_mfp {
1224 NL80211_MFP_REQUIRED, 1337 NL80211_MFP_REQUIRED,
1225}; 1338};
1226 1339
1340enum nl80211_wpa_versions {
1341 NL80211_WPA_VERSION_1 = 1 << 0,
1342 NL80211_WPA_VERSION_2 = 1 << 1,
1343};
1344
1345/**
1346 * enum nl80211_key_attributes - key attributes
1347 * @__NL80211_KEY_INVALID: invalid
1348 * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of
1349 * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC
1350 * keys
1351 * @NL80211_KEY_IDX: key ID (u8, 0-3)
1352 * @NL80211_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11
1353 * section 7.3.2.25.1, e.g. 0x000FAC04)
1354 * @NL80211_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and
1355 * CCMP keys, each six bytes in little endian
1356 * @NL80211_KEY_DEFAULT: flag indicating default key
1357 * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key
1358 * @__NL80211_KEY_AFTER_LAST: internal
1359 * @NL80211_KEY_MAX: highest key attribute
1360 */
1361enum nl80211_key_attributes {
1362 __NL80211_KEY_INVALID,
1363 NL80211_KEY_DATA,
1364 NL80211_KEY_IDX,
1365 NL80211_KEY_CIPHER,
1366 NL80211_KEY_SEQ,
1367 NL80211_KEY_DEFAULT,
1368 NL80211_KEY_DEFAULT_MGMT,
1369
1370 /* keep last */
1371 __NL80211_KEY_AFTER_LAST,
1372 NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1
1373};
1374
1227#endif /* __LINUX_NL80211_H */ 1375#endif /* __LINUX_NL80211_H */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index a3b000365795..73b46b6b904f 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2645,6 +2645,7 @@
2645#define PCI_DEVICE_ID_NETMOS_9835 0x9835 2645#define PCI_DEVICE_ID_NETMOS_9835 0x9835
2646#define PCI_DEVICE_ID_NETMOS_9845 0x9845 2646#define PCI_DEVICE_ID_NETMOS_9845 0x9845
2647#define PCI_DEVICE_ID_NETMOS_9855 0x9855 2647#define PCI_DEVICE_ID_NETMOS_9855 0x9855
2648#define PCI_DEVICE_ID_NETMOS_9901 0x9901
2648 2649
2649#define PCI_VENDOR_ID_3COM_2 0xa727 2650#define PCI_VENDOR_ID_3COM_2 0xa727
2650 2651
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index 8f921d74f49f..68438e18fff4 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -24,7 +24,8 @@
24 24
25#define DEFINE_PER_CPU_SECTION(type, name, section) \ 25#define DEFINE_PER_CPU_SECTION(type, name, section) \
26 __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ 26 __attribute__((__section__(PER_CPU_BASE_SECTION section))) \
27 PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name 27 PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES \
28 __typeof__(type) per_cpu__##name
28 29
29/* 30/*
30 * Variant on the per-CPU variable declaration/definition theme used for 31 * Variant on the per-CPU variable declaration/definition theme used for
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 89698d8aba5c..5e970c7d3fd5 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -178,8 +178,10 @@ struct perf_counter_attr {
178 mmap : 1, /* include mmap data */ 178 mmap : 1, /* include mmap data */
179 comm : 1, /* include comm data */ 179 comm : 1, /* include comm data */
180 freq : 1, /* use freq, not period */ 180 freq : 1, /* use freq, not period */
181 inherit_stat : 1, /* per task counts */
182 enable_on_exec : 1, /* next exec enables */
181 183
182 __reserved_1 : 53; 184 __reserved_1 : 51;
183 185
184 __u32 wakeup_events; /* wakeup every n events */ 186 __u32 wakeup_events; /* wakeup every n events */
185 __u32 __reserved_2; 187 __u32 __reserved_2;
@@ -232,6 +234,14 @@ struct perf_counter_mmap_page {
232 __u32 lock; /* seqlock for synchronization */ 234 __u32 lock; /* seqlock for synchronization */
233 __u32 index; /* hardware counter identifier */ 235 __u32 index; /* hardware counter identifier */
234 __s64 offset; /* add to hardware counter value */ 236 __s64 offset; /* add to hardware counter value */
237 __u64 time_enabled; /* time counter active */
238 __u64 time_running; /* time counter on cpu */
239
240 /*
241 * Hole for extension of the self monitor capabilities
242 */
243
244 __u64 __reserved[123]; /* align to 1k */
235 245
236 /* 246 /*
237 * Control data for the mmap() data buffer. 247 * Control data for the mmap() data buffer.
@@ -253,7 +263,6 @@ struct perf_counter_mmap_page {
253#define PERF_EVENT_MISC_KERNEL (1 << 0) 263#define PERF_EVENT_MISC_KERNEL (1 << 0)
254#define PERF_EVENT_MISC_USER (2 << 0) 264#define PERF_EVENT_MISC_USER (2 << 0)
255#define PERF_EVENT_MISC_HYPERVISOR (3 << 0) 265#define PERF_EVENT_MISC_HYPERVISOR (3 << 0)
256#define PERF_EVENT_MISC_OVERFLOW (1 << 2)
257 266
258struct perf_event_header { 267struct perf_event_header {
259 __u32 type; 268 __u32 type;
@@ -327,9 +336,18 @@ enum perf_event_type {
327 PERF_EVENT_FORK = 7, 336 PERF_EVENT_FORK = 7,
328 337
329 /* 338 /*
330 * When header.misc & PERF_EVENT_MISC_OVERFLOW the event_type field 339 * struct {
331 * will be PERF_SAMPLE_* 340 * struct perf_event_header header;
332 * 341 * u32 pid, tid;
342 * u64 value;
343 * { u64 time_enabled; } && PERF_FORMAT_ENABLED
344 * { u64 time_running; } && PERF_FORMAT_RUNNING
345 * { u64 parent_id; } && PERF_FORMAT_ID
346 * };
347 */
348 PERF_EVENT_READ = 8,
349
350 /*
333 * struct { 351 * struct {
334 * struct perf_event_header header; 352 * struct perf_event_header header;
335 * 353 *
@@ -337,8 +355,9 @@ enum perf_event_type {
337 * { u32 pid, tid; } && PERF_SAMPLE_TID 355 * { u32 pid, tid; } && PERF_SAMPLE_TID
338 * { u64 time; } && PERF_SAMPLE_TIME 356 * { u64 time; } && PERF_SAMPLE_TIME
339 * { u64 addr; } && PERF_SAMPLE_ADDR 357 * { u64 addr; } && PERF_SAMPLE_ADDR
340 * { u64 config; } && PERF_SAMPLE_CONFIG 358 * { u64 id; } && PERF_SAMPLE_ID
341 * { u32 cpu, res; } && PERF_SAMPLE_CPU 359 * { u32 cpu, res; } && PERF_SAMPLE_CPU
360 * { u64 period; } && PERF_SAMPLE_PERIOD
342 * 361 *
343 * { u64 nr; 362 * { u64 nr;
344 * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP 363 * { u64 id, val; } cnt[nr]; } && PERF_SAMPLE_GROUP
@@ -347,6 +366,9 @@ enum perf_event_type {
347 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN 366 * u64 ips[nr]; } && PERF_SAMPLE_CALLCHAIN
348 * }; 367 * };
349 */ 368 */
369 PERF_EVENT_SAMPLE = 9,
370
371 PERF_EVENT_MAX, /* non-ABI */
350}; 372};
351 373
352enum perf_callchain_context { 374enum perf_callchain_context {
@@ -582,6 +604,7 @@ struct perf_counter_context {
582 int nr_counters; 604 int nr_counters;
583 int nr_active; 605 int nr_active;
584 int is_active; 606 int is_active;
607 int nr_stat;
585 atomic_t refcount; 608 atomic_t refcount;
586 struct task_struct *task; 609 struct task_struct *task;
587 610
@@ -669,7 +692,16 @@ static inline int is_software_counter(struct perf_counter *counter)
669 (counter->attr.type != PERF_TYPE_HW_CACHE); 692 (counter->attr.type != PERF_TYPE_HW_CACHE);
670} 693}
671 694
672extern void perf_swcounter_event(u32, u64, int, struct pt_regs *, u64); 695extern atomic_t perf_swcounter_enabled[PERF_COUNT_SW_MAX];
696
697extern void __perf_swcounter_event(u32, u64, int, struct pt_regs *, u64);
698
699static inline void
700perf_swcounter_event(u32 event, u64 nr, int nmi, struct pt_regs *regs, u64 addr)
701{
702 if (atomic_read(&perf_swcounter_enabled[event]))
703 __perf_swcounter_event(event, nr, nmi, regs, addr);
704}
673 705
674extern void __perf_counter_mmap(struct vm_area_struct *vma); 706extern void __perf_counter_mmap(struct vm_area_struct *vma);
675 707
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index 278777fa8a3a..10202903141a 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -82,6 +82,20 @@ struct rfkill_event {
82 __u8 soft, hard; 82 __u8 soft, hard;
83} __packed; 83} __packed;
84 84
85/*
86 * We are planning to be backward and forward compatible with changes
87 * to the event struct, by adding new, optional, members at the end.
88 * When reading an event (whether the kernel from userspace or vice
89 * versa) we need to accept anything that's at least as large as the
90 * version 1 event size, but might be able to accept other sizes in
91 * the future.
92 *
93 * One exception is the kernel -- we already have two event sizes in
94 * that we've made the 'hard' member optional since our only option
95 * is to ignore it anyway.
96 */
97#define RFKILL_EVENT_SIZE_V1 8
98
85/* ioctl for turning off rfkill-input (if present) */ 99/* ioctl for turning off rfkill-input (if present) */
86#define RFKILL_IOC_MAGIC 'R' 100#define RFKILL_IOC_MAGIC 'R'
87#define RFKILL_IOC_NOINPUT 1 101#define RFKILL_IOC_NOINPUT 1
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4d0754269884..0085d758d645 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -349,8 +349,20 @@ extern int mutex_spin_on_owner(struct mutex *lock, struct thread_info *owner);
349struct nsproxy; 349struct nsproxy;
350struct user_namespace; 350struct user_namespace;
351 351
352/* Maximum number of active map areas.. This is a random (large) number */ 352/*
353#define DEFAULT_MAX_MAP_COUNT 65536 353 * Default maximum number of active map areas, this limits the number of vmas
354 * per mm struct. Users can overwrite this number by sysctl but there is a
355 * problem.
356 *
357 * When a program's coredump is generated as ELF format, a section is created
358 * per a vma. In ELF, the number of sections is represented in unsigned short.
359 * This means the number of sections should be smaller than 65535 at coredump.
360 * Because the kernel adds some informative sections to a image of program at
361 * generating coredump, we need some margin. The number of extra sections is
362 * 1-3 now and depends on arch. We use "5" as safe margin, here.
363 */
364#define MAPCOUNT_ELF_CORE_MARGIN (5)
365#define DEFAULT_MAX_MAP_COUNT (USHORT_MAX - MAPCOUNT_ELF_CORE_MARGIN)
354 366
355extern int sysctl_max_map_count; 367extern int sysctl_max_map_count;
356 368
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f2c69a2cca17..df7b23ac66e6 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -304,7 +304,6 @@ typedef unsigned char *sk_buff_data_t;
304 * @tc_index: Traffic control index 304 * @tc_index: Traffic control index
305 * @tc_verd: traffic control verdict 305 * @tc_verd: traffic control verdict
306 * @ndisc_nodetype: router type (from link layer) 306 * @ndisc_nodetype: router type (from link layer)
307 * @do_not_encrypt: set to prevent encryption of this frame
308 * @dma_cookie: a cookie to one of several possible DMA operations 307 * @dma_cookie: a cookie to one of several possible DMA operations
309 * done by skb DMA functions 308 * done by skb DMA functions
310 * @secmark: security marking 309 * @secmark: security marking
@@ -380,12 +379,9 @@ struct sk_buff {
380#ifdef CONFIG_IPV6_NDISC_NODETYPE 379#ifdef CONFIG_IPV6_NDISC_NODETYPE
381 __u8 ndisc_nodetype:2; 380 __u8 ndisc_nodetype:2;
382#endif 381#endif
383#if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE)
384 __u8 do_not_encrypt:1;
385#endif
386 kmemcheck_bitfield_end(flags2); 382 kmemcheck_bitfield_end(flags2);
387 383
388 /* 0/13/14 bit hole */ 384 /* 0/14 bit hole */
389 385
390#ifdef CONFIG_NET_DMA 386#ifdef CONFIG_NET_DMA
391 dma_cookie_t dma_cookie; 387 dma_cookie_t dma_cookie;
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 9c4cd27f4685..c47c4b4da97e 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -80,6 +80,8 @@ struct spi_device {
80#define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */ 80#define SPI_LSB_FIRST 0x08 /* per-word bits-on-wire */
81#define SPI_3WIRE 0x10 /* SI/SO signals shared */ 81#define SPI_3WIRE 0x10 /* SI/SO signals shared */
82#define SPI_LOOP 0x20 /* loopback mode */ 82#define SPI_LOOP 0x20 /* loopback mode */
83#define SPI_NO_CS 0x40 /* 1 dev/bus, no chipselect */
84#define SPI_READY 0x80 /* slave pulls low to pause */
83 u8 bits_per_word; 85 u8 bits_per_word;
84 int irq; 86 int irq;
85 void *controller_state; 87 void *controller_state;
@@ -248,6 +250,10 @@ struct spi_master {
248 /* spi_device.mode flags understood by this controller driver */ 250 /* spi_device.mode flags understood by this controller driver */
249 u16 mode_bits; 251 u16 mode_bits;
250 252
253 /* other constraints relevant to this driver */
254 u16 flags;
255#define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */
256
251 /* Setup mode and clock, etc (spi driver may call many times). 257 /* Setup mode and clock, etc (spi driver may call many times).
252 * 258 *
253 * IMPORTANT: this may be called when transfers to another 259 * IMPORTANT: this may be called when transfers to another
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h
index 95251ccd5a07..bf0570a84f7a 100644
--- a/include/linux/spi/spidev.h
+++ b/include/linux/spi/spidev.h
@@ -40,6 +40,8 @@
40#define SPI_LSB_FIRST 0x08 40#define SPI_LSB_FIRST 0x08
41#define SPI_3WIRE 0x10 41#define SPI_3WIRE 0x10
42#define SPI_LOOP 0x20 42#define SPI_LOOP 0x20
43#define SPI_NO_CS 0x40
44#define SPI_READY 0x80
43 45
44/*---------------------------------------------------------------------------*/ 46/*---------------------------------------------------------------------------*/
45 47
diff --git a/include/linux/timer.h b/include/linux/timer.h
index ccf882eed8f8..be62ec2ebea5 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -190,6 +190,8 @@ extern unsigned long get_next_timer_interrupt(unsigned long now);
190 */ 190 */
191#ifdef CONFIG_TIMER_STATS 191#ifdef CONFIG_TIMER_STATS
192 192
193extern int timer_stats_active;
194
193#define TIMER_STATS_FLAG_DEFERRABLE 0x1 195#define TIMER_STATS_FLAG_DEFERRABLE 0x1
194 196
195extern void init_timer_stats(void); 197extern void init_timer_stats(void);
@@ -203,6 +205,8 @@ extern void __timer_stats_timer_set_start_info(struct timer_list *timer,
203 205
204static inline void timer_stats_timer_set_start_info(struct timer_list *timer) 206static inline void timer_stats_timer_set_start_info(struct timer_list *timer)
205{ 207{
208 if (likely(!timer_stats_active))
209 return;
206 __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); 210 __timer_stats_timer_set_start_info(timer, __builtin_return_address(0));
207} 211}
208 212
diff --git a/include/linux/tipc.h b/include/linux/tipc.h
index bea469455a0c..3d92396639de 100644
--- a/include/linux/tipc.h
+++ b/include/linux/tipc.h
@@ -209,5 +209,7 @@ struct sockaddr_tipc {
209#define TIPC_SRC_DROPPABLE 128 /* Default: 0 (resend congested msg) */ 209#define TIPC_SRC_DROPPABLE 128 /* Default: 0 (resend congested msg) */
210#define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */ 210#define TIPC_DEST_DROPPABLE 129 /* Default: based on socket type */
211#define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */ 211#define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */
212#define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */
213#define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */
212 214
213#endif 215#endif
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index 310e18a880ff..7c17b2efba86 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -97,6 +97,9 @@ struct driver_info {
97 /* reset device ... can sleep */ 97 /* reset device ... can sleep */
98 int (*reset)(struct usbnet *); 98 int (*reset)(struct usbnet *);
99 99
100 /* stop device ... can sleep */
101 int (*stop)(struct usbnet *);
102
100 /* see if peer is connected ... can sleep */ 103 /* see if peer is connected ... can sleep */
101 int (*check_connect)(struct usbnet *); 104 int (*check_connect)(struct usbnet *);
102 105
diff --git a/include/linux/wireless.h b/include/linux/wireless.h
index cb24204851f7..5b4c6c772a9b 100644
--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -1132,6 +1132,14 @@ struct __compat_iw_event {
1132}; 1132};
1133#define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer) 1133#define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer)
1134#define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length) 1134#define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length)
1135
1136/* Size of the various events for compat */
1137#define IW_EV_COMPAT_CHAR_LEN (IW_EV_COMPAT_LCP_LEN + IFNAMSIZ)
1138#define IW_EV_COMPAT_UINT_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(__u32))
1139#define IW_EV_COMPAT_FREQ_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_freq))
1140#define IW_EV_COMPAT_PARAM_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_param))
1141#define IW_EV_COMPAT_ADDR_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct sockaddr))
1142#define IW_EV_COMPAT_QUAL_LEN (IW_EV_COMPAT_LCP_LEN + sizeof(struct iw_quality))
1135#define IW_EV_COMPAT_POINT_LEN \ 1143#define IW_EV_COMPAT_POINT_LEN \
1136 (IW_EV_COMPAT_LCP_LEN + sizeof(struct compat_iw_point) - \ 1144 (IW_EV_COMPAT_LCP_LEN + sizeof(struct compat_iw_point) - \
1137 IW_EV_COMPAT_POINT_OFF) 1145 IW_EV_COMPAT_POINT_OFF)
diff --git a/include/net/ieee802154/af_ieee802154.h b/include/net/af_ieee802154.h
index 0d78605fb1a6..0d78605fb1a6 100644
--- a/include/net/ieee802154/af_ieee802154.h
+++ b/include/net/af_ieee802154.h
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1a21895b732b..a981ca8a5701 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -538,7 +538,7 @@ struct cfg80211_ssid {
538 * @ssids: SSIDs to scan for (active scan only) 538 * @ssids: SSIDs to scan for (active scan only)
539 * @n_ssids: number of SSIDs 539 * @n_ssids: number of SSIDs
540 * @channels: channels to scan on. 540 * @channels: channels to scan on.
541 * @n_channels: number of channels for each band 541 * @n_channels: total number of channels to scan
542 * @ie: optional information element(s) to add into Probe Request or %NULL 542 * @ie: optional information element(s) to add into Probe Request or %NULL
543 * @ie_len: length of ie in octets 543 * @ie_len: length of ie in octets
544 * @wiphy: the wiphy this was for 544 * @wiphy: the wiphy this was for
@@ -555,6 +555,7 @@ struct cfg80211_scan_request {
555 /* internal */ 555 /* internal */
556 struct wiphy *wiphy; 556 struct wiphy *wiphy;
557 int ifidx; 557 int ifidx;
558 bool aborted;
558}; 559};
559 560
560/** 561/**
@@ -584,7 +585,6 @@ enum cfg80211_signal_type {
584 * is no guarantee that these are well-formed!) 585 * is no guarantee that these are well-formed!)
585 * @len_information_elements: total length of the information elements 586 * @len_information_elements: total length of the information elements
586 * @signal: signal strength value (type depends on the wiphy's signal_type) 587 * @signal: signal strength value (type depends on the wiphy's signal_type)
587 * @hold: BSS should not expire
588 * @free_priv: function pointer to free private data 588 * @free_priv: function pointer to free private data
589 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes 589 * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
590 */ 590 */
@@ -605,37 +605,59 @@ struct cfg80211_bss {
605}; 605};
606 606
607/** 607/**
608 * ieee80211_bss_get_ie - find IE with given ID
609 * @bss: the bss to search
610 * @ie: the IE ID
611 * Returns %NULL if not found.
612 */
613const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie);
614
615
616/**
617 * struct cfg80211_crypto_settings - Crypto settings
618 * @wpa_versions: indicates which, if any, WPA versions are enabled
619 * (from enum nl80211_wpa_versions)
620 * @cipher_group: group key cipher suite (or 0 if unset)
621 * @n_ciphers_pairwise: number of AP supported unicast ciphers
622 * @ciphers_pairwise: unicast key cipher suites
623 * @n_akm_suites: number of AKM suites
624 * @akm_suites: AKM suites
625 * @control_port: Whether user space controls IEEE 802.1X port, i.e.,
626 * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is
627 * required to assume that the port is unauthorized until authorized by
628 * user space. Otherwise, port is marked authorized by default.
629 */
630struct cfg80211_crypto_settings {
631 u32 wpa_versions;
632 u32 cipher_group;
633 int n_ciphers_pairwise;
634 u32 ciphers_pairwise[NL80211_MAX_NR_CIPHER_SUITES];
635 int n_akm_suites;
636 u32 akm_suites[NL80211_MAX_NR_AKM_SUITES];
637 bool control_port;
638};
639
640/**
608 * struct cfg80211_auth_request - Authentication request data 641 * struct cfg80211_auth_request - Authentication request data
609 * 642 *
610 * This structure provides information needed to complete IEEE 802.11 643 * This structure provides information needed to complete IEEE 802.11
611 * authentication. 644 * authentication.
612 * NOTE: This structure will likely change when more code from mac80211 is 645 *
613 * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. 646 * @bss: The BSS to authenticate with.
614 * Before using this in a driver that does not use mac80211, it would be better
615 * to check the status of that work and better yet, volunteer to work on it.
616 *
617 * @chan: The channel to use or %NULL if not specified (auto-select based on
618 * scan results)
619 * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case);
620 * this field is required to be present; if the driver wants to help with
621 * BSS selection, it should use (yet to be added) MLME event to allow user
622 * space SME to be notified of roaming candidate, so that the SME can then
623 * use the authentication request with the recommended BSSID and whatever
624 * other data may be needed for authentication/association
625 * @ssid: SSID or %NULL if not yet available
626 * @ssid_len: Length of ssid in octets
627 * @auth_type: Authentication type (algorithm) 647 * @auth_type: Authentication type (algorithm)
628 * @ie: Extra IEs to add to Authentication frame or %NULL 648 * @ie: Extra IEs to add to Authentication frame or %NULL
629 * @ie_len: Length of ie buffer in octets 649 * @ie_len: Length of ie buffer in octets
650 * @key_len: length of WEP key for shared key authentication
651 * @key_idx: index of WEP key for shared key authentication
652 * @key: WEP key for shared key authentication
630 */ 653 */
631struct cfg80211_auth_request { 654struct cfg80211_auth_request {
632 struct ieee80211_channel *chan; 655 struct cfg80211_bss *bss;
633 u8 *peer_addr;
634 const u8 *ssid;
635 size_t ssid_len;
636 enum nl80211_auth_type auth_type;
637 const u8 *ie; 656 const u8 *ie;
638 size_t ie_len; 657 size_t ie_len;
658 enum nl80211_auth_type auth_type;
659 const u8 *key;
660 u8 key_len, key_idx;
639}; 661};
640 662
641/** 663/**
@@ -643,35 +665,19 @@ struct cfg80211_auth_request {
643 * 665 *
644 * This structure provides information needed to complete IEEE 802.11 666 * This structure provides information needed to complete IEEE 802.11
645 * (re)association. 667 * (re)association.
646 * NOTE: This structure will likely change when more code from mac80211 is 668 * @bss: The BSS to associate with.
647 * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too.
648 * Before using this in a driver that does not use mac80211, it would be better
649 * to check the status of that work and better yet, volunteer to work on it.
650 *
651 * @chan: The channel to use or %NULL if not specified (auto-select based on
652 * scan results)
653 * @peer_addr: The address of the peer STA (AP BSSID); this field is required
654 * to be present and the STA must be in State 2 (authenticated) with the
655 * peer STA
656 * @ssid: SSID
657 * @ssid_len: Length of ssid in octets
658 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL 669 * @ie: Extra IEs to add to (Re)Association Request frame or %NULL
659 * @ie_len: Length of ie buffer in octets 670 * @ie_len: Length of ie buffer in octets
660 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association 671 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association
661 * @control_port: Whether user space controls IEEE 802.1X port, i.e., 672 * @crypto: crypto settings
662 * sets/clears %NL80211_STA_FLAG_AUTHORIZED. If true, the driver is 673 * @prev_bssid: previous BSSID, if not %NULL use reassociate frame
663 * required to assume that the port is unauthorized until authorized by
664 * user space. Otherwise, port is marked authorized by default.
665 */ 674 */
666struct cfg80211_assoc_request { 675struct cfg80211_assoc_request {
667 struct ieee80211_channel *chan; 676 struct cfg80211_bss *bss;
668 u8 *peer_addr; 677 const u8 *ie, *prev_bssid;
669 const u8 *ssid;
670 size_t ssid_len;
671 const u8 *ie;
672 size_t ie_len; 678 size_t ie_len;
679 struct cfg80211_crypto_settings crypto;
673 bool use_mfp; 680 bool use_mfp;
674 bool control_port;
675}; 681};
676 682
677/** 683/**
@@ -680,16 +686,16 @@ struct cfg80211_assoc_request {
680 * This structure provides information needed to complete IEEE 802.11 686 * This structure provides information needed to complete IEEE 802.11
681 * deauthentication. 687 * deauthentication.
682 * 688 *
683 * @peer_addr: The address of the peer STA (AP BSSID); this field is required 689 * @bss: the BSS to deauthenticate from
684 * to be present and the STA must be authenticated with the peer STA
685 * @ie: Extra IEs to add to Deauthentication frame or %NULL 690 * @ie: Extra IEs to add to Deauthentication frame or %NULL
686 * @ie_len: Length of ie buffer in octets 691 * @ie_len: Length of ie buffer in octets
692 * @reason_code: The reason code for the deauthentication
687 */ 693 */
688struct cfg80211_deauth_request { 694struct cfg80211_deauth_request {
689 u8 *peer_addr; 695 struct cfg80211_bss *bss;
690 u16 reason_code;
691 const u8 *ie; 696 const u8 *ie;
692 size_t ie_len; 697 size_t ie_len;
698 u16 reason_code;
693}; 699};
694 700
695/** 701/**
@@ -698,16 +704,16 @@ struct cfg80211_deauth_request {
698 * This structure provides information needed to complete IEEE 802.11 704 * This structure provides information needed to complete IEEE 802.11
699 * disassocation. 705 * disassocation.
700 * 706 *
701 * @peer_addr: The address of the peer STA (AP BSSID); this field is required 707 * @bss: the BSS to disassociate from
702 * to be present and the STA must be associated with the peer STA
703 * @ie: Extra IEs to add to Disassociation frame or %NULL 708 * @ie: Extra IEs to add to Disassociation frame or %NULL
704 * @ie_len: Length of ie buffer in octets 709 * @ie_len: Length of ie buffer in octets
710 * @reason_code: The reason code for the disassociation
705 */ 711 */
706struct cfg80211_disassoc_request { 712struct cfg80211_disassoc_request {
707 u8 *peer_addr; 713 struct cfg80211_bss *bss;
708 u16 reason_code;
709 const u8 *ie; 714 const u8 *ie;
710 size_t ie_len; 715 size_t ie_len;
716 u16 reason_code;
711}; 717};
712 718
713/** 719/**
@@ -726,6 +732,8 @@ struct cfg80211_disassoc_request {
726 * @ie: information element(s) to include in the beacon 732 * @ie: information element(s) to include in the beacon
727 * @ie_len: length of that 733 * @ie_len: length of that
728 * @beacon_interval: beacon interval to use 734 * @beacon_interval: beacon interval to use
735 * @privacy: this is a protected network, keys will be configured
736 * after joining
729 */ 737 */
730struct cfg80211_ibss_params { 738struct cfg80211_ibss_params {
731 u8 *ssid; 739 u8 *ssid;
@@ -735,6 +743,42 @@ struct cfg80211_ibss_params {
735 u8 ssid_len, ie_len; 743 u8 ssid_len, ie_len;
736 u16 beacon_interval; 744 u16 beacon_interval;
737 bool channel_fixed; 745 bool channel_fixed;
746 bool privacy;
747};
748
749/**
750 * struct cfg80211_connect_params - Connection parameters
751 *
752 * This structure provides information needed to complete IEEE 802.11
753 * authentication and association.
754 *
755 * @channel: The channel to use or %NULL if not specified (auto-select based
756 * on scan results)
757 * @bssid: The AP BSSID or %NULL if not specified (auto-select based on scan
758 * results)
759 * @ssid: SSID
760 * @ssid_len: Length of ssid in octets
761 * @auth_type: Authentication type (algorithm)
762 * @assoc_ie: IEs for association request
763 * @assoc_ie_len: Length of assoc_ie in octets
764 * @privacy: indicates whether privacy-enabled APs should be used
765 * @crypto: crypto settings
766 * @key_len: length of WEP key for shared key authentication
767 * @key_idx: index of WEP key for shared key authentication
768 * @key: WEP key for shared key authentication
769 */
770struct cfg80211_connect_params {
771 struct ieee80211_channel *channel;
772 u8 *bssid;
773 u8 *ssid;
774 size_t ssid_len;
775 enum nl80211_auth_type auth_type;
776 u8 *ie;
777 size_t ie_len;
778 bool privacy;
779 struct cfg80211_crypto_settings crypto;
780 const u8 *key;
781 u8 key_len, key_idx;
738}; 782};
739 783
740/** 784/**
@@ -764,6 +808,26 @@ enum tx_power_setting {
764 TX_POWER_FIXED, 808 TX_POWER_FIXED,
765}; 809};
766 810
811/*
812 * cfg80211_bitrate_mask - masks for bitrate control
813 */
814struct cfg80211_bitrate_mask {
815/*
816 * As discussed in Berlin, this struct really
817 * should look like this:
818
819 struct {
820 u32 legacy;
821 u8 mcs[IEEE80211_HT_MCS_MASK_LEN];
822 } control[IEEE80211_NUM_BANDS];
823
824 * Since we can always fix in-kernel users, let's keep
825 * it simpler for now:
826 */
827 u32 fixed; /* fixed bitrate, 0 == not fixed */
828 u32 maxrate; /* in kbps, 0 == no limit */
829};
830
767/** 831/**
768 * struct cfg80211_ops - backend description for wireless configuration 832 * struct cfg80211_ops - backend description for wireless configuration
769 * 833 *
@@ -841,6 +905,12 @@ enum tx_power_setting {
841 * @deauth: Request to deauthenticate from the specified peer 905 * @deauth: Request to deauthenticate from the specified peer
842 * @disassoc: Request to disassociate from the specified peer 906 * @disassoc: Request to disassociate from the specified peer
843 * 907 *
908 * @connect: Connect to the ESS with the specified parameters. When connected,
909 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS.
910 * If the connection fails for some reason, call cfg80211_connect_result()
911 * with the status from the AP.
912 * @disconnect: Disconnect from the BSS/ESS.
913 *
844 * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call 914 * @join_ibss: Join the specified IBSS (or create if necessary). Once done, call
845 * cfg80211_ibss_joined(), also call that function when changing BSSID due 915 * cfg80211_ibss_joined(), also call that function when changing BSSID due
846 * to a merge. 916 * to a merge.
@@ -857,6 +927,8 @@ enum tx_power_setting {
857 * 927 *
858 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting 928 * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
859 * functions to adjust rfkill hw state 929 * functions to adjust rfkill hw state
930 *
931 * @testmode_cmd: run a test mode command
860 */ 932 */
861struct cfg80211_ops { 933struct cfg80211_ops {
862 int (*suspend)(struct wiphy *wiphy); 934 int (*suspend)(struct wiphy *wiphy);
@@ -866,7 +938,8 @@ struct cfg80211_ops {
866 enum nl80211_iftype type, u32 *flags, 938 enum nl80211_iftype type, u32 *flags,
867 struct vif_params *params); 939 struct vif_params *params);
868 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex); 940 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
869 int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex, 941 int (*change_virtual_intf)(struct wiphy *wiphy,
942 struct net_device *dev,
870 enum nl80211_iftype type, u32 *flags, 943 enum nl80211_iftype type, u32 *flags,
871 struct vif_params *params); 944 struct vif_params *params);
872 945
@@ -939,9 +1012,16 @@ struct cfg80211_ops {
939 int (*assoc)(struct wiphy *wiphy, struct net_device *dev, 1012 int (*assoc)(struct wiphy *wiphy, struct net_device *dev,
940 struct cfg80211_assoc_request *req); 1013 struct cfg80211_assoc_request *req);
941 int (*deauth)(struct wiphy *wiphy, struct net_device *dev, 1014 int (*deauth)(struct wiphy *wiphy, struct net_device *dev,
942 struct cfg80211_deauth_request *req); 1015 struct cfg80211_deauth_request *req,
1016 void *cookie);
943 int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, 1017 int (*disassoc)(struct wiphy *wiphy, struct net_device *dev,
944 struct cfg80211_disassoc_request *req); 1018 struct cfg80211_disassoc_request *req,
1019 void *cookie);
1020
1021 int (*connect)(struct wiphy *wiphy, struct net_device *dev,
1022 struct cfg80211_connect_params *sme);
1023 int (*disconnect)(struct wiphy *wiphy, struct net_device *dev,
1024 u16 reason_code);
945 1025
946 int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev, 1026 int (*join_ibss)(struct wiphy *wiphy, struct net_device *dev,
947 struct cfg80211_ibss_params *params); 1027 struct cfg80211_ibss_params *params);
@@ -953,7 +1033,23 @@ struct cfg80211_ops {
953 enum tx_power_setting type, int dbm); 1033 enum tx_power_setting type, int dbm);
954 int (*get_tx_power)(struct wiphy *wiphy, int *dbm); 1034 int (*get_tx_power)(struct wiphy *wiphy, int *dbm);
955 1035
1036 int (*set_wds_peer)(struct wiphy *wiphy, struct net_device *dev,
1037 u8 *addr);
1038
956 void (*rfkill_poll)(struct wiphy *wiphy); 1039 void (*rfkill_poll)(struct wiphy *wiphy);
1040
1041#ifdef CONFIG_NL80211_TESTMODE
1042 int (*testmode_cmd)(struct wiphy *wiphy, void *data, int len);
1043#endif
1044
1045 int (*set_bitrate_mask)(struct wiphy *wiphy,
1046 struct net_device *dev,
1047 const u8 *peer,
1048 const struct cfg80211_bitrate_mask *mask);
1049
1050 /* some temporary stuff to finish wext */
1051 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
1052 bool enabled, int timeout);
957}; 1053};
958 1054
959/* 1055/*
@@ -1058,6 +1154,17 @@ static inline void *wiphy_priv(struct wiphy *wiphy)
1058} 1154}
1059 1155
1060/** 1156/**
1157 * priv_to_wiphy - return the wiphy containing the priv
1158 *
1159 * @priv: a pointer previously returned by wiphy_priv
1160 */
1161static inline struct wiphy *priv_to_wiphy(void *priv)
1162{
1163 BUG_ON(!priv);
1164 return container_of(priv, struct wiphy, priv);
1165}
1166
1167/**
1061 * set_wiphy_dev - set device pointer for wiphy 1168 * set_wiphy_dev - set device pointer for wiphy
1062 * 1169 *
1063 * @wiphy: The wiphy whose device to bind 1170 * @wiphy: The wiphy whose device to bind
@@ -1129,6 +1236,13 @@ extern void wiphy_unregister(struct wiphy *wiphy);
1129 */ 1236 */
1130extern void wiphy_free(struct wiphy *wiphy); 1237extern void wiphy_free(struct wiphy *wiphy);
1131 1238
1239/* internal structs */
1240struct cfg80211_conn;
1241struct cfg80211_internal_bss;
1242struct cfg80211_cached_keys;
1243
1244#define MAX_AUTH_BSSES 4
1245
1132/** 1246/**
1133 * struct wireless_dev - wireless per-netdev state 1247 * struct wireless_dev - wireless per-netdev state
1134 * 1248 *
@@ -1152,22 +1266,43 @@ struct wireless_dev {
1152 struct wiphy *wiphy; 1266 struct wiphy *wiphy;
1153 enum nl80211_iftype iftype; 1267 enum nl80211_iftype iftype;
1154 1268
1155 /* private to the generic wireless code */ 1269 /* the remainder of this struct should be private to cfg80211 */
1156 struct list_head list; 1270 struct list_head list;
1157 struct net_device *netdev; 1271 struct net_device *netdev;
1158 1272
1159 /* currently used for IBSS - might be rearranged in the future */ 1273 struct mutex mtx;
1160 struct cfg80211_bss *current_bss; 1274
1161 u8 bssid[ETH_ALEN]; 1275 /* currently used for IBSS and SME - might be rearranged later */
1162 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1276 u8 ssid[IEEE80211_MAX_SSID_LEN];
1163 u8 ssid_len; 1277 u8 ssid_len;
1278 enum {
1279 CFG80211_SME_IDLE,
1280 CFG80211_SME_CONNECTING,
1281 CFG80211_SME_CONNECTED,
1282 } sme_state;
1283 struct cfg80211_conn *conn;
1284 struct cfg80211_cached_keys *connect_keys;
1285
1286 struct list_head event_list;
1287 spinlock_t event_lock;
1288
1289 struct cfg80211_internal_bss *authtry_bsses[MAX_AUTH_BSSES];
1290 struct cfg80211_internal_bss *auth_bsses[MAX_AUTH_BSSES];
1291 struct cfg80211_internal_bss *current_bss; /* associated / joined */
1164 1292
1165#ifdef CONFIG_WIRELESS_EXT 1293#ifdef CONFIG_WIRELESS_EXT
1166 /* wext data */ 1294 /* wext data */
1167 struct { 1295 struct {
1168 struct cfg80211_ibss_params ibss; 1296 struct cfg80211_ibss_params ibss;
1297 struct cfg80211_connect_params connect;
1298 struct cfg80211_cached_keys *keys;
1299 u8 *ie;
1300 size_t ie_len;
1169 u8 bssid[ETH_ALEN]; 1301 u8 bssid[ETH_ALEN];
1302 u8 ssid[IEEE80211_MAX_SSID_LEN];
1170 s8 default_key, default_mgmt_key; 1303 s8 default_key, default_mgmt_key;
1304 bool ps;
1305 int ps_timeout;
1171 } wext; 1306 } wext;
1172#endif 1307#endif
1173}; 1308};
@@ -1447,9 +1582,44 @@ int cfg80211_ibss_wext_giwap(struct net_device *dev,
1447 struct iw_request_info *info, 1582 struct iw_request_info *info,
1448 struct sockaddr *ap_addr, char *extra); 1583 struct sockaddr *ap_addr, char *extra);
1449 1584
1585int cfg80211_mgd_wext_siwfreq(struct net_device *dev,
1586 struct iw_request_info *info,
1587 struct iw_freq *freq, char *extra);
1588int cfg80211_mgd_wext_giwfreq(struct net_device *dev,
1589 struct iw_request_info *info,
1590 struct iw_freq *freq, char *extra);
1591int cfg80211_mgd_wext_siwessid(struct net_device *dev,
1592 struct iw_request_info *info,
1593 struct iw_point *data, char *ssid);
1594int cfg80211_mgd_wext_giwessid(struct net_device *dev,
1595 struct iw_request_info *info,
1596 struct iw_point *data, char *ssid);
1597int cfg80211_mgd_wext_siwap(struct net_device *dev,
1598 struct iw_request_info *info,
1599 struct sockaddr *ap_addr, char *extra);
1600int cfg80211_mgd_wext_giwap(struct net_device *dev,
1601 struct iw_request_info *info,
1602 struct sockaddr *ap_addr, char *extra);
1603int cfg80211_wext_siwgenie(struct net_device *dev,
1604 struct iw_request_info *info,
1605 struct iw_point *data, char *extra);
1606int cfg80211_wext_siwauth(struct net_device *dev,
1607 struct iw_request_info *info,
1608 struct iw_param *data, char *extra);
1609int cfg80211_wext_giwauth(struct net_device *dev,
1610 struct iw_request_info *info,
1611 struct iw_param *data, char *extra);
1612
1450struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy, 1613struct ieee80211_channel *cfg80211_wext_freq(struct wiphy *wiphy,
1451 struct iw_freq *freq); 1614 struct iw_freq *freq);
1452 1615
1616int cfg80211_wext_siwrate(struct net_device *dev,
1617 struct iw_request_info *info,
1618 struct iw_param *rate, char *extra);
1619int cfg80211_wext_giwrate(struct net_device *dev,
1620 struct iw_request_info *info,
1621 struct iw_param *rate, char *extra);
1622
1453int cfg80211_wext_siwrts(struct net_device *dev, 1623int cfg80211_wext_siwrts(struct net_device *dev,
1454 struct iw_request_info *info, 1624 struct iw_request_info *info,
1455 struct iw_param *rts, char *extra); 1625 struct iw_param *rts, char *extra);
@@ -1483,6 +1653,21 @@ int cfg80211_wext_siwtxpower(struct net_device *dev,
1483int cfg80211_wext_giwtxpower(struct net_device *dev, 1653int cfg80211_wext_giwtxpower(struct net_device *dev,
1484 struct iw_request_info *info, 1654 struct iw_request_info *info,
1485 union iwreq_data *data, char *keybuf); 1655 union iwreq_data *data, char *keybuf);
1656struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev);
1657
1658int cfg80211_wext_siwpower(struct net_device *dev,
1659 struct iw_request_info *info,
1660 struct iw_param *wrq, char *extra);
1661int cfg80211_wext_giwpower(struct net_device *dev,
1662 struct iw_request_info *info,
1663 struct iw_param *wrq, char *extra);
1664
1665int cfg80211_wds_wext_siwap(struct net_device *dev,
1666 struct iw_request_info *info,
1667 struct sockaddr *addr, char *extra);
1668int cfg80211_wds_wext_giwap(struct net_device *dev,
1669 struct iw_request_info *info,
1670 struct sockaddr *addr, char *extra);
1486 1671
1487/* 1672/*
1488 * callbacks for asynchronous cfg80211 methods, notification 1673 * callbacks for asynchronous cfg80211 methods, notification
@@ -1564,7 +1749,7 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
1564 * This function is called whenever an authentication has been processed in 1749 * This function is called whenever an authentication has been processed in
1565 * station mode. The driver is required to call either this function or 1750 * station mode. The driver is required to call either this function or
1566 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() 1751 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth()
1567 * call. 1752 * call. This function may sleep.
1568 */ 1753 */
1569void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); 1754void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
1570 1755
@@ -1572,6 +1757,8 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
1572 * cfg80211_send_auth_timeout - notification of timed out authentication 1757 * cfg80211_send_auth_timeout - notification of timed out authentication
1573 * @dev: network device 1758 * @dev: network device
1574 * @addr: The MAC address of the device with which the authentication timed out 1759 * @addr: The MAC address of the device with which the authentication timed out
1760 *
1761 * This function may sleep.
1575 */ 1762 */
1576void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 1763void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
1577 1764
@@ -1584,7 +1771,7 @@ void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
1584 * This function is called whenever a (re)association response has been 1771 * This function is called whenever a (re)association response has been
1585 * processed in station mode. The driver is required to call either this 1772 * processed in station mode. The driver is required to call either this
1586 * function or cfg80211_send_assoc_timeout() to indicate the result of 1773 * function or cfg80211_send_assoc_timeout() to indicate the result of
1587 * cfg80211_ops::assoc() call. 1774 * cfg80211_ops::assoc() call. This function may sleep.
1588 */ 1775 */
1589void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); 1776void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len);
1590 1777
@@ -1592,6 +1779,8 @@ void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len);
1592 * cfg80211_send_assoc_timeout - notification of timed out association 1779 * cfg80211_send_assoc_timeout - notification of timed out association
1593 * @dev: network device 1780 * @dev: network device
1594 * @addr: The MAC address of the device with which the association timed out 1781 * @addr: The MAC address of the device with which the association timed out
1782 *
1783 * This function may sleep.
1595 */ 1784 */
1596void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); 1785void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
1597 1786
@@ -1600,41 +1789,30 @@ void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
1600 * @dev: network device 1789 * @dev: network device
1601 * @buf: deauthentication frame (header + body) 1790 * @buf: deauthentication frame (header + body)
1602 * @len: length of the frame data 1791 * @len: length of the frame data
1792 * @cookie: cookie from ->deauth if called within that callback,
1793 * %NULL otherwise
1603 * 1794 *
1604 * This function is called whenever deauthentication has been processed in 1795 * This function is called whenever deauthentication has been processed in
1605 * station mode. This includes both received deauthentication frames and 1796 * station mode. This includes both received deauthentication frames and
1606 * locally generated ones. 1797 * locally generated ones. This function may sleep.
1607 */ 1798 */
1608void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); 1799void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len,
1800 void *cookie);
1609 1801
1610/** 1802/**
1611 * cfg80211_send_disassoc - notification of processed disassociation 1803 * cfg80211_send_disassoc - notification of processed disassociation
1612 * @dev: network device 1804 * @dev: network device
1613 * @buf: disassociation response frame (header + body) 1805 * @buf: disassociation response frame (header + body)
1614 * @len: length of the frame data 1806 * @len: length of the frame data
1807 * @cookie: cookie from ->disassoc if called within that callback,
1808 * %NULL otherwise
1615 * 1809 *
1616 * This function is called whenever disassociation has been processed in 1810 * This function is called whenever disassociation has been processed in
1617 * station mode. This includes both received disassociation frames and locally 1811 * station mode. This includes both received disassociation frames and locally
1618 * generated ones. 1812 * generated ones. This function may sleep.
1619 */ 1813 */
1620void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); 1814void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len,
1621 1815 void *cookie);
1622/**
1623 * cfg80211_hold_bss - exclude bss from expiration
1624 * @bss: bss which should not expire
1625 *
1626 * In a case when the BSS is not updated but it shouldn't expire this
1627 * function can be used to mark the BSS to be excluded from expiration.
1628 */
1629void cfg80211_hold_bss(struct cfg80211_bss *bss);
1630
1631/**
1632 * cfg80211_unhold_bss - remove expiration exception from the BSS
1633 * @bss: bss which can expire again
1634 *
1635 * This function marks the BSS to be expirable again.
1636 */
1637void cfg80211_unhold_bss(struct cfg80211_bss *bss);
1638 1816
1639/** 1817/**
1640 * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP) 1818 * cfg80211_michael_mic_failure - notification of Michael MIC failure (TKIP)
@@ -1643,6 +1821,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss);
1643 * @key_type: The key type that the received frame used 1821 * @key_type: The key type that the received frame used
1644 * @key_id: Key identifier (0..3) 1822 * @key_id: Key identifier (0..3)
1645 * @tsc: The TSC value of the frame that generated the MIC failure (6 octets) 1823 * @tsc: The TSC value of the frame that generated the MIC failure (6 octets)
1824 * @gfp: allocation flags
1646 * 1825 *
1647 * This function is called whenever the local MAC detects a MIC failure in a 1826 * This function is called whenever the local MAC detects a MIC failure in a
1648 * received frame. This matches with MLME-MICHAELMICFAILURE.indication() 1827 * received frame. This matches with MLME-MICHAELMICFAILURE.indication()
@@ -1650,7 +1829,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss);
1650 */ 1829 */
1651void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, 1830void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
1652 enum nl80211_key_type key_type, int key_id, 1831 enum nl80211_key_type key_type, int key_id,
1653 const u8 *tsc); 1832 const u8 *tsc, gfp_t gfp);
1654 1833
1655/** 1834/**
1656 * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS 1835 * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS
@@ -1687,4 +1866,137 @@ void wiphy_rfkill_start_polling(struct wiphy *wiphy);
1687 */ 1866 */
1688void wiphy_rfkill_stop_polling(struct wiphy *wiphy); 1867void wiphy_rfkill_stop_polling(struct wiphy *wiphy);
1689 1868
1869#ifdef CONFIG_NL80211_TESTMODE
1870/**
1871 * cfg80211_testmode_alloc_reply_skb - allocate testmode reply
1872 * @wiphy: the wiphy
1873 * @approxlen: an upper bound of the length of the data that will
1874 * be put into the skb
1875 *
1876 * This function allocates and pre-fills an skb for a reply to
1877 * the testmode command. Since it is intended for a reply, calling
1878 * it outside of the @testmode_cmd operation is invalid.
1879 *
1880 * The returned skb (or %NULL if any errors happen) is pre-filled
1881 * with the wiphy index and set up in a way that any data that is
1882 * put into the skb (with skb_put(), nla_put() or similar) will end
1883 * up being within the %NL80211_ATTR_TESTDATA attribute, so all that
1884 * needs to be done with the skb is adding data for the corresponding
1885 * userspace tool which can then read that data out of the testdata
1886 * attribute. You must not modify the skb in any other way.
1887 *
1888 * When done, call cfg80211_testmode_reply() with the skb and return
1889 * its error code as the result of the @testmode_cmd operation.
1890 */
1891struct sk_buff *cfg80211_testmode_alloc_reply_skb(struct wiphy *wiphy,
1892 int approxlen);
1893
1894/**
1895 * cfg80211_testmode_reply - send the reply skb
1896 * @skb: The skb, must have been allocated with
1897 * cfg80211_testmode_alloc_reply_skb()
1898 *
1899 * Returns an error code or 0 on success, since calling this
1900 * function will usually be the last thing before returning
1901 * from the @testmode_cmd you should return the error code.
1902 * Note that this function consumes the skb regardless of the
1903 * return value.
1904 */
1905int cfg80211_testmode_reply(struct sk_buff *skb);
1906
1907/**
1908 * cfg80211_testmode_alloc_event_skb - allocate testmode event
1909 * @wiphy: the wiphy
1910 * @approxlen: an upper bound of the length of the data that will
1911 * be put into the skb
1912 * @gfp: allocation flags
1913 *
1914 * This function allocates and pre-fills an skb for an event on the
1915 * testmode multicast group.
1916 *
1917 * The returned skb (or %NULL if any errors happen) is set up in the
1918 * same way as with cfg80211_testmode_alloc_reply_skb() but prepared
1919 * for an event. As there, you should simply add data to it that will
1920 * then end up in the %NL80211_ATTR_TESTDATA attribute. Again, you must
1921 * not modify the skb in any other way.
1922 *
1923 * When done filling the skb, call cfg80211_testmode_event() with the
1924 * skb to send the event.
1925 */
1926struct sk_buff *cfg80211_testmode_alloc_event_skb(struct wiphy *wiphy,
1927 int approxlen, gfp_t gfp);
1928
1929/**
1930 * cfg80211_testmode_event - send the event
1931 * @skb: The skb, must have been allocated with
1932 * cfg80211_testmode_alloc_event_skb()
1933 * @gfp: allocation flags
1934 *
1935 * This function sends the given @skb, which must have been allocated
1936 * by cfg80211_testmode_alloc_event_skb(), as an event. It always
1937 * consumes it.
1938 */
1939void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp);
1940
1941#define CFG80211_TESTMODE_CMD(cmd) .testmode_cmd = (cmd),
1942#else
1943#define CFG80211_TESTMODE_CMD(cmd)
1944#endif
1945
1946/**
1947 * cfg80211_connect_result - notify cfg80211 of connection result
1948 *
1949 * @dev: network device
1950 * @bssid: the BSSID of the AP
1951 * @req_ie: association request IEs (maybe be %NULL)
1952 * @req_ie_len: association request IEs length
1953 * @resp_ie: association response IEs (may be %NULL)
1954 * @resp_ie_len: assoc response IEs length
1955 * @status: status code, 0 for successful connection, use
1956 * %WLAN_STATUS_UNSPECIFIED_FAILURE if your device cannot give you
1957 * the real status code for failures.
1958 * @gfp: allocation flags
1959 *
1960 * It should be called by the underlying driver whenever connect() has
1961 * succeeded.
1962 */
1963void cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
1964 const u8 *req_ie, size_t req_ie_len,
1965 const u8 *resp_ie, size_t resp_ie_len,
1966 u16 status, gfp_t gfp);
1967
1968/**
1969 * cfg80211_roamed - notify cfg80211 of roaming
1970 *
1971 * @dev: network device
1972 * @bssid: the BSSID of the new AP
1973 * @req_ie: association request IEs (maybe be %NULL)
1974 * @req_ie_len: association request IEs length
1975 * @resp_ie: association response IEs (may be %NULL)
1976 * @resp_ie_len: assoc response IEs length
1977 * @gfp: allocation flags
1978 *
1979 * It should be called by the underlying driver whenever it roamed
1980 * from one AP to another while connected.
1981 */
1982void cfg80211_roamed(struct net_device *dev, const u8 *bssid,
1983 const u8 *req_ie, size_t req_ie_len,
1984 const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp);
1985
1986/**
1987 * cfg80211_disconnected - notify cfg80211 that connection was dropped
1988 *
1989 * @dev: network device
1990 * @ie: information elements of the deauth/disassoc frame (may be %NULL)
1991 * @ie_len: length of IEs
1992 * @reason: reason code for the disconnection, set it to 0 if unknown
1993 * @gfp: allocation flags
1994 *
1995 * After it calls this function, the driver should enter an idle state
1996 * and not try to connect to any AP any more.
1997 */
1998void cfg80211_disconnected(struct net_device *dev, u16 reason,
1999 u8 *ie, size_t ie_len, gfp_t gfp);
2000
2001
1690#endif /* __NET_CFG80211_H */ 2002#endif /* __NET_CFG80211_H */
diff --git a/include/net/genetlink.h b/include/net/genetlink.h
index 1b0e3ee4ddd8..2a1c06874c42 100644
--- a/include/net/genetlink.h
+++ b/include/net/genetlink.h
@@ -3,6 +3,7 @@
3 3
4#include <linux/genetlink.h> 4#include <linux/genetlink.h>
5#include <net/netlink.h> 5#include <net/netlink.h>
6#include <net/net_namespace.h>
6 7
7/** 8/**
8 * struct genl_multicast_group - generic netlink multicast group 9 * struct genl_multicast_group - generic netlink multicast group
@@ -27,6 +28,8 @@ struct genl_multicast_group
27 * @name: name of family 28 * @name: name of family
28 * @version: protocol version 29 * @version: protocol version
29 * @maxattr: maximum number of attributes supported 30 * @maxattr: maximum number of attributes supported
31 * @netnsok: set to true if the family can handle network
32 * namespaces and should be presented in all of them
30 * @attrbuf: buffer to store parsed attributes 33 * @attrbuf: buffer to store parsed attributes
31 * @ops_list: list of all assigned operations 34 * @ops_list: list of all assigned operations
32 * @family_list: family list 35 * @family_list: family list
@@ -39,6 +42,7 @@ struct genl_family
39 char name[GENL_NAMSIZ]; 42 char name[GENL_NAMSIZ];
40 unsigned int version; 43 unsigned int version;
41 unsigned int maxattr; 44 unsigned int maxattr;
45 bool netnsok;
42 struct nlattr ** attrbuf; /* private */ 46 struct nlattr ** attrbuf; /* private */
43 struct list_head ops_list; /* private */ 47 struct list_head ops_list; /* private */
44 struct list_head family_list; /* private */ 48 struct list_head family_list; /* private */
@@ -62,8 +66,32 @@ struct genl_info
62 struct genlmsghdr * genlhdr; 66 struct genlmsghdr * genlhdr;
63 void * userhdr; 67 void * userhdr;
64 struct nlattr ** attrs; 68 struct nlattr ** attrs;
69#ifdef CONFIG_NET_NS
70 struct net * _net;
71#endif
65}; 72};
66 73
74#ifdef CONFIG_NET_NS
75static inline struct net *genl_info_net(struct genl_info *info)
76{
77 return info->_net;
78}
79
80static inline void genl_info_net_set(struct genl_info *info, struct net *net)
81{
82 info->_net = net;
83}
84#else
85static inline struct net *genl_info_net(struct genl_info *info)
86{
87 return &init_net;
88}
89
90static inline void genl_info_net_set(struct genl_info *info, struct net *net)
91{
92}
93#endif
94
67/** 95/**
68 * struct genl_ops - generic netlink operations 96 * struct genl_ops - generic netlink operations
69 * @cmd: command identifier 97 * @cmd: command identifier
@@ -98,8 +126,6 @@ extern int genl_register_mc_group(struct genl_family *family,
98extern void genl_unregister_mc_group(struct genl_family *family, 126extern void genl_unregister_mc_group(struct genl_family *family,
99 struct genl_multicast_group *grp); 127 struct genl_multicast_group *grp);
100 128
101extern struct sock *genl_sock;
102
103/** 129/**
104 * genlmsg_put - Add generic netlink header to netlink message 130 * genlmsg_put - Add generic netlink header to netlink message
105 * @skb: socket buffer holding the message 131 * @skb: socket buffer holding the message
@@ -170,7 +196,21 @@ static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr)
170} 196}
171 197
172/** 198/**
173 * genlmsg_multicast - multicast a netlink message 199 * genlmsg_multicast_netns - multicast a netlink message to a specific netns
200 * @net: the net namespace
201 * @skb: netlink message as socket buffer
202 * @pid: own netlink pid to avoid sending to yourself
203 * @group: multicast group id
204 * @flags: allocation flags
205 */
206static inline int genlmsg_multicast_netns(struct net *net, struct sk_buff *skb,
207 u32 pid, unsigned int group, gfp_t flags)
208{
209 return nlmsg_multicast(net->genl_sock, skb, pid, group, flags);
210}
211
212/**
213 * genlmsg_multicast - multicast a netlink message to the default netns
174 * @skb: netlink message as socket buffer 214 * @skb: netlink message as socket buffer
175 * @pid: own netlink pid to avoid sending to yourself 215 * @pid: own netlink pid to avoid sending to yourself
176 * @group: multicast group id 216 * @group: multicast group id
@@ -179,17 +219,29 @@ static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr)
179static inline int genlmsg_multicast(struct sk_buff *skb, u32 pid, 219static inline int genlmsg_multicast(struct sk_buff *skb, u32 pid,
180 unsigned int group, gfp_t flags) 220 unsigned int group, gfp_t flags)
181{ 221{
182 return nlmsg_multicast(genl_sock, skb, pid, group, flags); 222 return genlmsg_multicast_netns(&init_net, skb, pid, group, flags);
183} 223}
184 224
185/** 225/**
226 * genlmsg_multicast_allns - multicast a netlink message to all net namespaces
227 * @skb: netlink message as socket buffer
228 * @pid: own netlink pid to avoid sending to yourself
229 * @group: multicast group id
230 * @flags: allocation flags
231 *
232 * This function must hold the RTNL or rcu_read_lock().
233 */
234int genlmsg_multicast_allns(struct sk_buff *skb, u32 pid,
235 unsigned int group, gfp_t flags);
236
237/**
186 * genlmsg_unicast - unicast a netlink message 238 * genlmsg_unicast - unicast a netlink message
187 * @skb: netlink message as socket buffer 239 * @skb: netlink message as socket buffer
188 * @pid: netlink pid of the destination socket 240 * @pid: netlink pid of the destination socket
189 */ 241 */
190static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid) 242static inline int genlmsg_unicast(struct net *net, struct sk_buff *skb, u32 pid)
191{ 243{
192 return nlmsg_unicast(genl_sock, skb, pid); 244 return nlmsg_unicast(net->genl_sock, skb, pid);
193} 245}
194 246
195/** 247/**
@@ -199,7 +251,7 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid)
199 */ 251 */
200static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info) 252static inline int genlmsg_reply(struct sk_buff *skb, struct genl_info *info)
201{ 253{
202 return genlmsg_unicast(skb, info->snd_pid); 254 return genlmsg_unicast(genl_info_net(info), skb, info->snd_pid);
203} 255}
204 256
205/** 257/**
diff --git a/include/net/ieee802154/mac_def.h b/include/net/ieee802154.h
index 8cb684635650..d52685defb11 100644
--- a/include/net/ieee802154/mac_def.h
+++ b/include/net/ieee802154.h
@@ -23,8 +23,8 @@
23 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> 23 * Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
24 */ 24 */
25 25
26#ifndef IEEE802154_MAC_DEF_H 26#ifndef NET_IEEE802154_H
27#define IEEE802154_MAC_DEF_H 27#define NET_IEEE802154_H
28 28
29#define IEEE802154_FC_TYPE_BEACON 0x0 /* Frame is beacon */ 29#define IEEE802154_FC_TYPE_BEACON 0x0 /* Frame is beacon */
30#define IEEE802154_FC_TYPE_DATA 0x1 /* Frame is data */ 30#define IEEE802154_FC_TYPE_DATA 0x1 /* Frame is data */
diff --git a/include/net/ieee802154/nl802154.h b/include/net/ieee802154/nl802154.h
deleted file mode 100644
index 78efcdf52b59..000000000000
--- a/include/net/ieee802154/nl802154.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * nl802154.h
3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21#ifndef IEEE802154_NL_H
22#define IEEE802154_NL_H
23
24struct net_device;
25struct ieee802154_addr;
26
27int ieee802154_nl_assoc_indic(struct net_device *dev,
28 struct ieee802154_addr *addr, u8 cap);
29int ieee802154_nl_assoc_confirm(struct net_device *dev,
30 u16 short_addr, u8 status);
31int ieee802154_nl_disassoc_indic(struct net_device *dev,
32 struct ieee802154_addr *addr, u8 reason);
33int ieee802154_nl_disassoc_confirm(struct net_device *dev,
34 u8 status);
35int ieee802154_nl_scan_confirm(struct net_device *dev,
36 u8 status, u8 scan_type, u32 unscanned,
37 u8 *edl/*, struct list_head *pan_desc_list */);
38int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid,
39 u16 coord_addr);
40
41#endif
diff --git a/include/net/ieee802154/netdevice.h b/include/net/ieee802154_netdev.h
index e2506af3e7c8..e2506af3e7c8 100644
--- a/include/net/ieee802154/netdevice.h
+++ b/include/net/ieee802154_netdev.h
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 7c5c0f79168a..15b492a9aa79 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -22,6 +22,12 @@
22#include <net/flow.h> 22#include <net/flow.h>
23#include <net/netlink.h> 23#include <net/netlink.h>
24 24
25#ifdef CONFIG_IPV6_MULTIPLE_TABLES
26#define FIB6_TABLE_HASHSZ 256
27#else
28#define FIB6_TABLE_HASHSZ 1
29#endif
30
25struct rt6_info; 31struct rt6_info;
26 32
27struct fib6_config 33struct fib6_config
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index bbae1e87efcd..910820327bc4 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -99,47 +99,47 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
99 return &buf[*idx - len]; 99 return &buf[*idx - len];
100} 100}
101 101
102#define IP_VS_DBG_BUF(level, msg...) \ 102#define IP_VS_DBG_BUF(level, msg, ...) \
103 do { \ 103 do { \
104 char ip_vs_dbg_buf[160]; \ 104 char ip_vs_dbg_buf[160]; \
105 int ip_vs_dbg_idx = 0; \ 105 int ip_vs_dbg_idx = 0; \
106 if (level <= ip_vs_get_debug_level()) \ 106 if (level <= ip_vs_get_debug_level()) \
107 printk(KERN_DEBUG "IPVS: " msg); \ 107 printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \
108 } while (0) 108 } while (0)
109#define IP_VS_ERR_BUF(msg...) \ 109#define IP_VS_ERR_BUF(msg...) \
110 do { \ 110 do { \
111 char ip_vs_dbg_buf[160]; \ 111 char ip_vs_dbg_buf[160]; \
112 int ip_vs_dbg_idx = 0; \ 112 int ip_vs_dbg_idx = 0; \
113 printk(KERN_ERR "IPVS: " msg); \ 113 pr_err(msg); \
114 } while (0) 114 } while (0)
115 115
116/* Only use from within IP_VS_DBG_BUF() or IP_VS_ERR_BUF macros */ 116/* Only use from within IP_VS_DBG_BUF() or IP_VS_ERR_BUF macros */
117#define IP_VS_DBG_ADDR(af, addr) \ 117#define IP_VS_DBG_ADDR(af, addr) \
118 ip_vs_dbg_addr(af, ip_vs_dbg_buf, \ 118 ip_vs_dbg_addr(af, ip_vs_dbg_buf, \
119 sizeof(ip_vs_dbg_buf), addr, \ 119 sizeof(ip_vs_dbg_buf), addr, \
120 &ip_vs_dbg_idx) 120 &ip_vs_dbg_idx)
121 121
122#define IP_VS_DBG(level, msg...) \ 122#define IP_VS_DBG(level, msg, ...) \
123 do { \ 123 do { \
124 if (level <= ip_vs_get_debug_level()) \ 124 if (level <= ip_vs_get_debug_level()) \
125 printk(KERN_DEBUG "IPVS: " msg); \ 125 printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \
126 } while (0) 126 } while (0)
127#define IP_VS_DBG_RL(msg...) \ 127#define IP_VS_DBG_RL(msg, ...) \
128 do { \ 128 do { \
129 if (net_ratelimit()) \ 129 if (net_ratelimit()) \
130 printk(KERN_DEBUG "IPVS: " msg); \ 130 printk(KERN_DEBUG pr_fmt(msg), ##__VA_ARGS__); \
131 } while (0) 131 } while (0)
132#define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) \ 132#define IP_VS_DBG_PKT(level, pp, skb, ofs, msg) \
133 do { \ 133 do { \
134 if (level <= ip_vs_get_debug_level()) \ 134 if (level <= ip_vs_get_debug_level()) \
135 pp->debug_packet(pp, skb, ofs, msg); \ 135 pp->debug_packet(pp, skb, ofs, msg); \
136 } while (0) 136 } while (0)
137#define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) \ 137#define IP_VS_DBG_RL_PKT(level, pp, skb, ofs, msg) \
138 do { \ 138 do { \
139 if (level <= ip_vs_get_debug_level() && \ 139 if (level <= ip_vs_get_debug_level() && \
140 net_ratelimit()) \ 140 net_ratelimit()) \
141 pp->debug_packet(pp, skb, ofs, msg); \ 141 pp->debug_packet(pp, skb, ofs, msg); \
142 } while (0) 142 } while (0)
143#else /* NO DEBUGGING at ALL */ 143#else /* NO DEBUGGING at ALL */
144#define IP_VS_DBG_BUF(level, msg...) do {} while (0) 144#define IP_VS_DBG_BUF(level, msg...) do {} while (0)
145#define IP_VS_ERR_BUF(msg...) do {} while (0) 145#define IP_VS_ERR_BUF(msg...) do {} while (0)
@@ -150,29 +150,30 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len,
150#endif 150#endif
151 151
152#define IP_VS_BUG() BUG() 152#define IP_VS_BUG() BUG()
153#define IP_VS_ERR(msg...) printk(KERN_ERR "IPVS: " msg) 153#define IP_VS_ERR(msg...) pr_err(msg)
154#define IP_VS_INFO(msg...) printk(KERN_INFO "IPVS: " msg) 154#define IP_VS_INFO(msg...) pr_info(msg)
155#define IP_VS_WARNING(msg...) \ 155#define IP_VS_WARNING(msg...) pr_warning(msg)
156 printk(KERN_WARNING "IPVS: " msg) 156#define IP_VS_ERR_RL(msg...) \
157#define IP_VS_ERR_RL(msg...) \ 157 do { \
158 do { \ 158 if (net_ratelimit()) \
159 if (net_ratelimit()) \ 159 pr_err(msg); \
160 printk(KERN_ERR "IPVS: " msg); \ 160 } while (0)
161 } while (0)
162 161
163#ifdef CONFIG_IP_VS_DEBUG 162#ifdef CONFIG_IP_VS_DEBUG
164#define EnterFunction(level) \ 163#define EnterFunction(level) \
165 do { \ 164 do { \
166 if (level <= ip_vs_get_debug_level()) \ 165 if (level <= ip_vs_get_debug_level()) \
167 printk(KERN_DEBUG "Enter: %s, %s line %i\n", \ 166 printk(KERN_DEBUG \
168 __func__, __FILE__, __LINE__); \ 167 pr_fmt("Enter: %s, %s line %i\n"), \
169 } while (0) 168 __func__, __FILE__, __LINE__); \
170#define LeaveFunction(level) \ 169 } while (0)
171 do { \ 170#define LeaveFunction(level) \
172 if (level <= ip_vs_get_debug_level()) \ 171 do { \
173 printk(KERN_DEBUG "Leave: %s, %s line %i\n", \ 172 if (level <= ip_vs_get_debug_level()) \
174 __func__, __FILE__, __LINE__); \ 173 printk(KERN_DEBUG \
175 } while (0) 174 pr_fmt("Leave: %s, %s line %i\n"), \
175 __func__, __FILE__, __LINE__); \
176 } while (0)
176#else 177#else
177#define EnterFunction(level) do {} while (0) 178#define EnterFunction(level) do {} while (0)
178#define LeaveFunction(level) do {} while (0) 179#define LeaveFunction(level) do {} while (0)
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index f27fd83d67d8..ad9a51130254 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -441,6 +441,18 @@ static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_add
441 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); 441 return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr));
442} 442}
443 443
444static __inline__ void ipv6_select_ident(struct frag_hdr *fhdr)
445{
446 static u32 ipv6_fragmentation_id = 1;
447 static DEFINE_SPINLOCK(ip6_id_lock);
448
449 spin_lock_bh(&ip6_id_lock);
450 fhdr->identification = htonl(ipv6_fragmentation_id);
451 if (++ipv6_fragmentation_id == 0)
452 ipv6_fragmentation_id = 1;
453 spin_unlock_bh(&ip6_id_lock);
454}
455
444/* 456/*
445 * Prototypes exported by ipv6 457 * Prototypes exported by ipv6
446 */ 458 */
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h
index 51b9a37de991..2b3fbbb8669e 100644
--- a/include/net/iw_handler.h
+++ b/include/net/iw_handler.h
@@ -443,7 +443,7 @@ extern int dev_get_wireless_info(char * buffer, char **start, off_t offset,
443extern void wireless_send_event(struct net_device * dev, 443extern void wireless_send_event(struct net_device * dev,
444 unsigned int cmd, 444 unsigned int cmd,
445 union iwreq_data * wrqu, 445 union iwreq_data * wrqu,
446 char * extra); 446 const char * extra);
447 447
448/* We may need a function to send a stream of events to user space. 448/* We may need a function to send a stream of events to user space.
449 * More on that later... */ 449 * More on that later... */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c06104476973..7dd67a1ff4d5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -241,6 +241,8 @@ struct ieee80211_bss_conf {
241 * it can be sent out. 241 * it can be sent out.
242 * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, 242 * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211,
243 * used to indicate that a frame was already retried due to PS 243 * used to indicate that a frame was already retried due to PS
244 * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211,
245 * used to indicate frame should not be encrypted
244 */ 246 */
245enum mac80211_tx_control_flags { 247enum mac80211_tx_control_flags {
246 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 248 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
@@ -259,6 +261,7 @@ enum mac80211_tx_control_flags {
259 IEEE80211_TX_INTFL_RCALGO = BIT(13), 261 IEEE80211_TX_INTFL_RCALGO = BIT(13),
260 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 262 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
261 IEEE80211_TX_INTFL_RETRIED = BIT(15), 263 IEEE80211_TX_INTFL_RETRIED = BIT(15),
264 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
262}; 265};
263 266
264/** 267/**
@@ -397,6 +400,11 @@ static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
397 return (struct ieee80211_tx_info *)skb->cb; 400 return (struct ieee80211_tx_info *)skb->cb;
398} 401}
399 402
403static inline struct ieee80211_rx_status *IEEE80211_SKB_RXCB(struct sk_buff *skb)
404{
405 return (struct ieee80211_rx_status *)skb->cb;
406}
407
400/** 408/**
401 * ieee80211_tx_info_clear_status - clear TX status 409 * ieee80211_tx_info_clear_status - clear TX status
402 * 410 *
@@ -478,7 +486,7 @@ enum mac80211_rx_flags {
478 * 486 *
479 * The low-level driver should provide this information (the subset 487 * The low-level driver should provide this information (the subset
480 * supported by hardware) to the 802.11 code with each received 488 * supported by hardware) to the 802.11 code with each received
481 * frame. 489 * frame, in the skb's control buffer (cb).
482 * 490 *
483 * @mactime: value in microseconds of the 64-bit Time Synchronization Function 491 * @mactime: value in microseconds of the 64-bit Time Synchronization Function
484 * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. 492 * (TSF) timer when the first data symbol (MPDU) arrived at the hardware.
@@ -1411,6 +1419,8 @@ enum ieee80211_ampdu_mlme_action {
1411 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also 1419 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also
1412 * need to set wiphy->rfkill_poll to %true before registration, 1420 * need to set wiphy->rfkill_poll to %true before registration,
1413 * and need to call wiphy_rfkill_set_hw_state() in the callback. 1421 * and need to call wiphy_rfkill_set_hw_state() in the callback.
1422 *
1423 * @testmode_cmd: Implement a cfg80211 test mode command.
1414 */ 1424 */
1415struct ieee80211_ops { 1425struct ieee80211_ops {
1416 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb); 1426 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
@@ -1461,6 +1471,9 @@ struct ieee80211_ops {
1461 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1471 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1462 1472
1463 void (*rfkill_poll)(struct ieee80211_hw *hw); 1473 void (*rfkill_poll)(struct ieee80211_hw *hw);
1474#ifdef CONFIG_NL80211_TESTMODE
1475 int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
1476#endif
1464}; 1477};
1465 1478
1466/** 1479/**
@@ -1606,9 +1619,11 @@ void ieee80211_free_hw(struct ieee80211_hw *hw);
1606 */ 1619 */
1607void ieee80211_restart_hw(struct ieee80211_hw *hw); 1620void ieee80211_restart_hw(struct ieee80211_hw *hw);
1608 1621
1609/* trick to avoid symbol clashes with the ieee80211 subsystem */ 1622/*
1610void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, 1623 * trick to avoid symbol clashes with the ieee80211 subsystem,
1611 struct ieee80211_rx_status *status); 1624 * use the inline below instead
1625 */
1626void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1612 1627
1613/** 1628/**
1614 * ieee80211_rx - receive frame 1629 * ieee80211_rx - receive frame
@@ -1624,13 +1639,10 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
1624 * 1639 *
1625 * @hw: the hardware this frame came in on 1640 * @hw: the hardware this frame came in on
1626 * @skb: the buffer to receive, owned by mac80211 after this call 1641 * @skb: the buffer to receive, owned by mac80211 after this call
1627 * @status: status of this frame; the status pointer need not be valid
1628 * after this function returns
1629 */ 1642 */
1630static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb, 1643static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
1631 struct ieee80211_rx_status *status)
1632{ 1644{
1633 __ieee80211_rx(hw, skb, status); 1645 __ieee80211_rx(hw, skb);
1634} 1646}
1635 1647
1636/** 1648/**
@@ -1644,13 +1656,8 @@ static inline void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb,
1644 * 1656 *
1645 * @hw: the hardware this frame came in on 1657 * @hw: the hardware this frame came in on
1646 * @skb: the buffer to receive, owned by mac80211 after this call 1658 * @skb: the buffer to receive, owned by mac80211 after this call
1647 * @status: status of this frame; the status pointer need not be valid
1648 * after this function returns and is not freed by mac80211,
1649 * it is recommended that it points to a stack area
1650 */ 1659 */
1651void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, 1660void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
1652 struct sk_buff *skb,
1653 struct ieee80211_rx_status *status);
1654 1661
1655/** 1662/**
1656 * ieee80211_tx_status - transmit status callback 1663 * ieee80211_tx_status - transmit status callback
@@ -2090,6 +2097,29 @@ static inline int rate_supported(struct ieee80211_sta *sta,
2090 return (sta == NULL || sta->supp_rates[band] & BIT(index)); 2097 return (sta == NULL || sta->supp_rates[band] & BIT(index));
2091} 2098}
2092 2099
2100/**
2101 * rate_control_send_low - helper for drivers for management/no-ack frames
2102 *
2103 * Rate control algorithms that agree to use the lowest rate to
2104 * send management frames and NO_ACK data with the respective hw
2105 * retries should use this in the beginning of their mac80211 get_rate
2106 * callback. If true is returned the rate control can simply return.
2107 * If false is returned we guarantee that sta and sta and priv_sta is
2108 * not null.
2109 *
2110 * Rate control algorithms wishing to do more intelligent selection of
2111 * rate for multicast/broadcast frames may choose to not use this.
2112 *
2113 * @sta: &struct ieee80211_sta pointer to the target destination. Note
2114 * that this may be null.
2115 * @priv_sta: private rate control structure. This may be null.
2116 * @txrc: rate control information we sholud populate for mac80211.
2117 */
2118bool rate_control_send_low(struct ieee80211_sta *sta,
2119 void *priv_sta,
2120 struct ieee80211_tx_rate_control *txrc);
2121
2122
2093static inline s8 2123static inline s8
2094rate_lowest_index(struct ieee80211_supported_band *sband, 2124rate_lowest_index(struct ieee80211_supported_band *sband,
2095 struct ieee80211_sta *sta) 2125 struct ieee80211_sta *sta)
@@ -2106,6 +2136,17 @@ rate_lowest_index(struct ieee80211_supported_band *sband,
2106 return 0; 2136 return 0;
2107} 2137}
2108 2138
2139static inline
2140bool rate_usable_index_exists(struct ieee80211_supported_band *sband,
2141 struct ieee80211_sta *sta)
2142{
2143 unsigned int i;
2144
2145 for (i = 0; i < sband->n_bitrates; i++)
2146 if (rate_supported(sta, sband->band, i))
2147 return true;
2148 return false;
2149}
2109 2150
2110int ieee80211_rate_control_register(struct rate_control_ops *ops); 2151int ieee80211_rate_control_register(struct rate_control_ops *ops);
2111void ieee80211_rate_control_unregister(struct rate_control_ops *ops); 2152void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index ded434b032a4..a1202841aadd 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -26,6 +26,7 @@ struct net_device;
26struct sock; 26struct sock;
27struct ctl_table_header; 27struct ctl_table_header;
28struct net_generic; 28struct net_generic;
29struct sock;
29 30
30struct net { 31struct net {
31 atomic_t count; /* To decided when the network 32 atomic_t count; /* To decided when the network
@@ -57,6 +58,7 @@ struct net {
57 spinlock_t rules_mod_lock; 58 spinlock_t rules_mod_lock;
58 59
59 struct sock *rtnl; /* rtnetlink socket */ 60 struct sock *rtnl; /* rtnetlink socket */
61 struct sock *genl_sock;
60 62
61 struct netns_core core; 63 struct netns_core core;
62 struct netns_mib mib; 64 struct netns_mib mib;
@@ -78,6 +80,9 @@ struct net {
78#ifdef CONFIG_XFRM 80#ifdef CONFIG_XFRM
79 struct netns_xfrm xfrm; 81 struct netns_xfrm xfrm;
80#endif 82#endif
83#ifdef CONFIG_WIRELESS_EXT
84 struct sk_buff_head wext_nlevents;
85#endif
81 struct net_generic *gen; 86 struct net_generic *gen;
82}; 87};
83 88
@@ -106,6 +111,8 @@ static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
106 111
107extern struct list_head net_namespace_list; 112extern struct list_head net_namespace_list;
108 113
114extern struct net *get_net_ns_by_pid(pid_t pid);
115
109#ifdef CONFIG_NET_NS 116#ifdef CONFIG_NET_NS
110extern void __put_net(struct net *net); 117extern void __put_net(struct net *net);
111 118
@@ -208,6 +215,9 @@ static inline struct net *read_pnet(struct net * const *pnet)
208#define for_each_net(VAR) \ 215#define for_each_net(VAR) \
209 list_for_each_entry(VAR, &net_namespace_list, list) 216 list_for_each_entry(VAR, &net_namespace_list, list)
210 217
218#define for_each_net_rcu(VAR) \
219 list_for_each_entry_rcu(VAR, &net_namespace_list, list)
220
211#ifdef CONFIG_NET_NS 221#ifdef CONFIG_NET_NS
212#define __net_init 222#define __net_init
213#define __net_exit 223#define __net_exit
@@ -229,13 +239,15 @@ struct pernet_operations {
229 * needs per network namespace operations use device pernet operations, 239 * needs per network namespace operations use device pernet operations,
230 * otherwise use pernet subsys operations. 240 * otherwise use pernet subsys operations.
231 * 241 *
232 * This is critically important. Most of the network code cleanup 242 * Network interfaces need to be removed from a dying netns _before_
233 * runs with the assumption that dev_remove_pack has been called so no 243 * subsys notifiers can be called, as most of the network code cleanup
234 * new packets will arrive during and after the cleanup functions have 244 * (which is done from subsys notifiers) runs with the assumption that
235 * been called. dev_remove_pack is not per namespace so instead the 245 * dev_remove_pack has been called so no new packets will arrive during
236 * guarantee of no more packets arriving in a network namespace is 246 * and after the cleanup functions have been called. dev_remove_pack
237 * provided by ensuring that all network devices and all sockets have 247 * is not per namespace so instead the guarantee of no more packets
238 * left the network namespace before the cleanup methods are called. 248 * arriving in a network namespace is provided by ensuring that all
249 * network devices and all sockets have left the network namespace
250 * before the cleanup methods are called.
239 * 251 *
240 * For the longest time the ipv4 icmp code was registered as a pernet 252 * For the longest time the ipv4 icmp code was registered as a pernet
241 * device which caused kernel oops, and panics during network 253 * device which caused kernel oops, and panics during network
diff --git a/include/net/netns/x_tables.h b/include/net/netns/x_tables.h
index 9554a644a8f8..591db7d657a3 100644
--- a/include/net/netns/x_tables.h
+++ b/include/net/netns/x_tables.h
@@ -8,8 +8,11 @@ struct ebt_table;
8 8
9struct netns_xt { 9struct netns_xt {
10 struct list_head tables[NFPROTO_NUMPROTO]; 10 struct list_head tables[NFPROTO_NUMPROTO];
11#if defined(CONFIG_BRIDGE_NF_EBTABLES) || \
12 defined(CONFIG_BRIDGE_NF_EBTABLES_MODULE)
11 struct ebt_table *broute_table; 13 struct ebt_table *broute_table;
12 struct ebt_table *frame_filter; 14 struct ebt_table *frame_filter;
13 struct ebt_table *frame_nat; 15 struct ebt_table *frame_nat;
16#endif
14}; 17};
15#endif 18#endif
diff --git a/include/net/nl802154.h b/include/net/nl802154.h
new file mode 100644
index 000000000000..6096096f6d7d
--- /dev/null
+++ b/include/net/nl802154.h
@@ -0,0 +1,117 @@
1/*
2 * nl802154.h
3 *
4 * Copyright (C) 2007, 2008, 2009 Siemens AG
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 */
20
21#ifndef IEEE802154_NL_H
22#define IEEE802154_NL_H
23
24struct net_device;
25struct ieee802154_addr;
26
27/**
28 * ieee802154_nl_assoc_indic - Notify userland of an association request.
29 * @dev: The network device on which this association request was
30 * received.
31 * @addr: The address of the device requesting association.
32 * @cap: The capability information field from the device.
33 *
34 * This informs a userland coordinator of a device requesting to
35 * associate with the PAN controlled by the coordinator.
36 *
37 * Note: This is in section 7.3.1 of the IEEE 802.15.4-2006 document.
38 */
39int ieee802154_nl_assoc_indic(struct net_device *dev,
40 struct ieee802154_addr *addr, u8 cap);
41
42/**
43 * ieee802154_nl_assoc_confirm - Notify userland of association.
44 * @dev: The device which has completed association.
45 * @short_addr: The short address assigned to the device.
46 * @status: The status of the association.
47 *
48 * Inform userland of the result of an association request. If the
49 * association request included asking the coordinator to allocate
50 * a short address then it is returned in @short_addr.
51 *
52 * Note: This is in section 7.3.2 of the IEEE 802.15.4 document.
53 */
54int ieee802154_nl_assoc_confirm(struct net_device *dev,
55 u16 short_addr, u8 status);
56
57/**
58 * ieee802154_nl_disassoc_indic - Notify userland of disassociation.
59 * @dev: The device on which disassociation was indicated.
60 * @addr: The device which is disassociating.
61 * @reason: The reason for the disassociation.
62 *
63 * Inform userland that a device has disassociated from the network.
64 *
65 * Note: This is in section 7.3.3 of the IEEE 802.15.4 document.
66 */
67int ieee802154_nl_disassoc_indic(struct net_device *dev,
68 struct ieee802154_addr *addr, u8 reason);
69
70/**
71 * ieee802154_nl_disassoc_confirm - Notify userland of disassociation
72 * completion.
73 * @dev: The device on which disassociation was ordered.
74 * @status: The result of the disassociation.
75 *
76 * Inform userland of the result of requesting that a device
77 * disassociate, or the result of requesting that we disassociate from
78 * a PAN managed by another coordinator.
79 *
80 * Note: This is in section 7.1.4.3 of the IEEE 802.15.4 document.
81 */
82int ieee802154_nl_disassoc_confirm(struct net_device *dev,
83 u8 status);
84
85/**
86 * ieee802154_nl_scan_confirm - Notify userland of completion of scan.
87 * @dev: The device which was instructed to scan.
88 * @status: The status of the scan operation.
89 * @scan_type: What type of scan was performed.
90 * @unscanned: Any channels that the device was unable to scan.
91 * @edl: The energy levels (if a passive scan).
92 *
93 *
94 * Note: This is in section 7.1.11 of the IEEE 802.15.4 document.
95 * Note: This API does not permit the return of an active scan result.
96 */
97int ieee802154_nl_scan_confirm(struct net_device *dev,
98 u8 status, u8 scan_type, u32 unscanned,
99 u8 *edl/*, struct list_head *pan_desc_list */);
100
101/**
102 * ieee802154_nl_beacon_indic - Notify userland of a received beacon.
103 * @dev: The device on which a beacon was received.
104 * @panid: The PAN of the coordinator.
105 * @coord_addr: The short address of the coordinator on that PAN.
106 *
107 * Note: This is in section 7.1.5 of the IEEE 802.15.4 document.
108 * Note: This API does not provide extended information such as what
109 * channel the PAN is on or what the LQI of the beacon frame was on
110 * receipt.
111 * Note: This API cannot indicate a beacon frame for a coordinator
112 * operating in long addressing mode.
113 */
114int ieee802154_nl_beacon_indic(struct net_device *dev, u16 panid,
115 u16 coord_addr);
116
117#endif
diff --git a/include/net/phonet/pn_dev.h b/include/net/phonet/pn_dev.h
index 29d126736611..44c923c9e21d 100644
--- a/include/net/phonet/pn_dev.h
+++ b/include/net/phonet/pn_dev.h
@@ -49,4 +49,6 @@ void phonet_address_notify(int event, struct net_device *dev, u8 addr);
49 49
50#define PN_NO_ADDR 0xff 50#define PN_NO_ADDR 0xff
51 51
52extern const struct file_operations pn_sock_seq_fops;
53
52#endif 54#endif
diff --git a/include/net/scm.h b/include/net/scm.h
index f45bb6eca7d4..cf48c800e926 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -26,7 +26,6 @@ struct scm_cookie
26#ifdef CONFIG_SECURITY_NETWORK 26#ifdef CONFIG_SECURITY_NETWORK
27 u32 secid; /* Passed security ID */ 27 u32 secid; /* Passed security ID */
28#endif 28#endif
29 unsigned long seq; /* Connection seqno */
30}; 29};
31 30
32extern void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm); 31extern void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm);
@@ -59,7 +58,6 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
59 scm->creds.gid = current_gid(); 58 scm->creds.gid = current_gid();
60 scm->creds.pid = task_tgid_vnr(p); 59 scm->creds.pid = task_tgid_vnr(p);
61 scm->fp = NULL; 60 scm->fp = NULL;
62 scm->seq = 0;
63 unix_get_peersec_dgram(sock, scm); 61 unix_get_peersec_dgram(sock, scm);
64 if (msg->msg_controllen <= 0) 62 if (msg->msg_controllen <= 0)
65 return 0; 63 return 0;
diff --git a/include/net/udp.h b/include/net/udp.h
index 90e6ce56be65..5fb029f817a3 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -207,4 +207,7 @@ extern void udp4_proc_exit(void);
207#endif 207#endif
208 208
209extern void udp_init(void); 209extern void udp_init(void);
210
211extern int udp4_ufo_send_check(struct sk_buff *skb);
212extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, int features);
210#endif /* _UDP_H */ 213#endif /* _UDP_H */
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 9e3a3f4c1f60..223e90a44824 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1280,7 +1280,7 @@ struct xfrm6_tunnel {
1280}; 1280};
1281 1281
1282extern void xfrm_init(void); 1282extern void xfrm_init(void);
1283extern void xfrm4_init(void); 1283extern void xfrm4_init(int rt_hash_size);
1284extern int xfrm_state_init(struct net *net); 1284extern int xfrm_state_init(struct net *net);
1285extern void xfrm_state_fini(struct net *net); 1285extern void xfrm_state_fini(struct net *net);
1286extern void xfrm4_state_init(void); 1286extern void xfrm4_state_init(void);