diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-27 23:21:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-27 23:26:01 -0400 |
commit | 82268da1b130f763d22d04f7d016bbf6fc8815c2 (patch) | |
tree | 9803f361556d10708313e980428e63a18162e667 /include | |
parent | 6e15cf04860074ad032e88c306bea656bbdd0f22 (diff) | |
parent | 5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff) |
Merge branch 'linus' into percpu-cpumask-x86-for-linus-2
Conflicts:
arch/sparc/kernel/time_64.c
drivers/gpu/drm/drm_proc.c
Manual merge to resolve build warning due to phys_addr_t type change
on x86:
drivers/gpu/drm/drm_info.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
29 files changed, 962 insertions, 195 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index e5f4ae989abf..c19a93c3be85 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -758,6 +758,8 @@ struct drm_driver { | |||
758 | 758 | ||
759 | int (*proc_init)(struct drm_minor *minor); | 759 | int (*proc_init)(struct drm_minor *minor); |
760 | void (*proc_cleanup)(struct drm_minor *minor); | 760 | void (*proc_cleanup)(struct drm_minor *minor); |
761 | int (*debugfs_init)(struct drm_minor *minor); | ||
762 | void (*debugfs_cleanup)(struct drm_minor *minor); | ||
761 | 763 | ||
762 | /** | 764 | /** |
763 | * Driver-specific constructor for drm_gem_objects, to set up | 765 | * Driver-specific constructor for drm_gem_objects, to set up |
@@ -793,6 +795,48 @@ struct drm_driver { | |||
793 | #define DRM_MINOR_CONTROL 2 | 795 | #define DRM_MINOR_CONTROL 2 |
794 | #define DRM_MINOR_RENDER 3 | 796 | #define DRM_MINOR_RENDER 3 |
795 | 797 | ||
798 | |||
799 | /** | ||
800 | * debugfs node list. This structure represents a debugfs file to | ||
801 | * be created by the drm core | ||
802 | */ | ||
803 | struct drm_debugfs_list { | ||
804 | const char *name; /** file name */ | ||
805 | int (*show)(struct seq_file*, void*); /** show callback */ | ||
806 | u32 driver_features; /**< Required driver features for this entry */ | ||
807 | }; | ||
808 | |||
809 | /** | ||
810 | * debugfs node structure. This structure represents a debugfs file. | ||
811 | */ | ||
812 | struct drm_debugfs_node { | ||
813 | struct list_head list; | ||
814 | struct drm_minor *minor; | ||
815 | struct drm_debugfs_list *debugfs_ent; | ||
816 | struct dentry *dent; | ||
817 | }; | ||
818 | |||
819 | /** | ||
820 | * Info file list entry. This structure represents a debugfs or proc file to | ||
821 | * be created by the drm core | ||
822 | */ | ||
823 | struct drm_info_list { | ||
824 | const char *name; /** file name */ | ||
825 | int (*show)(struct seq_file*, void*); /** show callback */ | ||
826 | u32 driver_features; /**< Required driver features for this entry */ | ||
827 | void *data; | ||
828 | }; | ||
829 | |||
830 | /** | ||
831 | * debugfs node structure. This structure represents a debugfs file. | ||
832 | */ | ||
833 | struct drm_info_node { | ||
834 | struct list_head list; | ||
835 | struct drm_minor *minor; | ||
836 | struct drm_info_list *info_ent; | ||
837 | struct dentry *dent; | ||
838 | }; | ||
839 | |||
796 | /** | 840 | /** |
797 | * DRM minor structure. This structure represents a drm minor number. | 841 | * DRM minor structure. This structure represents a drm minor number. |
798 | */ | 842 | */ |
@@ -802,7 +846,12 @@ struct drm_minor { | |||
802 | dev_t device; /**< Device number for mknod */ | 846 | dev_t device; /**< Device number for mknod */ |
803 | struct device kdev; /**< Linux device */ | 847 | struct device kdev; /**< Linux device */ |
804 | struct drm_device *dev; | 848 | struct drm_device *dev; |
805 | struct proc_dir_entry *dev_root; /**< proc directory entry */ | 849 | |
850 | struct proc_dir_entry *proc_root; /**< proc directory entry */ | ||
851 | struct drm_info_node proc_nodes; | ||
852 | struct dentry *debugfs_root; | ||
853 | struct drm_info_node debugfs_nodes; | ||
854 | |||
806 | struct drm_master *master; /* currently active master for this node */ | 855 | struct drm_master *master; /* currently active master for this node */ |
807 | struct list_head master_list; | 856 | struct list_head master_list; |
808 | struct drm_mode_group mode_group; | 857 | struct drm_mode_group mode_group; |
@@ -1258,6 +1307,7 @@ extern unsigned int drm_debug; | |||
1258 | 1307 | ||
1259 | extern struct class *drm_class; | 1308 | extern struct class *drm_class; |
1260 | extern struct proc_dir_entry *drm_proc_root; | 1309 | extern struct proc_dir_entry *drm_proc_root; |
1310 | extern struct dentry *drm_debugfs_root; | ||
1261 | 1311 | ||
1262 | extern struct idr drm_minors_idr; | 1312 | extern struct idr drm_minors_idr; |
1263 | 1313 | ||
@@ -1268,6 +1318,31 @@ extern int drm_proc_init(struct drm_minor *minor, int minor_id, | |||
1268 | struct proc_dir_entry *root); | 1318 | struct proc_dir_entry *root); |
1269 | extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root); | 1319 | extern int drm_proc_cleanup(struct drm_minor *minor, struct proc_dir_entry *root); |
1270 | 1320 | ||
1321 | /* Debugfs support */ | ||
1322 | #if defined(CONFIG_DEBUG_FS) | ||
1323 | extern int drm_debugfs_init(struct drm_minor *minor, int minor_id, | ||
1324 | struct dentry *root); | ||
1325 | extern int drm_debugfs_create_files(struct drm_info_list *files, int count, | ||
1326 | struct dentry *root, struct drm_minor *minor); | ||
1327 | extern int drm_debugfs_remove_files(struct drm_info_list *files, int count, | ||
1328 | struct drm_minor *minor); | ||
1329 | extern int drm_debugfs_cleanup(struct drm_minor *minor); | ||
1330 | #endif | ||
1331 | |||
1332 | /* Info file support */ | ||
1333 | extern int drm_name_info(struct seq_file *m, void *data); | ||
1334 | extern int drm_vm_info(struct seq_file *m, void *data); | ||
1335 | extern int drm_queues_info(struct seq_file *m, void *data); | ||
1336 | extern int drm_bufs_info(struct seq_file *m, void *data); | ||
1337 | extern int drm_vblank_info(struct seq_file *m, void *data); | ||
1338 | extern int drm_clients_info(struct seq_file *m, void* data); | ||
1339 | extern int drm_gem_name_info(struct seq_file *m, void *data); | ||
1340 | extern int drm_gem_object_info(struct seq_file *m, void* data); | ||
1341 | |||
1342 | #if DRM_DEBUG_CODE | ||
1343 | extern int drm_vma_info(struct seq_file *m, void *data); | ||
1344 | #endif | ||
1345 | |||
1271 | /* Scatter Gather Support (drm_scatter.h) */ | 1346 | /* Scatter Gather Support (drm_scatter.h) */ |
1272 | extern void drm_sg_cleanup(struct drm_sg_mem * entry); | 1347 | extern void drm_sg_cleanup(struct drm_sg_mem * entry); |
1273 | extern int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, | 1348 | extern int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, |
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 5165f240aa68..76c4c8243038 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h | |||
@@ -418,4 +418,6 @@ | |||
418 | {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 418 | {0x8086, 0x2e02, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
419 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 419 | {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
420 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | 420 | {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ |
421 | {0x8086, 0xa001, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
422 | {0x8086, 0xa011, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, 0xffff00, 0}, \ | ||
421 | {0, 0, 0} | 423 | {0, 0, 0} |
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index bd7ac793be19..f19fd9045ea0 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -165,15 +165,8 @@ int sync_mapping_buffers(struct address_space *mapping); | |||
165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); | 165 | void unmap_underlying_metadata(struct block_device *bdev, sector_t block); |
166 | 166 | ||
167 | void mark_buffer_async_write(struct buffer_head *bh); | 167 | void mark_buffer_async_write(struct buffer_head *bh); |
168 | void invalidate_bdev(struct block_device *); | ||
169 | int sync_blockdev(struct block_device *bdev); | ||
170 | void __wait_on_buffer(struct buffer_head *); | 168 | void __wait_on_buffer(struct buffer_head *); |
171 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); | 169 | wait_queue_head_t *bh_waitq_head(struct buffer_head *bh); |
172 | int fsync_bdev(struct block_device *); | ||
173 | struct super_block *freeze_bdev(struct block_device *); | ||
174 | int thaw_bdev(struct block_device *, struct super_block *); | ||
175 | int fsync_super(struct super_block *); | ||
176 | int fsync_no_super(struct block_device *); | ||
177 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, | 170 | struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block, |
178 | unsigned size); | 171 | unsigned size); |
179 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, | 172 | struct buffer_head *__getblk(struct block_device *bdev, sector_t block, |
diff --git a/include/linux/compat.h b/include/linux/compat.h index 3fd2194ff573..b880864672de 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -125,6 +125,13 @@ struct compat_dirent { | |||
125 | char d_name[256]; | 125 | char d_name[256]; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | struct compat_ustat { | ||
129 | compat_daddr_t f_tfree; | ||
130 | compat_ino_t f_tinode; | ||
131 | char f_fname[6]; | ||
132 | char f_fpack[6]; | ||
133 | }; | ||
134 | |||
128 | typedef union compat_sigval { | 135 | typedef union compat_sigval { |
129 | compat_int_t sival_int; | 136 | compat_int_t sival_int; |
130 | compat_uptr_t sival_ptr; | 137 | compat_uptr_t sival_ptr; |
@@ -178,6 +185,7 @@ long compat_sys_semtimedop(int semid, struct sembuf __user *tsems, | |||
178 | unsigned nsems, const struct compat_timespec __user *timeout); | 185 | unsigned nsems, const struct compat_timespec __user *timeout); |
179 | asmlinkage long compat_sys_keyctl(u32 option, | 186 | asmlinkage long compat_sys_keyctl(u32 option, |
180 | u32 arg2, u32 arg3, u32 arg4, u32 arg5); | 187 | u32 arg2, u32 arg3, u32 arg4, u32 arg5); |
188 | asmlinkage long compat_sys_ustat(unsigned dev, struct compat_ustat __user *u32); | ||
181 | 189 | ||
182 | asmlinkage ssize_t compat_sys_readv(unsigned long fd, | 190 | asmlinkage ssize_t compat_sys_readv(unsigned long fd, |
183 | const struct compat_iovec __user *vec, unsigned long vlen); | 191 | const struct compat_iovec __user *vec, unsigned long vlen); |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index c66d22487bf8..15156364d196 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -112,7 +112,7 @@ struct dentry { | |||
112 | struct list_head d_subdirs; /* our children */ | 112 | struct list_head d_subdirs; /* our children */ |
113 | struct list_head d_alias; /* inode alias list */ | 113 | struct list_head d_alias; /* inode alias list */ |
114 | unsigned long d_time; /* used by d_revalidate */ | 114 | unsigned long d_time; /* used by d_revalidate */ |
115 | struct dentry_operations *d_op; | 115 | const struct dentry_operations *d_op; |
116 | struct super_block *d_sb; /* The root of the dentry tree */ | 116 | struct super_block *d_sb; /* The root of the dentry tree */ |
117 | void *d_fsdata; /* fs-specific data */ | 117 | void *d_fsdata; /* fs-specific data */ |
118 | 118 | ||
diff --git a/include/linux/firewire-cdev.h b/include/linux/firewire-cdev.h index 4d078e99c017..c6b3ca3af6df 100644 --- a/include/linux/firewire-cdev.h +++ b/include/linux/firewire-cdev.h | |||
@@ -25,10 +25,12 @@ | |||
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/firewire-constants.h> | 26 | #include <linux/firewire-constants.h> |
27 | 27 | ||
28 | #define FW_CDEV_EVENT_BUS_RESET 0x00 | 28 | #define FW_CDEV_EVENT_BUS_RESET 0x00 |
29 | #define FW_CDEV_EVENT_RESPONSE 0x01 | 29 | #define FW_CDEV_EVENT_RESPONSE 0x01 |
30 | #define FW_CDEV_EVENT_REQUEST 0x02 | 30 | #define FW_CDEV_EVENT_REQUEST 0x02 |
31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 | 31 | #define FW_CDEV_EVENT_ISO_INTERRUPT 0x03 |
32 | #define FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED 0x04 | ||
33 | #define FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED 0x05 | ||
32 | 34 | ||
33 | /** | 35 | /** |
34 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types | 36 | * struct fw_cdev_event_common - Common part of all fw_cdev_event_ types |
@@ -136,7 +138,24 @@ struct fw_cdev_event_request { | |||
136 | * This event is sent when the controller has completed an &fw_cdev_iso_packet | 138 | * This event is sent when the controller has completed an &fw_cdev_iso_packet |
137 | * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers | 139 | * with the %FW_CDEV_ISO_INTERRUPT bit set. In the receive case, the headers |
138 | * stripped of all packets up until and including the interrupt packet are | 140 | * stripped of all packets up until and including the interrupt packet are |
139 | * returned in the @header field. | 141 | * returned in the @header field. The amount of header data per packet is as |
142 | * specified at iso context creation by &fw_cdev_create_iso_context.header_size. | ||
143 | * | ||
144 | * In version 1 of this ABI, header data consisted of the 1394 isochronous | ||
145 | * packet header, followed by quadlets from the packet payload if | ||
146 | * &fw_cdev_create_iso_context.header_size > 4. | ||
147 | * | ||
148 | * In version 2 of this ABI, header data consist of the 1394 isochronous | ||
149 | * packet header, followed by a timestamp quadlet if | ||
150 | * &fw_cdev_create_iso_context.header_size > 4, followed by quadlets from the | ||
151 | * packet payload if &fw_cdev_create_iso_context.header_size > 8. | ||
152 | * | ||
153 | * Behaviour of ver. 1 of this ABI is no longer available since ABI ver. 2. | ||
154 | * | ||
155 | * Format of 1394 iso packet header: 16 bits len, 2 bits tag, 6 bits channel, | ||
156 | * 4 bits tcode, 4 bits sy, in big endian byte order. Format of timestamp: | ||
157 | * 16 bits invalid, 3 bits cycleSeconds, 13 bits cycleCount, in big endian byte | ||
158 | * order. | ||
140 | */ | 159 | */ |
141 | struct fw_cdev_event_iso_interrupt { | 160 | struct fw_cdev_event_iso_interrupt { |
142 | __u64 closure; | 161 | __u64 closure; |
@@ -147,12 +166,44 @@ struct fw_cdev_event_iso_interrupt { | |||
147 | }; | 166 | }; |
148 | 167 | ||
149 | /** | 168 | /** |
169 | * struct fw_cdev_event_iso_resource - Iso resources were allocated or freed | ||
170 | * @closure: See &fw_cdev_event_common; | ||
171 | * set by %FW_CDEV_IOC_(DE)ALLOCATE_ISO_RESOURCE(_ONCE) ioctl | ||
172 | * @type: %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or | ||
173 | * %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED | ||
174 | * @handle: Reference by which an allocated resource can be deallocated | ||
175 | * @channel: Isochronous channel which was (de)allocated, if any | ||
176 | * @bandwidth: Bandwidth allocation units which were (de)allocated, if any | ||
177 | * | ||
178 | * An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED event is sent after an isochronous | ||
179 | * resource was allocated at the IRM. The client has to check @channel and | ||
180 | * @bandwidth for whether the allocation actually succeeded. | ||
181 | * | ||
182 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event is sent after an isochronous | ||
183 | * resource was deallocated at the IRM. It is also sent when automatic | ||
184 | * reallocation after a bus reset failed. | ||
185 | * | ||
186 | * @channel is <0 if no channel was (de)allocated or if reallocation failed. | ||
187 | * @bandwidth is 0 if no bandwidth was (de)allocated or if reallocation failed. | ||
188 | */ | ||
189 | struct fw_cdev_event_iso_resource { | ||
190 | __u64 closure; | ||
191 | __u32 type; | ||
192 | __u32 handle; | ||
193 | __s32 channel; | ||
194 | __s32 bandwidth; | ||
195 | }; | ||
196 | |||
197 | /** | ||
150 | * union fw_cdev_event - Convenience union of fw_cdev_event_ types | 198 | * union fw_cdev_event - Convenience union of fw_cdev_event_ types |
151 | * @common: Valid for all types | 199 | * @common: Valid for all types |
152 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET | 200 | * @bus_reset: Valid if @common.type == %FW_CDEV_EVENT_BUS_RESET |
153 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE | 201 | * @response: Valid if @common.type == %FW_CDEV_EVENT_RESPONSE |
154 | * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST | 202 | * @request: Valid if @common.type == %FW_CDEV_EVENT_REQUEST |
155 | * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT | 203 | * @iso_interrupt: Valid if @common.type == %FW_CDEV_EVENT_ISO_INTERRUPT |
204 | * @iso_resource: Valid if @common.type == | ||
205 | * %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED or | ||
206 | * %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED | ||
156 | * | 207 | * |
157 | * Convenience union for userspace use. Events could be read(2) into an | 208 | * Convenience union for userspace use. Events could be read(2) into an |
158 | * appropriately aligned char buffer and then cast to this union for further | 209 | * appropriately aligned char buffer and then cast to this union for further |
@@ -163,33 +214,47 @@ struct fw_cdev_event_iso_interrupt { | |||
163 | * not fit will be discarded so that the next read(2) will return a new event. | 214 | * not fit will be discarded so that the next read(2) will return a new event. |
164 | */ | 215 | */ |
165 | union fw_cdev_event { | 216 | union fw_cdev_event { |
166 | struct fw_cdev_event_common common; | 217 | struct fw_cdev_event_common common; |
167 | struct fw_cdev_event_bus_reset bus_reset; | 218 | struct fw_cdev_event_bus_reset bus_reset; |
168 | struct fw_cdev_event_response response; | 219 | struct fw_cdev_event_response response; |
169 | struct fw_cdev_event_request request; | 220 | struct fw_cdev_event_request request; |
170 | struct fw_cdev_event_iso_interrupt iso_interrupt; | 221 | struct fw_cdev_event_iso_interrupt iso_interrupt; |
222 | struct fw_cdev_event_iso_resource iso_resource; | ||
171 | }; | 223 | }; |
172 | 224 | ||
173 | #define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) | 225 | /* available since kernel version 2.6.22 */ |
174 | #define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) | 226 | #define FW_CDEV_IOC_GET_INFO _IOWR('#', 0x00, struct fw_cdev_get_info) |
175 | #define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) | 227 | #define FW_CDEV_IOC_SEND_REQUEST _IOW('#', 0x01, struct fw_cdev_send_request) |
176 | #define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) | 228 | #define FW_CDEV_IOC_ALLOCATE _IOWR('#', 0x02, struct fw_cdev_allocate) |
177 | #define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) | 229 | #define FW_CDEV_IOC_DEALLOCATE _IOW('#', 0x03, struct fw_cdev_deallocate) |
178 | #define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) | 230 | #define FW_CDEV_IOC_SEND_RESPONSE _IOW('#', 0x04, struct fw_cdev_send_response) |
179 | #define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor) | 231 | #define FW_CDEV_IOC_INITIATE_BUS_RESET _IOW('#', 0x05, struct fw_cdev_initiate_bus_reset) |
180 | #define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor) | 232 | #define FW_CDEV_IOC_ADD_DESCRIPTOR _IOWR('#', 0x06, struct fw_cdev_add_descriptor) |
233 | #define FW_CDEV_IOC_REMOVE_DESCRIPTOR _IOW('#', 0x07, struct fw_cdev_remove_descriptor) | ||
234 | #define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context) | ||
235 | #define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) | ||
236 | #define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) | ||
237 | #define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) | ||
181 | 238 | ||
182 | #define FW_CDEV_IOC_CREATE_ISO_CONTEXT _IOWR('#', 0x08, struct fw_cdev_create_iso_context) | 239 | /* available since kernel version 2.6.24 */ |
183 | #define FW_CDEV_IOC_QUEUE_ISO _IOWR('#', 0x09, struct fw_cdev_queue_iso) | 240 | #define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) |
184 | #define FW_CDEV_IOC_START_ISO _IOW('#', 0x0a, struct fw_cdev_start_iso) | ||
185 | #define FW_CDEV_IOC_STOP_ISO _IOW('#', 0x0b, struct fw_cdev_stop_iso) | ||
186 | #define FW_CDEV_IOC_GET_CYCLE_TIMER _IOR('#', 0x0c, struct fw_cdev_get_cycle_timer) | ||
187 | 241 | ||
188 | /* FW_CDEV_VERSION History | 242 | /* available since kernel version 2.6.30 */ |
189 | * | 243 | #define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE _IOWR('#', 0x0d, struct fw_cdev_allocate_iso_resource) |
190 | * 1 Feb 18, 2007: Initial version. | 244 | #define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE _IOW('#', 0x0e, struct fw_cdev_deallocate) |
245 | #define FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x0f, struct fw_cdev_allocate_iso_resource) | ||
246 | #define FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE _IOW('#', 0x10, struct fw_cdev_allocate_iso_resource) | ||
247 | #define FW_CDEV_IOC_GET_SPEED _IO('#', 0x11) /* returns speed code */ | ||
248 | #define FW_CDEV_IOC_SEND_BROADCAST_REQUEST _IOW('#', 0x12, struct fw_cdev_send_request) | ||
249 | #define FW_CDEV_IOC_SEND_STREAM_PACKET _IOW('#', 0x13, struct fw_cdev_send_stream_packet) | ||
250 | |||
251 | /* | ||
252 | * FW_CDEV_VERSION History | ||
253 | * 1 (2.6.22) - initial version | ||
254 | * 2 (2.6.30) - changed &fw_cdev_event_iso_interrupt.header if | ||
255 | * &fw_cdev_create_iso_context.header_size is 8 or more | ||
191 | */ | 256 | */ |
192 | #define FW_CDEV_VERSION 1 | 257 | #define FW_CDEV_VERSION 2 |
193 | 258 | ||
194 | /** | 259 | /** |
195 | * struct fw_cdev_get_info - General purpose information ioctl | 260 | * struct fw_cdev_get_info - General purpose information ioctl |
@@ -201,7 +266,7 @@ union fw_cdev_event { | |||
201 | * case, @rom_length is updated with the actual length of the | 266 | * case, @rom_length is updated with the actual length of the |
202 | * configuration ROM. | 267 | * configuration ROM. |
203 | * @rom: If non-zero, address of a buffer to be filled by a copy of the | 268 | * @rom: If non-zero, address of a buffer to be filled by a copy of the |
204 | * local node's configuration ROM | 269 | * device's configuration ROM |
205 | * @bus_reset: If non-zero, address of a buffer to be filled by a | 270 | * @bus_reset: If non-zero, address of a buffer to be filled by a |
206 | * &struct fw_cdev_event_bus_reset with the current state | 271 | * &struct fw_cdev_event_bus_reset with the current state |
207 | * of the bus. This does not cause a bus reset to happen. | 272 | * of the bus. This does not cause a bus reset to happen. |
@@ -229,7 +294,7 @@ struct fw_cdev_get_info { | |||
229 | * Send a request to the device. This ioctl implements all outgoing requests. | 294 | * Send a request to the device. This ioctl implements all outgoing requests. |
230 | * Both quadlet and block request specify the payload as a pointer to the data | 295 | * Both quadlet and block request specify the payload as a pointer to the data |
231 | * in the @data field. Once the transaction completes, the kernel writes an | 296 | * in the @data field. Once the transaction completes, the kernel writes an |
232 | * &fw_cdev_event_request event back. The @closure field is passed back to | 297 | * &fw_cdev_event_response event back. The @closure field is passed back to |
233 | * user space in the response event. | 298 | * user space in the response event. |
234 | */ | 299 | */ |
235 | struct fw_cdev_send_request { | 300 | struct fw_cdev_send_request { |
@@ -284,9 +349,9 @@ struct fw_cdev_allocate { | |||
284 | }; | 349 | }; |
285 | 350 | ||
286 | /** | 351 | /** |
287 | * struct fw_cdev_deallocate - Free an address range allocation | 352 | * struct fw_cdev_deallocate - Free a CSR address range or isochronous resource |
288 | * @handle: Handle to the address range, as returned by the kernel when the | 353 | * @handle: Handle to the address range or iso resource, as returned by the |
289 | * range was allocated | 354 | * kernel when the range or resource was allocated |
290 | */ | 355 | */ |
291 | struct fw_cdev_deallocate { | 356 | struct fw_cdev_deallocate { |
292 | __u32 handle; | 357 | __u32 handle; |
@@ -329,6 +394,9 @@ struct fw_cdev_initiate_bus_reset { | |||
329 | * If successful, the kernel adds the descriptor and writes back a handle to the | 394 | * If successful, the kernel adds the descriptor and writes back a handle to the |
330 | * kernel-side object to be used for later removal of the descriptor block and | 395 | * kernel-side object to be used for later removal of the descriptor block and |
331 | * immediate key. | 396 | * immediate key. |
397 | * | ||
398 | * This ioctl affects the configuration ROMs of all local nodes. | ||
399 | * The ioctl only succeeds on device files which represent a local node. | ||
332 | */ | 400 | */ |
333 | struct fw_cdev_add_descriptor { | 401 | struct fw_cdev_add_descriptor { |
334 | __u32 immediate; | 402 | __u32 immediate; |
@@ -344,7 +412,7 @@ struct fw_cdev_add_descriptor { | |||
344 | * descriptor was added | 412 | * descriptor was added |
345 | * | 413 | * |
346 | * Remove a descriptor block and accompanying immediate key from the local | 414 | * Remove a descriptor block and accompanying immediate key from the local |
347 | * node's configuration ROM. | 415 | * nodes' configuration ROMs. |
348 | */ | 416 | */ |
349 | struct fw_cdev_remove_descriptor { | 417 | struct fw_cdev_remove_descriptor { |
350 | __u32 handle; | 418 | __u32 handle; |
@@ -370,6 +438,9 @@ struct fw_cdev_remove_descriptor { | |||
370 | * | 438 | * |
371 | * If a context was successfully created, the kernel writes back a handle to the | 439 | * If a context was successfully created, the kernel writes back a handle to the |
372 | * context, which must be passed in for subsequent operations on that context. | 440 | * context, which must be passed in for subsequent operations on that context. |
441 | * | ||
442 | * Note that the effect of a @header_size > 4 depends on | ||
443 | * &fw_cdev_get_info.version, as documented at &fw_cdev_event_iso_interrupt. | ||
373 | */ | 444 | */ |
374 | struct fw_cdev_create_iso_context { | 445 | struct fw_cdev_create_iso_context { |
375 | __u32 type; | 446 | __u32 type; |
@@ -473,10 +544,91 @@ struct fw_cdev_stop_iso { | |||
473 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer | 544 | * The %FW_CDEV_IOC_GET_CYCLE_TIMER ioctl reads the isochronous cycle timer |
474 | * and also the system clock. This allows to express the receive time of an | 545 | * and also the system clock. This allows to express the receive time of an |
475 | * isochronous packet as a system time with microsecond accuracy. | 546 | * isochronous packet as a system time with microsecond accuracy. |
547 | * | ||
548 | * @cycle_timer consists of 7 bits cycleSeconds, 13 bits cycleCount, and | ||
549 | * 12 bits cycleOffset, in host byte order. | ||
476 | */ | 550 | */ |
477 | struct fw_cdev_get_cycle_timer { | 551 | struct fw_cdev_get_cycle_timer { |
478 | __u64 local_time; | 552 | __u64 local_time; |
479 | __u32 cycle_timer; | 553 | __u32 cycle_timer; |
480 | }; | 554 | }; |
481 | 555 | ||
556 | /** | ||
557 | * struct fw_cdev_allocate_iso_resource - (De)allocate a channel or bandwidth | ||
558 | * @closure: Passed back to userspace in correponding iso resource events | ||
559 | * @channels: Isochronous channels of which one is to be (de)allocated | ||
560 | * @bandwidth: Isochronous bandwidth units to be (de)allocated | ||
561 | * @handle: Handle to the allocation, written by the kernel (only valid in | ||
562 | * case of %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE ioctls) | ||
563 | * | ||
564 | * The %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE ioctl initiates allocation of an | ||
565 | * isochronous channel and/or of isochronous bandwidth at the isochronous | ||
566 | * resource manager (IRM). Only one of the channels specified in @channels is | ||
567 | * allocated. An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED is sent after | ||
568 | * communication with the IRM, indicating success or failure in the event data. | ||
569 | * The kernel will automatically reallocate the resources after bus resets. | ||
570 | * Should a reallocation fail, an %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event | ||
571 | * will be sent. The kernel will also automatically deallocate the resources | ||
572 | * when the file descriptor is closed. | ||
573 | * | ||
574 | * The %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE ioctl can be used to initiate | ||
575 | * deallocation of resources which were allocated as described above. | ||
576 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. | ||
577 | * | ||
578 | * The %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE ioctl is a variant of allocation | ||
579 | * without automatic re- or deallocation. | ||
580 | * An %FW_CDEV_EVENT_ISO_RESOURCE_ALLOCATED event concludes this operation, | ||
581 | * indicating success or failure in its data. | ||
582 | * | ||
583 | * The %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE_ONCE ioctl works like | ||
584 | * %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE except that resources are freed | ||
585 | * instead of allocated. | ||
586 | * An %FW_CDEV_EVENT_ISO_RESOURCE_DEALLOCATED event concludes this operation. | ||
587 | * | ||
588 | * To summarize, %FW_CDEV_IOC_DEALLOCATE_ISO_RESOURCE allocates iso resources | ||
589 | * for the lifetime of the fd or handle. | ||
590 | * In contrast, %FW_CDEV_IOC_ALLOCATE_ISO_RESOURCE_ONCE allocates iso resources | ||
591 | * for the duration of a bus generation. | ||
592 | * | ||
593 | * @channels is a host-endian bitfield with the least significant bit | ||
594 | * representing channel 0 and the most significant bit representing channel 63: | ||
595 | * 1ULL << c for each channel c that is a candidate for (de)allocation. | ||
596 | * | ||
597 | * @bandwidth is expressed in bandwidth allocation units, i.e. the time to send | ||
598 | * one quadlet of data (payload or header data) at speed S1600. | ||
599 | */ | ||
600 | struct fw_cdev_allocate_iso_resource { | ||
601 | __u64 closure; | ||
602 | __u64 channels; | ||
603 | __u32 bandwidth; | ||
604 | __u32 handle; | ||
605 | }; | ||
606 | |||
607 | /** | ||
608 | * struct fw_cdev_send_stream_packet - send an asynchronous stream packet | ||
609 | * @length: Length of outgoing payload, in bytes | ||
610 | * @tag: Data format tag | ||
611 | * @channel: Isochronous channel to transmit to | ||
612 | * @sy: Synchronization code | ||
613 | * @closure: Passed back to userspace in the response event | ||
614 | * @data: Userspace pointer to payload | ||
615 | * @generation: The bus generation where packet is valid | ||
616 | * @speed: Speed to transmit at | ||
617 | * | ||
618 | * The %FW_CDEV_IOC_SEND_STREAM_PACKET ioctl sends an asynchronous stream packet | ||
619 | * to every device which is listening to the specified channel. The kernel | ||
620 | * writes an &fw_cdev_event_response event which indicates success or failure of | ||
621 | * the transmission. | ||
622 | */ | ||
623 | struct fw_cdev_send_stream_packet { | ||
624 | __u32 length; | ||
625 | __u32 tag; | ||
626 | __u32 channel; | ||
627 | __u32 sy; | ||
628 | __u64 closure; | ||
629 | __u64 data; | ||
630 | __u32 generation; | ||
631 | __u32 speed; | ||
632 | }; | ||
633 | |||
482 | #endif /* _LINUX_FIREWIRE_CDEV_H */ | 634 | #endif /* _LINUX_FIREWIRE_CDEV_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1cd44f727dac..42436ae42f70 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1064,34 +1064,147 @@ extern int lease_modify(struct file_lock **, int); | |||
1064 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); | 1064 | extern int lock_may_read(struct inode *, loff_t start, unsigned long count); |
1065 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); | 1065 | extern int lock_may_write(struct inode *, loff_t start, unsigned long count); |
1066 | #else /* !CONFIG_FILE_LOCKING */ | 1066 | #else /* !CONFIG_FILE_LOCKING */ |
1067 | #define fcntl_getlk(a, b) ({ -EINVAL; }) | 1067 | static inline int fcntl_getlk(struct file *file, struct flock __user *user) |
1068 | #define fcntl_setlk(a, b, c, d) ({ -EACCES; }) | 1068 | { |
1069 | return -EINVAL; | ||
1070 | } | ||
1071 | |||
1072 | static inline int fcntl_setlk(unsigned int fd, struct file *file, | ||
1073 | unsigned int cmd, struct flock __user *user) | ||
1074 | { | ||
1075 | return -EACCES; | ||
1076 | } | ||
1077 | |||
1069 | #if BITS_PER_LONG == 32 | 1078 | #if BITS_PER_LONG == 32 |
1070 | #define fcntl_getlk64(a, b) ({ -EINVAL; }) | 1079 | static inline int fcntl_getlk64(struct file *file, struct flock64 __user *user) |
1071 | #define fcntl_setlk64(a, b, c, d) ({ -EACCES; }) | 1080 | { |
1081 | return -EINVAL; | ||
1082 | } | ||
1083 | |||
1084 | static inline int fcntl_setlk64(unsigned int fd, struct file *file, | ||
1085 | unsigned int cmd, struct flock64 __user *user) | ||
1086 | { | ||
1087 | return -EACCES; | ||
1088 | } | ||
1072 | #endif | 1089 | #endif |
1073 | #define fcntl_setlease(a, b, c) ({ 0; }) | 1090 | static inline int fcntl_setlease(unsigned int fd, struct file *filp, long arg) |
1074 | #define fcntl_getlease(a) ({ 0; }) | 1091 | { |
1075 | #define locks_init_lock(a) ({ }) | 1092 | return 0; |
1076 | #define __locks_copy_lock(a, b) ({ }) | 1093 | } |
1077 | #define locks_copy_lock(a, b) ({ }) | 1094 | |
1078 | #define locks_remove_posix(a, b) ({ }) | 1095 | static inline int fcntl_getlease(struct file *filp) |
1079 | #define locks_remove_flock(a) ({ }) | 1096 | { |
1080 | #define posix_test_lock(a, b) ({ 0; }) | 1097 | return 0; |
1081 | #define posix_lock_file(a, b, c) ({ -ENOLCK; }) | 1098 | } |
1082 | #define posix_lock_file_wait(a, b) ({ -ENOLCK; }) | 1099 | |
1083 | #define posix_unblock_lock(a, b) (-ENOENT) | 1100 | static inline void locks_init_lock(struct file_lock *fl) |
1084 | #define vfs_test_lock(a, b) ({ 0; }) | 1101 | { |
1085 | #define vfs_lock_file(a, b, c, d) (-ENOLCK) | 1102 | return; |
1086 | #define vfs_cancel_lock(a, b) ({ 0; }) | 1103 | } |
1087 | #define flock_lock_file_wait(a, b) ({ -ENOLCK; }) | 1104 | |
1088 | #define __break_lease(a, b) ({ 0; }) | 1105 | static inline void __locks_copy_lock(struct file_lock *new, struct file_lock *fl) |
1089 | #define lease_get_mtime(a, b) ({ }) | 1106 | { |
1090 | #define generic_setlease(a, b, c) ({ -EINVAL; }) | 1107 | return; |
1091 | #define vfs_setlease(a, b, c) ({ -EINVAL; }) | 1108 | } |
1092 | #define lease_modify(a, b) ({ -EINVAL; }) | 1109 | |
1093 | #define lock_may_read(a, b, c) ({ 1; }) | 1110 | static inline void locks_copy_lock(struct file_lock *new, struct file_lock *fl) |
1094 | #define lock_may_write(a, b, c) ({ 1; }) | 1111 | { |
1112 | return; | ||
1113 | } | ||
1114 | |||
1115 | static inline void locks_remove_posix(struct file *filp, fl_owner_t owner) | ||
1116 | { | ||
1117 | return; | ||
1118 | } | ||
1119 | |||
1120 | static inline void locks_remove_flock(struct file *filp) | ||
1121 | { | ||
1122 | return; | ||
1123 | } | ||
1124 | |||
1125 | static inline void posix_test_lock(struct file *filp, struct file_lock *fl) | ||
1126 | { | ||
1127 | return; | ||
1128 | } | ||
1129 | |||
1130 | static inline int posix_lock_file(struct file *filp, struct file_lock *fl, | ||
1131 | struct file_lock *conflock) | ||
1132 | { | ||
1133 | return -ENOLCK; | ||
1134 | } | ||
1135 | |||
1136 | static inline int posix_lock_file_wait(struct file *filp, struct file_lock *fl) | ||
1137 | { | ||
1138 | return -ENOLCK; | ||
1139 | } | ||
1140 | |||
1141 | static inline int posix_unblock_lock(struct file *filp, | ||
1142 | struct file_lock *waiter) | ||
1143 | { | ||
1144 | return -ENOENT; | ||
1145 | } | ||
1146 | |||
1147 | static inline int vfs_test_lock(struct file *filp, struct file_lock *fl) | ||
1148 | { | ||
1149 | return 0; | ||
1150 | } | ||
1151 | |||
1152 | static inline int vfs_lock_file(struct file *filp, unsigned int cmd, | ||
1153 | struct file_lock *fl, struct file_lock *conf) | ||
1154 | { | ||
1155 | return -ENOLCK; | ||
1156 | } | ||
1157 | |||
1158 | static inline int vfs_cancel_lock(struct file *filp, struct file_lock *fl) | ||
1159 | { | ||
1160 | return 0; | ||
1161 | } | ||
1162 | |||
1163 | static inline int flock_lock_file_wait(struct file *filp, | ||
1164 | struct file_lock *request) | ||
1165 | { | ||
1166 | return -ENOLCK; | ||
1167 | } | ||
1168 | |||
1169 | static inline int __break_lease(struct inode *inode, unsigned int mode) | ||
1170 | { | ||
1171 | return 0; | ||
1172 | } | ||
1173 | |||
1174 | static inline void lease_get_mtime(struct inode *inode, struct timespec *time) | ||
1175 | { | ||
1176 | return; | ||
1177 | } | ||
1178 | |||
1179 | static inline int generic_setlease(struct file *filp, long arg, | ||
1180 | struct file_lock **flp) | ||
1181 | { | ||
1182 | return -EINVAL; | ||
1183 | } | ||
1184 | |||
1185 | static inline int vfs_setlease(struct file *filp, long arg, | ||
1186 | struct file_lock **lease) | ||
1187 | { | ||
1188 | return -EINVAL; | ||
1189 | } | ||
1190 | |||
1191 | static inline int lease_modify(struct file_lock **before, int arg) | ||
1192 | { | ||
1193 | return -EINVAL; | ||
1194 | } | ||
1195 | |||
1196 | static inline int lock_may_read(struct inode *inode, loff_t start, | ||
1197 | unsigned long len) | ||
1198 | { | ||
1199 | return 1; | ||
1200 | } | ||
1201 | |||
1202 | static inline int lock_may_write(struct inode *inode, loff_t start, | ||
1203 | unsigned long len) | ||
1204 | { | ||
1205 | return 1; | ||
1206 | } | ||
1207 | |||
1095 | #endif /* !CONFIG_FILE_LOCKING */ | 1208 | #endif /* !CONFIG_FILE_LOCKING */ |
1096 | 1209 | ||
1097 | 1210 | ||
@@ -1607,7 +1720,7 @@ struct super_block *sget(struct file_system_type *type, | |||
1607 | extern int get_sb_pseudo(struct file_system_type *, char *, | 1720 | extern int get_sb_pseudo(struct file_system_type *, char *, |
1608 | const struct super_operations *ops, unsigned long, | 1721 | const struct super_operations *ops, unsigned long, |
1609 | struct vfsmount *mnt); | 1722 | struct vfsmount *mnt); |
1610 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1723 | extern void simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1611 | int __put_super_and_need_restart(struct super_block *sb); | 1724 | int __put_super_and_need_restart(struct super_block *sb); |
1612 | 1725 | ||
1613 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1726 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
@@ -1688,13 +1801,44 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
1688 | return 0; | 1801 | return 0; |
1689 | } | 1802 | } |
1690 | #else /* !CONFIG_FILE_LOCKING */ | 1803 | #else /* !CONFIG_FILE_LOCKING */ |
1691 | #define locks_mandatory_locked(a) ({ 0; }) | 1804 | static inline int locks_mandatory_locked(struct inode *inode) |
1692 | #define locks_mandatory_area(a, b, c, d, e) ({ 0; }) | 1805 | { |
1693 | #define __mandatory_lock(a) ({ 0; }) | 1806 | return 0; |
1694 | #define mandatory_lock(a) ({ 0; }) | 1807 | } |
1695 | #define locks_verify_locked(a) ({ 0; }) | 1808 | |
1696 | #define locks_verify_truncate(a, b, c) ({ 0; }) | 1809 | static inline int locks_mandatory_area(int rw, struct inode *inode, |
1697 | #define break_lease(a, b) ({ 0; }) | 1810 | struct file *filp, loff_t offset, |
1811 | size_t count) | ||
1812 | { | ||
1813 | return 0; | ||
1814 | } | ||
1815 | |||
1816 | static inline int __mandatory_lock(struct inode *inode) | ||
1817 | { | ||
1818 | return 0; | ||
1819 | } | ||
1820 | |||
1821 | static inline int mandatory_lock(struct inode *inode) | ||
1822 | { | ||
1823 | return 0; | ||
1824 | } | ||
1825 | |||
1826 | static inline int locks_verify_locked(struct inode *inode) | ||
1827 | { | ||
1828 | return 0; | ||
1829 | } | ||
1830 | |||
1831 | static inline int locks_verify_truncate(struct inode *inode, struct file *filp, | ||
1832 | size_t size) | ||
1833 | { | ||
1834 | return 0; | ||
1835 | } | ||
1836 | |||
1837 | static inline int break_lease(struct inode *inode, unsigned int mode) | ||
1838 | { | ||
1839 | return 0; | ||
1840 | } | ||
1841 | |||
1698 | #endif /* CONFIG_FILE_LOCKING */ | 1842 | #endif /* CONFIG_FILE_LOCKING */ |
1699 | 1843 | ||
1700 | /* fs/open.c */ | 1844 | /* fs/open.c */ |
@@ -1731,6 +1875,13 @@ extern void bd_set_size(struct block_device *, loff_t size); | |||
1731 | extern void bd_forget(struct inode *inode); | 1875 | extern void bd_forget(struct inode *inode); |
1732 | extern void bdput(struct block_device *); | 1876 | extern void bdput(struct block_device *); |
1733 | extern struct block_device *open_by_devnum(dev_t, fmode_t); | 1877 | extern struct block_device *open_by_devnum(dev_t, fmode_t); |
1878 | extern void invalidate_bdev(struct block_device *); | ||
1879 | extern int sync_blockdev(struct block_device *bdev); | ||
1880 | extern struct super_block *freeze_bdev(struct block_device *); | ||
1881 | extern int thaw_bdev(struct block_device *bdev, struct super_block *sb); | ||
1882 | extern int fsync_bdev(struct block_device *); | ||
1883 | extern int fsync_super(struct super_block *); | ||
1884 | extern int fsync_no_super(struct block_device *); | ||
1734 | #else | 1885 | #else |
1735 | static inline void bd_forget(struct inode *inode) {} | 1886 | static inline void bd_forget(struct inode *inode) {} |
1736 | #endif | 1887 | #endif |
@@ -1882,7 +2033,6 @@ static inline void allow_write_access(struct file *file) | |||
1882 | if (file) | 2033 | if (file) |
1883 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); | 2034 | atomic_inc(&file->f_path.dentry->d_inode->i_writecount); |
1884 | } | 2035 | } |
1885 | extern int do_pipe(int *); | ||
1886 | extern int do_pipe_flags(int *, int); | 2036 | extern int do_pipe_flags(int *, int); |
1887 | extern struct file *create_read_pipe(struct file *f, int flags); | 2037 | extern struct file *create_read_pipe(struct file *f, int flags); |
1888 | extern struct file *create_write_pipe(int flags); | 2038 | extern struct file *create_write_pipe(int flags); |
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index b1bb817d1427..4b501b48ce86 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -18,6 +18,22 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
20 | 20 | ||
21 | /* | ||
22 | * DS bit usage | ||
23 | * | ||
24 | * TA = transmitter address | ||
25 | * RA = receiver address | ||
26 | * DA = destination address | ||
27 | * SA = source address | ||
28 | * | ||
29 | * ToDS FromDS A1(RA) A2(TA) A3 A4 Use | ||
30 | * ----------------------------------------------------------------- | ||
31 | * 0 0 DA SA BSSID - IBSS/DLS | ||
32 | * 0 1 DA BSSID SA - AP -> STA | ||
33 | * 1 0 BSSID SA DA - AP <- STA | ||
34 | * 1 1 RA TA DA SA unspecified (WDS) | ||
35 | */ | ||
36 | |||
21 | #define FCS_LEN 4 | 37 | #define FCS_LEN 4 |
22 | 38 | ||
23 | #define IEEE80211_FCTL_VERS 0x0003 | 39 | #define IEEE80211_FCTL_VERS 0x0003 |
@@ -851,6 +867,7 @@ struct ieee80211_ht_info { | |||
851 | /* Authentication algorithms */ | 867 | /* Authentication algorithms */ |
852 | #define WLAN_AUTH_OPEN 0 | 868 | #define WLAN_AUTH_OPEN 0 |
853 | #define WLAN_AUTH_SHARED_KEY 1 | 869 | #define WLAN_AUTH_SHARED_KEY 1 |
870 | #define WLAN_AUTH_FT 2 | ||
854 | #define WLAN_AUTH_LEAP 128 | 871 | #define WLAN_AUTH_LEAP 128 |
855 | 872 | ||
856 | #define WLAN_AUTH_CHALLENGE_LEN 128 | 873 | #define WLAN_AUTH_CHALLENGE_LEN 128 |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 60e16a551dd6..673f2209453d 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -153,7 +153,6 @@ struct frhdr | |||
153 | 153 | ||
154 | struct dlci_local | 154 | struct dlci_local |
155 | { | 155 | { |
156 | struct net_device_stats stats; | ||
157 | struct net_device *master; | 156 | struct net_device *master; |
158 | struct net_device *slave; | 157 | struct net_device *slave; |
159 | struct dlci_conf config; | 158 | struct dlci_conf config; |
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h index f69e66d151cc..30b06c893944 100644 --- a/include/linux/ncp_fs.h +++ b/include/linux/ncp_fs.h | |||
@@ -204,7 +204,7 @@ void ncp_update_inode2(struct inode *, struct ncp_entry_info *); | |||
204 | /* linux/fs/ncpfs/dir.c */ | 204 | /* linux/fs/ncpfs/dir.c */ |
205 | extern const struct inode_operations ncp_dir_inode_operations; | 205 | extern const struct inode_operations ncp_dir_inode_operations; |
206 | extern const struct file_operations ncp_dir_operations; | 206 | extern const struct file_operations ncp_dir_operations; |
207 | extern struct dentry_operations ncp_root_dentry_operations; | 207 | extern const struct dentry_operations ncp_root_dentry_operations; |
208 | int ncp_conn_logged_in(struct super_block *); | 208 | int ncp_conn_logged_in(struct super_block *); |
209 | int ncp_date_dos2unix(__le16 time, __le16 date); | 209 | int ncp_date_dos2unix(__le16 time, __le16 date); |
210 | void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); | 210 | void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date); |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index be3ebd7e8ce5..1b55952a17f6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/mm.h> | ||
35 | #include <asm/atomic.h> | 36 | #include <asm/atomic.h> |
36 | #include <asm/cache.h> | 37 | #include <asm/cache.h> |
37 | #include <asm/byteorder.h> | 38 | #include <asm/byteorder.h> |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index adbc50a20ec2..7b1a652066c0 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -437,6 +437,29 @@ extern void xt_free_table_info(struct xt_table_info *info); | |||
437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | 437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, |
438 | struct xt_table_info *new); | 438 | struct xt_table_info *new); |
439 | 439 | ||
440 | /* | ||
441 | * This helper is performance critical and must be inlined | ||
442 | */ | ||
443 | static inline unsigned long ifname_compare_aligned(const char *_a, | ||
444 | const char *_b, | ||
445 | const char *_mask) | ||
446 | { | ||
447 | const unsigned long *a = (const unsigned long *)_a; | ||
448 | const unsigned long *b = (const unsigned long *)_b; | ||
449 | const unsigned long *mask = (const unsigned long *)_mask; | ||
450 | unsigned long ret; | ||
451 | |||
452 | ret = (a[0] ^ b[0]) & mask[0]; | ||
453 | if (IFNAMSIZ > sizeof(unsigned long)) | ||
454 | ret |= (a[1] ^ b[1]) & mask[1]; | ||
455 | if (IFNAMSIZ > 2 * sizeof(unsigned long)) | ||
456 | ret |= (a[2] ^ b[2]) & mask[2]; | ||
457 | if (IFNAMSIZ > 3 * sizeof(unsigned long)) | ||
458 | ret |= (a[3] ^ b[3]) & mask[3]; | ||
459 | BUILD_BUG_ON(IFNAMSIZ > 4 * sizeof(unsigned long)); | ||
460 | return ret; | ||
461 | } | ||
462 | |||
440 | #ifdef CONFIG_COMPAT | 463 | #ifdef CONFIG_COMPAT |
441 | #include <net/compat.h> | 464 | #include <net/compat.h> |
442 | 465 | ||
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index db867b04ac3c..8cc8807f77d6 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -415,7 +415,7 @@ extern const struct inode_operations nfs_dir_inode_operations; | |||
415 | extern const struct inode_operations nfs3_dir_inode_operations; | 415 | extern const struct inode_operations nfs3_dir_inode_operations; |
416 | #endif /* CONFIG_NFS_V3 */ | 416 | #endif /* CONFIG_NFS_V3 */ |
417 | extern const struct file_operations nfs_dir_operations; | 417 | extern const struct file_operations nfs_dir_operations; |
418 | extern struct dentry_operations nfs_dentry_operations; | 418 | extern const struct dentry_operations nfs_dentry_operations; |
419 | 419 | ||
420 | extern void nfs_force_lookup_revalidate(struct inode *dir); | 420 | extern void nfs_force_lookup_revalidate(struct inode *dir); |
421 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); | 421 | extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_fattr *fattr); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 2e5f00066afd..43a713fce11c 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -785,7 +785,7 @@ struct nfs_access_entry; | |||
785 | */ | 785 | */ |
786 | struct nfs_rpc_ops { | 786 | struct nfs_rpc_ops { |
787 | u32 version; /* Protocol version */ | 787 | u32 version; /* Protocol version */ |
788 | struct dentry_operations *dentry_ops; | 788 | const struct dentry_operations *dentry_ops; |
789 | const struct inode_operations *dir_inode_ops; | 789 | const struct inode_operations *dir_inode_ops; |
790 | const struct inode_operations *file_inode_ops; | 790 | const struct inode_operations *file_inode_ops; |
791 | 791 | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index f33aa08dd9b3..cbe8ce3bf486 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -142,6 +142,12 @@ | |||
142 | * %NL80211_ATTR_IE. If the command succeeds, the requested data will be | 142 | * %NL80211_ATTR_IE. If the command succeeds, the requested data will be |
143 | * added to all specified management frames generated by | 143 | * added to all specified management frames generated by |
144 | * kernel/firmware/driver. | 144 | * kernel/firmware/driver. |
145 | * Note: This command has been removed and it is only reserved at this | ||
146 | * point to avoid re-using existing command number. The functionality this | ||
147 | * command was planned for has been provided with cleaner design with the | ||
148 | * option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN, | ||
149 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE, | ||
150 | * NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE. | ||
145 | * | 151 | * |
146 | * @NL80211_CMD_GET_SCAN: get scan results | 152 | * @NL80211_CMD_GET_SCAN: get scan results |
147 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters | 153 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters |
@@ -161,6 +167,38 @@ | |||
161 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | 167 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on |
162 | * to (%NL80211_ATTR_REG_ALPHA2). | 168 | * to (%NL80211_ATTR_REG_ALPHA2). |
163 | * | 169 | * |
170 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. | ||
171 | * This command is used both as a command (request to authenticate) and | ||
172 | * as an event on the "mlme" multicast group indicating completion of the | ||
173 | * authentication process. | ||
174 | * When used as a command, %NL80211_ATTR_IFINDEX is used to identify the | ||
175 | * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and | ||
176 | * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify | ||
177 | * the SSID (mainly for association, but is included in authentication | ||
178 | * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used | ||
179 | * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE | ||
180 | * is used to specify the authentication type. %NL80211_ATTR_IE is used to | ||
181 | * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs) | ||
182 | * to be added to the frame. | ||
183 | * When used as an event, this reports reception of an Authentication | ||
184 | * frame in station and IBSS modes when the local MLME processed the | ||
185 | * frame, i.e., it was for the local STA and was received in correct | ||
186 | * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the | ||
187 | * MLME SAP interface (kernel providing MLME, userspace SME). The | ||
188 | * included NL80211_ATTR_FRAME attribute contains the management frame | ||
189 | * (including both the header and frame body, but not FCS). | ||
190 | * @NL80211_CMD_ASSOCIATE: association request and notification; like | ||
191 | * NL80211_CMD_AUTHENTICATE but for Association and Reassociation | ||
192 | * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, | ||
193 | * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). | ||
194 | * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like | ||
195 | * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to | ||
196 | * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication | ||
197 | * primitives). | ||
198 | * @NL80211_CMD_DISASSOCIATE: disassociation request and notification; like | ||
199 | * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to | ||
200 | * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives). | ||
201 | * | ||
164 | * @NL80211_CMD_MAX: highest used command number | 202 | * @NL80211_CMD_MAX: highest used command number |
165 | * @__NL80211_CMD_AFTER_LAST: internal use | 203 | * @__NL80211_CMD_AFTER_LAST: internal use |
166 | */ | 204 | */ |
@@ -206,7 +244,7 @@ enum nl80211_commands { | |||
206 | NL80211_CMD_GET_MESH_PARAMS, | 244 | NL80211_CMD_GET_MESH_PARAMS, |
207 | NL80211_CMD_SET_MESH_PARAMS, | 245 | NL80211_CMD_SET_MESH_PARAMS, |
208 | 246 | ||
209 | NL80211_CMD_SET_MGMT_EXTRA_IE, | 247 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, |
210 | 248 | ||
211 | NL80211_CMD_GET_REG, | 249 | NL80211_CMD_GET_REG, |
212 | 250 | ||
@@ -217,6 +255,11 @@ enum nl80211_commands { | |||
217 | 255 | ||
218 | NL80211_CMD_REG_CHANGE, | 256 | NL80211_CMD_REG_CHANGE, |
219 | 257 | ||
258 | NL80211_CMD_AUTHENTICATE, | ||
259 | NL80211_CMD_ASSOCIATE, | ||
260 | NL80211_CMD_DEAUTHENTICATE, | ||
261 | NL80211_CMD_DISASSOCIATE, | ||
262 | |||
220 | /* add new commands above here */ | 263 | /* add new commands above here */ |
221 | 264 | ||
222 | /* used to define NL80211_CMD_MAX below */ | 265 | /* used to define NL80211_CMD_MAX below */ |
@@ -230,8 +273,11 @@ enum nl80211_commands { | |||
230 | */ | 273 | */ |
231 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | 274 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
232 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE | 275 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE |
233 | |||
234 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE | 276 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE |
277 | #define NL80211_CMD_AUTHENTICATE NL80211_CMD_AUTHENTICATE | ||
278 | #define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE | ||
279 | #define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE | ||
280 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE | ||
235 | 281 | ||
236 | /** | 282 | /** |
237 | * enum nl80211_attrs - nl80211 netlink attributes | 283 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -349,6 +395,19 @@ enum nl80211_commands { | |||
349 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently | 395 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently |
350 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) | 396 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) |
351 | * | 397 | * |
398 | * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies | ||
399 | * an array of command numbers (i.e. a mapping index to command number) | ||
400 | * that the driver for the given wiphy supports. | ||
401 | * | ||
402 | * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header | ||
403 | * and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and | ||
404 | * NL80211_CMD_ASSOCIATE events | ||
405 | * @NL80211_ATTR_SSID: SSID (binary attribute, 0..32 octets) | ||
406 | * @NL80211_ATTR_AUTH_TYPE: AuthenticationType, see &enum nl80211_auth_type, | ||
407 | * represented as a u32 | ||
408 | * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and | ||
409 | * %NL80211_CMD_DISASSOCIATE, u16 | ||
410 | * | ||
352 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 411 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
353 | * @__NL80211_ATTR_AFTER_LAST: internal use | 412 | * @__NL80211_ATTR_AFTER_LAST: internal use |
354 | */ | 413 | */ |
@@ -426,6 +485,13 @@ enum nl80211_attrs { | |||
426 | NL80211_ATTR_REG_INITIATOR, | 485 | NL80211_ATTR_REG_INITIATOR, |
427 | NL80211_ATTR_REG_TYPE, | 486 | NL80211_ATTR_REG_TYPE, |
428 | 487 | ||
488 | NL80211_ATTR_SUPPORTED_COMMANDS, | ||
489 | |||
490 | NL80211_ATTR_FRAME, | ||
491 | NL80211_ATTR_SSID, | ||
492 | NL80211_ATTR_AUTH_TYPE, | ||
493 | NL80211_ATTR_REASON_CODE, | ||
494 | |||
429 | /* add attributes here, update the policy in nl80211.c */ | 495 | /* add attributes here, update the policy in nl80211.c */ |
430 | 496 | ||
431 | __NL80211_ATTR_AFTER_LAST, | 497 | __NL80211_ATTR_AFTER_LAST, |
@@ -445,6 +511,10 @@ enum nl80211_attrs { | |||
445 | #define NL80211_ATTR_IE NL80211_ATTR_IE | 511 | #define NL80211_ATTR_IE NL80211_ATTR_IE |
446 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR | 512 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR |
447 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE | 513 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE |
514 | #define NL80211_ATTR_FRAME NL80211_ATTR_FRAME | ||
515 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID | ||
516 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE | ||
517 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE | ||
448 | 518 | ||
449 | #define NL80211_MAX_SUPP_RATES 32 | 519 | #define NL80211_MAX_SUPP_RATES 32 |
450 | #define NL80211_MAX_SUPP_REG_RULES 32 | 520 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -978,4 +1048,18 @@ enum nl80211_bss { | |||
978 | NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 | 1048 | NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 |
979 | }; | 1049 | }; |
980 | 1050 | ||
1051 | /** | ||
1052 | * enum nl80211_auth_type - AuthenticationType | ||
1053 | * | ||
1054 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | ||
1055 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | ||
1056 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | ||
1057 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | ||
1058 | */ | ||
1059 | enum nl80211_auth_type { | ||
1060 | NL80211_AUTHTYPE_OPEN_SYSTEM, | ||
1061 | NL80211_AUTHTYPE_SHARED_KEY, | ||
1062 | NL80211_AUTHTYPE_FT, | ||
1063 | NL80211_AUTHTYPE_NETWORK_EAP, | ||
1064 | }; | ||
981 | #endif /* __LINUX_NL80211_H */ | 1065 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 097f410edefa..05dfa7c4fb64 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2271,6 +2271,8 @@ | |||
2271 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2271 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
2272 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff | 2272 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff |
2273 | 2273 | ||
2274 | #define PCI_VENDOR_ID_QMI 0x1a32 | ||
2275 | |||
2274 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2276 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2275 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2277 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
2276 | 2278 | ||
diff --git a/include/linux/quota.h b/include/linux/quota.h index d72d5d84fde5..78c48895b12a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -198,6 +198,7 @@ struct mem_dqblk { | |||
198 | qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ | 198 | qsize_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ |
199 | qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ | 199 | qsize_t dqb_bsoftlimit; /* preferred limit on disk blks */ |
200 | qsize_t dqb_curspace; /* current used space */ | 200 | qsize_t dqb_curspace; /* current used space */ |
201 | qsize_t dqb_rsvspace; /* current reserved space for delalloc*/ | ||
201 | qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ | 202 | qsize_t dqb_ihardlimit; /* absolute limit on allocated inodes */ |
202 | qsize_t dqb_isoftlimit; /* preferred inode limit */ | 203 | qsize_t dqb_isoftlimit; /* preferred inode limit */ |
203 | qsize_t dqb_curinodes; /* current # allocated inodes */ | 204 | qsize_t dqb_curinodes; /* current # allocated inodes */ |
@@ -276,8 +277,6 @@ struct dquot { | |||
276 | struct mem_dqblk dq_dqb; /* Diskquota usage */ | 277 | struct mem_dqblk dq_dqb; /* Diskquota usage */ |
277 | }; | 278 | }; |
278 | 279 | ||
279 | #define NODQUOT (struct dquot *)NULL | ||
280 | |||
281 | #define QUOTA_OK 0 | 280 | #define QUOTA_OK 0 |
282 | #define NO_QUOTA 1 | 281 | #define NO_QUOTA 1 |
283 | 282 | ||
@@ -308,6 +307,14 @@ struct dquot_operations { | |||
308 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ | 307 | int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ |
309 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ | 308 | int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ |
310 | int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ | 309 | int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ |
310 | /* reserve quota for delayed block allocation */ | ||
311 | int (*reserve_space) (struct inode *, qsize_t, int); | ||
312 | /* claim reserved quota for delayed alloc */ | ||
313 | int (*claim_space) (struct inode *, qsize_t); | ||
314 | /* release rsved quota for delayed alloc */ | ||
315 | void (*release_rsv) (struct inode *, qsize_t); | ||
316 | /* get reserved quota for delayed alloc */ | ||
317 | qsize_t (*get_reserved_space) (struct inode *); | ||
311 | }; | 318 | }; |
312 | 319 | ||
313 | /* Operations handling requests from userspace */ | 320 | /* Operations handling requests from userspace */ |
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index 0b35b3a1be05..36353d95c8db 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -35,6 +35,11 @@ void dquot_destroy(struct dquot *dquot); | |||
35 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); | 35 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); |
36 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); | 36 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); |
37 | 37 | ||
38 | int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc); | ||
39 | int dquot_claim_space(struct inode *inode, qsize_t number); | ||
40 | void dquot_release_reserved_space(struct inode *inode, qsize_t number); | ||
41 | qsize_t dquot_get_reserved_space(struct inode *inode); | ||
42 | |||
38 | int dquot_free_space(struct inode *inode, qsize_t number); | 43 | int dquot_free_space(struct inode *inode, qsize_t number); |
39 | int dquot_free_inode(const struct inode *inode, qsize_t number); | 44 | int dquot_free_inode(const struct inode *inode, qsize_t number); |
40 | 45 | ||
@@ -183,6 +188,16 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | |||
183 | return ret; | 188 | return ret; |
184 | } | 189 | } |
185 | 190 | ||
191 | static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | ||
192 | { | ||
193 | if (sb_any_quota_active(inode->i_sb)) { | ||
194 | /* Used space is updated in alloc_space() */ | ||
195 | if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA) | ||
196 | return 1; | ||
197 | } | ||
198 | return 0; | ||
199 | } | ||
200 | |||
186 | static inline int vfs_dq_alloc_inode(struct inode *inode) | 201 | static inline int vfs_dq_alloc_inode(struct inode *inode) |
187 | { | 202 | { |
188 | if (sb_any_quota_active(inode->i_sb)) { | 203 | if (sb_any_quota_active(inode->i_sb)) { |
@@ -193,6 +208,31 @@ static inline int vfs_dq_alloc_inode(struct inode *inode) | |||
193 | return 0; | 208 | return 0; |
194 | } | 209 | } |
195 | 210 | ||
211 | /* | ||
212 | * Convert in-memory reserved quotas to real consumed quotas | ||
213 | */ | ||
214 | static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | ||
215 | { | ||
216 | if (sb_any_quota_active(inode->i_sb)) { | ||
217 | if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA) | ||
218 | return 1; | ||
219 | } else | ||
220 | inode_add_bytes(inode, nr); | ||
221 | |||
222 | mark_inode_dirty(inode); | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | /* | ||
227 | * Release reserved (in-memory) quotas | ||
228 | */ | ||
229 | static inline | ||
230 | void vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | ||
231 | { | ||
232 | if (sb_any_quota_active(inode->i_sb)) | ||
233 | inode->i_sb->dq_op->release_rsv(inode, nr); | ||
234 | } | ||
235 | |||
196 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 236 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
197 | { | 237 | { |
198 | if (sb_any_quota_active(inode->i_sb)) | 238 | if (sb_any_quota_active(inode->i_sb)) |
@@ -339,6 +379,22 @@ static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr) | |||
339 | return 0; | 379 | return 0; |
340 | } | 380 | } |
341 | 381 | ||
382 | static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr) | ||
383 | { | ||
384 | return 0; | ||
385 | } | ||
386 | |||
387 | static inline int vfs_dq_claim_space(struct inode *inode, qsize_t nr) | ||
388 | { | ||
389 | return vfs_dq_alloc_space(inode, nr); | ||
390 | } | ||
391 | |||
392 | static inline | ||
393 | int vfs_dq_release_reservation_space(struct inode *inode, qsize_t nr) | ||
394 | { | ||
395 | return 0; | ||
396 | } | ||
397 | |||
342 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) | 398 | static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr) |
343 | { | 399 | { |
344 | inode_sub_bytes(inode, nr); | 400 | inode_sub_bytes(inode, nr); |
@@ -354,67 +410,48 @@ static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr) | |||
354 | 410 | ||
355 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) | 411 | static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr) |
356 | { | 412 | { |
357 | return vfs_dq_prealloc_space_nodirty(inode, | 413 | return vfs_dq_prealloc_space_nodirty(inode, nr << inode->i_blkbits); |
358 | nr << inode->i_sb->s_blocksize_bits); | ||
359 | } | 414 | } |
360 | 415 | ||
361 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) | 416 | static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr) |
362 | { | 417 | { |
363 | return vfs_dq_prealloc_space(inode, | 418 | return vfs_dq_prealloc_space(inode, nr << inode->i_blkbits); |
364 | nr << inode->i_sb->s_blocksize_bits); | ||
365 | } | 419 | } |
366 | 420 | ||
367 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) | 421 | static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr) |
368 | { | 422 | { |
369 | return vfs_dq_alloc_space_nodirty(inode, | 423 | return vfs_dq_alloc_space_nodirty(inode, nr << inode->i_blkbits); |
370 | nr << inode->i_sb->s_blocksize_bits); | ||
371 | } | 424 | } |
372 | 425 | ||
373 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) | 426 | static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr) |
374 | { | 427 | { |
375 | return vfs_dq_alloc_space(inode, | 428 | return vfs_dq_alloc_space(inode, nr << inode->i_blkbits); |
376 | nr << inode->i_sb->s_blocksize_bits); | 429 | } |
430 | |||
431 | static inline int vfs_dq_reserve_block(struct inode *inode, qsize_t nr) | ||
432 | { | ||
433 | return vfs_dq_reserve_space(inode, nr << inode->i_blkbits); | ||
434 | } | ||
435 | |||
436 | static inline int vfs_dq_claim_block(struct inode *inode, qsize_t nr) | ||
437 | { | ||
438 | return vfs_dq_claim_space(inode, nr << inode->i_blkbits); | ||
439 | } | ||
440 | |||
441 | static inline | ||
442 | void vfs_dq_release_reservation_block(struct inode *inode, qsize_t nr) | ||
443 | { | ||
444 | vfs_dq_release_reservation_space(inode, nr << inode->i_blkbits); | ||
377 | } | 445 | } |
378 | 446 | ||
379 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) | 447 | static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr) |
380 | { | 448 | { |
381 | vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits); | 449 | vfs_dq_free_space_nodirty(inode, nr << inode->i_blkbits); |
382 | } | 450 | } |
383 | 451 | ||
384 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) | 452 | static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr) |
385 | { | 453 | { |
386 | vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits); | 454 | vfs_dq_free_space(inode, nr << inode->i_blkbits); |
387 | } | 455 | } |
388 | 456 | ||
389 | /* | ||
390 | * Define uppercase equivalents for compatibility with old function names | ||
391 | * Can go away when we think all users have been converted (15/04/2008) | ||
392 | */ | ||
393 | #define DQUOT_INIT(inode) vfs_dq_init(inode) | ||
394 | #define DQUOT_DROP(inode) vfs_dq_drop(inode) | ||
395 | #define DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr) \ | ||
396 | vfs_dq_prealloc_space_nodirty(inode, nr) | ||
397 | #define DQUOT_PREALLOC_SPACE(inode, nr) vfs_dq_prealloc_space(inode, nr) | ||
398 | #define DQUOT_ALLOC_SPACE_NODIRTY(inode, nr) \ | ||
399 | vfs_dq_alloc_space_nodirty(inode, nr) | ||
400 | #define DQUOT_ALLOC_SPACE(inode, nr) vfs_dq_alloc_space(inode, nr) | ||
401 | #define DQUOT_PREALLOC_BLOCK_NODIRTY(inode, nr) \ | ||
402 | vfs_dq_prealloc_block_nodirty(inode, nr) | ||
403 | #define DQUOT_PREALLOC_BLOCK(inode, nr) vfs_dq_prealloc_block(inode, nr) | ||
404 | #define DQUOT_ALLOC_BLOCK_NODIRTY(inode, nr) \ | ||
405 | vfs_dq_alloc_block_nodirty(inode, nr) | ||
406 | #define DQUOT_ALLOC_BLOCK(inode, nr) vfs_dq_alloc_block(inode, nr) | ||
407 | #define DQUOT_ALLOC_INODE(inode) vfs_dq_alloc_inode(inode) | ||
408 | #define DQUOT_FREE_SPACE_NODIRTY(inode, nr) \ | ||
409 | vfs_dq_free_space_nodirty(inode, nr) | ||
410 | #define DQUOT_FREE_SPACE(inode, nr) vfs_dq_free_space(inode, nr) | ||
411 | #define DQUOT_FREE_BLOCK_NODIRTY(inode, nr) \ | ||
412 | vfs_dq_free_block_nodirty(inode, nr) | ||
413 | #define DQUOT_FREE_BLOCK(inode, nr) vfs_dq_free_block(inode, nr) | ||
414 | #define DQUOT_FREE_INODE(inode) vfs_dq_free_inode(inode) | ||
415 | #define DQUOT_TRANSFER(inode, iattr) vfs_dq_transfer(inode, iattr) | ||
416 | #define DQUOT_SYNC(sb) vfs_dq_sync(sb) | ||
417 | #define DQUOT_OFF(sb, remount) vfs_dq_off(sb, remount) | ||
418 | #define DQUOT_ON_REMOUNT(sb) vfs_dq_quota_on_remount(sb) | ||
419 | |||
420 | #endif /* _LINUX_QUOTAOPS_ */ | 457 | #endif /* _LINUX_QUOTAOPS_ */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 50f3fd9ff524..5389afdc1297 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -471,26 +471,6 @@ struct ieee80211_txq_params { | |||
471 | u8 aifs; | 471 | u8 aifs; |
472 | }; | 472 | }; |
473 | 473 | ||
474 | /** | ||
475 | * struct mgmt_extra_ie_params - Extra management frame IE parameters | ||
476 | * | ||
477 | * Used to add extra IE(s) into management frames. If the driver cannot add the | ||
478 | * requested data into all management frames of the specified subtype that are | ||
479 | * generated in kernel or firmware/hardware, it must reject the configuration | ||
480 | * call. The IE data buffer is added to the end of the specified management | ||
481 | * frame body after all other IEs. This addition is not applied to frames that | ||
482 | * are injected through a monitor interface. | ||
483 | * | ||
484 | * @subtype: Management frame subtype | ||
485 | * @ies: IE data buffer or %NULL to remove previous data | ||
486 | * @ies_len: Length of @ies in octets | ||
487 | */ | ||
488 | struct mgmt_extra_ie_params { | ||
489 | u8 subtype; | ||
490 | u8 *ies; | ||
491 | int ies_len; | ||
492 | }; | ||
493 | |||
494 | /* from net/wireless.h */ | 474 | /* from net/wireless.h */ |
495 | struct wiphy; | 475 | struct wiphy; |
496 | 476 | ||
@@ -559,6 +539,7 @@ enum cfg80211_signal_type { | |||
559 | * is no guarantee that these are well-formed!) | 539 | * is no guarantee that these are well-formed!) |
560 | * @len_information_elements: total length of the information elements | 540 | * @len_information_elements: total length of the information elements |
561 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 541 | * @signal: signal strength value (type depends on the wiphy's signal_type) |
542 | * @hold: BSS should not expire | ||
562 | * @free_priv: function pointer to free private data | 543 | * @free_priv: function pointer to free private data |
563 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 544 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
564 | */ | 545 | */ |
@@ -579,6 +560,105 @@ struct cfg80211_bss { | |||
579 | }; | 560 | }; |
580 | 561 | ||
581 | /** | 562 | /** |
563 | * struct cfg80211_auth_request - Authentication request data | ||
564 | * | ||
565 | * This structure provides information needed to complete IEEE 802.11 | ||
566 | * authentication. | ||
567 | * NOTE: This structure will likely change when more code from mac80211 is | ||
568 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
569 | * Before using this in a driver that does not use mac80211, it would be better | ||
570 | * to check the status of that work and better yet, volunteer to work on it. | ||
571 | * | ||
572 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
573 | * scan results) | ||
574 | * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case); | ||
575 | * this field is required to be present; if the driver wants to help with | ||
576 | * BSS selection, it should use (yet to be added) MLME event to allow user | ||
577 | * space SME to be notified of roaming candidate, so that the SME can then | ||
578 | * use the authentication request with the recommended BSSID and whatever | ||
579 | * other data may be needed for authentication/association | ||
580 | * @ssid: SSID or %NULL if not yet available | ||
581 | * @ssid_len: Length of ssid in octets | ||
582 | * @auth_type: Authentication type (algorithm) | ||
583 | * @ie: Extra IEs to add to Authentication frame or %NULL | ||
584 | * @ie_len: Length of ie buffer in octets | ||
585 | */ | ||
586 | struct cfg80211_auth_request { | ||
587 | struct ieee80211_channel *chan; | ||
588 | u8 *peer_addr; | ||
589 | const u8 *ssid; | ||
590 | size_t ssid_len; | ||
591 | enum nl80211_auth_type auth_type; | ||
592 | const u8 *ie; | ||
593 | size_t ie_len; | ||
594 | }; | ||
595 | |||
596 | /** | ||
597 | * struct cfg80211_assoc_request - (Re)Association request data | ||
598 | * | ||
599 | * This structure provides information needed to complete IEEE 802.11 | ||
600 | * (re)association. | ||
601 | * NOTE: This structure will likely change when more code from mac80211 is | ||
602 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
603 | * Before using this in a driver that does not use mac80211, it would be better | ||
604 | * to check the status of that work and better yet, volunteer to work on it. | ||
605 | * | ||
606 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
607 | * scan results) | ||
608 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
609 | * to be present and the STA must be in State 2 (authenticated) with the | ||
610 | * peer STA | ||
611 | * @ssid: SSID | ||
612 | * @ssid_len: Length of ssid in octets | ||
613 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL | ||
614 | * @ie_len: Length of ie buffer in octets | ||
615 | */ | ||
616 | struct cfg80211_assoc_request { | ||
617 | struct ieee80211_channel *chan; | ||
618 | u8 *peer_addr; | ||
619 | const u8 *ssid; | ||
620 | size_t ssid_len; | ||
621 | const u8 *ie; | ||
622 | size_t ie_len; | ||
623 | }; | ||
624 | |||
625 | /** | ||
626 | * struct cfg80211_deauth_request - Deauthentication request data | ||
627 | * | ||
628 | * This structure provides information needed to complete IEEE 802.11 | ||
629 | * deauthentication. | ||
630 | * | ||
631 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
632 | * to be present and the STA must be authenticated with the peer STA | ||
633 | * @ie: Extra IEs to add to Deauthentication frame or %NULL | ||
634 | * @ie_len: Length of ie buffer in octets | ||
635 | */ | ||
636 | struct cfg80211_deauth_request { | ||
637 | u8 *peer_addr; | ||
638 | u16 reason_code; | ||
639 | const u8 *ie; | ||
640 | size_t ie_len; | ||
641 | }; | ||
642 | |||
643 | /** | ||
644 | * struct cfg80211_disassoc_request - Disassociation request data | ||
645 | * | ||
646 | * This structure provides information needed to complete IEEE 802.11 | ||
647 | * disassocation. | ||
648 | * | ||
649 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
650 | * to be present and the STA must be associated with the peer STA | ||
651 | * @ie: Extra IEs to add to Disassociation frame or %NULL | ||
652 | * @ie_len: Length of ie buffer in octets | ||
653 | */ | ||
654 | struct cfg80211_disassoc_request { | ||
655 | u8 *peer_addr; | ||
656 | u16 reason_code; | ||
657 | const u8 *ie; | ||
658 | size_t ie_len; | ||
659 | }; | ||
660 | |||
661 | /** | ||
582 | * struct cfg80211_ops - backend description for wireless configuration | 662 | * struct cfg80211_ops - backend description for wireless configuration |
583 | * | 663 | * |
584 | * This struct is registered by fullmac card drivers and/or wireless stacks | 664 | * This struct is registered by fullmac card drivers and/or wireless stacks |
@@ -644,12 +724,15 @@ struct cfg80211_bss { | |||
644 | * | 724 | * |
645 | * @set_channel: Set channel | 725 | * @set_channel: Set channel |
646 | * | 726 | * |
647 | * @set_mgmt_extra_ie: Set extra IE data for management frames | ||
648 | * | ||
649 | * @scan: Request to do a scan. If returning zero, the scan request is given | 727 | * @scan: Request to do a scan. If returning zero, the scan request is given |
650 | * the driver, and will be valid until passed to cfg80211_scan_done(). | 728 | * the driver, and will be valid until passed to cfg80211_scan_done(). |
651 | * For scan results, call cfg80211_inform_bss(); you can call this outside | 729 | * For scan results, call cfg80211_inform_bss(); you can call this outside |
652 | * the scan/scan_done bracket too. | 730 | * the scan/scan_done bracket too. |
731 | * | ||
732 | * @auth: Request to authenticate with the specified peer | ||
733 | * @assoc: Request to (re)associate with the specified peer | ||
734 | * @deauth: Request to deauthenticate from the specified peer | ||
735 | * @disassoc: Request to disassociate from the specified peer | ||
653 | */ | 736 | */ |
654 | struct cfg80211_ops { | 737 | struct cfg80211_ops { |
655 | int (*suspend)(struct wiphy *wiphy); | 738 | int (*suspend)(struct wiphy *wiphy); |
@@ -724,12 +807,17 @@ struct cfg80211_ops { | |||
724 | struct ieee80211_channel *chan, | 807 | struct ieee80211_channel *chan, |
725 | enum nl80211_channel_type channel_type); | 808 | enum nl80211_channel_type channel_type); |
726 | 809 | ||
727 | int (*set_mgmt_extra_ie)(struct wiphy *wiphy, | ||
728 | struct net_device *dev, | ||
729 | struct mgmt_extra_ie_params *params); | ||
730 | |||
731 | int (*scan)(struct wiphy *wiphy, struct net_device *dev, | 810 | int (*scan)(struct wiphy *wiphy, struct net_device *dev, |
732 | struct cfg80211_scan_request *request); | 811 | struct cfg80211_scan_request *request); |
812 | |||
813 | int (*auth)(struct wiphy *wiphy, struct net_device *dev, | ||
814 | struct cfg80211_auth_request *req); | ||
815 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, | ||
816 | struct cfg80211_assoc_request *req); | ||
817 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, | ||
818 | struct cfg80211_deauth_request *req); | ||
819 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, | ||
820 | struct cfg80211_disassoc_request *req); | ||
733 | }; | 821 | }; |
734 | 822 | ||
735 | /* temporary wext handlers */ | 823 | /* temporary wext handlers */ |
@@ -807,4 +895,67 @@ void cfg80211_put_bss(struct cfg80211_bss *bss); | |||
807 | */ | 895 | */ |
808 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | 896 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
809 | 897 | ||
898 | /** | ||
899 | * cfg80211_send_rx_auth - notification of processed authentication | ||
900 | * @dev: network device | ||
901 | * @buf: authentication frame (header + body) | ||
902 | * @len: length of the frame data | ||
903 | * | ||
904 | * This function is called whenever an authentication has been processed in | ||
905 | * station mode. | ||
906 | */ | ||
907 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | ||
908 | |||
909 | /** | ||
910 | * cfg80211_send_rx_assoc - notification of processed association | ||
911 | * @dev: network device | ||
912 | * @buf: (re)association response frame (header + body) | ||
913 | * @len: length of the frame data | ||
914 | * | ||
915 | * This function is called whenever a (re)association response has been | ||
916 | * processed in station mode. | ||
917 | */ | ||
918 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); | ||
919 | |||
920 | /** | ||
921 | * cfg80211_send_rx_deauth - notification of processed deauthentication | ||
922 | * @dev: network device | ||
923 | * @buf: deauthentication frame (header + body) | ||
924 | * @len: length of the frame data | ||
925 | * | ||
926 | * This function is called whenever deauthentication has been processed in | ||
927 | * station mode. | ||
928 | */ | ||
929 | void cfg80211_send_rx_deauth(struct net_device *dev, const u8 *buf, | ||
930 | size_t len); | ||
931 | |||
932 | /** | ||
933 | * cfg80211_send_rx_disassoc - notification of processed disassociation | ||
934 | * @dev: network device | ||
935 | * @buf: disassociation response frame (header + body) | ||
936 | * @len: length of the frame data | ||
937 | * | ||
938 | * This function is called whenever disassociation has been processed in | ||
939 | * station mode. | ||
940 | */ | ||
941 | void cfg80211_send_rx_disassoc(struct net_device *dev, const u8 *buf, | ||
942 | size_t len); | ||
943 | |||
944 | /** | ||
945 | * cfg80211_hold_bss - exclude bss from expiration | ||
946 | * @bss: bss which should not expire | ||
947 | * | ||
948 | * In a case when the BSS is not updated but it shouldn't expire this | ||
949 | * function can be used to mark the BSS to be excluded from expiration. | ||
950 | */ | ||
951 | void cfg80211_hold_bss(struct cfg80211_bss *bss); | ||
952 | |||
953 | /** | ||
954 | * cfg80211_unhold_bss - remove expiration exception from the BSS | ||
955 | * @bss: bss which can expire again | ||
956 | * | ||
957 | * This function marks the BSS to be expirable again. | ||
958 | */ | ||
959 | void cfg80211_unhold_bss(struct cfg80211_bss *bss); | ||
960 | |||
810 | #endif /* __NET_CFG80211_H */ | 961 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/ethoc.h b/include/net/ethoc.h new file mode 100644 index 000000000000..96f3789b27bc --- /dev/null +++ b/include/net/ethoc.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * linux/include/net/ethoc.h | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Avionic Design GmbH | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Written by Thierry Reding <thierry.reding@avionic-design.de> | ||
11 | */ | ||
12 | |||
13 | #ifndef LINUX_NET_ETHOC_H | ||
14 | #define LINUX_NET_ETHOC_H 1 | ||
15 | |||
16 | struct ethoc_platform_data { | ||
17 | u8 hwaddr[IFHWADDRLEN]; | ||
18 | s8 phy_id; | ||
19 | }; | ||
20 | |||
21 | #endif /* !LINUX_NET_ETHOC_H */ | ||
22 | |||
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 384698cb773a..23c3f3d97779 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -230,8 +230,10 @@ enum ieee80211_radiotap_type { | |||
230 | * 802.11 header and payload | 230 | * 802.11 header and payload |
231 | * (to 32-bit boundary) | 231 | * (to 32-bit boundary) |
232 | */ | 232 | */ |
233 | #define IEEE80211_RADIOTAP_F_BADFCS 0x40 /* bad FCS */ | ||
234 | |||
233 | /* For IEEE80211_RADIOTAP_RX_FLAGS */ | 235 | /* For IEEE80211_RADIOTAP_RX_FLAGS */ |
234 | #define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* frame failed crc check */ | 236 | #define IEEE80211_RADIOTAP_F_RX_BADPLCP 0x0002 /* frame has bad PLCP */ |
235 | 237 | ||
236 | /* For IEEE80211_RADIOTAP_TX_FLAGS */ | 238 | /* For IEEE80211_RADIOTAP_TX_FLAGS */ |
237 | #define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive | 239 | #define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 12a52efcd0d1..3b83a80e3fe0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -93,12 +93,9 @@ struct ieee80211_ht_bss_info { | |||
93 | * enum ieee80211_max_queues - maximum number of queues | 93 | * enum ieee80211_max_queues - maximum number of queues |
94 | * | 94 | * |
95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. | 95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. |
96 | * @IEEE80211_MAX_AMPDU_QUEUES: Maximum number of queues usable | ||
97 | * for A-MPDU operation. | ||
98 | */ | 96 | */ |
99 | enum ieee80211_max_queues { | 97 | enum ieee80211_max_queues { |
100 | IEEE80211_MAX_QUEUES = 16, | 98 | IEEE80211_MAX_QUEUES = 4, |
101 | IEEE80211_MAX_AMPDU_QUEUES = 16, | ||
102 | }; | 99 | }; |
103 | 100 | ||
104 | /** | 101 | /** |
@@ -245,6 +242,12 @@ struct ieee80211_bss_conf { | |||
245 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be | 242 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be |
246 | * set by rate control algorithms to indicate probe rate, will | 243 | * set by rate control algorithms to indicate probe rate, will |
247 | * be cleared for fragmented frames (except on the last fragment) | 244 | * be cleared for fragmented frames (except on the last fragment) |
245 | * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or | ||
246 | * set this flag in the driver; indicates that the rate control | ||
247 | * algorithm was used and should be notified of TX status | ||
248 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, | ||
249 | * used to indicate that a pending frame requires TX processing before | ||
250 | * it can be sent out. | ||
248 | */ | 251 | */ |
249 | enum mac80211_tx_control_flags { | 252 | enum mac80211_tx_control_flags { |
250 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 253 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -260,6 +263,8 @@ enum mac80211_tx_control_flags { | |||
260 | IEEE80211_TX_STAT_AMPDU = BIT(10), | 263 | IEEE80211_TX_STAT_AMPDU = BIT(10), |
261 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), | 264 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), |
262 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), | 265 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), |
266 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | ||
267 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | ||
263 | }; | 268 | }; |
264 | 269 | ||
265 | /** | 270 | /** |
@@ -520,12 +525,6 @@ enum ieee80211_conf_flags { | |||
520 | IEEE80211_CONF_PS = (1<<1), | 525 | IEEE80211_CONF_PS = (1<<1), |
521 | }; | 526 | }; |
522 | 527 | ||
523 | /* XXX: remove all this once drivers stop trying to use it */ | ||
524 | static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | ||
525 | { | ||
526 | return 0; | ||
527 | } | ||
528 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) | ||
529 | 528 | ||
530 | /** | 529 | /** |
531 | * enum ieee80211_conf_changed - denotes which configuration changed | 530 | * enum ieee80211_conf_changed - denotes which configuration changed |
@@ -888,6 +887,10 @@ enum ieee80211_tkip_key_type { | |||
888 | * | 887 | * |
889 | * @IEEE80211_HW_MFP_CAPABLE: | 888 | * @IEEE80211_HW_MFP_CAPABLE: |
890 | * Hardware supports management frame protection (MFP, IEEE 802.11w). | 889 | * Hardware supports management frame protection (MFP, IEEE 802.11w). |
890 | * | ||
891 | * @IEEE80211_HW_BEACON_FILTER: | ||
892 | * Hardware supports dropping of irrelevant beacon frames to | ||
893 | * avoid waking up cpu. | ||
891 | */ | 894 | */ |
892 | enum ieee80211_hw_flags { | 895 | enum ieee80211_hw_flags { |
893 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, | 896 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, |
@@ -903,6 +906,7 @@ enum ieee80211_hw_flags { | |||
903 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, | 906 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, |
904 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 907 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
905 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 908 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
909 | IEEE80211_HW_BEACON_FILTER = 1<<14, | ||
906 | }; | 910 | }; |
907 | 911 | ||
908 | /** | 912 | /** |
@@ -945,12 +949,6 @@ enum ieee80211_hw_flags { | |||
945 | * data packets. WMM/QoS requires at least four, these | 949 | * data packets. WMM/QoS requires at least four, these |
946 | * queues need to have configurable access parameters. | 950 | * queues need to have configurable access parameters. |
947 | * | 951 | * |
948 | * @ampdu_queues: number of available hardware transmit queues | ||
949 | * for A-MPDU packets, these have no access parameters | ||
950 | * because they're used only for A-MPDU frames. Note that | ||
951 | * mac80211 will not currently use any of the regular queues | ||
952 | * for aggregation. | ||
953 | * | ||
954 | * @rate_control_algorithm: rate control algorithm for this hardware. | 952 | * @rate_control_algorithm: rate control algorithm for this hardware. |
955 | * If unset (NULL), the default algorithm will be used. Must be | 953 | * If unset (NULL), the default algorithm will be used. Must be |
956 | * set before calling ieee80211_register_hw(). | 954 | * set before calling ieee80211_register_hw(). |
@@ -975,7 +973,6 @@ struct ieee80211_hw { | |||
975 | int vif_data_size; | 973 | int vif_data_size; |
976 | int sta_data_size; | 974 | int sta_data_size; |
977 | u16 queues; | 975 | u16 queues; |
978 | u16 ampdu_queues; | ||
979 | u16 max_listen_interval; | 976 | u16 max_listen_interval; |
980 | s8 max_signal; | 977 | s8 max_signal; |
981 | u8 max_rates; | 978 | u8 max_rates; |
@@ -1017,11 +1014,6 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr) | |||
1017 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); | 1014 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); |
1018 | } | 1015 | } |
1019 | 1016 | ||
1020 | static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw) | ||
1021 | { | ||
1022 | return hw->queues; | ||
1023 | } | ||
1024 | |||
1025 | static inline struct ieee80211_rate * | 1017 | static inline struct ieee80211_rate * |
1026 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, | 1018 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, |
1027 | const struct ieee80211_tx_info *c) | 1019 | const struct ieee80211_tx_info *c) |
@@ -1132,6 +1124,24 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1132 | */ | 1124 | */ |
1133 | 1125 | ||
1134 | /** | 1126 | /** |
1127 | * DOC: Beacon filter support | ||
1128 | * | ||
1129 | * Some hardware have beacon filter support to reduce host cpu wakeups | ||
1130 | * which will reduce system power consumption. It usuallly works so that | ||
1131 | * the firmware creates a checksum of the beacon but omits all constantly | ||
1132 | * changing elements (TSF, TIM etc). Whenever the checksum changes the | ||
1133 | * beacon is forwarded to the host, otherwise it will be just dropped. That | ||
1134 | * way the host will only receive beacons where some relevant information | ||
1135 | * (for example ERP protection or WMM settings) have changed. | ||
1136 | * | ||
1137 | * Beacon filter support is informed with %IEEE80211_HW_BEACON_FILTER flag. | ||
1138 | * The driver needs to enable beacon filter support whenever power save is | ||
1139 | * enabled, that is %IEEE80211_CONF_PS is set. When power save is enabled, | ||
1140 | * the stack will not check for beacon miss at all and the driver needs to | ||
1141 | * notify about complete loss of beacons with ieee80211_beacon_loss(). | ||
1142 | */ | ||
1143 | |||
1144 | /** | ||
1135 | * DOC: Frame filtering | 1145 | * DOC: Frame filtering |
1136 | * | 1146 | * |
1137 | * mac80211 requires to see many management frames for proper | 1147 | * mac80211 requires to see many management frames for proper |
@@ -1220,14 +1230,14 @@ enum ieee80211_filter_flags { | |||
1220 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation | 1230 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation |
1221 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation | 1231 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation |
1222 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation | 1232 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation |
1223 | * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation | 1233 | * @IEEE80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational |
1224 | */ | 1234 | */ |
1225 | enum ieee80211_ampdu_mlme_action { | 1235 | enum ieee80211_ampdu_mlme_action { |
1226 | IEEE80211_AMPDU_RX_START, | 1236 | IEEE80211_AMPDU_RX_START, |
1227 | IEEE80211_AMPDU_RX_STOP, | 1237 | IEEE80211_AMPDU_RX_STOP, |
1228 | IEEE80211_AMPDU_TX_START, | 1238 | IEEE80211_AMPDU_TX_START, |
1229 | IEEE80211_AMPDU_TX_STOP, | 1239 | IEEE80211_AMPDU_TX_STOP, |
1230 | IEEE80211_AMPDU_TX_RESUME, | 1240 | IEEE80211_AMPDU_TX_OPERATIONAL, |
1231 | }; | 1241 | }; |
1232 | 1242 | ||
1233 | /** | 1243 | /** |
@@ -1318,11 +1328,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1318 | * | 1328 | * |
1319 | * @hw_scan: Ask the hardware to service the scan request, no need to start | 1329 | * @hw_scan: Ask the hardware to service the scan request, no need to start |
1320 | * the scan state machine in stack. The scan must honour the channel | 1330 | * the scan state machine in stack. The scan must honour the channel |
1321 | * configuration done by the regulatory agent in the wiphy's registered | 1331 | * configuration done by the regulatory agent in the wiphy's |
1322 | * bands. When the scan finishes, ieee80211_scan_completed() must be | 1332 | * registered bands. The hardware (or the driver) needs to make sure |
1323 | * called; note that it also must be called when the scan cannot finish | 1333 | * that power save is disabled. When the scan finishes, |
1324 | * because the hardware is turned off! Anything else is a bug! | 1334 | * ieee80211_scan_completed() must be called; note that it also must |
1325 | * Returns a negative error code which will be seen in userspace. | 1335 | * be called when the scan cannot finish because the hardware is |
1336 | * turned off! Anything else is a bug! Returns a negative error code | ||
1337 | * which will be seen in userspace. | ||
1326 | * | 1338 | * |
1327 | * @sw_scan_start: Notifier function that is called just before a software scan | 1339 | * @sw_scan_start: Notifier function that is called just before a software scan |
1328 | * is started. Can be NULL, if the driver doesn't need this notification. | 1340 | * is started. Can be NULL, if the driver doesn't need this notification. |
@@ -1350,8 +1362,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1350 | * @get_tx_stats: Get statistics of the current TX queue status. This is used | 1362 | * @get_tx_stats: Get statistics of the current TX queue status. This is used |
1351 | * to get number of currently queued packets (queue length), maximum queue | 1363 | * to get number of currently queued packets (queue length), maximum queue |
1352 | * size (limit), and total number of packets sent using each TX queue | 1364 | * size (limit), and total number of packets sent using each TX queue |
1353 | * (count). The 'stats' pointer points to an array that has hw->queues + | 1365 | * (count). The 'stats' pointer points to an array that has hw->queues |
1354 | * hw->ampdu_queues items. | 1366 | * items. |
1355 | * | 1367 | * |
1356 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, | 1368 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, |
1357 | * this is only used for IBSS mode BSSID merging and debugging. Is not a | 1369 | * this is only used for IBSS mode BSSID merging and debugging. Is not a |
@@ -1979,6 +1991,16 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | |||
1979 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, | 1991 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, |
1980 | const u8 *addr); | 1992 | const u8 *addr); |
1981 | 1993 | ||
1994 | /** | ||
1995 | * ieee80211_beacon_loss - inform hardware does not receive beacons | ||
1996 | * | ||
1997 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | ||
1998 | * | ||
1999 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and | ||
2000 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the | ||
2001 | * hardware is not receiving beacons with this function. | ||
2002 | */ | ||
2003 | void ieee80211_beacon_loss(struct ieee80211_vif *vif); | ||
1982 | 2004 | ||
1983 | /* Rate control API */ | 2005 | /* Rate control API */ |
1984 | 2006 | ||
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 4dfb793c3f15..6c3f964de9e1 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -91,8 +91,7 @@ struct nf_conn_help { | |||
91 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> | 91 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> |
92 | #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> | 92 | #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> |
93 | 93 | ||
94 | struct nf_conn | 94 | struct nf_conn { |
95 | { | ||
96 | /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, | 95 | /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, |
97 | plus 1 for any connection(s) we are `master' for */ | 96 | plus 1 for any connection(s) we are `master' for */ |
98 | struct nf_conntrack ct_general; | 97 | struct nf_conntrack ct_general; |
@@ -126,7 +125,6 @@ struct nf_conn | |||
126 | #ifdef CONFIG_NET_NS | 125 | #ifdef CONFIG_NET_NS |
127 | struct net *ct_net; | 126 | struct net *ct_net; |
128 | #endif | 127 | #endif |
129 | struct rcu_head rcu; | ||
130 | }; | 128 | }; |
131 | 129 | ||
132 | static inline struct nf_conn * | 130 | static inline struct nf_conn * |
@@ -190,9 +188,13 @@ static inline void nf_ct_put(struct nf_conn *ct) | |||
190 | extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); | 188 | extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); |
191 | extern void nf_ct_l3proto_module_put(unsigned short l3proto); | 189 | extern void nf_ct_l3proto_module_put(unsigned short l3proto); |
192 | 190 | ||
193 | extern struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced); | 191 | /* |
194 | extern void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, | 192 | * Allocate a hashtable of hlist_head (if nulls == 0), |
195 | unsigned int size); | 193 | * or hlist_nulls_head (if nulls == 1) |
194 | */ | ||
195 | extern void *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced, int nulls); | ||
196 | |||
197 | extern void nf_ct_free_hashtable(void *hash, int vmalloced, unsigned int size); | ||
196 | 198 | ||
197 | extern struct nf_conntrack_tuple_hash * | 199 | extern struct nf_conntrack_tuple_hash * |
198 | __nf_conntrack_find(struct net *net, const struct nf_conntrack_tuple *tuple); | 200 | __nf_conntrack_find(struct net *net, const struct nf_conntrack_tuple *tuple); |
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h index 66d65a7caa39..ee2a4b369a04 100644 --- a/include/net/netfilter/nf_conntrack_helper.h +++ b/include/net/netfilter/nf_conntrack_helper.h | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | struct module; | 15 | struct module; |
16 | 16 | ||
17 | #define NF_CT_HELPER_NAME_LEN 16 | ||
18 | |||
17 | struct nf_conntrack_helper | 19 | struct nf_conntrack_helper |
18 | { | 20 | { |
19 | struct hlist_node hnode; /* Internal use. */ | 21 | struct hlist_node hnode; /* Internal use. */ |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 0378676c3dd8..9f99d36d5de9 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -53,10 +53,17 @@ struct nf_conntrack_l3proto | |||
53 | int (*tuple_to_nlattr)(struct sk_buff *skb, | 53 | int (*tuple_to_nlattr)(struct sk_buff *skb, |
54 | const struct nf_conntrack_tuple *t); | 54 | const struct nf_conntrack_tuple *t); |
55 | 55 | ||
56 | /* | ||
57 | * Calculate size of tuple nlattr | ||
58 | */ | ||
59 | int (*nlattr_tuple_size)(void); | ||
60 | |||
56 | int (*nlattr_to_tuple)(struct nlattr *tb[], | 61 | int (*nlattr_to_tuple)(struct nlattr *tb[], |
57 | struct nf_conntrack_tuple *t); | 62 | struct nf_conntrack_tuple *t); |
58 | const struct nla_policy *nla_policy; | 63 | const struct nla_policy *nla_policy; |
59 | 64 | ||
65 | size_t nla_size; | ||
66 | |||
60 | #ifdef CONFIG_SYSCTL | 67 | #ifdef CONFIG_SYSCTL |
61 | struct ctl_table_header *ctl_table_header; | 68 | struct ctl_table_header *ctl_table_header; |
62 | struct ctl_path *ctl_table_path; | 69 | struct ctl_path *ctl_table_path; |
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index b01070bf2f84..ba32ed7bdabe 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -64,16 +64,22 @@ struct nf_conntrack_l4proto | |||
64 | /* convert protoinfo to nfnetink attributes */ | 64 | /* convert protoinfo to nfnetink attributes */ |
65 | int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla, | 65 | int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla, |
66 | const struct nf_conn *ct); | 66 | const struct nf_conn *ct); |
67 | /* Calculate protoinfo nlattr size */ | ||
68 | int (*nlattr_size)(void); | ||
67 | 69 | ||
68 | /* convert nfnetlink attributes to protoinfo */ | 70 | /* convert nfnetlink attributes to protoinfo */ |
69 | int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct); | 71 | int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct); |
70 | 72 | ||
71 | int (*tuple_to_nlattr)(struct sk_buff *skb, | 73 | int (*tuple_to_nlattr)(struct sk_buff *skb, |
72 | const struct nf_conntrack_tuple *t); | 74 | const struct nf_conntrack_tuple *t); |
75 | /* Calculate tuple nlattr size */ | ||
76 | int (*nlattr_tuple_size)(void); | ||
73 | int (*nlattr_to_tuple)(struct nlattr *tb[], | 77 | int (*nlattr_to_tuple)(struct nlattr *tb[], |
74 | struct nf_conntrack_tuple *t); | 78 | struct nf_conntrack_tuple *t); |
75 | const struct nla_policy *nla_policy; | 79 | const struct nla_policy *nla_policy; |
76 | 80 | ||
81 | size_t nla_size; | ||
82 | |||
77 | #ifdef CONFIG_SYSCTL | 83 | #ifdef CONFIG_SYSCTL |
78 | struct ctl_table_header **ctl_table_header; | 84 | struct ctl_table_header **ctl_table_header; |
79 | struct ctl_table *ctl_table; | 85 | struct ctl_table *ctl_table; |
@@ -107,6 +113,7 @@ extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb, | |||
107 | const struct nf_conntrack_tuple *tuple); | 113 | const struct nf_conntrack_tuple *tuple); |
108 | extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[], | 114 | extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[], |
109 | struct nf_conntrack_tuple *t); | 115 | struct nf_conntrack_tuple *t); |
116 | extern int nf_ct_port_nlattr_tuple_size(void); | ||
110 | extern const struct nla_policy nf_ct_port_nla_policy[]; | 117 | extern const struct nla_policy nf_ct_port_nla_policy[]; |
111 | 118 | ||
112 | #ifdef CONFIG_SYSCTL | 119 | #ifdef CONFIG_SYSCTL |
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index f2f6aa73dc10..2628c154d40e 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/netfilter/x_tables.h> | 13 | #include <linux/netfilter/x_tables.h> |
14 | #include <linux/netfilter/nf_conntrack_tuple_common.h> | 14 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
15 | #include <linux/list_nulls.h> | ||
15 | 16 | ||
16 | /* A `tuple' is a structure containing the information to uniquely | 17 | /* A `tuple' is a structure containing the information to uniquely |
17 | identify a connection. ie. if two packets have the same tuple, they | 18 | identify a connection. ie. if two packets have the same tuple, they |
@@ -146,9 +147,8 @@ static inline void nf_ct_dump_tuple(const struct nf_conntrack_tuple *t) | |||
146 | ((enum ip_conntrack_dir)(h)->tuple.dst.dir) | 147 | ((enum ip_conntrack_dir)(h)->tuple.dst.dir) |
147 | 148 | ||
148 | /* Connections have two entries in the hash table: one for each way */ | 149 | /* Connections have two entries in the hash table: one for each way */ |
149 | struct nf_conntrack_tuple_hash | 150 | struct nf_conntrack_tuple_hash { |
150 | { | 151 | struct hlist_nulls_node hnnode; |
151 | struct hlist_node hnode; | ||
152 | struct nf_conntrack_tuple tuple; | 152 | struct nf_conntrack_tuple tuple; |
153 | }; | 153 | }; |
154 | 154 | ||
diff --git a/include/net/netlink.h b/include/net/netlink.h index 8a6150a3f4c7..eddb50289d6d 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -230,6 +230,7 @@ extern int nla_validate(struct nlattr *head, int len, int maxtype, | |||
230 | extern int nla_parse(struct nlattr *tb[], int maxtype, | 230 | extern int nla_parse(struct nlattr *tb[], int maxtype, |
231 | struct nlattr *head, int len, | 231 | struct nlattr *head, int len, |
232 | const struct nla_policy *policy); | 232 | const struct nla_policy *policy); |
233 | extern int nla_policy_len(const struct nla_policy *, int); | ||
233 | extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); | 234 | extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); |
234 | extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, | 235 | extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, |
235 | size_t dstsize); | 236 | size_t dstsize); |
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index f4498a62881b..9dc58402bc09 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NETNS_CONNTRACK_H | 2 | #define __NETNS_CONNTRACK_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/list_nulls.h> | ||
5 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
6 | 7 | ||
7 | struct ctl_table_header; | 8 | struct ctl_table_header; |
@@ -10,9 +11,9 @@ struct nf_conntrack_ecache; | |||
10 | struct netns_ct { | 11 | struct netns_ct { |
11 | atomic_t count; | 12 | atomic_t count; |
12 | unsigned int expect_count; | 13 | unsigned int expect_count; |
13 | struct hlist_head *hash; | 14 | struct hlist_nulls_head *hash; |
14 | struct hlist_head *expect_hash; | 15 | struct hlist_head *expect_hash; |
15 | struct hlist_head unconfirmed; | 16 | struct hlist_nulls_head unconfirmed; |
16 | struct ip_conntrack_stat *stat; | 17 | struct ip_conntrack_stat *stat; |
17 | #ifdef CONFIG_NF_CONNTRACK_EVENTS | 18 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
18 | struct nf_conntrack_ecache *ecache; | 19 | struct nf_conntrack_ecache *ecache; |