diff options
author | Patrick McHardy <kaber@trash.net> | 2010-02-10 08:17:10 -0500 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-02-10 08:17:10 -0500 |
commit | 9ab99d5a43e9f283738fd9fd365539306d13eaac (patch) | |
tree | 0214a63e3f4f7f4f187f0139e4a5d8abe453902b /include | |
parent | 76780373190d7e8ddfb6fed06aef068e2445c743 (diff) | |
parent | b1109bf085c8dd69537b7876ea83f914dd1fe46a (diff) |
Merge branch 'master' of /repos/git/net-next-2.6
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
84 files changed, 1078 insertions, 284 deletions
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 9d7febde10a1..09469971472f 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -152,7 +152,7 @@ static inline void *acpi_os_acquire_object(acpi_cache_t * cache) | |||
152 | #include <linux/hardirq.h> | 152 | #include <linux/hardirq.h> |
153 | #define ACPI_PREEMPTION_POINT() \ | 153 | #define ACPI_PREEMPTION_POINT() \ |
154 | do { \ | 154 | do { \ |
155 | if (!in_atomic_preempt_off()) \ | 155 | if (!in_atomic_preempt_off() && !irqs_disabled()) \ |
156 | cond_resched(); \ | 156 | cond_resched(); \ |
157 | } while (0) | 157 | } while (0) |
158 | 158 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 29245c6b5c0e..0ea5ef4eb6a9 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -224,8 +224,6 @@ struct acpi_processor { | |||
224 | struct acpi_processor_throttling throttling; | 224 | struct acpi_processor_throttling throttling; |
225 | struct acpi_processor_limit limit; | 225 | struct acpi_processor_limit limit; |
226 | struct thermal_cooling_device *cdev; | 226 | struct thermal_cooling_device *cdev; |
227 | /* the _PDC objects for this processor, if any */ | ||
228 | struct acpi_object_list *pdc; | ||
229 | }; | 227 | }; |
230 | 228 | ||
231 | struct acpi_processor_errata { | 229 | struct acpi_processor_errata { |
@@ -257,9 +255,6 @@ int acpi_processor_notify_smm(struct module *calling_module); | |||
257 | DECLARE_PER_CPU(struct acpi_processor *, processors); | 255 | DECLARE_PER_CPU(struct acpi_processor *, processors); |
258 | extern struct acpi_processor_errata errata; | 256 | extern struct acpi_processor_errata errata; |
259 | 257 | ||
260 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); | ||
261 | void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr); | ||
262 | |||
263 | #ifdef ARCH_HAS_POWER_INIT | 258 | #ifdef ARCH_HAS_POWER_INIT |
264 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 259 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
265 | unsigned int cpu); | 260 | unsigned int cpu); |
@@ -325,6 +320,9 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) | |||
325 | 320 | ||
326 | #endif /* CONFIG_CPU_FREQ */ | 321 | #endif /* CONFIG_CPU_FREQ */ |
327 | 322 | ||
323 | /* in processor_pdc.c */ | ||
324 | void acpi_processor_set_pdc(acpi_handle handle); | ||
325 | |||
328 | /* in processor_throttling.c */ | 326 | /* in processor_throttling.c */ |
329 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | 327 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr); |
330 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 328 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 71dafb69cfeb..ffac157fb5b2 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1408,7 +1408,7 @@ extern int drm_ati_pcigart_cleanup(struct drm_device *dev, | |||
1408 | struct drm_ati_pcigart_info * gart_info); | 1408 | struct drm_ati_pcigart_info * gart_info); |
1409 | 1409 | ||
1410 | extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, | 1410 | extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, |
1411 | size_t align, dma_addr_t maxaddr); | 1411 | size_t align); |
1412 | extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); | 1412 | extern void __drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); |
1413 | extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); | 1413 | extern void drm_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); |
1414 | 1414 | ||
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 43009bc2e757..bc4fdf27bd2e 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -160,6 +160,7 @@ struct drm_mode_get_encoder { | |||
160 | #define DRM_MODE_CONNECTOR_HDMIA 11 | 160 | #define DRM_MODE_CONNECTOR_HDMIA 11 |
161 | #define DRM_MODE_CONNECTOR_HDMIB 12 | 161 | #define DRM_MODE_CONNECTOR_HDMIB 12 |
162 | #define DRM_MODE_CONNECTOR_TV 13 | 162 | #define DRM_MODE_CONNECTOR_TV 13 |
163 | #define DRM_MODE_CONNECTOR_eDP 14 | ||
163 | 164 | ||
164 | struct drm_mode_get_connector { | 165 | struct drm_mode_get_connector { |
165 | 166 | ||
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index ec3f5e80a5df..b64a8d7cdf6d 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h | |||
@@ -188,6 +188,7 @@ typedef struct _drm_i915_sarea { | |||
188 | #define DRM_I915_GEM_MADVISE 0x26 | 188 | #define DRM_I915_GEM_MADVISE 0x26 |
189 | #define DRM_I915_OVERLAY_PUT_IMAGE 0x27 | 189 | #define DRM_I915_OVERLAY_PUT_IMAGE 0x27 |
190 | #define DRM_I915_OVERLAY_ATTRS 0x28 | 190 | #define DRM_I915_OVERLAY_ATTRS 0x28 |
191 | #define DRM_I915_GEM_EXECBUFFER2 0x29 | ||
191 | 192 | ||
192 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) | 193 | #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) |
193 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) | 194 | #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) |
@@ -207,6 +208,7 @@ typedef struct _drm_i915_sarea { | |||
207 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) | 208 | #define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) |
208 | #define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) | 209 | #define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) |
209 | #define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) | 210 | #define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) |
211 | #define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2) | ||
210 | #define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin) | 212 | #define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin) |
211 | #define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin) | 213 | #define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin) |
212 | #define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy) | 214 | #define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy) |
@@ -272,6 +274,7 @@ typedef struct drm_i915_irq_wait { | |||
272 | #define I915_PARAM_NUM_FENCES_AVAIL 6 | 274 | #define I915_PARAM_NUM_FENCES_AVAIL 6 |
273 | #define I915_PARAM_HAS_OVERLAY 7 | 275 | #define I915_PARAM_HAS_OVERLAY 7 |
274 | #define I915_PARAM_HAS_PAGEFLIPPING 8 | 276 | #define I915_PARAM_HAS_PAGEFLIPPING 8 |
277 | #define I915_PARAM_HAS_EXECBUF2 9 | ||
275 | 278 | ||
276 | typedef struct drm_i915_getparam { | 279 | typedef struct drm_i915_getparam { |
277 | int param; | 280 | int param; |
@@ -567,6 +570,57 @@ struct drm_i915_gem_execbuffer { | |||
567 | __u64 cliprects_ptr; | 570 | __u64 cliprects_ptr; |
568 | }; | 571 | }; |
569 | 572 | ||
573 | struct drm_i915_gem_exec_object2 { | ||
574 | /** | ||
575 | * User's handle for a buffer to be bound into the GTT for this | ||
576 | * operation. | ||
577 | */ | ||
578 | __u32 handle; | ||
579 | |||
580 | /** Number of relocations to be performed on this buffer */ | ||
581 | __u32 relocation_count; | ||
582 | /** | ||
583 | * Pointer to array of struct drm_i915_gem_relocation_entry containing | ||
584 | * the relocations to be performed in this buffer. | ||
585 | */ | ||
586 | __u64 relocs_ptr; | ||
587 | |||
588 | /** Required alignment in graphics aperture */ | ||
589 | __u64 alignment; | ||
590 | |||
591 | /** | ||
592 | * Returned value of the updated offset of the object, for future | ||
593 | * presumed_offset writes. | ||
594 | */ | ||
595 | __u64 offset; | ||
596 | |||
597 | #define EXEC_OBJECT_NEEDS_FENCE (1<<0) | ||
598 | __u64 flags; | ||
599 | __u64 rsvd1; | ||
600 | __u64 rsvd2; | ||
601 | }; | ||
602 | |||
603 | struct drm_i915_gem_execbuffer2 { | ||
604 | /** | ||
605 | * List of gem_exec_object2 structs | ||
606 | */ | ||
607 | __u64 buffers_ptr; | ||
608 | __u32 buffer_count; | ||
609 | |||
610 | /** Offset in the batchbuffer to start execution from. */ | ||
611 | __u32 batch_start_offset; | ||
612 | /** Bytes used in batchbuffer from batch_start_offset */ | ||
613 | __u32 batch_len; | ||
614 | __u32 DR1; | ||
615 | __u32 DR4; | ||
616 | __u32 num_cliprects; | ||
617 | /** This is a struct drm_clip_rect *cliprects */ | ||
618 | __u64 cliprects_ptr; | ||
619 | __u64 flags; /* currently unused */ | ||
620 | __u64 rsvd1; | ||
621 | __u64 rsvd2; | ||
622 | }; | ||
623 | |||
570 | struct drm_i915_gem_pin { | 624 | struct drm_i915_gem_pin { |
571 | /** Handle of the buffer to be pinned. */ | 625 | /** Handle of the buffer to be pinned. */ |
572 | __u32 handle; | 626 | __u32 handle; |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 756f831cbdd5..d93080748a91 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -362,6 +362,7 @@ unifdef-y += uio.h | |||
362 | unifdef-y += unistd.h | 362 | unifdef-y += unistd.h |
363 | unifdef-y += usbdevice_fs.h | 363 | unifdef-y += usbdevice_fs.h |
364 | unifdef-y += utsname.h | 364 | unifdef-y += utsname.h |
365 | unifdef-y += vhost.h | ||
365 | unifdef-y += videodev2.h | 366 | unifdef-y += videodev2.h |
366 | unifdef-y += videodev.h | 367 | unifdef-y += videodev.h |
367 | unifdef-y += virtio_config.h | 368 | unifdef-y += virtio_config.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ce945d4845fc..b926afe8c03e 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -80,7 +80,7 @@ char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | |||
80 | void __acpi_unmap_table(char *map, unsigned long size); | 80 | void __acpi_unmap_table(char *map, unsigned long size); |
81 | int early_acpi_boot_init(void); | 81 | int early_acpi_boot_init(void); |
82 | int acpi_boot_init (void); | 82 | int acpi_boot_init (void); |
83 | int acpi_boot_table_init (void); | 83 | void acpi_boot_table_init (void); |
84 | int acpi_mps_check (void); | 84 | int acpi_mps_check (void); |
85 | int acpi_numa_init (void); | 85 | int acpi_numa_init (void); |
86 | 86 | ||
@@ -251,6 +251,7 @@ int acpi_check_mem_region(resource_size_t start, resource_size_t n, | |||
251 | void __init acpi_no_s4_hw_signature(void); | 251 | void __init acpi_no_s4_hw_signature(void); |
252 | void __init acpi_old_suspend_ordering(void); | 252 | void __init acpi_old_suspend_ordering(void); |
253 | void __init acpi_s4_no_nvs(void); | 253 | void __init acpi_s4_no_nvs(void); |
254 | void __init acpi_set_sci_en_on_resume(void); | ||
254 | #endif /* CONFIG_PM_SLEEP */ | 255 | #endif /* CONFIG_PM_SLEEP */ |
255 | 256 | ||
256 | struct acpi_osc_context { | 257 | struct acpi_osc_context { |
@@ -320,9 +321,9 @@ static inline int acpi_boot_init(void) | |||
320 | return 0; | 321 | return 0; |
321 | } | 322 | } |
322 | 323 | ||
323 | static inline int acpi_boot_table_init(void) | 324 | static inline void acpi_boot_table_init(void) |
324 | { | 325 | { |
325 | return 0; | 326 | return; |
326 | } | 327 | } |
327 | 328 | ||
328 | static inline int acpi_mps_check(void) | 329 | static inline int acpi_mps_check(void) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 784a919aa0d0..5c8018977efa 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -845,7 +845,6 @@ static inline struct request_queue *bdev_get_queue(struct block_device *bdev) | |||
845 | * blk_rq_err_bytes() : bytes left till the next error boundary | 845 | * blk_rq_err_bytes() : bytes left till the next error boundary |
846 | * blk_rq_sectors() : sectors left in the entire request | 846 | * blk_rq_sectors() : sectors left in the entire request |
847 | * blk_rq_cur_sectors() : sectors left in the current segment | 847 | * blk_rq_cur_sectors() : sectors left in the current segment |
848 | * blk_rq_err_sectors() : sectors left till the next error boundary | ||
849 | */ | 848 | */ |
850 | static inline sector_t blk_rq_pos(const struct request *rq) | 849 | static inline sector_t blk_rq_pos(const struct request *rq) |
851 | { | 850 | { |
@@ -874,11 +873,6 @@ static inline unsigned int blk_rq_cur_sectors(const struct request *rq) | |||
874 | return blk_rq_cur_bytes(rq) >> 9; | 873 | return blk_rq_cur_bytes(rq) >> 9; |
875 | } | 874 | } |
876 | 875 | ||
877 | static inline unsigned int blk_rq_err_sectors(const struct request *rq) | ||
878 | { | ||
879 | return blk_rq_err_bytes(rq) >> 9; | ||
880 | } | ||
881 | |||
882 | /* | 876 | /* |
883 | * Request issue related functions. | 877 | * Request issue related functions. |
884 | */ | 878 | */ |
@@ -944,6 +938,8 @@ extern void blk_queue_io_opt(struct request_queue *q, unsigned int opt); | |||
944 | extern void blk_set_default_limits(struct queue_limits *lim); | 938 | extern void blk_set_default_limits(struct queue_limits *lim); |
945 | extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, | 939 | extern int blk_stack_limits(struct queue_limits *t, struct queue_limits *b, |
946 | sector_t offset); | 940 | sector_t offset); |
941 | extern int bdev_stack_limits(struct queue_limits *t, struct block_device *bdev, | ||
942 | sector_t offset); | ||
947 | extern void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, | 943 | extern void disk_stack_limits(struct gendisk *disk, struct block_device *bdev, |
948 | sector_t offset); | 944 | sector_t offset); |
949 | extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); | 945 | extern void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b); |
@@ -1116,11 +1112,18 @@ static inline int queue_alignment_offset(struct request_queue *q) | |||
1116 | return q->limits.alignment_offset; | 1112 | return q->limits.alignment_offset; |
1117 | } | 1113 | } |
1118 | 1114 | ||
1115 | static inline int queue_limit_alignment_offset(struct queue_limits *lim, sector_t offset) | ||
1116 | { | ||
1117 | unsigned int granularity = max(lim->physical_block_size, lim->io_min); | ||
1118 | |||
1119 | offset &= granularity - 1; | ||
1120 | return (granularity + lim->alignment_offset - offset) & (granularity - 1); | ||
1121 | } | ||
1122 | |||
1119 | static inline int queue_sector_alignment_offset(struct request_queue *q, | 1123 | static inline int queue_sector_alignment_offset(struct request_queue *q, |
1120 | sector_t sector) | 1124 | sector_t sector) |
1121 | { | 1125 | { |
1122 | return ((sector << 9) - q->limits.alignment_offset) | 1126 | return queue_limit_alignment_offset(&q->limits, sector << 9); |
1123 | & (q->limits.io_min - 1); | ||
1124 | } | 1127 | } |
1125 | 1128 | ||
1126 | static inline int bdev_alignment_offset(struct block_device *bdev) | 1129 | static inline int bdev_alignment_offset(struct block_device *bdev) |
@@ -1147,8 +1150,11 @@ static inline int queue_discard_alignment(struct request_queue *q) | |||
1147 | static inline int queue_sector_discard_alignment(struct request_queue *q, | 1150 | static inline int queue_sector_discard_alignment(struct request_queue *q, |
1148 | sector_t sector) | 1151 | sector_t sector) |
1149 | { | 1152 | { |
1150 | return ((sector << 9) - q->limits.discard_alignment) | 1153 | struct queue_limits *lim = &q->limits; |
1151 | & (q->limits.discard_granularity - 1); | 1154 | unsigned int alignment = (sector << 9) & (lim->discard_granularity - 1); |
1155 | |||
1156 | return (lim->discard_granularity + lim->discard_alignment - alignment) | ||
1157 | & (lim->discard_granularity - 1); | ||
1152 | } | 1158 | } |
1153 | 1159 | ||
1154 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) | 1160 | static inline unsigned int queue_discard_zeroes_data(struct request_queue *q) |
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 3db7767d2a17..c8c660a79f90 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
@@ -38,6 +38,7 @@ struct can_priv { | |||
38 | 38 | ||
39 | enum can_state state; | 39 | enum can_state state; |
40 | u32 ctrlmode; | 40 | u32 ctrlmode; |
41 | u32 ctrlmode_supported; | ||
41 | 42 | ||
42 | int restart_ms; | 43 | int restart_ms; |
43 | struct timer_list restart_timer; | 44 | struct timer_list restart_timer; |
@@ -60,6 +61,21 @@ struct can_priv { | |||
60 | */ | 61 | */ |
61 | #define get_can_dlc(i) (min_t(__u8, (i), 8)) | 62 | #define get_can_dlc(i) (min_t(__u8, (i), 8)) |
62 | 63 | ||
64 | /* Drop a given socketbuffer if it does not contain a valid CAN frame. */ | ||
65 | static inline int can_dropped_invalid_skb(struct net_device *dev, | ||
66 | struct sk_buff *skb) | ||
67 | { | ||
68 | const struct can_frame *cf = (struct can_frame *)skb->data; | ||
69 | |||
70 | if (unlikely(skb->len != sizeof(*cf) || cf->can_dlc > 8)) { | ||
71 | kfree_skb(skb); | ||
72 | dev->stats.tx_dropped++; | ||
73 | return 1; | ||
74 | } | ||
75 | |||
76 | return 0; | ||
77 | } | ||
78 | |||
63 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); | 79 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); |
64 | void free_candev(struct net_device *dev); | 80 | void free_candev(struct net_device *dev); |
65 | 81 | ||
diff --git a/include/linux/connector.h b/include/linux/connector.h index 72ba63eb83c5..3a779ffba60b 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -24,9 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | 26 | ||
27 | #define CN_IDX_CONNECTOR 0xffffffff | ||
28 | #define CN_VAL_CONNECTOR 0xffffffff | ||
29 | |||
30 | /* | 27 | /* |
31 | * Process Events connector unique ids -- used for message routing | 28 | * Process Events connector unique ids -- used for message routing |
32 | */ | 29 | */ |
@@ -75,30 +72,6 @@ struct cn_msg { | |||
75 | __u8 data[0]; | 72 | __u8 data[0]; |
76 | }; | 73 | }; |
77 | 74 | ||
78 | /* | ||
79 | * Notify structure - requests notification about | ||
80 | * registering/unregistering idx/val in range [first, first+range]. | ||
81 | */ | ||
82 | struct cn_notify_req { | ||
83 | __u32 first; | ||
84 | __u32 range; | ||
85 | }; | ||
86 | |||
87 | /* | ||
88 | * Main notification control message | ||
89 | * *_notify_num - number of appropriate cn_notify_req structures after | ||
90 | * this struct. | ||
91 | * group - notification receiver's idx. | ||
92 | * len - total length of the attached data. | ||
93 | */ | ||
94 | struct cn_ctl_msg { | ||
95 | __u32 idx_notify_num; | ||
96 | __u32 val_notify_num; | ||
97 | __u32 group; | ||
98 | __u32 len; | ||
99 | __u8 data[0]; | ||
100 | }; | ||
101 | |||
102 | #ifdef __KERNEL__ | 75 | #ifdef __KERNEL__ |
103 | 76 | ||
104 | #include <asm/atomic.h> | 77 | #include <asm/atomic.h> |
@@ -151,11 +124,6 @@ struct cn_callback_entry { | |||
151 | u32 seq, group; | 124 | u32 seq, group; |
152 | }; | 125 | }; |
153 | 126 | ||
154 | struct cn_ctl_entry { | ||
155 | struct list_head notify_entry; | ||
156 | struct cn_ctl_msg *msg; | ||
157 | }; | ||
158 | |||
159 | struct cn_dev { | 127 | struct cn_dev { |
160 | struct cb_id id; | 128 | struct cb_id id; |
161 | 129 | ||
diff --git a/include/linux/decompress/unlzo.h b/include/linux/decompress/unlzo.h new file mode 100644 index 000000000000..987229752519 --- /dev/null +++ b/include/linux/decompress/unlzo.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef DECOMPRESS_UNLZO_H | ||
2 | #define DECOMPRESS_UNLZO_H | ||
3 | |||
4 | int unlzo(unsigned char *inbuf, int len, | ||
5 | int(*fill)(void*, unsigned int), | ||
6 | int(*flush)(void*, unsigned int), | ||
7 | unsigned char *output, | ||
8 | int *pos, | ||
9 | void(*error)(char *x)); | ||
10 | #endif | ||
diff --git a/include/linux/drbd.h b/include/linux/drbd.h index e84f4733cb55..78962272338a 100644 --- a/include/linux/drbd.h +++ b/include/linux/drbd.h | |||
@@ -53,7 +53,7 @@ | |||
53 | 53 | ||
54 | 54 | ||
55 | extern const char *drbd_buildtag(void); | 55 | extern const char *drbd_buildtag(void); |
56 | #define REL_VERSION "8.3.6" | 56 | #define REL_VERSION "8.3.7" |
57 | #define API_VERSION 88 | 57 | #define API_VERSION 88 |
58 | #define PRO_VERSION_MIN 86 | 58 | #define PRO_VERSION_MIN 86 |
59 | #define PRO_VERSION_MAX 91 | 59 | #define PRO_VERSION_MAX 91 |
diff --git a/include/linux/drbd_nl.h b/include/linux/drbd_nl.h index db5721ad50d1..a4d82f895994 100644 --- a/include/linux/drbd_nl.h +++ b/include/linux/drbd_nl.h | |||
@@ -69,6 +69,7 @@ NL_PACKET(disconnect, 6, ) | |||
69 | 69 | ||
70 | NL_PACKET(resize, 7, | 70 | NL_PACKET(resize, 7, |
71 | NL_INT64( 29, T_MAY_IGNORE, resize_size) | 71 | NL_INT64( 29, T_MAY_IGNORE, resize_size) |
72 | NL_BIT( 68, T_MAY_IGNORE, resize_force) | ||
72 | ) | 73 | ) |
73 | 74 | ||
74 | NL_PACKET(syncer_conf, 8, | 75 | NL_PACKET(syncer_conf, 8, |
diff --git a/include/linux/fiemap.h b/include/linux/fiemap.h index 934e22d65801..d830747f5c0b 100644 --- a/include/linux/fiemap.h +++ b/include/linux/fiemap.h | |||
@@ -62,5 +62,7 @@ struct fiemap { | |||
62 | #define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively | 62 | #define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively |
63 | * support extents. Result | 63 | * support extents. Result |
64 | * merged for efficiency. */ | 64 | * merged for efficiency. */ |
65 | #define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other | ||
66 | * files. */ | ||
65 | 67 | ||
66 | #endif /* _LINUX_FIEMAP_H */ | 68 | #endif /* _LINUX_FIEMAP_H */ |
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index c6b3ca3af6df..1f716d9f714b 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -340,6 +340,9 @@ struct fw_cdev_send_response { | |||
340 | * The @closure field is passed back to userspace in the response event. | 340 | * The @closure field is passed back to userspace in the response event. |
341 | * The @handle field is an out parameter, returning a handle to the allocated | 341 | * The @handle field is an out parameter, returning a handle to the allocated |
342 | * range to be used for later deallocation of the range. | 342 | * range to be used for later deallocation of the range. |
343 | * | ||
344 | * The address range is allocated on all local nodes. The address allocation | ||
345 | * is exclusive except for the FCP command and response registers. | ||
343 | */ | 346 | */ |
344 | struct fw_cdev_allocate { | 347 | struct fw_cdev_allocate { |
345 | __u64 offset; | 348 | __u64 offset; |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 9416a461b696..a0e67150a729 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -248,8 +248,8 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode, | |||
248 | void *data, size_t length, | 248 | void *data, size_t length, |
249 | void *callback_data); | 249 | void *callback_data); |
250 | /* | 250 | /* |
251 | * Important note: The callback must guarantee that either fw_send_response() | 251 | * Important note: Except for the FCP registers, the callback must guarantee |
252 | * or kfree() is called on the @request. | 252 | * that either fw_send_response() or kfree() is called on the @request. |
253 | */ | 253 | */ |
254 | typedef void (*fw_address_callback_t)(struct fw_card *card, | 254 | typedef void (*fw_address_callback_t)(struct fw_card *card, |
255 | struct fw_request *request, | 255 | struct fw_request *request, |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9147ca88f253..b1bcb275b596 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2463,7 +2463,7 @@ int proc_nr_files(struct ctl_table *table, int write, | |||
2463 | 2463 | ||
2464 | int __init get_filesystem_list(char *buf); | 2464 | int __init get_filesystem_list(char *buf); |
2465 | 2465 | ||
2466 | #define ACC_MODE(x) ("\000\004\002\006"[(x)&O_ACCMODE]) | 2466 | #define ACC_MODE(x) ("\004\002\006\006"[(x)&O_ACCMODE]) |
2467 | #define OPEN_FMODE(flag) ((__force fmode_t)((flag + 1) & O_ACCMODE)) | 2467 | #define OPEN_FMODE(flag) ((__force fmode_t)((flag + 1) & O_ACCMODE)) |
2468 | 2468 | ||
2469 | #endif /* __KERNEL__ */ | 2469 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index c6c0c41af35f..9717081c75ad 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -256,9 +256,9 @@ extern struct hd_struct *disk_map_sector_rcu(struct gendisk *disk, | |||
256 | #define part_stat_read(part, field) \ | 256 | #define part_stat_read(part, field) \ |
257 | ({ \ | 257 | ({ \ |
258 | typeof((part)->dkstats->field) res = 0; \ | 258 | typeof((part)->dkstats->field) res = 0; \ |
259 | int i; \ | 259 | unsigned int _cpu; \ |
260 | for_each_possible_cpu(i) \ | 260 | for_each_possible_cpu(_cpu) \ |
261 | res += per_cpu_ptr((part)->dkstats, i)->field; \ | 261 | res += per_cpu_ptr((part)->dkstats, _cpu)->field; \ |
262 | res; \ | 262 | res; \ |
263 | }) | 263 | }) |
264 | 264 | ||
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index 211ff4497269..ab2cc20e21a5 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h | |||
@@ -46,7 +46,7 @@ void kmap_flush_unused(void); | |||
46 | 46 | ||
47 | static inline unsigned int nr_free_highpages(void) { return 0; } | 47 | static inline unsigned int nr_free_highpages(void) { return 0; } |
48 | 48 | ||
49 | #define totalhigh_pages 0 | 49 | #define totalhigh_pages 0UL |
50 | 50 | ||
51 | #ifndef ARCH_HAS_KMAP | 51 | #ifndef ARCH_HAS_KMAP |
52 | static inline void *kmap(struct page *page) | 52 | static inline void *kmap(struct page *page) |
diff --git a/include/linux/i2c/adp5588.h b/include/linux/i2c/adp5588.h index fc5db826b48e..02c9af374741 100644 --- a/include/linux/i2c/adp5588.h +++ b/include/linux/i2c/adp5588.h | |||
@@ -89,4 +89,16 @@ struct adp5588_kpad_platform_data { | |||
89 | unsigned short unlock_key2; /* Unlock Key 2 */ | 89 | unsigned short unlock_key2; /* Unlock Key 2 */ |
90 | }; | 90 | }; |
91 | 91 | ||
92 | struct adp5588_gpio_platform_data { | ||
93 | unsigned gpio_start; /* GPIO Chip base # */ | ||
94 | unsigned pullup_dis_mask; /* Pull-Up Disable Mask */ | ||
95 | int (*setup)(struct i2c_client *client, | ||
96 | int gpio, unsigned ngpio, | ||
97 | void *context); | ||
98 | int (*teardown)(struct i2c_client *client, | ||
99 | int gpio, unsigned ngpio, | ||
100 | void *context); | ||
101 | void *context; | ||
102 | }; | ||
103 | |||
92 | #endif | 104 | #endif |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index aeea282bd2fe..19984958ab7b 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -120,6 +120,26 @@ | |||
120 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F | 120 | #define IEEE80211_QOS_CTL_TID_MASK 0x000F |
121 | #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 | 121 | #define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007 |
122 | 122 | ||
123 | /* U-APSD queue for WMM IEs sent by AP */ | ||
124 | #define IEEE80211_WMM_IE_AP_QOSINFO_UAPSD (1<<7) | ||
125 | |||
126 | /* U-APSD queues for WMM IEs sent by STA */ | ||
127 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VO (1<<0) | ||
128 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_VI (1<<1) | ||
129 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_BK (1<<2) | ||
130 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_BE (1<<3) | ||
131 | #define IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK 0x0f | ||
132 | |||
133 | /* U-APSD max SP length for WMM IEs sent by STA */ | ||
134 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL 0x00 | ||
135 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_2 0x01 | ||
136 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_4 0x02 | ||
137 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_6 0x03 | ||
138 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_MASK 0x03 | ||
139 | #define IEEE80211_WMM_IE_STA_QOSINFO_SP_SHIFT 5 | ||
140 | |||
141 | #define IEEE80211_HT_CTL_LEN 4 | ||
142 | |||
123 | struct ieee80211_hdr { | 143 | struct ieee80211_hdr { |
124 | __le16 frame_control; | 144 | __le16 frame_control; |
125 | __le16 duration_id; | 145 | __le16 duration_id; |
@@ -130,6 +150,25 @@ struct ieee80211_hdr { | |||
130 | u8 addr4[6]; | 150 | u8 addr4[6]; |
131 | } __attribute__ ((packed)); | 151 | } __attribute__ ((packed)); |
132 | 152 | ||
153 | struct ieee80211_hdr_3addr { | ||
154 | __le16 frame_control; | ||
155 | __le16 duration_id; | ||
156 | u8 addr1[6]; | ||
157 | u8 addr2[6]; | ||
158 | u8 addr3[6]; | ||
159 | __le16 seq_ctrl; | ||
160 | } __attribute__ ((packed)); | ||
161 | |||
162 | struct ieee80211_qos_hdr { | ||
163 | __le16 frame_control; | ||
164 | __le16 duration_id; | ||
165 | u8 addr1[6]; | ||
166 | u8 addr2[6]; | ||
167 | u8 addr3[6]; | ||
168 | __le16 seq_ctrl; | ||
169 | __le16 qos_ctrl; | ||
170 | } __attribute__ ((packed)); | ||
171 | |||
133 | /** | 172 | /** |
134 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set | 173 | * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set |
135 | * @fc: frame control bytes in little-endian byteorder | 174 | * @fc: frame control bytes in little-endian byteorder |
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 5f200bac3749..51f1512045e9 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
@@ -1,6 +1,77 @@ | |||
1 | #ifndef _LINUX_IF_MACVLAN_H | 1 | #ifndef _LINUX_IF_MACVLAN_H |
2 | #define _LINUX_IF_MACVLAN_H | 2 | #define _LINUX_IF_MACVLAN_H |
3 | 3 | ||
4 | #include <linux/if_link.h> | ||
5 | #include <linux/list.h> | ||
6 | #include <linux/netdevice.h> | ||
7 | #include <linux/netlink.h> | ||
8 | #include <net/netlink.h> | ||
9 | |||
10 | struct macvlan_port; | ||
11 | struct macvtap_queue; | ||
12 | |||
13 | /** | ||
14 | * struct macvlan_rx_stats - MACVLAN percpu rx stats | ||
15 | * @rx_packets: number of received packets | ||
16 | * @rx_bytes: number of received bytes | ||
17 | * @multicast: number of received multicast packets | ||
18 | * @rx_errors: number of errors | ||
19 | */ | ||
20 | struct macvlan_rx_stats { | ||
21 | unsigned long rx_packets; | ||
22 | unsigned long rx_bytes; | ||
23 | unsigned long multicast; | ||
24 | unsigned long rx_errors; | ||
25 | }; | ||
26 | |||
27 | struct macvlan_dev { | ||
28 | struct net_device *dev; | ||
29 | struct list_head list; | ||
30 | struct hlist_node hlist; | ||
31 | struct macvlan_port *port; | ||
32 | struct net_device *lowerdev; | ||
33 | struct macvlan_rx_stats *rx_stats; | ||
34 | enum macvlan_mode mode; | ||
35 | int (*receive)(struct sk_buff *skb); | ||
36 | int (*forward)(struct net_device *dev, struct sk_buff *skb); | ||
37 | struct macvtap_queue *tap; | ||
38 | }; | ||
39 | |||
40 | static inline void macvlan_count_rx(const struct macvlan_dev *vlan, | ||
41 | unsigned int len, bool success, | ||
42 | bool multicast) | ||
43 | { | ||
44 | struct macvlan_rx_stats *rx_stats; | ||
45 | |||
46 | rx_stats = per_cpu_ptr(vlan->rx_stats, smp_processor_id()); | ||
47 | if (likely(success)) { | ||
48 | rx_stats->rx_packets++;; | ||
49 | rx_stats->rx_bytes += len; | ||
50 | if (multicast) | ||
51 | rx_stats->multicast++; | ||
52 | } else { | ||
53 | rx_stats->rx_errors++; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | extern int macvlan_common_newlink(struct net *src_net, struct net_device *dev, | ||
58 | struct nlattr *tb[], struct nlattr *data[], | ||
59 | int (*receive)(struct sk_buff *skb), | ||
60 | int (*forward)(struct net_device *dev, | ||
61 | struct sk_buff *skb)); | ||
62 | |||
63 | extern void macvlan_count_rx(const struct macvlan_dev *vlan, | ||
64 | unsigned int len, bool success, | ||
65 | bool multicast); | ||
66 | |||
67 | extern void macvlan_dellink(struct net_device *dev, struct list_head *head); | ||
68 | |||
69 | extern int macvlan_link_register(struct rtnl_link_ops *ops); | ||
70 | |||
71 | extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb, | ||
72 | struct net_device *dev); | ||
73 | |||
74 | |||
4 | extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *); | 75 | extern struct sk_buff *(*macvlan_handle_frame_hook)(struct sk_buff *); |
5 | 76 | ||
6 | #endif /* _LINUX_IF_MACVLAN_H */ | 77 | #endif /* _LINUX_IF_MACVLAN_H */ |
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index 4021d47cc437..aa57a5f993fc 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -46,6 +46,7 @@ struct sockaddr_ll { | |||
46 | #define PACKET_RESERVE 12 | 46 | #define PACKET_RESERVE 12 |
47 | #define PACKET_TX_RING 13 | 47 | #define PACKET_TX_RING 13 |
48 | #define PACKET_LOSS 14 | 48 | #define PACKET_LOSS 14 |
49 | #define PACKET_VNET_HDR 15 | ||
49 | 50 | ||
50 | struct tpacket_stats { | 51 | struct tpacket_stats { |
51 | unsigned int tp_packets; | 52 | unsigned int tp_packets; |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 3f5fd523b49d..404abe00162c 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -86,4 +86,18 @@ struct tun_filter { | |||
86 | __u8 addr[0][ETH_ALEN]; | 86 | __u8 addr[0][ETH_ALEN]; |
87 | }; | 87 | }; |
88 | 88 | ||
89 | #ifdef __KERNEL__ | ||
90 | #if defined(CONFIG_TUN) || defined(CONFIG_TUN_MODULE) | ||
91 | struct socket *tun_get_socket(struct file *); | ||
92 | #else | ||
93 | #include <linux/err.h> | ||
94 | #include <linux/errno.h> | ||
95 | struct file; | ||
96 | struct socket; | ||
97 | static inline struct socket *tun_get_socket(struct file *f) | ||
98 | { | ||
99 | return ERR_PTR(-EINVAL); | ||
100 | } | ||
101 | #endif /* CONFIG_TUN */ | ||
102 | #endif /* __KERNEL__ */ | ||
89 | #endif /* __IF_TUN_H */ | 103 | #endif /* __IF_TUN_H */ |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 724c27e5d173..93fc2449af10 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -153,6 +153,7 @@ extern int sysctl_igmp_max_msf; | |||
153 | struct ip_sf_socklist { | 153 | struct ip_sf_socklist { |
154 | unsigned int sl_max; | 154 | unsigned int sl_max; |
155 | unsigned int sl_count; | 155 | unsigned int sl_count; |
156 | struct rcu_head rcu; | ||
156 | __be32 sl_addr[0]; | 157 | __be32 sl_addr[0]; |
157 | }; | 158 | }; |
158 | 159 | ||
@@ -170,6 +171,7 @@ struct ip_mc_socklist { | |||
170 | struct ip_mreqn multi; | 171 | struct ip_mreqn multi; |
171 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ | 172 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ |
172 | struct ip_sf_socklist *sflist; | 173 | struct ip_sf_socklist *sflist; |
174 | struct rcu_head rcu; | ||
173 | }; | 175 | }; |
174 | 176 | ||
175 | struct ip_sf_list { | 177 | struct ip_sf_list { |
diff --git a/include/linux/in.h b/include/linux/in.h index b615649db129..583c76f9c30f 100644 --- a/include/linux/in.h +++ b/include/linux/in.h | |||
@@ -84,6 +84,8 @@ struct in_addr { | |||
84 | #define IP_ORIGDSTADDR 20 | 84 | #define IP_ORIGDSTADDR 20 |
85 | #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR | 85 | #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR |
86 | 86 | ||
87 | #define IP_MINTTL 21 | ||
88 | |||
87 | /* IP_MTU_DISCOVER values */ | 89 | /* IP_MTU_DISCOVER values */ |
88 | #define IP_PMTUDISC_DONT 0 /* Never send DF frames */ | 90 | #define IP_PMTUDISC_DONT 0 /* Never send DF frames */ |
89 | #define IP_PMTUDISC_WANT 1 /* Use per route hints */ | 91 | #define IP_PMTUDISC_WANT 1 /* Use per route hints */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 699e85c01a4d..cf257809771b 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -81,6 +81,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
81 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) | 81 | #define IN_DEV_FORWARD(in_dev) IN_DEV_CONF_GET((in_dev), FORWARDING) |
82 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) | 82 | #define IN_DEV_MFORWARD(in_dev) IN_DEV_ANDCONF((in_dev), MC_FORWARDING) |
83 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) | 83 | #define IN_DEV_RPFILTER(in_dev) IN_DEV_MAXCONF((in_dev), RP_FILTER) |
84 | #define IN_DEV_SRC_VMARK(in_dev) IN_DEV_ORCONF((in_dev), SRC_VMARK) | ||
84 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ | 85 | #define IN_DEV_SOURCE_ROUTE(in_dev) IN_DEV_ANDCONF((in_dev), \ |
85 | ACCEPT_SOURCE_ROUTE) | 86 | ACCEPT_SOURCE_ROUTE) |
86 | #define IN_DEV_ACCEPT_LOCAL(in_dev) IN_DEV_ORCONF((in_dev), ACCEPT_LOCAL) | 87 | #define IN_DEV_ACCEPT_LOCAL(in_dev) IN_DEV_ORCONF((in_dev), ACCEPT_LOCAL) |
@@ -88,6 +89,7 @@ static inline void ipv4_devconf_setall(struct in_device *in_dev) | |||
88 | 89 | ||
89 | #define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS) | 90 | #define IN_DEV_LOG_MARTIANS(in_dev) IN_DEV_ORCONF((in_dev), LOG_MARTIANS) |
90 | #define IN_DEV_PROXY_ARP(in_dev) IN_DEV_ORCONF((in_dev), PROXY_ARP) | 91 | #define IN_DEV_PROXY_ARP(in_dev) IN_DEV_ORCONF((in_dev), PROXY_ARP) |
92 | #define IN_DEV_PROXY_ARP_PVLAN(in_dev) IN_DEV_CONF_GET(in_dev, PROXY_ARP_PVLAN) | ||
91 | #define IN_DEV_SHARED_MEDIA(in_dev) IN_DEV_ORCONF((in_dev), SHARED_MEDIA) | 93 | #define IN_DEV_SHARED_MEDIA(in_dev) IN_DEV_ORCONF((in_dev), SHARED_MEDIA) |
92 | #define IN_DEV_TX_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), SEND_REDIRECTS) | 94 | #define IN_DEV_TX_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), SEND_REDIRECTS) |
93 | #define IN_DEV_SEC_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), \ | 95 | #define IN_DEV_SEC_REDIRECTS(in_dev) IN_DEV_ORCONF((in_dev), \ |
diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h index a63235996309..78ef023227d4 100644 --- a/include/linux/iocontext.h +++ b/include/linux/iocontext.h | |||
@@ -4,32 +4,6 @@ | |||
4 | #include <linux/radix-tree.h> | 4 | #include <linux/radix-tree.h> |
5 | #include <linux/rcupdate.h> | 5 | #include <linux/rcupdate.h> |
6 | 6 | ||
7 | /* | ||
8 | * This is the per-process anticipatory I/O scheduler state. | ||
9 | */ | ||
10 | struct as_io_context { | ||
11 | spinlock_t lock; | ||
12 | |||
13 | void (*dtor)(struct as_io_context *aic); /* destructor */ | ||
14 | void (*exit)(struct as_io_context *aic); /* called on task exit */ | ||
15 | |||
16 | unsigned long state; | ||
17 | atomic_t nr_queued; /* queued reads & sync writes */ | ||
18 | atomic_t nr_dispatched; /* number of requests gone to the drivers */ | ||
19 | |||
20 | /* IO History tracking */ | ||
21 | /* Thinktime */ | ||
22 | unsigned long last_end_request; | ||
23 | unsigned long ttime_total; | ||
24 | unsigned long ttime_samples; | ||
25 | unsigned long ttime_mean; | ||
26 | /* Layout pattern */ | ||
27 | unsigned int seek_samples; | ||
28 | sector_t last_request_pos; | ||
29 | u64 seek_total; | ||
30 | sector_t seek_mean; | ||
31 | }; | ||
32 | |||
33 | struct cfq_queue; | 7 | struct cfq_queue; |
34 | struct cfq_io_context { | 8 | struct cfq_io_context { |
35 | void *key; | 9 | void *key; |
@@ -78,7 +52,6 @@ struct io_context { | |||
78 | unsigned long last_waited; /* Time last woken after wait for request */ | 52 | unsigned long last_waited; /* Time last woken after wait for request */ |
79 | int nr_batch_requests; /* Number of requests left in the batch */ | 53 | int nr_batch_requests; /* Number of requests left in the batch */ |
80 | 54 | ||
81 | struct as_io_context *aic; | ||
82 | struct radix_tree_root radix_root; | 55 | struct radix_tree_root radix_root; |
83 | struct hlist_head cic_list; | 56 | struct hlist_head cic_list; |
84 | void *ioc_data; | 57 | void *ioc_data; |
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h index 7acb87a44872..d3e5e9da0c82 100644 --- a/include/linux/isdn/capilli.h +++ b/include/linux/isdn/capilli.h | |||
@@ -50,8 +50,7 @@ struct capi_ctr { | |||
50 | u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb); | 50 | u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb); |
51 | 51 | ||
52 | char *(*procinfo)(struct capi_ctr *); | 52 | char *(*procinfo)(struct capi_ctr *); |
53 | int (*ctr_read_proc)(char *page, char **start, off_t off, | 53 | const struct file_operations *proc_fops; |
54 | int count, int *eof, struct capi_ctr *card); | ||
55 | 54 | ||
56 | /* filled in before calling ready callback */ | 55 | /* filled in before calling ready callback */ |
57 | u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ | 56 | u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index f1011f7f3d41..638ce4554c76 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -653,6 +653,7 @@ struct transaction_s | |||
653 | * waiting for it to finish. | 653 | * waiting for it to finish. |
654 | */ | 654 | */ |
655 | unsigned int t_synchronous_commit:1; | 655 | unsigned int t_synchronous_commit:1; |
656 | unsigned int t_flushed_data_blocks:1; | ||
656 | 657 | ||
657 | /* | 658 | /* |
658 | * For use by the filesystem to store fs-specific data | 659 | * For use by the filesystem to store fs-specific data |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 3fc9f5aab5f8..328bca609b9b 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -734,6 +734,10 @@ struct sysinfo { | |||
734 | /* Force a compilation error if condition is constant and true */ | 734 | /* Force a compilation error if condition is constant and true */ |
735 | #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) | 735 | #define MAYBE_BUILD_BUG_ON(cond) ((void)sizeof(char[1 - 2 * !!(cond)])) |
736 | 736 | ||
737 | /* Force a compilation error if a constant expression is not a power of 2 */ | ||
738 | #define BUILD_BUG_ON_NOT_POWER_OF_2(n) \ | ||
739 | BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0)) | ||
740 | |||
737 | /* Force a compilation error if condition is true, but also produce a | 741 | /* Force a compilation error if condition is true, but also produce a |
738 | result (of value 0 and type size_t), so the expression can be used | 742 | result (of value 0 and type size_t), so the expression can be used |
739 | e.g. in a structure initializer (or where-ever else comma expressions | 743 | e.g. in a structure initializer (or where-ever else comma expressions |
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index 3d44e9c65a8e..6f6c5f300af6 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -67,7 +67,7 @@ struct kfifo { | |||
67 | /** | 67 | /** |
68 | * DECLARE_KFIFO - macro to declare a kfifo and the associated buffer | 68 | * DECLARE_KFIFO - macro to declare a kfifo and the associated buffer |
69 | * @name: name of the declared kfifo datatype | 69 | * @name: name of the declared kfifo datatype |
70 | * @size: size of the fifo buffer | 70 | * @size: size of the fifo buffer. Must be a power of two. |
71 | * | 71 | * |
72 | * Note1: the macro can be used inside struct or union declaration | 72 | * Note1: the macro can be used inside struct or union declaration |
73 | * Note2: the macro creates two objects: | 73 | * Note2: the macro creates two objects: |
@@ -81,7 +81,7 @@ union { \ | |||
81 | } | 81 | } |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * INIT_KFIFO - Initialize a kfifo declared by DECLARED_KFIFO | 84 | * INIT_KFIFO - Initialize a kfifo declared by DECLARE_KFIFO |
85 | * @name: name of the declared kfifo datatype | 85 | * @name: name of the declared kfifo datatype |
86 | */ | 86 | */ |
87 | #define INIT_KFIFO(name) \ | 87 | #define INIT_KFIFO(name) \ |
@@ -91,7 +91,7 @@ union { \ | |||
91 | /** | 91 | /** |
92 | * DEFINE_KFIFO - macro to define and initialize a kfifo | 92 | * DEFINE_KFIFO - macro to define and initialize a kfifo |
93 | * @name: name of the declared kfifo datatype | 93 | * @name: name of the declared kfifo datatype |
94 | * @size: size of the fifo buffer | 94 | * @size: size of the fifo buffer. Must be a power of two. |
95 | * | 95 | * |
96 | * Note1: the macro can be used for global and local kfifo data type variables | 96 | * Note1: the macro can be used for global and local kfifo data type variables |
97 | * Note2: the macro creates two objects: | 97 | * Note2: the macro creates two objects: |
@@ -104,15 +104,28 @@ union { \ | |||
104 | 104 | ||
105 | #undef __kfifo_initializer | 105 | #undef __kfifo_initializer |
106 | 106 | ||
107 | extern void kfifo_init(struct kfifo *fifo, unsigned char *buffer, | 107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
108 | unsigned int size); | 108 | unsigned int size); |
109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
110 | gfp_t gfp_mask); | 110 | gfp_t gfp_mask); |
111 | extern void kfifo_free(struct kfifo *fifo); | 111 | extern void kfifo_free(struct kfifo *fifo); |
112 | extern unsigned int kfifo_in(struct kfifo *fifo, | 112 | extern unsigned int kfifo_in(struct kfifo *fifo, |
113 | const unsigned char *from, unsigned int len); | 113 | const void *from, unsigned int len); |
114 | extern __must_check unsigned int kfifo_out(struct kfifo *fifo, | 114 | extern __must_check unsigned int kfifo_out(struct kfifo *fifo, |
115 | unsigned char *to, unsigned int len); | 115 | void *to, unsigned int len); |
116 | extern __must_check unsigned int kfifo_out_peek(struct kfifo *fifo, | ||
117 | void *to, unsigned int len, unsigned offset); | ||
118 | |||
119 | /** | ||
120 | * kfifo_initialized - Check if kfifo is initialized. | ||
121 | * @fifo: fifo to check | ||
122 | * Return %true if FIFO is initialized, otherwise %false. | ||
123 | * Assumes the fifo was 0 before. | ||
124 | */ | ||
125 | static inline bool kfifo_initialized(struct kfifo *fifo) | ||
126 | { | ||
127 | return fifo->buffer != 0; | ||
128 | } | ||
116 | 129 | ||
117 | /** | 130 | /** |
118 | * kfifo_reset - removes the entire FIFO contents | 131 | * kfifo_reset - removes the entire FIFO contents |
@@ -194,7 +207,7 @@ static inline __must_check unsigned int kfifo_avail(struct kfifo *fifo) | |||
194 | * bytes copied. | 207 | * bytes copied. |
195 | */ | 208 | */ |
196 | static inline unsigned int kfifo_in_locked(struct kfifo *fifo, | 209 | static inline unsigned int kfifo_in_locked(struct kfifo *fifo, |
197 | const unsigned char *from, unsigned int n, spinlock_t *lock) | 210 | const void *from, unsigned int n, spinlock_t *lock) |
198 | { | 211 | { |
199 | unsigned long flags; | 212 | unsigned long flags; |
200 | unsigned int ret; | 213 | unsigned int ret; |
@@ -219,7 +232,7 @@ static inline unsigned int kfifo_in_locked(struct kfifo *fifo, | |||
219 | * @to buffer and returns the number of copied bytes. | 232 | * @to buffer and returns the number of copied bytes. |
220 | */ | 233 | */ |
221 | static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, | 234 | static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, |
222 | unsigned char *to, unsigned int n, spinlock_t *lock) | 235 | void *to, unsigned int n, spinlock_t *lock) |
223 | { | 236 | { |
224 | unsigned long flags; | 237 | unsigned long flags; |
225 | unsigned int ret; | 238 | unsigned int ret; |
@@ -228,13 +241,6 @@ static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, | |||
228 | 241 | ||
229 | ret = kfifo_out(fifo, to, n); | 242 | ret = kfifo_out(fifo, to, n); |
230 | 243 | ||
231 | /* | ||
232 | * optimization: if the FIFO is empty, set the indices to 0 | ||
233 | * so we don't wrap the next time | ||
234 | */ | ||
235 | if (kfifo_is_empty(fifo)) | ||
236 | kfifo_reset(fifo); | ||
237 | |||
238 | spin_unlock_irqrestore(lock, flags); | 244 | spin_unlock_irqrestore(lock, flags); |
239 | 245 | ||
240 | return ret; | 246 | return ret; |
@@ -242,11 +248,11 @@ static inline __must_check unsigned int kfifo_out_locked(struct kfifo *fifo, | |||
242 | 248 | ||
243 | extern void kfifo_skip(struct kfifo *fifo, unsigned int len); | 249 | extern void kfifo_skip(struct kfifo *fifo, unsigned int len); |
244 | 250 | ||
245 | extern __must_check unsigned int kfifo_from_user(struct kfifo *fifo, | 251 | extern __must_check int kfifo_from_user(struct kfifo *fifo, |
246 | const void __user *from, unsigned int n); | 252 | const void __user *from, unsigned int n, unsigned *lenout); |
247 | 253 | ||
248 | extern __must_check unsigned int kfifo_to_user(struct kfifo *fifo, | 254 | extern __must_check int kfifo_to_user(struct kfifo *fifo, |
249 | void __user *to, unsigned int n); | 255 | void __user *to, unsigned int n, unsigned *lenout); |
250 | 256 | ||
251 | /* | 257 | /* |
252 | * __kfifo_add_out internal helper function for updating the out offset | 258 | * __kfifo_add_out internal helper function for updating the out offset |
diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h index 6adcc297e354..19ec41a183f5 100644 --- a/include/linux/kgdb.h +++ b/include/linux/kgdb.h | |||
@@ -29,8 +29,7 @@ struct pt_regs; | |||
29 | * | 29 | * |
30 | * On some architectures it is required to skip a breakpoint | 30 | * On some architectures it is required to skip a breakpoint |
31 | * exception when it occurs after a breakpoint has been removed. | 31 | * exception when it occurs after a breakpoint has been removed. |
32 | * This can be implemented in the architecture specific portion of | 32 | * This can be implemented in the architecture specific portion of kgdb. |
33 | * for kgdb. | ||
34 | */ | 33 | */ |
35 | extern int kgdb_skipexception(int exception, struct pt_regs *regs); | 34 | extern int kgdb_skipexception(int exception, struct pt_regs *regs); |
36 | 35 | ||
@@ -65,7 +64,7 @@ struct uart_port; | |||
65 | /** | 64 | /** |
66 | * kgdb_breakpoint - compiled in breakpoint | 65 | * kgdb_breakpoint - compiled in breakpoint |
67 | * | 66 | * |
68 | * This will be impelmented a static inline per architecture. This | 67 | * This will be implemented as a static inline per architecture. This |
69 | * function is called by the kgdb core to execute an architecture | 68 | * function is called by the kgdb core to execute an architecture |
70 | * specific trap to cause kgdb to enter the exception processing. | 69 | * specific trap to cause kgdb to enter the exception processing. |
71 | * | 70 | * |
@@ -190,7 +189,7 @@ kgdb_arch_handle_exception(int vector, int signo, int err_code, | |||
190 | * @flags: Current IRQ state | 189 | * @flags: Current IRQ state |
191 | * | 190 | * |
192 | * On SMP systems, we need to get the attention of the other CPUs | 191 | * On SMP systems, we need to get the attention of the other CPUs |
193 | * and get them be in a known state. This should do what is needed | 192 | * and get them into a known state. This should do what is needed |
194 | * to get the other CPUs to call kgdb_wait(). Note that on some arches, | 193 | * to get the other CPUs to call kgdb_wait(). Note that on some arches, |
195 | * the NMI approach is not used for rounding up all the CPUs. For example, | 194 | * the NMI approach is not used for rounding up all the CPUs. For example, |
196 | * in case of MIPS, smp_call_function() is used to roundup CPUs. In | 195 | * in case of MIPS, smp_call_function() is used to roundup CPUs. In |
diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index e880d4cf9e22..08d7dc4ddf40 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h | |||
@@ -36,6 +36,56 @@ int kmemcheck_hide_addr(unsigned long address); | |||
36 | 36 | ||
37 | bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size); | 37 | bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size); |
38 | 38 | ||
39 | /* | ||
40 | * Bitfield annotations | ||
41 | * | ||
42 | * How to use: If you have a struct using bitfields, for example | ||
43 | * | ||
44 | * struct a { | ||
45 | * int x:8, y:8; | ||
46 | * }; | ||
47 | * | ||
48 | * then this should be rewritten as | ||
49 | * | ||
50 | * struct a { | ||
51 | * kmemcheck_bitfield_begin(flags); | ||
52 | * int x:8, y:8; | ||
53 | * kmemcheck_bitfield_end(flags); | ||
54 | * }; | ||
55 | * | ||
56 | * Now the "flags_begin" and "flags_end" members may be used to refer to the | ||
57 | * beginning and end, respectively, of the bitfield (and things like | ||
58 | * &x.flags_begin is allowed). As soon as the struct is allocated, the bit- | ||
59 | * fields should be annotated: | ||
60 | * | ||
61 | * struct a *a = kmalloc(sizeof(struct a), GFP_KERNEL); | ||
62 | * kmemcheck_annotate_bitfield(a, flags); | ||
63 | */ | ||
64 | #define kmemcheck_bitfield_begin(name) \ | ||
65 | int name##_begin[0]; | ||
66 | |||
67 | #define kmemcheck_bitfield_end(name) \ | ||
68 | int name##_end[0]; | ||
69 | |||
70 | #define kmemcheck_annotate_bitfield(ptr, name) \ | ||
71 | do { \ | ||
72 | int _n; \ | ||
73 | \ | ||
74 | if (!ptr) \ | ||
75 | break; \ | ||
76 | \ | ||
77 | _n = (long) &((ptr)->name##_end) \ | ||
78 | - (long) &((ptr)->name##_begin); \ | ||
79 | MAYBE_BUILD_BUG_ON(_n < 0); \ | ||
80 | \ | ||
81 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ | ||
82 | } while (0) | ||
83 | |||
84 | #define kmemcheck_annotate_variable(var) \ | ||
85 | do { \ | ||
86 | kmemcheck_mark_initialized(&(var), sizeof(var)); \ | ||
87 | } while (0) \ | ||
88 | |||
39 | #else | 89 | #else |
40 | #define kmemcheck_enabled 0 | 90 | #define kmemcheck_enabled 0 |
41 | 91 | ||
@@ -106,60 +156,16 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size) | |||
106 | return true; | 156 | return true; |
107 | } | 157 | } |
108 | 158 | ||
109 | #endif /* CONFIG_KMEMCHECK */ | 159 | #define kmemcheck_bitfield_begin(name) |
110 | 160 | #define kmemcheck_bitfield_end(name) | |
111 | /* | 161 | #define kmemcheck_annotate_bitfield(ptr, name) \ |
112 | * Bitfield annotations | 162 | do { \ |
113 | * | 163 | } while (0) |
114 | * How to use: If you have a struct using bitfields, for example | ||
115 | * | ||
116 | * struct a { | ||
117 | * int x:8, y:8; | ||
118 | * }; | ||
119 | * | ||
120 | * then this should be rewritten as | ||
121 | * | ||
122 | * struct a { | ||
123 | * kmemcheck_bitfield_begin(flags); | ||
124 | * int x:8, y:8; | ||
125 | * kmemcheck_bitfield_end(flags); | ||
126 | * }; | ||
127 | * | ||
128 | * Now the "flags_begin" and "flags_end" members may be used to refer to the | ||
129 | * beginning and end, respectively, of the bitfield (and things like | ||
130 | * &x.flags_begin is allowed). As soon as the struct is allocated, the bit- | ||
131 | * fields should be annotated: | ||
132 | * | ||
133 | * struct a *a = kmalloc(sizeof(struct a), GFP_KERNEL); | ||
134 | * kmemcheck_annotate_bitfield(a, flags); | ||
135 | * | ||
136 | * Note: We provide the same definitions for both kmemcheck and non- | ||
137 | * kmemcheck kernels. This makes it harder to introduce accidental errors. It | ||
138 | * is also allowed to pass NULL pointers to kmemcheck_annotate_bitfield(). | ||
139 | */ | ||
140 | #define kmemcheck_bitfield_begin(name) \ | ||
141 | int name##_begin[0]; | ||
142 | |||
143 | #define kmemcheck_bitfield_end(name) \ | ||
144 | int name##_end[0]; | ||
145 | 164 | ||
146 | #define kmemcheck_annotate_bitfield(ptr, name) \ | 165 | #define kmemcheck_annotate_variable(var) \ |
147 | do { \ | 166 | do { \ |
148 | int _n; \ | ||
149 | \ | ||
150 | if (!ptr) \ | ||
151 | break; \ | ||
152 | \ | ||
153 | _n = (long) &((ptr)->name##_end) \ | ||
154 | - (long) &((ptr)->name##_begin); \ | ||
155 | MAYBE_BUILD_BUG_ON(_n < 0); \ | ||
156 | \ | ||
157 | kmemcheck_mark_initialized(&((ptr)->name##_begin), _n); \ | ||
158 | } while (0) | 167 | } while (0) |
159 | 168 | ||
160 | #define kmemcheck_annotate_variable(var) \ | 169 | #endif /* CONFIG_KMEMCHECK */ |
161 | do { \ | ||
162 | kmemcheck_mark_initialized(&(var), sizeof(var)); \ | ||
163 | } while (0) \ | ||
164 | 170 | ||
165 | #endif /* LINUX_KMEMCHECK_H */ | 171 | #endif /* LINUX_KMEMCHECK_H */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 6a9c4ddd3d95..73112250862c 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -354,6 +354,9 @@ enum { | |||
354 | /* max tries if error condition is still set after ->error_handler */ | 354 | /* max tries if error condition is still set after ->error_handler */ |
355 | ATA_EH_MAX_TRIES = 5, | 355 | ATA_EH_MAX_TRIES = 5, |
356 | 356 | ||
357 | /* sometimes resuming a link requires several retries */ | ||
358 | ATA_LINK_RESUME_TRIES = 5, | ||
359 | |||
357 | /* how hard are we gonna try to probe/recover devices */ | 360 | /* how hard are we gonna try to probe/recover devices */ |
358 | ATA_PROBE_MAX_TRIES = 3, | 361 | ATA_PROBE_MAX_TRIES = 3, |
359 | ATA_EH_DEV_TRIES = 3, | 362 | ATA_EH_DEV_TRIES = 3, |
diff --git a/include/linux/list_sort.h b/include/linux/list_sort.h new file mode 100644 index 000000000000..1a2df2efb771 --- /dev/null +++ b/include/linux/list_sort.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _LINUX_LIST_SORT_H | ||
2 | #define _LINUX_LIST_SORT_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct list_head; | ||
7 | |||
8 | void list_sort(void *priv, struct list_head *head, | ||
9 | int (*cmp)(void *priv, struct list_head *a, | ||
10 | struct list_head *b)); | ||
11 | #endif | ||
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index 6b9c5d06690c..9cb1834deffa 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define MFD_TMIO_H | 2 | #define MFD_TMIO_H |
3 | 3 | ||
4 | #include <linux/fb.h> | 4 | #include <linux/fb.h> |
5 | #include <linux/io.h> | ||
6 | #include <linux/platform_device.h> | ||
5 | 7 | ||
6 | #define tmio_ioread8(addr) readb(addr) | 8 | #define tmio_ioread8(addr) readb(addr) |
7 | #define tmio_ioread16(addr) readw(addr) | 9 | #define tmio_ioread16(addr) readw(addr) |
@@ -18,11 +20,48 @@ | |||
18 | writew((val) >> 16, (addr) + 2); \ | 20 | writew((val) >> 16, (addr) + 2); \ |
19 | } while (0) | 21 | } while (0) |
20 | 22 | ||
23 | #define CNF_CMD 0x04 | ||
24 | #define CNF_CTL_BASE 0x10 | ||
25 | #define CNF_INT_PIN 0x3d | ||
26 | #define CNF_STOP_CLK_CTL 0x40 | ||
27 | #define CNF_GCLK_CTL 0x41 | ||
28 | #define CNF_SD_CLK_MODE 0x42 | ||
29 | #define CNF_PIN_STATUS 0x44 | ||
30 | #define CNF_PWR_CTL_1 0x48 | ||
31 | #define CNF_PWR_CTL_2 0x49 | ||
32 | #define CNF_PWR_CTL_3 0x4a | ||
33 | #define CNF_CARD_DETECT_MODE 0x4c | ||
34 | #define CNF_SD_SLOT 0x50 | ||
35 | #define CNF_EXT_GCLK_CTL_1 0xf0 | ||
36 | #define CNF_EXT_GCLK_CTL_2 0xf1 | ||
37 | #define CNF_EXT_GCLK_CTL_3 0xf9 | ||
38 | #define CNF_SD_LED_EN_1 0xfa | ||
39 | #define CNF_SD_LED_EN_2 0xfe | ||
40 | |||
41 | #define SDCREN 0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/ | ||
42 | |||
43 | #define sd_config_write8(base, shift, reg, val) \ | ||
44 | tmio_iowrite8((val), (base) + ((reg) << (shift))) | ||
45 | #define sd_config_write16(base, shift, reg, val) \ | ||
46 | tmio_iowrite16((val), (base) + ((reg) << (shift))) | ||
47 | #define sd_config_write32(base, shift, reg, val) \ | ||
48 | do { \ | ||
49 | tmio_iowrite16((val), (base) + ((reg) << (shift))); \ | ||
50 | tmio_iowrite16((val) >> 16, (base) + ((reg + 2) << (shift))); \ | ||
51 | } while (0) | ||
52 | |||
53 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | ||
54 | int tmio_core_mmc_resume(void __iomem *cnf, int shift, unsigned long base); | ||
55 | void tmio_core_mmc_pwr(void __iomem *cnf, int shift, int state); | ||
56 | void tmio_core_mmc_clk_div(void __iomem *cnf, int shift, int state); | ||
57 | |||
21 | /* | 58 | /* |
22 | * data for the MMC controller | 59 | * data for the MMC controller |
23 | */ | 60 | */ |
24 | struct tmio_mmc_data { | 61 | struct tmio_mmc_data { |
25 | const unsigned int hclk; | 62 | const unsigned int hclk; |
63 | void (*set_pwr)(struct platform_device *host, int state); | ||
64 | void (*set_clk_div)(struct platform_device *host, int state); | ||
26 | }; | 65 | }; |
27 | 66 | ||
28 | /* | 67 | /* |
diff --git a/include/linux/mfd/wm8350/pmic.h b/include/linux/mfd/wm8350/pmic.h index be3264e286e0..e786fe9841ef 100644 --- a/include/linux/mfd/wm8350/pmic.h +++ b/include/linux/mfd/wm8350/pmic.h | |||
@@ -666,20 +666,20 @@ | |||
666 | #define WM8350_ISINK_FLASH_DUR_64MS (1 << 8) | 666 | #define WM8350_ISINK_FLASH_DUR_64MS (1 << 8) |
667 | #define WM8350_ISINK_FLASH_DUR_96MS (2 << 8) | 667 | #define WM8350_ISINK_FLASH_DUR_96MS (2 << 8) |
668 | #define WM8350_ISINK_FLASH_DUR_1024MS (3 << 8) | 668 | #define WM8350_ISINK_FLASH_DUR_1024MS (3 << 8) |
669 | #define WM8350_ISINK_FLASH_ON_INSTANT (0 << 4) | 669 | #define WM8350_ISINK_FLASH_ON_INSTANT (0 << 0) |
670 | #define WM8350_ISINK_FLASH_ON_0_25S (1 << 4) | 670 | #define WM8350_ISINK_FLASH_ON_0_25S (1 << 0) |
671 | #define WM8350_ISINK_FLASH_ON_0_50S (2 << 4) | 671 | #define WM8350_ISINK_FLASH_ON_0_50S (2 << 0) |
672 | #define WM8350_ISINK_FLASH_ON_1_00S (3 << 4) | 672 | #define WM8350_ISINK_FLASH_ON_1_00S (3 << 0) |
673 | #define WM8350_ISINK_FLASH_ON_1_95S (1 << 4) | 673 | #define WM8350_ISINK_FLASH_ON_1_95S (1 << 0) |
674 | #define WM8350_ISINK_FLASH_ON_3_91S (2 << 4) | 674 | #define WM8350_ISINK_FLASH_ON_3_91S (2 << 0) |
675 | #define WM8350_ISINK_FLASH_ON_7_80S (3 << 4) | 675 | #define WM8350_ISINK_FLASH_ON_7_80S (3 << 0) |
676 | #define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 0) | 676 | #define WM8350_ISINK_FLASH_OFF_INSTANT (0 << 4) |
677 | #define WM8350_ISINK_FLASH_OFF_0_25S (1 << 0) | 677 | #define WM8350_ISINK_FLASH_OFF_0_25S (1 << 4) |
678 | #define WM8350_ISINK_FLASH_OFF_0_50S (2 << 0) | 678 | #define WM8350_ISINK_FLASH_OFF_0_50S (2 << 4) |
679 | #define WM8350_ISINK_FLASH_OFF_1_00S (3 << 0) | 679 | #define WM8350_ISINK_FLASH_OFF_1_00S (3 << 4) |
680 | #define WM8350_ISINK_FLASH_OFF_1_95S (1 << 0) | 680 | #define WM8350_ISINK_FLASH_OFF_1_95S (1 << 4) |
681 | #define WM8350_ISINK_FLASH_OFF_3_91S (2 << 0) | 681 | #define WM8350_ISINK_FLASH_OFF_3_91S (2 << 4) |
682 | #define WM8350_ISINK_FLASH_OFF_7_80S (3 << 0) | 682 | #define WM8350_ISINK_FLASH_OFF_7_80S (3 << 4) |
683 | 683 | ||
684 | /* | 684 | /* |
685 | * Regulator Interrupts. | 685 | * Regulator Interrupts. |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index adaf3c15e449..8b5f7cc0fba6 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #define HPET_MINOR 228 | 30 | #define HPET_MINOR 228 |
31 | #define FUSE_MINOR 229 | 31 | #define FUSE_MINOR 229 |
32 | #define KVM_MINOR 232 | 32 | #define KVM_MINOR 232 |
33 | #define VHOST_NET_MINOR 233 | ||
33 | #define MISC_DYNAMIC_MINOR 255 | 34 | #define MISC_DYNAMIC_MINOR 255 |
34 | 35 | ||
35 | struct device; | 36 | struct device; |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 2265f28eb47a..60c467bfbabd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1089,6 +1089,7 @@ extern void zone_pcp_update(struct zone *zone); | |||
1089 | 1089 | ||
1090 | /* nommu.c */ | 1090 | /* nommu.c */ |
1091 | extern atomic_long_t mmap_pages_allocated; | 1091 | extern atomic_long_t mmap_pages_allocated; |
1092 | extern int nommu_shrink_inode_mappings(struct inode *, size_t, size_t); | ||
1092 | 1093 | ||
1093 | /* prio_tree.c */ | 1094 | /* prio_tree.c */ |
1094 | void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); | 1095 | void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 84a524afb3dc..36f96271306c 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -122,7 +122,9 @@ struct vm_region { | |||
122 | unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ | 122 | unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */ |
123 | struct file *vm_file; /* the backing file or NULL */ | 123 | struct file *vm_file; /* the backing file or NULL */ |
124 | 124 | ||
125 | atomic_t vm_usage; /* region usage count */ | 125 | int vm_usage; /* region usage count (access under nommu_region_sem) */ |
126 | bool vm_icache_flushed : 1; /* true if the icache has been flushed for | ||
127 | * this region */ | ||
126 | }; | 128 | }; |
127 | 129 | ||
128 | /* | 130 | /* |
@@ -203,10 +205,12 @@ struct mm_struct { | |||
203 | struct vm_area_struct * mmap; /* list of VMAs */ | 205 | struct vm_area_struct * mmap; /* list of VMAs */ |
204 | struct rb_root mm_rb; | 206 | struct rb_root mm_rb; |
205 | struct vm_area_struct * mmap_cache; /* last find_vma result */ | 207 | struct vm_area_struct * mmap_cache; /* last find_vma result */ |
208 | #ifdef CONFIG_MMU | ||
206 | unsigned long (*get_unmapped_area) (struct file *filp, | 209 | unsigned long (*get_unmapped_area) (struct file *filp, |
207 | unsigned long addr, unsigned long len, | 210 | unsigned long addr, unsigned long len, |
208 | unsigned long pgoff, unsigned long flags); | 211 | unsigned long pgoff, unsigned long flags); |
209 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); | 212 | void (*unmap_area) (struct mm_struct *mm, unsigned long addr); |
213 | #endif | ||
210 | unsigned long mmap_base; /* base of mmap area */ | 214 | unsigned long mmap_base; /* base of mmap area */ |
211 | unsigned long task_size; /* size of task vm space */ | 215 | unsigned long task_size; /* size of task vm space */ |
212 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ | 216 | unsigned long cached_hole_size; /* if non-zero, the largest hole below free_area_cache */ |
diff --git a/include/linux/net.h b/include/linux/net.h index 5e8083cacc8b..4157b5d42bd6 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -174,18 +174,22 @@ struct proto_ops { | |||
174 | struct poll_table_struct *wait); | 174 | struct poll_table_struct *wait); |
175 | int (*ioctl) (struct socket *sock, unsigned int cmd, | 175 | int (*ioctl) (struct socket *sock, unsigned int cmd, |
176 | unsigned long arg); | 176 | unsigned long arg); |
177 | #ifdef CONFIG_COMPAT | ||
177 | int (*compat_ioctl) (struct socket *sock, unsigned int cmd, | 178 | int (*compat_ioctl) (struct socket *sock, unsigned int cmd, |
178 | unsigned long arg); | 179 | unsigned long arg); |
180 | #endif | ||
179 | int (*listen) (struct socket *sock, int len); | 181 | int (*listen) (struct socket *sock, int len); |
180 | int (*shutdown) (struct socket *sock, int flags); | 182 | int (*shutdown) (struct socket *sock, int flags); |
181 | int (*setsockopt)(struct socket *sock, int level, | 183 | int (*setsockopt)(struct socket *sock, int level, |
182 | int optname, char __user *optval, unsigned int optlen); | 184 | int optname, char __user *optval, unsigned int optlen); |
183 | int (*getsockopt)(struct socket *sock, int level, | 185 | int (*getsockopt)(struct socket *sock, int level, |
184 | int optname, char __user *optval, int __user *optlen); | 186 | int optname, char __user *optval, int __user *optlen); |
187 | #ifdef CONFIG_COMPAT | ||
185 | int (*compat_setsockopt)(struct socket *sock, int level, | 188 | int (*compat_setsockopt)(struct socket *sock, int level, |
186 | int optname, char __user *optval, unsigned int optlen); | 189 | int optname, char __user *optval, unsigned int optlen); |
187 | int (*compat_getsockopt)(struct socket *sock, int level, | 190 | int (*compat_getsockopt)(struct socket *sock, int level, |
188 | int optname, char __user *optval, int __user *optlen); | 191 | int optname, char __user *optval, int __user *optlen); |
192 | #endif | ||
189 | int (*sendmsg) (struct kiocb *iocb, struct socket *sock, | 193 | int (*sendmsg) (struct kiocb *iocb, struct socket *sock, |
190 | struct msghdr *m, size_t total_len); | 194 | struct msghdr *m, size_t total_len); |
191 | int (*recvmsg) (struct kiocb *iocb, struct socket *sock, | 195 | int (*recvmsg) (struct kiocb *iocb, struct socket *sock, |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a3fccc85b1a0..e535700a3b72 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -263,6 +263,17 @@ struct netdev_hw_addr_list { | |||
263 | int count; | 263 | int count; |
264 | }; | 264 | }; |
265 | 265 | ||
266 | #define netdev_uc_count(dev) ((dev)->uc.count) | ||
267 | #define netdev_uc_empty(dev) ((dev)->uc.count == 0) | ||
268 | #define netdev_for_each_uc_addr(ha, dev) \ | ||
269 | list_for_each_entry(ha, &dev->uc.list, list) | ||
270 | |||
271 | #define netdev_mc_count(dev) ((dev)->mc_count) | ||
272 | #define netdev_mc_empty(dev) (netdev_mc_count(dev) == 0) | ||
273 | |||
274 | #define netdev_for_each_mc_addr(mclist, dev) \ | ||
275 | for (mclist = dev->mc_list; mclist; mclist = mclist->next) | ||
276 | |||
266 | struct hh_cache { | 277 | struct hh_cache { |
267 | struct hh_cache *hh_next; /* Next entry */ | 278 | struct hh_cache *hh_next; /* Next entry */ |
268 | atomic_t hh_refcnt; /* number of users */ | 279 | atomic_t hh_refcnt; /* number of users */ |
@@ -621,30 +632,21 @@ struct net_device_ops { | |||
621 | struct net_device *dev); | 632 | struct net_device *dev); |
622 | u16 (*ndo_select_queue)(struct net_device *dev, | 633 | u16 (*ndo_select_queue)(struct net_device *dev, |
623 | struct sk_buff *skb); | 634 | struct sk_buff *skb); |
624 | #define HAVE_CHANGE_RX_FLAGS | ||
625 | void (*ndo_change_rx_flags)(struct net_device *dev, | 635 | void (*ndo_change_rx_flags)(struct net_device *dev, |
626 | int flags); | 636 | int flags); |
627 | #define HAVE_SET_RX_MODE | ||
628 | void (*ndo_set_rx_mode)(struct net_device *dev); | 637 | void (*ndo_set_rx_mode)(struct net_device *dev); |
629 | #define HAVE_MULTICAST | ||
630 | void (*ndo_set_multicast_list)(struct net_device *dev); | 638 | void (*ndo_set_multicast_list)(struct net_device *dev); |
631 | #define HAVE_SET_MAC_ADDR | ||
632 | int (*ndo_set_mac_address)(struct net_device *dev, | 639 | int (*ndo_set_mac_address)(struct net_device *dev, |
633 | void *addr); | 640 | void *addr); |
634 | #define HAVE_VALIDATE_ADDR | ||
635 | int (*ndo_validate_addr)(struct net_device *dev); | 641 | int (*ndo_validate_addr)(struct net_device *dev); |
636 | #define HAVE_PRIVATE_IOCTL | ||
637 | int (*ndo_do_ioctl)(struct net_device *dev, | 642 | int (*ndo_do_ioctl)(struct net_device *dev, |
638 | struct ifreq *ifr, int cmd); | 643 | struct ifreq *ifr, int cmd); |
639 | #define HAVE_SET_CONFIG | ||
640 | int (*ndo_set_config)(struct net_device *dev, | 644 | int (*ndo_set_config)(struct net_device *dev, |
641 | struct ifmap *map); | 645 | struct ifmap *map); |
642 | #define HAVE_CHANGE_MTU | ||
643 | int (*ndo_change_mtu)(struct net_device *dev, | 646 | int (*ndo_change_mtu)(struct net_device *dev, |
644 | int new_mtu); | 647 | int new_mtu); |
645 | int (*ndo_neigh_setup)(struct net_device *dev, | 648 | int (*ndo_neigh_setup)(struct net_device *dev, |
646 | struct neigh_parms *); | 649 | struct neigh_parms *); |
647 | #define HAVE_TX_TIMEOUT | ||
648 | void (*ndo_tx_timeout) (struct net_device *dev); | 650 | void (*ndo_tx_timeout) (struct net_device *dev); |
649 | 651 | ||
650 | struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); | 652 | struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); |
@@ -656,7 +658,6 @@ struct net_device_ops { | |||
656 | void (*ndo_vlan_rx_kill_vid)(struct net_device *dev, | 658 | void (*ndo_vlan_rx_kill_vid)(struct net_device *dev, |
657 | unsigned short vid); | 659 | unsigned short vid); |
658 | #ifdef CONFIG_NET_POLL_CONTROLLER | 660 | #ifdef CONFIG_NET_POLL_CONTROLLER |
659 | #define HAVE_NETDEV_POLL | ||
660 | void (*ndo_poll_controller)(struct net_device *dev); | 661 | void (*ndo_poll_controller)(struct net_device *dev); |
661 | #endif | 662 | #endif |
662 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) | 663 | #if defined(CONFIG_FCOE) || defined(CONFIG_FCOE_MODULE) |
@@ -1009,6 +1010,15 @@ static inline bool netdev_uses_dsa_tags(struct net_device *dev) | |||
1009 | return 0; | 1010 | return 0; |
1010 | } | 1011 | } |
1011 | 1012 | ||
1013 | #ifndef CONFIG_NET_NS | ||
1014 | static inline void skb_set_dev(struct sk_buff *skb, struct net_device *dev) | ||
1015 | { | ||
1016 | skb->dev = dev; | ||
1017 | } | ||
1018 | #else /* CONFIG_NET_NS */ | ||
1019 | void skb_set_dev(struct sk_buff *skb, struct net_device *dev); | ||
1020 | #endif | ||
1021 | |||
1012 | static inline bool netdev_uses_trailer_tags(struct net_device *dev) | 1022 | static inline bool netdev_uses_trailer_tags(struct net_device *dev) |
1013 | { | 1023 | { |
1014 | #ifdef CONFIG_NET_DSA_TAG_TRAILER | 1024 | #ifdef CONFIG_NET_DSA_TAG_TRAILER |
@@ -1527,7 +1537,6 @@ extern int netif_rx(struct sk_buff *skb); | |||
1527 | extern int netif_rx_ni(struct sk_buff *skb); | 1537 | extern int netif_rx_ni(struct sk_buff *skb); |
1528 | #define HAVE_NETIF_RECEIVE_SKB 1 | 1538 | #define HAVE_NETIF_RECEIVE_SKB 1 |
1529 | extern int netif_receive_skb(struct sk_buff *skb); | 1539 | extern int netif_receive_skb(struct sk_buff *skb); |
1530 | extern void napi_gro_flush(struct napi_struct *napi); | ||
1531 | extern gro_result_t dev_gro_receive(struct napi_struct *napi, | 1540 | extern gro_result_t dev_gro_receive(struct napi_struct *napi, |
1532 | struct sk_buff *skb); | 1541 | struct sk_buff *skb); |
1533 | extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb); | 1542 | extern gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb); |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 2524267210d3..a765ea898549 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -21,15 +21,20 @@ struct netpoll { | |||
21 | __be32 local_ip, remote_ip; | 21 | __be32 local_ip, remote_ip; |
22 | u16 local_port, remote_port; | 22 | u16 local_port, remote_port; |
23 | u8 remote_mac[ETH_ALEN]; | 23 | u8 remote_mac[ETH_ALEN]; |
24 | |||
25 | struct list_head rx; /* rx_np list element */ | ||
24 | }; | 26 | }; |
25 | 27 | ||
26 | struct netpoll_info { | 28 | struct netpoll_info { |
27 | atomic_t refcnt; | 29 | atomic_t refcnt; |
30 | |||
28 | int rx_flags; | 31 | int rx_flags; |
29 | spinlock_t rx_lock; | 32 | spinlock_t rx_lock; |
30 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 33 | struct list_head rx_np; /* netpolls that registered an rx_hook */ |
34 | |||
31 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ | 35 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ |
32 | struct sk_buff_head txq; | 36 | struct sk_buff_head txq; |
37 | |||
33 | struct delayed_work tx_work; | 38 | struct delayed_work tx_work; |
34 | }; | 39 | }; |
35 | 40 | ||
@@ -51,7 +56,7 @@ static inline int netpoll_rx(struct sk_buff *skb) | |||
51 | unsigned long flags; | 56 | unsigned long flags; |
52 | int ret = 0; | 57 | int ret = 0; |
53 | 58 | ||
54 | if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) | 59 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) |
55 | return 0; | 60 | return 0; |
56 | 61 | ||
57 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 62 | spin_lock_irqsave(&npinfo->rx_lock, flags); |
@@ -67,7 +72,7 @@ static inline int netpoll_rx_on(struct sk_buff *skb) | |||
67 | { | 72 | { |
68 | struct netpoll_info *npinfo = skb->dev->npinfo; | 73 | struct netpoll_info *npinfo = skb->dev->npinfo; |
69 | 74 | ||
70 | return npinfo && (npinfo->rx_np || npinfo->rx_flags); | 75 | return npinfo && (!list_empty(&npinfo->rx_np) || npinfo->rx_flags); |
71 | } | 76 | } |
72 | 77 | ||
73 | static inline int netpoll_receive_skb(struct sk_buff *skb) | 78 | static inline int netpoll_receive_skb(struct sk_buff *skb) |
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 2bfbe88837ef..127a73015760 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -295,6 +295,10 @@ | |||
295 | * This command is also used as an event to notify when a requested | 295 | * This command is also used as an event to notify when a requested |
296 | * remain-on-channel duration has expired. | 296 | * remain-on-channel duration has expired. |
297 | * | 297 | * |
298 | * @NL80211_CMD_SET_TX_BITRATE_MASK: Set the mask of rates to be used in TX | ||
299 | * rate selection. %NL80211_ATTR_IFINDEX is used to specify the interface | ||
300 | * and @NL80211_ATTR_TX_RATES the set of allowed rates. | ||
301 | * | ||
298 | * @NL80211_CMD_MAX: highest used command number | 302 | * @NL80211_CMD_MAX: highest used command number |
299 | * @__NL80211_CMD_AFTER_LAST: internal use | 303 | * @__NL80211_CMD_AFTER_LAST: internal use |
300 | */ | 304 | */ |
@@ -381,6 +385,8 @@ enum nl80211_commands { | |||
381 | NL80211_CMD_REMAIN_ON_CHANNEL, | 385 | NL80211_CMD_REMAIN_ON_CHANNEL, |
382 | NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, | 386 | NL80211_CMD_CANCEL_REMAIN_ON_CHANNEL, |
383 | 387 | ||
388 | NL80211_CMD_SET_TX_BITRATE_MASK, | ||
389 | |||
384 | /* add new commands above here */ | 390 | /* add new commands above here */ |
385 | 391 | ||
386 | /* used to define NL80211_CMD_MAX below */ | 392 | /* used to define NL80211_CMD_MAX below */ |
@@ -430,6 +436,8 @@ enum nl80211_commands { | |||
430 | * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length | 436 | * @NL80211_ATTR_WIPHY_RTS_THRESHOLD: RTS threshold (TX frames with length |
431 | * larger than or equal to this use RTS/CTS handshake); allowed range: | 437 | * larger than or equal to this use RTS/CTS handshake); allowed range: |
432 | * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32 | 438 | * 0..65536, disable with (u32)-1; dot11RTSThreshold; u32 |
439 | * @NL80211_ATTR_WIPHY_COVERAGE_CLASS: Coverage Class as defined by IEEE 802.11 | ||
440 | * section 7.3.2.9; dot11CoverageClass; u8 | ||
433 | * | 441 | * |
434 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on | 442 | * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on |
435 | * @NL80211_ATTR_IFNAME: network interface name | 443 | * @NL80211_ATTR_IFNAME: network interface name |
@@ -638,6 +646,13 @@ enum nl80211_commands { | |||
638 | * | 646 | * |
639 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. | 647 | * @NL80211_ATTR_COOKIE: Generic 64-bit cookie to identify objects. |
640 | * | 648 | * |
649 | * @NL80211_ATTR_TX_RATES: Nested set of attributes | ||
650 | * (enum nl80211_tx_rate_attributes) describing TX rates per band. The | ||
651 | * enum nl80211_band value is used as the index (nla_type() of the nested | ||
652 | * data. If a band is not included, it will be configured to allow all | ||
653 | * rates based on negotiated supported rates information. This attribute | ||
654 | * is used with %NL80211_CMD_SET_TX_BITRATE_MASK. | ||
655 | * | ||
641 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 656 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
642 | * @__NL80211_ATTR_AFTER_LAST: internal use | 657 | * @__NL80211_ATTR_AFTER_LAST: internal use |
643 | */ | 658 | */ |
@@ -779,6 +794,10 @@ enum nl80211_attrs { | |||
779 | 794 | ||
780 | NL80211_ATTR_COOKIE, | 795 | NL80211_ATTR_COOKIE, |
781 | 796 | ||
797 | NL80211_ATTR_WIPHY_COVERAGE_CLASS, | ||
798 | |||
799 | NL80211_ATTR_TX_RATES, | ||
800 | |||
782 | /* add attributes here, update the policy in nl80211.c */ | 801 | /* add attributes here, update the policy in nl80211.c */ |
783 | 802 | ||
784 | __NL80211_ATTR_AFTER_LAST, | 803 | __NL80211_ATTR_AFTER_LAST, |
@@ -1359,13 +1378,20 @@ enum nl80211_channel_type { | |||
1359 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) | 1378 | * @NL80211_BSS_BEACON_INTERVAL: beacon interval of the (I)BSS (u16) |
1360 | * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) | 1379 | * @NL80211_BSS_CAPABILITY: capability field (CPU order, u16) |
1361 | * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the | 1380 | * @NL80211_BSS_INFORMATION_ELEMENTS: binary attribute containing the |
1362 | * raw information elements from the probe response/beacon (bin) | 1381 | * raw information elements from the probe response/beacon (bin); |
1382 | * if the %NL80211_BSS_BEACON_IES attribute is present, the IEs here are | ||
1383 | * from a Probe Response frame; otherwise they are from a Beacon frame. | ||
1384 | * However, if the driver does not indicate the source of the IEs, these | ||
1385 | * IEs may be from either frame subtype. | ||
1363 | * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon | 1386 | * @NL80211_BSS_SIGNAL_MBM: signal strength of probe response/beacon |
1364 | * in mBm (100 * dBm) (s32) | 1387 | * in mBm (100 * dBm) (s32) |
1365 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 1388 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
1366 | * in unspecified units, scaled to 0..100 (u8) | 1389 | * in unspecified units, scaled to 0..100 (u8) |
1367 | * @NL80211_BSS_STATUS: status, if this BSS is "used" | 1390 | * @NL80211_BSS_STATUS: status, if this BSS is "used" |
1368 | * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms | 1391 | * @NL80211_BSS_SEEN_MS_AGO: age of this BSS entry in ms |
1392 | * @NL80211_BSS_BEACON_IES: binary attribute containing the raw information | ||
1393 | * elements from a Beacon frame (bin); not present if no Beacon frame has | ||
1394 | * yet been received | ||
1369 | * @__NL80211_BSS_AFTER_LAST: internal | 1395 | * @__NL80211_BSS_AFTER_LAST: internal |
1370 | * @NL80211_BSS_MAX: highest BSS attribute | 1396 | * @NL80211_BSS_MAX: highest BSS attribute |
1371 | */ | 1397 | */ |
@@ -1381,6 +1407,7 @@ enum nl80211_bss { | |||
1381 | NL80211_BSS_SIGNAL_UNSPEC, | 1407 | NL80211_BSS_SIGNAL_UNSPEC, |
1382 | NL80211_BSS_STATUS, | 1408 | NL80211_BSS_STATUS, |
1383 | NL80211_BSS_SEEN_MS_AGO, | 1409 | NL80211_BSS_SEEN_MS_AGO, |
1410 | NL80211_BSS_BEACON_IES, | ||
1384 | 1411 | ||
1385 | /* keep last */ | 1412 | /* keep last */ |
1386 | __NL80211_BSS_AFTER_LAST, | 1413 | __NL80211_BSS_AFTER_LAST, |
@@ -1478,4 +1505,33 @@ enum nl80211_key_attributes { | |||
1478 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | 1505 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 |
1479 | }; | 1506 | }; |
1480 | 1507 | ||
1508 | /** | ||
1509 | * enum nl80211_tx_rate_attributes - TX rate set attributes | ||
1510 | * @__NL80211_TXRATE_INVALID: invalid | ||
1511 | * @NL80211_TXRATE_LEGACY: Legacy (non-MCS) rates allowed for TX rate selection | ||
1512 | * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with | ||
1513 | * 1 = 500 kbps) but without the IE length restriction (at most | ||
1514 | * %NL80211_MAX_SUPP_RATES in a single array). | ||
1515 | * @__NL80211_TXRATE_AFTER_LAST: internal | ||
1516 | * @NL80211_TXRATE_MAX: highest TX rate attribute | ||
1517 | */ | ||
1518 | enum nl80211_tx_rate_attributes { | ||
1519 | __NL80211_TXRATE_INVALID, | ||
1520 | NL80211_TXRATE_LEGACY, | ||
1521 | |||
1522 | /* keep last */ | ||
1523 | __NL80211_TXRATE_AFTER_LAST, | ||
1524 | NL80211_TXRATE_MAX = __NL80211_TXRATE_AFTER_LAST - 1 | ||
1525 | }; | ||
1526 | |||
1527 | /** | ||
1528 | * enum nl80211_band - Frequency band | ||
1529 | * @NL80211_BAND_2GHZ - 2.4 GHz ISM band | ||
1530 | * @NL80211_BAND_5GHZ - around 5 GHz band (4.9 - 5.7 GHz) | ||
1531 | */ | ||
1532 | enum nl80211_band { | ||
1533 | NL80211_BAND_2GHZ, | ||
1534 | NL80211_BAND_5GHZ, | ||
1535 | }; | ||
1536 | |||
1481 | #endif /* __LINUX_NL80211_H */ | 1537 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index bf1e67080849..174e5392e51e 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -243,6 +243,7 @@ struct pci_dev { | |||
243 | unsigned int d2_support:1; /* Low power state D2 is supported */ | 243 | unsigned int d2_support:1; /* Low power state D2 is supported */ |
244 | unsigned int no_d1d2:1; /* Only allow D0 and D3 */ | 244 | unsigned int no_d1d2:1; /* Only allow D0 and D3 */ |
245 | unsigned int wakeup_prepared:1; | 245 | unsigned int wakeup_prepared:1; |
246 | unsigned int d3_delay; /* D3->D0 transition time in ms */ | ||
246 | 247 | ||
247 | #ifdef CONFIG_PCIEASPM | 248 | #ifdef CONFIG_PCIEASPM |
248 | struct pcie_link_state *link_state; /* ASPM link state. */ | 249 | struct pcie_link_state *link_state; /* ASPM link state. */ |
@@ -566,6 +567,9 @@ void pcibios_align_resource(void *, struct resource *, resource_size_t, | |||
566 | resource_size_t); | 567 | resource_size_t); |
567 | void pcibios_update_irq(struct pci_dev *, int irq); | 568 | void pcibios_update_irq(struct pci_dev *, int irq); |
568 | 569 | ||
570 | /* Weak but can be overriden by arch */ | ||
571 | void pci_fixup_cardbus(struct pci_bus *); | ||
572 | |||
569 | /* Generic PCI functions used internally */ | 573 | /* Generic PCI functions used internally */ |
570 | 574 | ||
571 | extern struct pci_bus *pci_find_bus(int domain, int busnr); | 575 | extern struct pci_bus *pci_find_bus(int domain, int busnr); |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index c66b34f75eea..8fa71874113f 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -814,9 +814,14 @@ extern int perf_event_overflow(struct perf_event *event, int nmi, | |||
814 | */ | 814 | */ |
815 | static inline int is_software_event(struct perf_event *event) | 815 | static inline int is_software_event(struct perf_event *event) |
816 | { | 816 | { |
817 | return (event->attr.type != PERF_TYPE_RAW) && | 817 | switch (event->attr.type) { |
818 | (event->attr.type != PERF_TYPE_HARDWARE) && | 818 | case PERF_TYPE_SOFTWARE: |
819 | (event->attr.type != PERF_TYPE_HW_CACHE); | 819 | case PERF_TYPE_TRACEPOINT: |
820 | /* for now the breakpoint stuff also works as software event */ | ||
821 | case PERF_TYPE_BREAKPOINT: | ||
822 | return 1; | ||
823 | } | ||
824 | return 0; | ||
820 | } | 825 | } |
821 | 826 | ||
822 | extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; | 827 | extern atomic_t perf_swevent_enabled[PERF_COUNT_SW_MAX]; |
diff --git a/include/linux/phy.h b/include/linux/phy.h index b1368b8f6572..14d7fdf6a90a 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -447,10 +447,12 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr); | |||
447 | int phy_device_register(struct phy_device *phy); | 447 | int phy_device_register(struct phy_device *phy); |
448 | int phy_clear_interrupt(struct phy_device *phydev); | 448 | int phy_clear_interrupt(struct phy_device *phydev); |
449 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); | 449 | int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); |
450 | int phy_init_hw(struct phy_device *phydev); | ||
450 | int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, | 451 | int phy_attach_direct(struct net_device *dev, struct phy_device *phydev, |
451 | u32 flags, phy_interface_t interface); | 452 | u32 flags, phy_interface_t interface); |
452 | struct phy_device * phy_attach(struct net_device *dev, | 453 | struct phy_device * phy_attach(struct net_device *dev, |
453 | const char *bus_id, u32 flags, phy_interface_t interface); | 454 | const char *bus_id, u32 flags, phy_interface_t interface); |
455 | struct phy_device *phy_find_first(struct mii_bus *bus); | ||
454 | int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, | 456 | int phy_connect_direct(struct net_device *dev, struct phy_device *phydev, |
455 | void (*handler)(struct net_device *), u32 flags, | 457 | void (*handler)(struct net_device *), u32 flags, |
456 | phy_interface_t interface); | 458 | phy_interface_t interface); |
@@ -484,6 +486,7 @@ void phy_driver_unregister(struct phy_driver *drv); | |||
484 | int phy_driver_register(struct phy_driver *new_driver); | 486 | int phy_driver_register(struct phy_driver *new_driver); |
485 | void phy_prepare_link(struct phy_device *phydev, | 487 | void phy_prepare_link(struct phy_device *phydev, |
486 | void (*adjust_link)(struct net_device *)); | 488 | void (*adjust_link)(struct net_device *)); |
489 | void phy_state_machine(struct work_struct *work); | ||
487 | void phy_start_machine(struct phy_device *phydev, | 490 | void phy_start_machine(struct phy_device *phydev, |
488 | void (*handler)(struct net_device *)); | 491 | void (*handler)(struct net_device *)); |
489 | void phy_stop_machine(struct phy_device *phydev); | 492 | void phy_stop_machine(struct phy_device *phydev); |
diff --git a/include/linux/poison.h b/include/linux/poison.h index 7fc194aef8c2..2110a81c5e2a 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
@@ -2,13 +2,25 @@ | |||
2 | #define _LINUX_POISON_H | 2 | #define _LINUX_POISON_H |
3 | 3 | ||
4 | /********** include/linux/list.h **********/ | 4 | /********** include/linux/list.h **********/ |
5 | |||
6 | /* | ||
7 | * Architectures might want to move the poison pointer offset | ||
8 | * into some well-recognized area such as 0xdead000000000000, | ||
9 | * that is also not mappable by user-space exploits: | ||
10 | */ | ||
11 | #ifdef CONFIG_ILLEGAL_POINTER_VALUE | ||
12 | # define POISON_POINTER_DELTA _AC(CONFIG_ILLEGAL_POINTER_VALUE, UL) | ||
13 | #else | ||
14 | # define POISON_POINTER_DELTA 0 | ||
15 | #endif | ||
16 | |||
5 | /* | 17 | /* |
6 | * These are non-NULL pointers that will result in page faults | 18 | * These are non-NULL pointers that will result in page faults |
7 | * under normal circumstances, used to verify that nobody uses | 19 | * under normal circumstances, used to verify that nobody uses |
8 | * non-initialized list entries. | 20 | * non-initialized list entries. |
9 | */ | 21 | */ |
10 | #define LIST_POISON1 ((void *) 0x00100100) | 22 | #define LIST_POISON1 ((void *) 0x00100100 + POISON_POINTER_DELTA) |
11 | #define LIST_POISON2 ((void *) 0x00200200) | 23 | #define LIST_POISON2 ((void *) 0x00200200 + POISON_POINTER_DELTA) |
12 | 24 | ||
13 | /********** include/linux/timer.h **********/ | 25 | /********** include/linux/timer.h **********/ |
14 | /* | 26 | /* |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index c96c1858fe2c..1ba3cf6edfbb 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -62,6 +62,12 @@ void reiserfs_write_unlock(struct super_block *s); | |||
62 | int reiserfs_write_lock_once(struct super_block *s); | 62 | int reiserfs_write_lock_once(struct super_block *s); |
63 | void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); | 63 | void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); |
64 | 64 | ||
65 | #ifdef CONFIG_REISERFS_CHECK | ||
66 | void reiserfs_lock_check_recursive(struct super_block *s); | ||
67 | #else | ||
68 | static inline void reiserfs_lock_check_recursive(struct super_block *s) { } | ||
69 | #endif | ||
70 | |||
65 | /* | 71 | /* |
66 | * Several mutexes depend on the write lock. | 72 | * Several mutexes depend on the write lock. |
67 | * However sometimes we want to relax the write lock while we hold | 73 | * However sometimes we want to relax the write lock while we hold |
@@ -92,11 +98,31 @@ void reiserfs_write_unlock_once(struct super_block *s, int lock_depth); | |||
92 | static inline void reiserfs_mutex_lock_safe(struct mutex *m, | 98 | static inline void reiserfs_mutex_lock_safe(struct mutex *m, |
93 | struct super_block *s) | 99 | struct super_block *s) |
94 | { | 100 | { |
101 | reiserfs_lock_check_recursive(s); | ||
95 | reiserfs_write_unlock(s); | 102 | reiserfs_write_unlock(s); |
96 | mutex_lock(m); | 103 | mutex_lock(m); |
97 | reiserfs_write_lock(s); | 104 | reiserfs_write_lock(s); |
98 | } | 105 | } |
99 | 106 | ||
107 | static inline void | ||
108 | reiserfs_mutex_lock_nested_safe(struct mutex *m, unsigned int subclass, | ||
109 | struct super_block *s) | ||
110 | { | ||
111 | reiserfs_lock_check_recursive(s); | ||
112 | reiserfs_write_unlock(s); | ||
113 | mutex_lock_nested(m, subclass); | ||
114 | reiserfs_write_lock(s); | ||
115 | } | ||
116 | |||
117 | static inline void | ||
118 | reiserfs_down_read_safe(struct rw_semaphore *sem, struct super_block *s) | ||
119 | { | ||
120 | reiserfs_lock_check_recursive(s); | ||
121 | reiserfs_write_unlock(s); | ||
122 | down_read(sem); | ||
123 | reiserfs_write_lock(s); | ||
124 | } | ||
125 | |||
100 | /* | 126 | /* |
101 | * When we schedule, we usually want to also release the write lock, | 127 | * When we schedule, we usually want to also release the write lock, |
102 | * according to the previous bkl based locking scheme of reiserfs. | 128 | * according to the previous bkl based locking scheme of reiserfs. |
diff --git a/include/linux/resource.h b/include/linux/resource.h index 40fc7e626082..f1e914eefeab 100644 --- a/include/linux/resource.h +++ b/include/linux/resource.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/time.h> | 4 | #include <linux/time.h> |
5 | 5 | ||
6 | struct task_struct; | ||
7 | |||
8 | /* | 6 | /* |
9 | * Resource control/accounting header file for linux | 7 | * Resource control/accounting header file for linux |
10 | */ | 8 | */ |
@@ -70,6 +68,12 @@ struct rlimit { | |||
70 | */ | 68 | */ |
71 | #include <asm/resource.h> | 69 | #include <asm/resource.h> |
72 | 70 | ||
71 | #ifdef __KERNEL__ | ||
72 | |||
73 | struct task_struct; | ||
74 | |||
73 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); | 75 | int getrusage(struct task_struct *p, int who, struct rusage __user *ru); |
74 | 76 | ||
77 | #endif /* __KERNEL__ */ | ||
78 | |||
75 | #endif | 79 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f2f842db03ce..6f7bba93929b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -377,6 +377,8 @@ extern int sysctl_max_map_count; | |||
377 | 377 | ||
378 | #include <linux/aio.h> | 378 | #include <linux/aio.h> |
379 | 379 | ||
380 | #ifdef CONFIG_MMU | ||
381 | extern void arch_pick_mmap_layout(struct mm_struct *mm); | ||
380 | extern unsigned long | 382 | extern unsigned long |
381 | arch_get_unmapped_area(struct file *, unsigned long, unsigned long, | 383 | arch_get_unmapped_area(struct file *, unsigned long, unsigned long, |
382 | unsigned long, unsigned long); | 384 | unsigned long, unsigned long); |
@@ -386,6 +388,9 @@ arch_get_unmapped_area_topdown(struct file *filp, unsigned long addr, | |||
386 | unsigned long flags); | 388 | unsigned long flags); |
387 | extern void arch_unmap_area(struct mm_struct *, unsigned long); | 389 | extern void arch_unmap_area(struct mm_struct *, unsigned long); |
388 | extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); | 390 | extern void arch_unmap_area_topdown(struct mm_struct *, unsigned long); |
391 | #else | ||
392 | static inline void arch_pick_mmap_layout(struct mm_struct *mm) {} | ||
393 | #endif | ||
389 | 394 | ||
390 | #if USE_SPLIT_PTLOCKS | 395 | #if USE_SPLIT_PTLOCKS |
391 | /* | 396 | /* |
@@ -2491,8 +2496,6 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) | |||
2491 | 2496 | ||
2492 | #endif /* CONFIG_SMP */ | 2497 | #endif /* CONFIG_SMP */ |
2493 | 2498 | ||
2494 | extern void arch_pick_mmap_layout(struct mm_struct *mm); | ||
2495 | |||
2496 | #ifdef CONFIG_TRACING | 2499 | #ifdef CONFIG_TRACING |
2497 | extern void | 2500 | extern void |
2498 | __trace_special(void *__tr, void *__data, | 2501 | __trace_special(void *__tr, void *__data, |
@@ -2601,6 +2604,28 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p) | |||
2601 | } | 2604 | } |
2602 | #endif /* CONFIG_MM_OWNER */ | 2605 | #endif /* CONFIG_MM_OWNER */ |
2603 | 2606 | ||
2607 | static inline unsigned long task_rlimit(const struct task_struct *tsk, | ||
2608 | unsigned int limit) | ||
2609 | { | ||
2610 | return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_cur); | ||
2611 | } | ||
2612 | |||
2613 | static inline unsigned long task_rlimit_max(const struct task_struct *tsk, | ||
2614 | unsigned int limit) | ||
2615 | { | ||
2616 | return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_max); | ||
2617 | } | ||
2618 | |||
2619 | static inline unsigned long rlimit(unsigned int limit) | ||
2620 | { | ||
2621 | return task_rlimit(current, limit); | ||
2622 | } | ||
2623 | |||
2624 | static inline unsigned long rlimit_max(unsigned int limit) | ||
2625 | { | ||
2626 | return task_rlimit_max(current, limit); | ||
2627 | } | ||
2628 | |||
2604 | #endif /* __KERNEL__ */ | 2629 | #endif /* __KERNEL__ */ |
2605 | 2630 | ||
2606 | #endif | 2631 | #endif |
diff --git a/include/linux/serio.h b/include/linux/serio.h index e2f3044d4a4a..813d26c247ec 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -136,25 +136,6 @@ static inline void serio_continue_rx(struct serio *serio) | |||
136 | spin_unlock_irq(&serio->lock); | 136 | spin_unlock_irq(&serio->lock); |
137 | } | 137 | } |
138 | 138 | ||
139 | /* | ||
140 | * Use the following functions to pin serio's driver in process context | ||
141 | */ | ||
142 | static inline int serio_pin_driver(struct serio *serio) | ||
143 | { | ||
144 | return mutex_lock_interruptible(&serio->drv_mutex); | ||
145 | } | ||
146 | |||
147 | static inline void serio_pin_driver_uninterruptible(struct serio *serio) | ||
148 | { | ||
149 | mutex_lock(&serio->drv_mutex); | ||
150 | } | ||
151 | |||
152 | static inline void serio_unpin_driver(struct serio *serio) | ||
153 | { | ||
154 | mutex_unlock(&serio->drv_mutex); | ||
155 | } | ||
156 | |||
157 | |||
158 | #endif | 139 | #endif |
159 | 140 | ||
160 | /* | 141 | /* |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 34c4475ac4a2..4f95c1aac2fd 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -111,6 +111,7 @@ | |||
111 | #define SONYPI_EVENT_VOLUME_INC_PRESSED 69 | 111 | #define SONYPI_EVENT_VOLUME_INC_PRESSED 69 |
112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 | 112 | #define SONYPI_EVENT_VOLUME_DEC_PRESSED 70 |
113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 | 113 | #define SONYPI_EVENT_BRIGHTNESS_PRESSED 71 |
114 | #define SONYPI_EVENT_MEDIA_PRESSED 72 | ||
114 | 115 | ||
115 | /* get/set brightness */ | 116 | /* get/set brightness */ |
116 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 117 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h new file mode 100644 index 000000000000..32bfd1a8a48d --- /dev/null +++ b/include/linux/stmmac.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /******************************************************************************* | ||
2 | |||
3 | Header file for stmmac platform data | ||
4 | |||
5 | Copyright (C) 2009 STMicroelectronics Ltd | ||
6 | |||
7 | This program is free software; you can redistribute it and/or modify it | ||
8 | under the terms and conditions of the GNU General Public License, | ||
9 | version 2, as published by the Free Software Foundation. | ||
10 | |||
11 | This program is distributed in the hope it will be useful, but WITHOUT | ||
12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | more details. | ||
15 | |||
16 | You should have received a copy of the GNU General Public License along with | ||
17 | this program; if not, write to the Free Software Foundation, Inc., | ||
18 | 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | |||
20 | The full GNU General Public License is included in this distribution in | ||
21 | the file called "COPYING". | ||
22 | |||
23 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | ||
24 | *******************************************************************************/ | ||
25 | |||
26 | #ifndef __STMMAC_PLATFORM_DATA | ||
27 | #define __STMMAC_PLATFORM_DATA | ||
28 | |||
29 | /* platfrom data for platfrom device structure's platfrom_data field */ | ||
30 | |||
31 | /* Private data for the STM on-board ethernet driver */ | ||
32 | struct plat_stmmacenet_data { | ||
33 | int bus_id; | ||
34 | int pbl; | ||
35 | int has_gmac; | ||
36 | void (*fix_mac_speed)(void *priv, unsigned int speed); | ||
37 | void (*bus_setup)(unsigned long ioaddr); | ||
38 | #ifdef CONFIG_STM_DRIVERS | ||
39 | struct stm_pad_config *pad_config; | ||
40 | #endif | ||
41 | void *bsp_priv; | ||
42 | }; | ||
43 | |||
44 | struct plat_stmmacphy_data { | ||
45 | int bus_id; | ||
46 | int phy_addr; | ||
47 | unsigned int phy_mask; | ||
48 | int interface; | ||
49 | int (*phy_reset)(void *priv); | ||
50 | void *priv; | ||
51 | }; | ||
52 | #endif | ||
53 | |||
diff --git a/include/linux/string.h b/include/linux/string.h index 651839a2a755..a716ee2a8adb 100644 --- a/include/linux/string.h +++ b/include/linux/string.h | |||
@@ -72,7 +72,10 @@ static inline __must_check char *strstrip(char *str) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | #ifndef __HAVE_ARCH_STRSTR | 74 | #ifndef __HAVE_ARCH_STRSTR |
75 | extern char * strstr(const char *,const char *); | 75 | extern char * strstr(const char *, const char *); |
76 | #endif | ||
77 | #ifndef __HAVE_ARCH_STRNSTR | ||
78 | extern char * strnstr(const char *, const char *, size_t); | ||
76 | #endif | 79 | #endif |
77 | #ifndef __HAVE_ARCH_STRLEN | 80 | #ifndef __HAVE_ARCH_STRLEN |
78 | extern __kernel_size_t strlen(const char *); | 81 | extern __kernel_size_t strlen(const char *); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 65793e90d6f6..207466a49f3d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -195,7 +195,7 @@ struct perf_event_attr; | |||
195 | static const struct syscall_metadata __used \ | 195 | static const struct syscall_metadata __used \ |
196 | __attribute__((__aligned__(4))) \ | 196 | __attribute__((__aligned__(4))) \ |
197 | __attribute__((section("__syscalls_metadata"))) \ | 197 | __attribute__((section("__syscalls_metadata"))) \ |
198 | __syscall_meta_##sname = { \ | 198 | __syscall_meta__##sname = { \ |
199 | .name = "sys_"#sname, \ | 199 | .name = "sys_"#sname, \ |
200 | .nb_args = 0, \ | 200 | .nb_args = 0, \ |
201 | .enter_event = &event_enter__##sname, \ | 201 | .enter_event = &event_enter__##sname, \ |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 877ba039e6a4..9f236cdcf3fe 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -482,6 +482,8 @@ enum | |||
482 | NET_IPV4_CONF_ARP_ACCEPT=21, | 482 | NET_IPV4_CONF_ARP_ACCEPT=21, |
483 | NET_IPV4_CONF_ARP_NOTIFY=22, | 483 | NET_IPV4_CONF_ARP_NOTIFY=22, |
484 | NET_IPV4_CONF_ACCEPT_LOCAL=23, | 484 | NET_IPV4_CONF_ACCEPT_LOCAL=23, |
485 | NET_IPV4_CONF_SRC_VMARK=24, | ||
486 | NET_IPV4_CONF_PROXY_ARP_PVLAN=25, | ||
485 | __NET_IPV4_CONF_MAX | 487 | __NET_IPV4_CONF_MAX |
486 | }; | 488 | }; |
487 | 489 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index 57e63579bfdd..5b81156780b1 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -99,7 +99,7 @@ int arch_update_cpu_topology(void); | |||
99 | | 1*SD_WAKE_AFFINE \ | 99 | | 1*SD_WAKE_AFFINE \ |
100 | | 1*SD_SHARE_CPUPOWER \ | 100 | | 1*SD_SHARE_CPUPOWER \ |
101 | | 0*SD_POWERSAVINGS_BALANCE \ | 101 | | 0*SD_POWERSAVINGS_BALANCE \ |
102 | | 0*SD_SHARE_PKG_RESOURCES \ | 102 | | 1*SD_SHARE_PKG_RESOURCES \ |
103 | | 0*SD_SERIALIZE \ | 103 | | 0*SD_SERIALIZE \ |
104 | | 0*SD_PREFER_SIBLING \ | 104 | | 0*SD_PREFER_SIBLING \ |
105 | , \ | 105 | , \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index ef3a2947b102..6abfcf5b5887 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -464,7 +464,7 @@ extern int tty_port_alloc_xmit_buf(struct tty_port *port); | |||
464 | extern void tty_port_free_xmit_buf(struct tty_port *port); | 464 | extern void tty_port_free_xmit_buf(struct tty_port *port); |
465 | extern void tty_port_put(struct tty_port *port); | 465 | extern void tty_port_put(struct tty_port *port); |
466 | 466 | ||
467 | extern inline struct tty_port *tty_port_get(struct tty_port *port) | 467 | static inline struct tty_port *tty_port_get(struct tty_port *port) |
468 | { | 468 | { |
469 | if (port) | 469 | if (port) |
470 | kref_get(&port->kref); | 470 | kref_get(&port->kref); |
@@ -486,7 +486,7 @@ extern void tty_port_close(struct tty_port *port, | |||
486 | struct tty_struct *tty, struct file *filp); | 486 | struct tty_struct *tty, struct file *filp); |
487 | extern int tty_port_open(struct tty_port *port, | 487 | extern int tty_port_open(struct tty_port *port, |
488 | struct tty_struct *tty, struct file *filp); | 488 | struct tty_struct *tty, struct file *filp); |
489 | extern inline int tty_port_users(struct tty_port *port) | 489 | static inline int tty_port_users(struct tty_port *port) |
490 | { | 490 | { |
491 | return port->count + port->blocked_open; | 491 | return port->count + port->blocked_open; |
492 | } | 492 | } |
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 6b58367d145e..d512d98dfb7d 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h | |||
@@ -94,6 +94,7 @@ static inline unsigned long __copy_from_user_nocache(void *to, | |||
94 | * happens, handle that and return -EFAULT. | 94 | * happens, handle that and return -EFAULT. |
95 | */ | 95 | */ |
96 | extern long probe_kernel_read(void *dst, void *src, size_t size); | 96 | extern long probe_kernel_read(void *dst, void *src, size_t size); |
97 | extern long __probe_kernel_read(void *dst, void *src, size_t size); | ||
97 | 98 | ||
98 | /* | 99 | /* |
99 | * probe_kernel_write(): safely attempt to write to a location | 100 | * probe_kernel_write(): safely attempt to write to a location |
@@ -104,6 +105,7 @@ extern long probe_kernel_read(void *dst, void *src, size_t size); | |||
104 | * Safely write to address @dst from the buffer at @src. If a kernel fault | 105 | * Safely write to address @dst from the buffer at @src. If a kernel fault |
105 | * happens, handle that and return -EFAULT. | 106 | * happens, handle that and return -EFAULT. |
106 | */ | 107 | */ |
107 | extern long probe_kernel_write(void *dst, void *src, size_t size); | 108 | extern long notrace probe_kernel_write(void *dst, void *src, size_t size); |
109 | extern long notrace __probe_kernel_write(void *dst, void *src, size_t size); | ||
108 | 110 | ||
109 | #endif /* __LINUX_UACCESS_H__ */ | 111 | #endif /* __LINUX_UACCESS_H__ */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index e101a2d04d75..d7ace1b80f09 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -192,6 +192,7 @@ struct usb_interface { | |||
192 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ | 192 | unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ |
193 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ | 193 | unsigned needs_binding:1; /* needs delayed unbind/rebind */ |
194 | unsigned reset_running:1; | 194 | unsigned reset_running:1; |
195 | unsigned resetting_device:1; /* true: bandwidth alloc after reset */ | ||
195 | 196 | ||
196 | struct device dev; /* interface specific device info */ | 197 | struct device dev; /* interface specific device info */ |
197 | struct device *usb_dev; | 198 | struct device *usb_dev; |
diff --git a/include/linux/vhost.h b/include/linux/vhost.h new file mode 100644 index 000000000000..e847f1e30756 --- /dev/null +++ b/include/linux/vhost.h | |||
@@ -0,0 +1,130 @@ | |||
1 | #ifndef _LINUX_VHOST_H | ||
2 | #define _LINUX_VHOST_H | ||
3 | /* Userspace interface for in-kernel virtio accelerators. */ | ||
4 | |||
5 | /* vhost is used to reduce the number of system calls involved in virtio. | ||
6 | * | ||
7 | * Existing virtio net code is used in the guest without modification. | ||
8 | * | ||
9 | * This header includes interface used by userspace hypervisor for | ||
10 | * device configuration. | ||
11 | */ | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | #include <linux/compiler.h> | ||
15 | #include <linux/ioctl.h> | ||
16 | #include <linux/virtio_config.h> | ||
17 | #include <linux/virtio_ring.h> | ||
18 | |||
19 | struct vhost_vring_state { | ||
20 | unsigned int index; | ||
21 | unsigned int num; | ||
22 | }; | ||
23 | |||
24 | struct vhost_vring_file { | ||
25 | unsigned int index; | ||
26 | int fd; /* Pass -1 to unbind from file. */ | ||
27 | |||
28 | }; | ||
29 | |||
30 | struct vhost_vring_addr { | ||
31 | unsigned int index; | ||
32 | /* Option flags. */ | ||
33 | unsigned int flags; | ||
34 | /* Flag values: */ | ||
35 | /* Whether log address is valid. If set enables logging. */ | ||
36 | #define VHOST_VRING_F_LOG 0 | ||
37 | |||
38 | /* Start of array of descriptors (virtually contiguous) */ | ||
39 | __u64 desc_user_addr; | ||
40 | /* Used structure address. Must be 32 bit aligned */ | ||
41 | __u64 used_user_addr; | ||
42 | /* Available structure address. Must be 16 bit aligned */ | ||
43 | __u64 avail_user_addr; | ||
44 | /* Logging support. */ | ||
45 | /* Log writes to used structure, at offset calculated from specified | ||
46 | * address. Address must be 32 bit aligned. */ | ||
47 | __u64 log_guest_addr; | ||
48 | }; | ||
49 | |||
50 | struct vhost_memory_region { | ||
51 | __u64 guest_phys_addr; | ||
52 | __u64 memory_size; /* bytes */ | ||
53 | __u64 userspace_addr; | ||
54 | __u64 flags_padding; /* No flags are currently specified. */ | ||
55 | }; | ||
56 | |||
57 | /* All region addresses and sizes must be 4K aligned. */ | ||
58 | #define VHOST_PAGE_SIZE 0x1000 | ||
59 | |||
60 | struct vhost_memory { | ||
61 | __u32 nregions; | ||
62 | __u32 padding; | ||
63 | struct vhost_memory_region regions[0]; | ||
64 | }; | ||
65 | |||
66 | /* ioctls */ | ||
67 | |||
68 | #define VHOST_VIRTIO 0xAF | ||
69 | |||
70 | /* Features bitmask for forward compatibility. Transport bits are used for | ||
71 | * vhost specific features. */ | ||
72 | #define VHOST_GET_FEATURES _IOR(VHOST_VIRTIO, 0x00, __u64) | ||
73 | #define VHOST_SET_FEATURES _IOW(VHOST_VIRTIO, 0x00, __u64) | ||
74 | |||
75 | /* Set current process as the (exclusive) owner of this file descriptor. This | ||
76 | * must be called before any other vhost command. Further calls to | ||
77 | * VHOST_OWNER_SET fail until VHOST_OWNER_RESET is called. */ | ||
78 | #define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01) | ||
79 | /* Give up ownership, and reset the device to default values. | ||
80 | * Allows subsequent call to VHOST_OWNER_SET to succeed. */ | ||
81 | #define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02) | ||
82 | |||
83 | /* Set up/modify memory layout */ | ||
84 | #define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory) | ||
85 | |||
86 | /* Write logging setup. */ | ||
87 | /* Memory writes can optionally be logged by setting bit at an offset | ||
88 | * (calculated from the physical address) from specified log base. | ||
89 | * The bit is set using an atomic 32 bit operation. */ | ||
90 | /* Set base address for logging. */ | ||
91 | #define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64) | ||
92 | /* Specify an eventfd file descriptor to signal on log write. */ | ||
93 | #define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int) | ||
94 | |||
95 | /* Ring setup. */ | ||
96 | /* Set number of descriptors in ring. This parameter can not | ||
97 | * be modified while ring is running (bound to a device). */ | ||
98 | #define VHOST_SET_VRING_NUM _IOW(VHOST_VIRTIO, 0x10, struct vhost_vring_state) | ||
99 | /* Set addresses for the ring. */ | ||
100 | #define VHOST_SET_VRING_ADDR _IOW(VHOST_VIRTIO, 0x11, struct vhost_vring_addr) | ||
101 | /* Base value where queue looks for available descriptors */ | ||
102 | #define VHOST_SET_VRING_BASE _IOW(VHOST_VIRTIO, 0x12, struct vhost_vring_state) | ||
103 | /* Get accessor: reads index, writes value in num */ | ||
104 | #define VHOST_GET_VRING_BASE _IOWR(VHOST_VIRTIO, 0x12, struct vhost_vring_state) | ||
105 | |||
106 | /* The following ioctls use eventfd file descriptors to signal and poll | ||
107 | * for events. */ | ||
108 | |||
109 | /* Set eventfd to poll for added buffers */ | ||
110 | #define VHOST_SET_VRING_KICK _IOW(VHOST_VIRTIO, 0x20, struct vhost_vring_file) | ||
111 | /* Set eventfd to signal when buffers have beed used */ | ||
112 | #define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, struct vhost_vring_file) | ||
113 | /* Set eventfd to signal an error */ | ||
114 | #define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file) | ||
115 | |||
116 | /* VHOST_NET specific defines */ | ||
117 | |||
118 | /* Attach virtio net ring to a raw socket, or tap device. | ||
119 | * The socket must be already bound to an ethernet device, this device will be | ||
120 | * used for transmit. Pass fd -1 to unbind from the socket and the transmit | ||
121 | * device. This can be used to stop the ring (e.g. for migration). */ | ||
122 | #define VHOST_NET_SET_BACKEND _IOW(VHOST_VIRTIO, 0x30, struct vhost_vring_file) | ||
123 | |||
124 | /* Feature bits */ | ||
125 | /* Log all write descriptors. Can be changed while device is active. */ | ||
126 | #define VHOST_F_LOG_ALL 26 | ||
127 | /* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */ | ||
128 | #define VHOST_NET_F_VIRTIO_NET_HDR 27 | ||
129 | |||
130 | #endif | ||
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 057a2e010758..f508c651e53d 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h | |||
@@ -51,6 +51,9 @@ struct virtqueue { | |||
51 | * This re-enables callbacks; it returns "false" if there are pending | 51 | * This re-enables callbacks; it returns "false" if there are pending |
52 | * buffers in the queue, to detect a possible race between the driver | 52 | * buffers in the queue, to detect a possible race between the driver |
53 | * checking for more work, and enabling callbacks. | 53 | * checking for more work, and enabling callbacks. |
54 | * @detach_unused_buf: detach first unused buffer | ||
55 | * vq: the struct virtqueue we're talking about. | ||
56 | * Returns NULL or the "data" token handed to add_buf | ||
54 | * | 57 | * |
55 | * Locking rules are straightforward: the driver is responsible for | 58 | * Locking rules are straightforward: the driver is responsible for |
56 | * locking. No two operations may be invoked simultaneously, with the exception | 59 | * locking. No two operations may be invoked simultaneously, with the exception |
@@ -71,6 +74,7 @@ struct virtqueue_ops { | |||
71 | 74 | ||
72 | void (*disable_cb)(struct virtqueue *vq); | 75 | void (*disable_cb)(struct virtqueue *vq); |
73 | bool (*enable_cb)(struct virtqueue *vq); | 76 | bool (*enable_cb)(struct virtqueue *vq); |
77 | void *(*detach_unused_buf)(struct virtqueue *vq); | ||
74 | }; | 78 | }; |
75 | 79 | ||
76 | /** | 80 | /** |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index c18c008f4bbf..76e8903cd204 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -70,6 +70,7 @@ struct writeback_control { | |||
70 | struct bdi_writeback; | 70 | struct bdi_writeback; |
71 | int inode_wait(void *); | 71 | int inode_wait(void *); |
72 | void writeback_inodes_sb(struct super_block *); | 72 | void writeback_inodes_sb(struct super_block *); |
73 | int writeback_inodes_sb_if_idle(struct super_block *); | ||
73 | void sync_inodes_sb(struct super_block *); | 74 | void sync_inodes_sb(struct super_block *); |
74 | void writeback_inodes_wbc(struct writeback_control *wbc); | 75 | void writeback_inodes_wbc(struct writeback_control *wbc); |
75 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); | 76 | long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index add79930f47d..a3f0a7ed31ac 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -39,8 +39,8 @@ | |||
39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) | 39 | * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7) |
40 | */ | 40 | */ |
41 | enum ieee80211_band { | 41 | enum ieee80211_band { |
42 | IEEE80211_BAND_2GHZ, | 42 | IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ, |
43 | IEEE80211_BAND_5GHZ, | 43 | IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ, |
44 | 44 | ||
45 | /* keep last */ | 45 | /* keep last */ |
46 | IEEE80211_NUM_BANDS | 46 | IEEE80211_NUM_BANDS |
@@ -626,8 +626,14 @@ enum cfg80211_signal_type { | |||
626 | * @beacon_interval: the beacon interval as from the frame | 626 | * @beacon_interval: the beacon interval as from the frame |
627 | * @capability: the capability field in host byte order | 627 | * @capability: the capability field in host byte order |
628 | * @information_elements: the information elements (Note that there | 628 | * @information_elements: the information elements (Note that there |
629 | * is no guarantee that these are well-formed!) | 629 | * is no guarantee that these are well-formed!); this is a pointer to |
630 | * either the beacon_ies or proberesp_ies depending on whether Probe | ||
631 | * Response frame has been received | ||
630 | * @len_information_elements: total length of the information elements | 632 | * @len_information_elements: total length of the information elements |
633 | * @beacon_ies: the information elements from the last Beacon frame | ||
634 | * @len_beacon_ies: total length of the beacon_ies | ||
635 | * @proberesp_ies: the information elements from the last Probe Response frame | ||
636 | * @len_proberesp_ies: total length of the proberesp_ies | ||
631 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 637 | * @signal: signal strength value (type depends on the wiphy's signal_type) |
632 | * @free_priv: function pointer to free private data | 638 | * @free_priv: function pointer to free private data |
633 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 639 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
@@ -641,6 +647,10 @@ struct cfg80211_bss { | |||
641 | u16 capability; | 647 | u16 capability; |
642 | u8 *information_elements; | 648 | u8 *information_elements; |
643 | size_t len_information_elements; | 649 | size_t len_information_elements; |
650 | u8 *beacon_ies; | ||
651 | size_t len_beacon_ies; | ||
652 | u8 *proberesp_ies; | ||
653 | size_t len_proberesp_ies; | ||
644 | 654 | ||
645 | s32 signal; | 655 | s32 signal; |
646 | 656 | ||
@@ -837,6 +847,7 @@ enum wiphy_params_flags { | |||
837 | WIPHY_PARAM_RETRY_LONG = 1 << 1, | 847 | WIPHY_PARAM_RETRY_LONG = 1 << 1, |
838 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, | 848 | WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2, |
839 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, | 849 | WIPHY_PARAM_RTS_THRESHOLD = 1 << 3, |
850 | WIPHY_PARAM_COVERAGE_CLASS = 1 << 4, | ||
840 | }; | 851 | }; |
841 | 852 | ||
842 | /** | 853 | /** |
@@ -856,20 +867,11 @@ enum tx_power_setting { | |||
856 | * cfg80211_bitrate_mask - masks for bitrate control | 867 | * cfg80211_bitrate_mask - masks for bitrate control |
857 | */ | 868 | */ |
858 | struct cfg80211_bitrate_mask { | 869 | struct cfg80211_bitrate_mask { |
859 | /* | ||
860 | * As discussed in Berlin, this struct really | ||
861 | * should look like this: | ||
862 | |||
863 | struct { | 870 | struct { |
864 | u32 legacy; | 871 | u32 legacy; |
865 | u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; | 872 | /* TODO: add support for masking MCS rates; e.g.: */ |
873 | /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */ | ||
866 | } control[IEEE80211_NUM_BANDS]; | 874 | } control[IEEE80211_NUM_BANDS]; |
867 | |||
868 | * Since we can always fix in-kernel users, let's keep | ||
869 | * it simpler for now: | ||
870 | */ | ||
871 | u32 fixed; /* fixed bitrate, 0 == not fixed */ | ||
872 | u32 maxrate; /* in kbps, 0 == no limit */ | ||
873 | }; | 875 | }; |
874 | /** | 876 | /** |
875 | * struct cfg80211_pmksa - PMK Security Association | 877 | * struct cfg80211_pmksa - PMK Security Association |
@@ -1193,6 +1195,10 @@ enum wiphy_flags { | |||
1193 | WIPHY_FLAG_4ADDR_STATION = BIT(6), | 1195 | WIPHY_FLAG_4ADDR_STATION = BIT(6), |
1194 | }; | 1196 | }; |
1195 | 1197 | ||
1198 | struct mac_address { | ||
1199 | u8 addr[ETH_ALEN]; | ||
1200 | }; | ||
1201 | |||
1196 | /** | 1202 | /** |
1197 | * struct wiphy - wireless hardware description | 1203 | * struct wiphy - wireless hardware description |
1198 | * @idx: the wiphy index assigned to this item | 1204 | * @idx: the wiphy index assigned to this item |
@@ -1211,12 +1217,28 @@ enum wiphy_flags { | |||
1211 | * -1 = fragmentation disabled, only odd values >= 256 used | 1217 | * -1 = fragmentation disabled, only odd values >= 256 used |
1212 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled | 1218 | * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled |
1213 | * @net: the network namespace this wiphy currently lives in | 1219 | * @net: the network namespace this wiphy currently lives in |
1220 | * @perm_addr: permanent MAC address of this device | ||
1221 | * @addr_mask: If the device supports multiple MAC addresses by masking, | ||
1222 | * set this to a mask with variable bits set to 1, e.g. if the last | ||
1223 | * four bits are variable then set it to 00:...:00:0f. The actual | ||
1224 | * variable bits shall be determined by the interfaces added, with | ||
1225 | * interfaces not matching the mask being rejected to be brought up. | ||
1226 | * @n_addresses: number of addresses in @addresses. | ||
1227 | * @addresses: If the device has more than one address, set this pointer | ||
1228 | * to a list of addresses (6 bytes each). The first one will be used | ||
1229 | * by default for perm_addr. In this case, the mask should be set to | ||
1230 | * all-zeroes. In this case it is assumed that the device can handle | ||
1231 | * the same number of arbitrary MAC addresses. | ||
1214 | */ | 1232 | */ |
1215 | struct wiphy { | 1233 | struct wiphy { |
1216 | /* assign these fields before you register the wiphy */ | 1234 | /* assign these fields before you register the wiphy */ |
1217 | 1235 | ||
1218 | /* permanent MAC address */ | 1236 | /* permanent MAC address(es) */ |
1219 | u8 perm_addr[ETH_ALEN]; | 1237 | u8 perm_addr[ETH_ALEN]; |
1238 | u8 addr_mask[ETH_ALEN]; | ||
1239 | |||
1240 | u16 n_addresses; | ||
1241 | struct mac_address *addresses; | ||
1220 | 1242 | ||
1221 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ | 1243 | /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ |
1222 | u16 interface_modes; | 1244 | u16 interface_modes; |
@@ -1236,6 +1258,7 @@ struct wiphy { | |||
1236 | u8 retry_long; | 1258 | u8 retry_long; |
1237 | u32 frag_threshold; | 1259 | u32 frag_threshold; |
1238 | u32 rts_threshold; | 1260 | u32 rts_threshold; |
1261 | u8 coverage_class; | ||
1239 | 1262 | ||
1240 | char fw_version[ETHTOOL_BUSINFO_LEN]; | 1263 | char fw_version[ETHTOOL_BUSINFO_LEN]; |
1241 | u32 hw_version; | 1264 | u32 hw_version; |
@@ -1635,6 +1658,22 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list, | |||
1635 | */ | 1658 | */ |
1636 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); | 1659 | unsigned int cfg80211_classify8021d(struct sk_buff *skb); |
1637 | 1660 | ||
1661 | /** | ||
1662 | * cfg80211_find_ie - find information element in data | ||
1663 | * | ||
1664 | * @eid: element ID | ||
1665 | * @ies: data consisting of IEs | ||
1666 | * @len: length of data | ||
1667 | * | ||
1668 | * This function will return %NULL if the element ID could | ||
1669 | * not be found or if the element is invalid (claims to be | ||
1670 | * longer than the given data), or a pointer to the first byte | ||
1671 | * of the requested element, that is the byte containing the | ||
1672 | * element ID. There are no checks on the element length | ||
1673 | * other than having to fit into the given data. | ||
1674 | */ | ||
1675 | const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len); | ||
1676 | |||
1638 | /* | 1677 | /* |
1639 | * Regulatory helper functions for wiphys | 1678 | * Regulatory helper functions for wiphys |
1640 | */ | 1679 | */ |
diff --git a/include/net/icmp.h b/include/net/icmp.h index dfa72d4e8907..15b3dfe9fce8 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h | |||
@@ -28,7 +28,7 @@ struct icmp_err { | |||
28 | unsigned fatal:1; | 28 | unsigned fatal:1; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | extern struct icmp_err icmp_err_convert[]; | 31 | extern const struct icmp_err icmp_err_convert[]; |
32 | #define ICMP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.icmp_statistics, field) | 32 | #define ICMP_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.icmp_statistics, field) |
33 | #define ICMP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.icmp_statistics, field) | 33 | #define ICMP_INC_STATS_BH(net, field) SNMP_INC_STATS_BH((net)->mib.icmp_statistics, field) |
34 | #define ICMPMSGOUT_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.icmpmsg_statistics, field+256) | 34 | #define ICMPMSGOUT_INC_STATS(net, field) SNMP_INC_STATS((net)->mib.icmpmsg_statistics, field+256) |
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index bd4c53f75ac0..83fd34437cf1 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -122,10 +122,12 @@ struct inet_sock { | |||
122 | __be32 inet_saddr; | 122 | __be32 inet_saddr; |
123 | __s16 uc_ttl; | 123 | __s16 uc_ttl; |
124 | __u16 cmsg_flags; | 124 | __u16 cmsg_flags; |
125 | struct ip_options *opt; | ||
126 | __be16 inet_sport; | 125 | __be16 inet_sport; |
127 | __u16 inet_id; | 126 | __u16 inet_id; |
127 | |||
128 | struct ip_options *opt; | ||
128 | __u8 tos; | 129 | __u8 tos; |
130 | __u8 min_ttl; | ||
129 | __u8 mc_ttl; | 131 | __u8 mc_ttl; |
130 | __u8 pmtudisc; | 132 | __u8 pmtudisc; |
131 | __u8 recverr:1, | 133 | __u8 recverr:1, |
diff --git a/include/net/ip.h b/include/net/ip.h index 85108cfbb1ae..fb63371c07a8 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -326,6 +326,22 @@ static __inline__ void inet_reset_saddr(struct sock *sk) | |||
326 | 326 | ||
327 | #endif | 327 | #endif |
328 | 328 | ||
329 | static inline int sk_mc_loop(struct sock *sk) | ||
330 | { | ||
331 | if (!sk) | ||
332 | return 1; | ||
333 | switch (sk->sk_family) { | ||
334 | case AF_INET: | ||
335 | return inet_sk(sk)->mc_loop; | ||
336 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
337 | case AF_INET6: | ||
338 | return inet6_sk(sk)->mc_loop; | ||
339 | #endif | ||
340 | } | ||
341 | WARN_ON(1); | ||
342 | return 1; | ||
343 | } | ||
344 | |||
329 | extern int ip_call_ra_chain(struct sk_buff *skb); | 345 | extern int ip_call_ra_chain(struct sk_buff *skb); |
330 | 346 | ||
331 | /* | 347 | /* |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index f073a2a50574..74ccf30fdf8e 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -107,12 +107,14 @@ enum ieee80211_max_queues { | |||
107 | * 2^n-1 in the range 1..32767] | 107 | * 2^n-1 in the range 1..32767] |
108 | * @cw_max: maximum contention window [like @cw_min] | 108 | * @cw_max: maximum contention window [like @cw_min] |
109 | * @txop: maximum burst time in units of 32 usecs, 0 meaning disabled | 109 | * @txop: maximum burst time in units of 32 usecs, 0 meaning disabled |
110 | * @uapsd: is U-APSD mode enabled for the queue | ||
110 | */ | 111 | */ |
111 | struct ieee80211_tx_queue_params { | 112 | struct ieee80211_tx_queue_params { |
112 | u16 txop; | 113 | u16 txop; |
113 | u16 cw_min; | 114 | u16 cw_min; |
114 | u16 cw_max; | 115 | u16 cw_max; |
115 | u8 aifs; | 116 | u8 aifs; |
117 | bool uapsd; | ||
116 | }; | 118 | }; |
117 | 119 | ||
118 | /** | 120 | /** |
@@ -184,7 +186,8 @@ enum ieee80211_bss_change { | |||
184 | * @use_short_slot: use short slot time (only relevant for ERP); | 186 | * @use_short_slot: use short slot time (only relevant for ERP); |
185 | * if the hardware cannot handle this it must set the | 187 | * if the hardware cannot handle this it must set the |
186 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag | 188 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag |
187 | * @dtim_period: num of beacons before the next DTIM, for PSM | 189 | * @dtim_period: num of beacons before the next DTIM, for beaconing, |
190 | * not valid in station mode (cf. hw conf ps_dtim_period) | ||
188 | * @timestamp: beacon timestamp | 191 | * @timestamp: beacon timestamp |
189 | * @beacon_int: beacon interval | 192 | * @beacon_int: beacon interval |
190 | * @assoc_capability: capabilities taken from assoc resp | 193 | * @assoc_capability: capabilities taken from assoc resp |
@@ -255,9 +258,6 @@ struct ieee80211_bss_conf { | |||
255 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be | 258 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be |
256 | * set by rate control algorithms to indicate probe rate, will | 259 | * set by rate control algorithms to indicate probe rate, will |
257 | * be cleared for fragmented frames (except on the last fragment) | 260 | * be cleared for fragmented frames (except on the last fragment) |
258 | * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or | ||
259 | * set this flag in the driver; indicates that the rate control | ||
260 | * algorithm was used and should be notified of TX status | ||
261 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, | 261 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, |
262 | * used to indicate that a pending frame requires TX processing before | 262 | * used to indicate that a pending frame requires TX processing before |
263 | * it can be sent out. | 263 | * it can be sent out. |
@@ -272,6 +272,11 @@ struct ieee80211_bss_conf { | |||
272 | * transmit function after the current frame, this can be used | 272 | * transmit function after the current frame, this can be used |
273 | * by drivers to kick the DMA queue only if unset or when the | 273 | * by drivers to kick the DMA queue only if unset or when the |
274 | * queue gets full. | 274 | * queue gets full. |
275 | * @IEEE80211_TX_INTFL_RETRANSMISSION: This frame is being retransmitted | ||
276 | * after TX status because the destination was asleep, it must not | ||
277 | * be modified again (no seqno assignment, crypto, etc.) | ||
278 | * @IEEE80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still | ||
279 | * has a radiotap header at skb->data. | ||
275 | */ | 280 | */ |
276 | enum mac80211_tx_control_flags { | 281 | enum mac80211_tx_control_flags { |
277 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 282 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -287,12 +292,13 @@ enum mac80211_tx_control_flags { | |||
287 | IEEE80211_TX_STAT_AMPDU = BIT(10), | 292 | IEEE80211_TX_STAT_AMPDU = BIT(10), |
288 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), | 293 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), |
289 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), | 294 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), |
290 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | ||
291 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | 295 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), |
292 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 296 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
293 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | 297 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), |
294 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), | 298 | IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17), |
295 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), | 299 | IEEE80211_TX_CTL_MORE_FRAMES = BIT(18), |
300 | IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19), | ||
301 | IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20), | ||
296 | }; | 302 | }; |
297 | 303 | ||
298 | /** | 304 | /** |
@@ -571,7 +577,13 @@ struct ieee80211_rx_status { | |||
571 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this | 577 | * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this |
572 | * to determine for example whether to calculate timestamps for packets | 578 | * to determine for example whether to calculate timestamps for packets |
573 | * or not, do not use instead of filter flags! | 579 | * or not, do not use instead of filter flags! |
574 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only) | 580 | * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only). |
581 | * This is the power save mode defined by IEEE 802.11-2007 section 11.2, | ||
582 | * meaning that the hardware still wakes up for beacons, is able to | ||
583 | * transmit frames and receive the possible acknowledgment frames. | ||
584 | * Not to be confused with hardware specific wakeup/sleep states, | ||
585 | * driver is responsible for that. See the section "Powersave support" | ||
586 | * for more. | ||
575 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set | 587 | * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set |
576 | * the driver should be prepared to handle configuration requests but | 588 | * the driver should be prepared to handle configuration requests but |
577 | * may turn the device off as much as possible. Typically, this flag will | 589 | * may turn the device off as much as possible. Typically, this flag will |
@@ -611,7 +623,11 @@ enum ieee80211_conf_changed { | |||
611 | /** | 623 | /** |
612 | * enum ieee80211_smps_mode - spatial multiplexing power save mode | 624 | * enum ieee80211_smps_mode - spatial multiplexing power save mode |
613 | * | 625 | * |
614 | * @ | 626 | * @IEEE80211_SMPS_AUTOMATIC: automatic |
627 | * @IEEE80211_SMPS_OFF: off | ||
628 | * @IEEE80211_SMPS_STATIC: static | ||
629 | * @IEEE80211_SMPS_DYNAMIC: dynamic | ||
630 | * @IEEE80211_SMPS_NUM_MODES: internal, don't use | ||
615 | */ | 631 | */ |
616 | enum ieee80211_smps_mode { | 632 | enum ieee80211_smps_mode { |
617 | IEEE80211_SMPS_AUTOMATIC, | 633 | IEEE80211_SMPS_AUTOMATIC, |
@@ -636,6 +652,9 @@ enum ieee80211_smps_mode { | |||
636 | * value will be only achievable between DTIM frames, the hardware | 652 | * value will be only achievable between DTIM frames, the hardware |
637 | * needs to check for the multicast traffic bit in DTIM beacons. | 653 | * needs to check for the multicast traffic bit in DTIM beacons. |
638 | * This variable is valid only when the CONF_PS flag is set. | 654 | * This variable is valid only when the CONF_PS flag is set. |
655 | * @ps_dtim_period: The DTIM period of the AP we're connected to, for use | ||
656 | * in power saving. Power saving will not be enabled until a beacon | ||
657 | * has been received and the DTIM period is known. | ||
639 | * @dynamic_ps_timeout: The dynamic powersave timeout (in ms), see the | 658 | * @dynamic_ps_timeout: The dynamic powersave timeout (in ms), see the |
640 | * powersave documentation below. This variable is valid only when | 659 | * powersave documentation below. This variable is valid only when |
641 | * the CONF_PS flag is set. | 660 | * the CONF_PS flag is set. |
@@ -662,6 +681,7 @@ struct ieee80211_conf { | |||
662 | int max_sleep_period; | 681 | int max_sleep_period; |
663 | 682 | ||
664 | u16 listen_interval; | 683 | u16 listen_interval; |
684 | u8 ps_dtim_period; | ||
665 | 685 | ||
666 | u8 long_frame_max_tx_count, short_frame_max_tx_count; | 686 | u8 long_frame_max_tx_count, short_frame_max_tx_count; |
667 | 687 | ||
@@ -933,6 +953,11 @@ enum ieee80211_tkip_key_type { | |||
933 | * Hardware supports dynamic spatial multiplexing powersave, | 953 | * Hardware supports dynamic spatial multiplexing powersave, |
934 | * ie. can turn off all but one chain and then wake the rest | 954 | * ie. can turn off all but one chain and then wake the rest |
935 | * up as required after, for example, rts/cts handshake. | 955 | * up as required after, for example, rts/cts handshake. |
956 | * | ||
957 | * @IEEE80211_HW_SUPPORTS_UAPSD: | ||
958 | * Hardware supports Unscheduled Automatic Power Save Delivery | ||
959 | * (U-APSD) in managed mode. The mode is configured with | ||
960 | * conf_tx() operation. | ||
936 | */ | 961 | */ |
937 | enum ieee80211_hw_flags { | 962 | enum ieee80211_hw_flags { |
938 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 963 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -952,6 +977,7 @@ enum ieee80211_hw_flags { | |||
952 | IEEE80211_HW_BEACON_FILTER = 1<<14, | 977 | IEEE80211_HW_BEACON_FILTER = 1<<14, |
953 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, | 978 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, |
954 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, | 979 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, |
980 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, | ||
955 | }; | 981 | }; |
956 | 982 | ||
957 | /** | 983 | /** |
@@ -1130,18 +1156,24 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1130 | * | 1156 | * |
1131 | * mac80211 has support for various powersave implementations. | 1157 | * mac80211 has support for various powersave implementations. |
1132 | * | 1158 | * |
1133 | * First, it can support hardware that handles all powersaving by | 1159 | * First, it can support hardware that handles all powersaving by itself, |
1134 | * itself, such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS | 1160 | * such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS hardware |
1135 | * hardware flag. In that case, it will be told about the desired | 1161 | * flag. In that case, it will be told about the desired powersave mode |
1136 | * powersave mode depending on the association status, and the driver | 1162 | * with the %IEEE80211_CONF_PS flag depending on the association status. |
1137 | * must take care of sending nullfunc frames when necessary, i.e. when | 1163 | * The hardware must take care of sending nullfunc frames when necessary, |
1138 | * entering and leaving powersave mode. The driver is required to look at | 1164 | * i.e. when entering and leaving powersave mode. The hardware is required |
1139 | * the AID in beacons and signal to the AP that it woke up when it finds | 1165 | * to look at the AID in beacons and signal to the AP that it woke up when |
1140 | * traffic directed to it. This mode supports dynamic PS by simply | 1166 | * it finds traffic directed to it. |
1141 | * enabling/disabling PS. | 1167 | * |
1142 | * | 1168 | * %IEEE80211_CONF_PS flag enabled means that the powersave mode defined in |
1143 | * Additionally, such hardware may set the %IEEE80211_HW_SUPPORTS_DYNAMIC_PS | 1169 | * IEEE 802.11-2007 section 11.2 is enabled. This is not to be confused |
1144 | * flag to indicate that it can support dynamic PS mode itself (see below). | 1170 | * with hardware wakeup and sleep states. Driver is responsible for waking |
1171 | * up the hardware before issueing commands to the hardware and putting it | ||
1172 | * back to sleep at approriate times. | ||
1173 | * | ||
1174 | * When PS is enabled, hardware needs to wakeup for beacons and receive the | ||
1175 | * buffered multicast/broadcast frames after the beacon. Also it must be | ||
1176 | * possible to send frames and receive the acknowledment frame. | ||
1145 | * | 1177 | * |
1146 | * Other hardware designs cannot send nullfunc frames by themselves and also | 1178 | * Other hardware designs cannot send nullfunc frames by themselves and also |
1147 | * need software support for parsing the TIM bitmap. This is also supported | 1179 | * need software support for parsing the TIM bitmap. This is also supported |
@@ -1149,14 +1181,35 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1149 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still | 1181 | * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still |
1150 | * required to pass up beacons. The hardware is still required to handle | 1182 | * required to pass up beacons. The hardware is still required to handle |
1151 | * waking up for multicast traffic; if it cannot the driver must handle that | 1183 | * waking up for multicast traffic; if it cannot the driver must handle that |
1152 | * as best as it can, mac80211 is too slow. | 1184 | * as best as it can, mac80211 is too slow to do that. |
1153 | * | 1185 | * |
1154 | * Dynamic powersave mode is an extension to normal powersave mode in which | 1186 | * Dynamic powersave is an extension to normal powersave in which the |
1155 | * the hardware stays awake for a user-specified period of time after sending | 1187 | * hardware stays awake for a user-specified period of time after sending a |
1156 | * a frame so that reply frames need not be buffered and therefore delayed | 1188 | * frame so that reply frames need not be buffered and therefore delayed to |
1157 | * to the next wakeup. This can either be supported by hardware, in which case | 1189 | * the next wakeup. It's compromise of getting good enough latency when |
1158 | * the driver needs to look at the @dynamic_ps_timeout hardware configuration | 1190 | * there's data traffic and still saving significantly power in idle |
1159 | * value, or by the stack if all nullfunc handling is in the stack. | 1191 | * periods. |
1192 | * | ||
1193 | * Dynamic powersave is supported by simply mac80211 enabling and disabling | ||
1194 | * PS based on traffic. Driver needs to only set %IEEE80211_HW_SUPPORTS_PS | ||
1195 | * flag and mac80211 will handle everything automatically. Additionally, | ||
1196 | * hardware having support for the dynamic PS feature may set the | ||
1197 | * %IEEE80211_HW_SUPPORTS_DYNAMIC_PS flag to indicate that it can support | ||
1198 | * dynamic PS mode itself. The driver needs to look at the | ||
1199 | * @dynamic_ps_timeout hardware configuration value and use it that value | ||
1200 | * whenever %IEEE80211_CONF_PS is set. In this case mac80211 will disable | ||
1201 | * dynamic PS feature in stack and will just keep %IEEE80211_CONF_PS | ||
1202 | * enabled whenever user has enabled powersave. | ||
1203 | * | ||
1204 | * Driver informs U-APSD client support by enabling | ||
1205 | * %IEEE80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the | ||
1206 | * uapsd paramater in conf_tx() operation. Hardware needs to send the QoS | ||
1207 | * Nullfunc frames and stay awake until the service period has ended. To | ||
1208 | * utilize U-APSD, dynamic powersave is disabled for voip AC and all frames | ||
1209 | * from that AC are transmitted with powersave enabled. | ||
1210 | * | ||
1211 | * Note: U-APSD client mode is not yet supported with | ||
1212 | * %IEEE80211_HW_PS_NULLFUNC_STACK. | ||
1160 | */ | 1213 | */ |
1161 | 1214 | ||
1162 | /** | 1215 | /** |
@@ -1444,7 +1497,7 @@ enum ieee80211_ampdu_mlme_action { | |||
1444 | * @update_tkip_key: See the section "Hardware crypto acceleration" | 1497 | * @update_tkip_key: See the section "Hardware crypto acceleration" |
1445 | * This callback will be called in the context of Rx. Called for drivers | 1498 | * This callback will be called in the context of Rx. Called for drivers |
1446 | * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. | 1499 | * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. |
1447 | * The callback can sleep. | 1500 | * The callback must be atomic. |
1448 | * | 1501 | * |
1449 | * @hw_scan: Ask the hardware to service the scan request, no need to start | 1502 | * @hw_scan: Ask the hardware to service the scan request, no need to start |
1450 | * the scan state machine in stack. The scan must honour the channel | 1503 | * the scan state machine in stack. The scan must honour the channel |
@@ -1533,6 +1586,10 @@ enum ieee80211_ampdu_mlme_action { | |||
1533 | * and need to call wiphy_rfkill_set_hw_state() in the callback. | 1586 | * and need to call wiphy_rfkill_set_hw_state() in the callback. |
1534 | * The callback can sleep. | 1587 | * The callback can sleep. |
1535 | * | 1588 | * |
1589 | * @set_coverage_class: Set slot time for given coverage class as specified | ||
1590 | * in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout | ||
1591 | * accordingly. This callback is not required and may sleep. | ||
1592 | * | ||
1536 | * @testmode_cmd: Implement a cfg80211 test mode command. | 1593 | * @testmode_cmd: Implement a cfg80211 test mode command. |
1537 | * The callback can sleep. | 1594 | * The callback can sleep. |
1538 | * | 1595 | * |
@@ -1565,8 +1622,10 @@ struct ieee80211_ops { | |||
1565 | struct ieee80211_vif *vif, struct ieee80211_sta *sta, | 1622 | struct ieee80211_vif *vif, struct ieee80211_sta *sta, |
1566 | struct ieee80211_key_conf *key); | 1623 | struct ieee80211_key_conf *key); |
1567 | void (*update_tkip_key)(struct ieee80211_hw *hw, | 1624 | void (*update_tkip_key)(struct ieee80211_hw *hw, |
1568 | struct ieee80211_key_conf *conf, const u8 *address, | 1625 | struct ieee80211_vif *vif, |
1569 | u32 iv32, u16 *phase1key); | 1626 | struct ieee80211_key_conf *conf, |
1627 | struct ieee80211_sta *sta, | ||
1628 | u32 iv32, u16 *phase1key); | ||
1570 | int (*hw_scan)(struct ieee80211_hw *hw, | 1629 | int (*hw_scan)(struct ieee80211_hw *hw, |
1571 | struct cfg80211_scan_request *req); | 1630 | struct cfg80211_scan_request *req); |
1572 | void (*sw_scan_start)(struct ieee80211_hw *hw); | 1631 | void (*sw_scan_start)(struct ieee80211_hw *hw); |
@@ -1592,6 +1651,7 @@ struct ieee80211_ops { | |||
1592 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); | 1651 | struct ieee80211_sta *sta, u16 tid, u16 *ssn); |
1593 | 1652 | ||
1594 | void (*rfkill_poll)(struct ieee80211_hw *hw); | 1653 | void (*rfkill_poll)(struct ieee80211_hw *hw); |
1654 | void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class); | ||
1595 | #ifdef CONFIG_NL80211_TESTMODE | 1655 | #ifdef CONFIG_NL80211_TESTMODE |
1596 | int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); | 1656 | int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len); |
1597 | #endif | 1657 | #endif |
@@ -1874,6 +1934,53 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, | |||
1874 | } | 1934 | } |
1875 | 1935 | ||
1876 | /** | 1936 | /** |
1937 | * ieee80211_pspoll_get - retrieve a PS Poll template | ||
1938 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1939 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1940 | * | ||
1941 | * Creates a PS Poll a template which can, for example, uploaded to | ||
1942 | * hardware. The template must be updated after association so that correct | ||
1943 | * AID, BSSID and MAC address is used. | ||
1944 | * | ||
1945 | * Note: Caller (or hardware) is responsible for setting the | ||
1946 | * &IEEE80211_FCTL_PM bit. | ||
1947 | */ | ||
1948 | struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw, | ||
1949 | struct ieee80211_vif *vif); | ||
1950 | |||
1951 | /** | ||
1952 | * ieee80211_nullfunc_get - retrieve a nullfunc template | ||
1953 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1954 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1955 | * | ||
1956 | * Creates a Nullfunc template which can, for example, uploaded to | ||
1957 | * hardware. The template must be updated after association so that correct | ||
1958 | * BSSID and address is used. | ||
1959 | * | ||
1960 | * Note: Caller (or hardware) is responsible for setting the | ||
1961 | * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields. | ||
1962 | */ | ||
1963 | struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw, | ||
1964 | struct ieee80211_vif *vif); | ||
1965 | |||
1966 | /** | ||
1967 | * ieee80211_probereq_get - retrieve a Probe Request template | ||
1968 | * @hw: pointer obtained from ieee80211_alloc_hw(). | ||
1969 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | ||
1970 | * @ssid: SSID buffer | ||
1971 | * @ssid_len: length of SSID | ||
1972 | * @ie: buffer containing all IEs except SSID for the template | ||
1973 | * @ie_len: length of the IE buffer | ||
1974 | * | ||
1975 | * Creates a Probe Request template which can, for example, be uploaded to | ||
1976 | * hardware. | ||
1977 | */ | ||
1978 | struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw, | ||
1979 | struct ieee80211_vif *vif, | ||
1980 | const u8 *ssid, size_t ssid_len, | ||
1981 | const u8 *ie, size_t ie_len); | ||
1982 | |||
1983 | /** | ||
1877 | * ieee80211_rts_get - RTS frame generation function | 1984 | * ieee80211_rts_get - RTS frame generation function |
1878 | * @hw: pointer obtained from ieee80211_alloc_hw(). | 1985 | * @hw: pointer obtained from ieee80211_alloc_hw(). |
1879 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 1986 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
@@ -2292,8 +2399,12 @@ enum rate_control_changed { | |||
2292 | * @short_preamble: whether mac80211 will request short-preamble transmission | 2399 | * @short_preamble: whether mac80211 will request short-preamble transmission |
2293 | * if the selected rate supports it | 2400 | * if the selected rate supports it |
2294 | * @max_rate_idx: user-requested maximum rate (not MCS for now) | 2401 | * @max_rate_idx: user-requested maximum rate (not MCS for now) |
2402 | * (deprecated; this will be removed once drivers get updated to use | ||
2403 | * rate_idx_mask) | ||
2404 | * @rate_idx_mask: user-requested rate mask (not MCS for now) | ||
2295 | * @skb: the skb that will be transmitted, the control information in it needs | 2405 | * @skb: the skb that will be transmitted, the control information in it needs |
2296 | * to be filled in | 2406 | * to be filled in |
2407 | * @ap: whether this frame is sent out in AP mode | ||
2297 | */ | 2408 | */ |
2298 | struct ieee80211_tx_rate_control { | 2409 | struct ieee80211_tx_rate_control { |
2299 | struct ieee80211_hw *hw; | 2410 | struct ieee80211_hw *hw; |
@@ -2303,6 +2414,8 @@ struct ieee80211_tx_rate_control { | |||
2303 | struct ieee80211_tx_rate reported_rate; | 2414 | struct ieee80211_tx_rate reported_rate; |
2304 | bool rts, short_preamble; | 2415 | bool rts, short_preamble; |
2305 | u8 max_rate_idx; | 2416 | u8 max_rate_idx; |
2417 | u32 rate_idx_mask; | ||
2418 | bool ap; | ||
2306 | }; | 2419 | }; |
2307 | 2420 | ||
2308 | struct rate_control_ops { | 2421 | struct rate_control_ops { |
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index ba1ba0c5efd1..63d449807d9b 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -11,6 +11,8 @@ struct nf_conntrack_ecache; | |||
11 | struct netns_ct { | 11 | struct netns_ct { |
12 | atomic_t count; | 12 | atomic_t count; |
13 | unsigned int expect_count; | 13 | unsigned int expect_count; |
14 | unsigned int htable_size; | ||
15 | struct kmem_cache *nf_conntrack_cachep; | ||
14 | struct hlist_nulls_head *hash; | 16 | struct hlist_nulls_head *hash; |
15 | struct hlist_head *expect_hash; | 17 | struct hlist_head *expect_hash; |
16 | struct hlist_nulls_head unconfirmed; | 18 | struct hlist_nulls_head unconfirmed; |
@@ -28,5 +30,6 @@ struct netns_ct { | |||
28 | #endif | 30 | #endif |
29 | int hash_vmalloc; | 31 | int hash_vmalloc; |
30 | int expect_vmalloc; | 32 | int expect_vmalloc; |
33 | char *slabname; | ||
31 | }; | 34 | }; |
32 | #endif | 35 | #endif |
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index 8098f6b8319d..2764994c9136 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h | |||
@@ -42,6 +42,7 @@ struct netns_ipv4 { | |||
42 | #endif | 42 | #endif |
43 | struct xt_table *nat_table; | 43 | struct xt_table *nat_table; |
44 | struct hlist_head *nat_bysource; | 44 | struct hlist_head *nat_bysource; |
45 | unsigned int nat_htable_size; | ||
45 | int nat_vmalloced; | 46 | int nat_vmalloced; |
46 | #endif | 47 | #endif |
47 | 48 | ||
diff --git a/include/net/netns/xfrm.h b/include/net/netns/xfrm.h index 56f8e5585df7..74f119a2829a 100644 --- a/include/net/netns/xfrm.h +++ b/include/net/netns/xfrm.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/wait.h> | 5 | #include <linux/wait.h> |
6 | #include <linux/workqueue.h> | 6 | #include <linux/workqueue.h> |
7 | #include <linux/xfrm.h> | 7 | #include <linux/xfrm.h> |
8 | #include <net/dst_ops.h> | ||
8 | 9 | ||
9 | struct ctl_table_header; | 10 | struct ctl_table_header; |
10 | 11 | ||
@@ -42,6 +43,11 @@ struct netns_xfrm { | |||
42 | unsigned int policy_count[XFRM_POLICY_MAX * 2]; | 43 | unsigned int policy_count[XFRM_POLICY_MAX * 2]; |
43 | struct work_struct policy_hash_work; | 44 | struct work_struct policy_hash_work; |
44 | 45 | ||
46 | struct dst_ops xfrm4_dst_ops; | ||
47 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
48 | struct dst_ops xfrm6_dst_ops; | ||
49 | #endif | ||
50 | |||
45 | struct sock *nlsk; | 51 | struct sock *nlsk; |
46 | struct sock *nlsk_stash; | 52 | struct sock *nlsk_stash; |
47 | 53 | ||
diff --git a/include/net/netrom.h b/include/net/netrom.h index 15696b1fd30f..ab170a60e7d3 100644 --- a/include/net/netrom.h +++ b/include/net/netrom.h | |||
@@ -132,6 +132,8 @@ static __inline__ void nr_node_put(struct nr_node *nr_node) | |||
132 | static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh) | 132 | static __inline__ void nr_neigh_put(struct nr_neigh *nr_neigh) |
133 | { | 133 | { |
134 | if (atomic_dec_and_test(&nr_neigh->refcount)) { | 134 | if (atomic_dec_and_test(&nr_neigh->refcount)) { |
135 | if (nr_neigh->ax25) | ||
136 | ax25_cb_put(nr_neigh->ax25); | ||
135 | kfree(nr_neigh->digipeat); | 137 | kfree(nr_neigh->digipeat); |
136 | kfree(nr_neigh); | 138 | kfree(nr_neigh); |
137 | } | 139 | } |
diff --git a/include/net/phonet/pep.h b/include/net/phonet/pep.h index 4c61cdce4e5f..35672b1cf44a 100644 --- a/include/net/phonet/pep.h +++ b/include/net/phonet/pep.h | |||
@@ -44,6 +44,7 @@ struct pep_sock { | |||
44 | u8 rx_fc; /* RX flow control */ | 44 | u8 rx_fc; /* RX flow control */ |
45 | u8 tx_fc; /* TX flow control */ | 45 | u8 tx_fc; /* TX flow control */ |
46 | u8 init_enable; /* auto-enable at creation */ | 46 | u8 init_enable; /* auto-enable at creation */ |
47 | u8 aligned; | ||
47 | }; | 48 | }; |
48 | 49 | ||
49 | static inline struct pep_sock *pep_sk(struct sock *sk) | 50 | static inline struct pep_sock *pep_sk(struct sock *sk) |
@@ -77,6 +78,7 @@ static inline struct pnpipehdr *pnp_hdr(struct sk_buff *skb) | |||
77 | 78 | ||
78 | enum { | 79 | enum { |
79 | PNS_PIPE_DATA = 0x20, | 80 | PNS_PIPE_DATA = 0x20, |
81 | PNS_PIPE_ALIGNED_DATA, | ||
80 | 82 | ||
81 | PNS_PEP_CONNECT_REQ = 0x40, | 83 | PNS_PEP_CONNECT_REQ = 0x40, |
82 | PNS_PEP_CONNECT_RESP, | 84 | PNS_PEP_CONNECT_RESP, |
@@ -138,6 +140,7 @@ enum { | |||
138 | PN_PIPE_SB_NEGOTIATED_FC, | 140 | PN_PIPE_SB_NEGOTIATED_FC, |
139 | PN_PIPE_SB_REQUIRED_FC_TX, | 141 | PN_PIPE_SB_REQUIRED_FC_TX, |
140 | PN_PIPE_SB_PREFERRED_FC_RX, | 142 | PN_PIPE_SB_PREFERRED_FC_RX, |
143 | PN_PIPE_SB_ALIGNED_DATA, | ||
141 | }; | 144 | }; |
142 | 145 | ||
143 | /* Phonet pipe flow control models */ | 146 | /* Phonet pipe flow control models */ |
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 2d567265363e..b6cdc33b39c1 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -71,6 +71,7 @@ extern void qdisc_watchdog_cancel(struct qdisc_watchdog *wd); | |||
71 | 71 | ||
72 | extern struct Qdisc_ops pfifo_qdisc_ops; | 72 | extern struct Qdisc_ops pfifo_qdisc_ops; |
73 | extern struct Qdisc_ops bfifo_qdisc_ops; | 73 | extern struct Qdisc_ops bfifo_qdisc_ops; |
74 | extern struct Qdisc_ops pfifo_head_drop_qdisc_ops; | ||
74 | 75 | ||
75 | extern int fifo_set_limit(struct Qdisc *q, unsigned int limit); | 76 | extern int fifo_set_limit(struct Qdisc *q, unsigned int limit); |
76 | extern struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, | 77 | extern struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, |
diff --git a/include/net/regulatory.h b/include/net/regulatory.h index 47995b81c5d7..f873ee37f7e4 100644 --- a/include/net/regulatory.h +++ b/include/net/regulatory.h | |||
@@ -39,6 +39,7 @@ enum environment_cap { | |||
39 | * 00 - World regulatory domain | 39 | * 00 - World regulatory domain |
40 | * 99 - built by driver but a specific alpha2 cannot be determined | 40 | * 99 - built by driver but a specific alpha2 cannot be determined |
41 | * 98 - result of an intersection between two regulatory domains | 41 | * 98 - result of an intersection between two regulatory domains |
42 | * 97 - regulatory domain has not yet been configured | ||
42 | * @intersect: indicates whether the wireless core should intersect | 43 | * @intersect: indicates whether the wireless core should intersect |
43 | * the requested regulatory domain with the presently set regulatory | 44 | * the requested regulatory domain with the presently set regulatory |
44 | * domain. | 45 | * domain. |
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index c9b50ebd9ce9..99e6e19b57c2 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h | |||
@@ -45,6 +45,8 @@ struct request_sock_ops { | |||
45 | void (*send_reset)(struct sock *sk, | 45 | void (*send_reset)(struct sock *sk, |
46 | struct sk_buff *skb); | 46 | struct sk_buff *skb); |
47 | void (*destructor)(struct request_sock *req); | 47 | void (*destructor)(struct request_sock *req); |
48 | void (*syn_ack_timeout)(struct sock *sk, | ||
49 | struct request_sock *req); | ||
48 | }; | 50 | }; |
49 | 51 | ||
50 | /* struct request_sock - mini sock to represent a connection request | 52 | /* struct request_sock - mini sock to represent a connection request |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index dad558bc06fa..67dc08eaaa45 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -427,6 +427,25 @@ static inline struct sk_buff *qdisc_dequeue_head(struct Qdisc *sch) | |||
427 | return __qdisc_dequeue_head(sch, &sch->q); | 427 | return __qdisc_dequeue_head(sch, &sch->q); |
428 | } | 428 | } |
429 | 429 | ||
430 | static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch, | ||
431 | struct sk_buff_head *list) | ||
432 | { | ||
433 | struct sk_buff *skb = __qdisc_dequeue_head(sch, list); | ||
434 | |||
435 | if (likely(skb != NULL)) { | ||
436 | unsigned int len = qdisc_pkt_len(skb); | ||
437 | kfree_skb(skb); | ||
438 | return len; | ||
439 | } | ||
440 | |||
441 | return 0; | ||
442 | } | ||
443 | |||
444 | static inline unsigned int qdisc_queue_drop_head(struct Qdisc *sch) | ||
445 | { | ||
446 | return __qdisc_queue_drop_head(sch, &sch->q); | ||
447 | } | ||
448 | |||
430 | static inline struct sk_buff *__qdisc_dequeue_tail(struct Qdisc *sch, | 449 | static inline struct sk_buff *__qdisc_dequeue_tail(struct Qdisc *sch, |
431 | struct sk_buff_head *list) | 450 | struct sk_buff_head *list) |
432 | { | 451 | { |
diff --git a/include/net/snmp.h b/include/net/snmp.h index f0d756f2ac99..da02ee027d69 100644 --- a/include/net/snmp.h +++ b/include/net/snmp.h | |||
@@ -32,7 +32,7 @@ | |||
32 | * - name of entries. | 32 | * - name of entries. |
33 | */ | 33 | */ |
34 | struct snmp_mib { | 34 | struct snmp_mib { |
35 | char *name; | 35 | const char *name; |
36 | int entry; | 36 | int entry; |
37 | }; | 37 | }; |
38 | 38 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 788c99f98597..87d164b9bd8f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -400,6 +400,8 @@ extern int compat_tcp_setsockopt(struct sock *sk, | |||
400 | int level, int optname, | 400 | int level, int optname, |
401 | char __user *optval, unsigned int optlen); | 401 | char __user *optval, unsigned int optlen); |
402 | extern void tcp_set_keepalive(struct sock *sk, int val); | 402 | extern void tcp_set_keepalive(struct sock *sk, int val); |
403 | extern void tcp_syn_ack_timeout(struct sock *sk, | ||
404 | struct request_sock *req); | ||
403 | extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, | 405 | extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, |
404 | struct msghdr *msg, | 406 | struct msghdr *msg, |
405 | size_t len, int nonblock, | 407 | size_t len, int nonblock, |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 6d85861ab990..fcee547ca7e3 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1367,8 +1367,8 @@ struct xfrmk_spdinfo { | |||
1367 | extern struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 seq); | 1367 | extern struct xfrm_state *xfrm_find_acq_byseq(struct net *net, u32 seq); |
1368 | extern int xfrm_state_delete(struct xfrm_state *x); | 1368 | extern int xfrm_state_delete(struct xfrm_state *x); |
1369 | extern int xfrm_state_flush(struct net *net, u8 proto, struct xfrm_audit *audit_info); | 1369 | extern int xfrm_state_flush(struct net *net, u8 proto, struct xfrm_audit *audit_info); |
1370 | extern void xfrm_sad_getinfo(struct xfrmk_sadinfo *si); | 1370 | extern void xfrm_sad_getinfo(struct net *net, struct xfrmk_sadinfo *si); |
1371 | extern void xfrm_spd_getinfo(struct xfrmk_spdinfo *si); | 1371 | extern void xfrm_spd_getinfo(struct net *net, struct xfrmk_spdinfo *si); |
1372 | extern int xfrm_replay_check(struct xfrm_state *x, | 1372 | extern int xfrm_replay_check(struct xfrm_state *x, |
1373 | struct sk_buff *skb, __be32 seq); | 1373 | struct sk_buff *skb, __be32 seq); |
1374 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); | 1374 | extern void xfrm_replay_advance(struct xfrm_state *x, __be32 seq); |
@@ -1408,9 +1408,9 @@ extern int xfrm6_input_addr(struct sk_buff *skb, xfrm_address_t *daddr, | |||
1408 | xfrm_address_t *saddr, u8 proto); | 1408 | xfrm_address_t *saddr, u8 proto); |
1409 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); | 1409 | extern int xfrm6_tunnel_register(struct xfrm6_tunnel *handler, unsigned short family); |
1410 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); | 1410 | extern int xfrm6_tunnel_deregister(struct xfrm6_tunnel *handler, unsigned short family); |
1411 | extern __be32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); | 1411 | extern __be32 xfrm6_tunnel_alloc_spi(struct net *net, xfrm_address_t *saddr); |
1412 | extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); | 1412 | extern void xfrm6_tunnel_free_spi(struct net *net, xfrm_address_t *saddr); |
1413 | extern __be32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); | 1413 | extern __be32 xfrm6_tunnel_spi_lookup(struct net *net, xfrm_address_t *saddr); |
1414 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); | 1414 | extern int xfrm6_extract_output(struct xfrm_state *x, struct sk_buff *skb); |
1415 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); | 1415 | extern int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb); |
1416 | extern int xfrm6_output(struct sk_buff *skb); | 1416 | extern int xfrm6_output(struct sk_buff *skb); |
diff --git a/include/scsi/libsrp.h b/include/scsi/libsrp.h index 07e3adde21d9..f4105c91af53 100644 --- a/include/scsi/libsrp.h +++ b/include/scsi/libsrp.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __LIBSRP_H__ | 2 | #define __LIBSRP_H__ |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/kfifo.h> | ||
5 | #include <scsi/scsi_cmnd.h> | 6 | #include <scsi/scsi_cmnd.h> |
6 | #include <scsi/scsi_host.h> | 7 | #include <scsi/scsi_host.h> |
7 | #include <scsi/srp.h> | 8 | #include <scsi/srp.h> |
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 73523151a731..c6fe03e902ca 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
@@ -414,7 +414,8 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | |||
414 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ | 414 | BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ |
415 | ret = trace_define_field(event_call, #type "[" #len "]", #item, \ | 415 | ret = trace_define_field(event_call, #type "[" #len "]", #item, \ |
416 | offsetof(typeof(field), item), \ | 416 | offsetof(typeof(field), item), \ |
417 | sizeof(field.item), 0, FILTER_OTHER); \ | 417 | sizeof(field.item), \ |
418 | is_signed_type(type), FILTER_OTHER); \ | ||
418 | if (ret) \ | 419 | if (ret) \ |
419 | return ret; | 420 | return ret; |
420 | 421 | ||
@@ -422,8 +423,8 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \ | |||
422 | #define __dynamic_array(type, item, len) \ | 423 | #define __dynamic_array(type, item, len) \ |
423 | ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \ | 424 | ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \ |
424 | offsetof(typeof(field), __data_loc_##item), \ | 425 | offsetof(typeof(field), __data_loc_##item), \ |
425 | sizeof(field.__data_loc_##item), 0, \ | 426 | sizeof(field.__data_loc_##item), \ |
426 | FILTER_OTHER); | 427 | is_signed_type(type), FILTER_OTHER); |
427 | 428 | ||
428 | #undef __string | 429 | #undef __string |
429 | #define __string(item, src) __dynamic_array(char, item, -1) | 430 | #define __string(item, src) __dynamic_array(char, item, -1) |