diff options
Diffstat (limited to 'include/linux')
44 files changed, 1183 insertions, 124 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d5a55bdb9c3c..b123cc08773d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #ifndef _LINUX_ACPI_H | 25 | #ifndef _LINUX_ACPI_H |
26 | #define _LINUX_ACPI_H | 26 | #define _LINUX_ACPI_H |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | |||
28 | #ifdef CONFIG_ACPI | 30 | #ifdef CONFIG_ACPI |
29 | 31 | ||
30 | #ifndef _LINUX | 32 | #ifndef _LINUX |
diff --git a/include/linux/ata.h b/include/linux/ata.h index f178894edd04..ca5fcadf9981 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -224,6 +224,7 @@ struct ata_taskfile { | |||
224 | }; | 224 | }; |
225 | 225 | ||
226 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) | 226 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) |
227 | #define ata_id_is_sata(id) ((id)[93] == 0) | ||
227 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) | 228 | #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) |
228 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) | 229 | #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) |
229 | #define ata_id_has_flush(id) ((id)[83] & (1 << 12)) | 230 | #define ata_id_has_flush(id) ((id)[83] & (1 << 12)) |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 31d3fc25ccbd..09a1451c1159 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0) | 20 | #define SIOCATALKDIFADDR (SIOCPROTOPRIVATE + 0) |
21 | 21 | ||
22 | struct atalk_addr { | 22 | struct atalk_addr { |
23 | __u16 s_net; | 23 | __be16 s_net; |
24 | __u8 s_node; | 24 | __u8 s_node; |
25 | }; | 25 | }; |
26 | 26 | ||
@@ -33,8 +33,8 @@ struct sockaddr_at { | |||
33 | 33 | ||
34 | struct atalk_netrange { | 34 | struct atalk_netrange { |
35 | __u8 nr_phase; | 35 | __u8 nr_phase; |
36 | __u16 nr_firstnet; | 36 | __be16 nr_firstnet; |
37 | __u16 nr_lastnet; | 37 | __be16 nr_lastnet; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | #ifdef __KERNEL__ | 40 | #ifdef __KERNEL__ |
@@ -70,8 +70,8 @@ struct atalk_iface { | |||
70 | struct atalk_sock { | 70 | struct atalk_sock { |
71 | /* struct sock has to be the first member of atalk_sock */ | 71 | /* struct sock has to be the first member of atalk_sock */ |
72 | struct sock sk; | 72 | struct sock sk; |
73 | unsigned short dest_net; | 73 | __be16 dest_net; |
74 | unsigned short src_net; | 74 | __be16 src_net; |
75 | unsigned char dest_node; | 75 | unsigned char dest_node; |
76 | unsigned char src_node; | 76 | unsigned char src_node; |
77 | unsigned char dest_port; | 77 | unsigned char dest_port; |
@@ -95,9 +95,9 @@ struct ddpehdr { | |||
95 | deh_hops:4, | 95 | deh_hops:4, |
96 | deh_len:10; | 96 | deh_len:10; |
97 | #endif | 97 | #endif |
98 | __u16 deh_sum; | 98 | __be16 deh_sum; |
99 | __u16 deh_dnet; | 99 | __be16 deh_dnet; |
100 | __u16 deh_snet; | 100 | __be16 deh_snet; |
101 | __u8 deh_dnode; | 101 | __u8 deh_dnode; |
102 | __u8 deh_snode; | 102 | __u8 deh_snode; |
103 | __u8 deh_dport; | 103 | __u8 deh_dport; |
@@ -142,24 +142,24 @@ struct ddpshdr { | |||
142 | 142 | ||
143 | /* AppleTalk AARP headers */ | 143 | /* AppleTalk AARP headers */ |
144 | struct elapaarp { | 144 | struct elapaarp { |
145 | __u16 hw_type; | 145 | __be16 hw_type; |
146 | #define AARP_HW_TYPE_ETHERNET 1 | 146 | #define AARP_HW_TYPE_ETHERNET 1 |
147 | #define AARP_HW_TYPE_TOKENRING 2 | 147 | #define AARP_HW_TYPE_TOKENRING 2 |
148 | __u16 pa_type; | 148 | __be16 pa_type; |
149 | __u8 hw_len; | 149 | __u8 hw_len; |
150 | __u8 pa_len; | 150 | __u8 pa_len; |
151 | #define AARP_PA_ALEN 4 | 151 | #define AARP_PA_ALEN 4 |
152 | __u16 function; | 152 | __be16 function; |
153 | #define AARP_REQUEST 1 | 153 | #define AARP_REQUEST 1 |
154 | #define AARP_REPLY 2 | 154 | #define AARP_REPLY 2 |
155 | #define AARP_PROBE 3 | 155 | #define AARP_PROBE 3 |
156 | __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); | 156 | __u8 hw_src[ETH_ALEN] __attribute__ ((packed)); |
157 | __u8 pa_src_zero __attribute__ ((packed)); | 157 | __u8 pa_src_zero __attribute__ ((packed)); |
158 | __u16 pa_src_net __attribute__ ((packed)); | 158 | __be16 pa_src_net __attribute__ ((packed)); |
159 | __u8 pa_src_node __attribute__ ((packed)); | 159 | __u8 pa_src_node __attribute__ ((packed)); |
160 | __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); | 160 | __u8 hw_dst[ETH_ALEN] __attribute__ ((packed)); |
161 | __u8 pa_dst_zero __attribute__ ((packed)); | 161 | __u8 pa_dst_zero __attribute__ ((packed)); |
162 | __u16 pa_dst_net __attribute__ ((packed)); | 162 | __be16 pa_dst_net __attribute__ ((packed)); |
163 | __u8 pa_dst_node __attribute__ ((packed)); | 163 | __u8 pa_dst_node __attribute__ ((packed)); |
164 | }; | 164 | }; |
165 | 165 | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 19f04b049798..bf2ad3ba72eb 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -27,15 +27,52 @@ | |||
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/elf.h> | 28 | #include <linux/elf.h> |
29 | 29 | ||
30 | /* Request and reply types */ | 30 | /* The netlink messages for the audit system is divided into blocks: |
31 | #define AUDIT_GET 1000 /* Get status */ | 31 | * 1000 - 1099 are for commanding the audit system |
32 | #define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */ | 32 | * 1100 - 1199 user space trusted application messages |
33 | #define AUDIT_LIST 1002 /* List filtering rules */ | 33 | * 1200 - 1299 messages internal to the audit daemon |
34 | #define AUDIT_ADD 1003 /* Add filtering rule */ | 34 | * 1300 - 1399 audit event messages |
35 | #define AUDIT_DEL 1004 /* Delete filtering rule */ | 35 | * 1400 - 1499 SE Linux use |
36 | #define AUDIT_USER 1005 /* Send a message from user-space */ | 36 | * 1500 - 1999 future use |
37 | #define AUDIT_LOGIN 1006 /* Define the login id and informaiton */ | 37 | * 2000 is for otherwise unclassified kernel audit messages |
38 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | 38 | * |
39 | * Messages from 1000-1199 are bi-directional. 1200-1299 are exclusively user | ||
40 | * space. Anything over that is kernel --> user space communication. | ||
41 | */ | ||
42 | #define AUDIT_GET 1000 /* Get status */ | ||
43 | #define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */ | ||
44 | #define AUDIT_LIST 1002 /* List syscall filtering rules */ | ||
45 | #define AUDIT_ADD 1003 /* Add syscall filtering rule */ | ||
46 | #define AUDIT_DEL 1004 /* Delete syscall filtering rule */ | ||
47 | #define AUDIT_USER 1005 /* Message from userspace -- deprecated */ | ||
48 | #define AUDIT_LOGIN 1006 /* Define the login id and information */ | ||
49 | #define AUDIT_WATCH_INS 1007 /* Insert file/dir watch entry */ | ||
50 | #define AUDIT_WATCH_REM 1008 /* Remove file/dir watch entry */ | ||
51 | #define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */ | ||
52 | #define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */ | ||
53 | |||
54 | #define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages uninteresting to kernel */ | ||
55 | #define AUDIT_LAST_USER_MSG 1199 | ||
56 | |||
57 | #define AUDIT_DAEMON_START 1200 /* Daemon startup record */ | ||
58 | #define AUDIT_DAEMON_END 1201 /* Daemon normal stop record */ | ||
59 | #define AUDIT_DAEMON_ABORT 1202 /* Daemon error stop record */ | ||
60 | #define AUDIT_DAEMON_CONFIG 1203 /* Daemon config change */ | ||
61 | |||
62 | #define AUDIT_SYSCALL 1300 /* Syscall event */ | ||
63 | #define AUDIT_FS_WATCH 1301 /* Filesystem watch event */ | ||
64 | #define AUDIT_PATH 1302 /* Filename path information */ | ||
65 | #define AUDIT_IPC 1303 /* IPC record */ | ||
66 | #define AUDIT_SOCKETCALL 1304 /* sys_socketcall arguments */ | ||
67 | #define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */ | ||
68 | #define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */ | ||
69 | #define AUDIT_CWD 1307 /* Current working directory */ | ||
70 | |||
71 | #define AUDIT_AVC 1400 /* SE Linux avc denial or grant */ | ||
72 | #define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */ | ||
73 | #define AUDIT_AVC_PATH 1402 /* dentry, vfsmount pair from avc */ | ||
74 | |||
75 | #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ | ||
39 | 76 | ||
40 | /* Rule flags */ | 77 | /* Rule flags */ |
41 | #define AUDIT_PER_TASK 0x01 /* Apply rule at task creation (not syscall) */ | 78 | #define AUDIT_PER_TASK 0x01 /* Apply rule at task creation (not syscall) */ |
@@ -132,16 +169,9 @@ | |||
132 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | 169 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) |
133 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 170 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
134 | 171 | ||
135 | #ifndef __KERNEL__ | ||
136 | struct audit_message { | ||
137 | struct nlmsghdr nlh; | ||
138 | char data[1200]; | ||
139 | }; | ||
140 | #endif | ||
141 | |||
142 | struct audit_status { | 172 | struct audit_status { |
143 | __u32 mask; /* Bit mask for valid entries */ | 173 | __u32 mask; /* Bit mask for valid entries */ |
144 | __u32 enabled; /* 1 = enabled, 0 = disbaled */ | 174 | __u32 enabled; /* 1 = enabled, 0 = disabled */ |
145 | __u32 failure; /* Failure-to-log action */ | 175 | __u32 failure; /* Failure-to-log action */ |
146 | __u32 pid; /* pid of auditd process */ | 176 | __u32 pid; /* pid of auditd process */ |
147 | __u32 rate_limit; /* messages rate limit (per second) */ | 177 | __u32 rate_limit; /* messages rate limit (per second) */ |
@@ -161,6 +191,11 @@ struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */ | |||
161 | 191 | ||
162 | #ifdef __KERNEL__ | 192 | #ifdef __KERNEL__ |
163 | 193 | ||
194 | struct audit_sig_info { | ||
195 | uid_t uid; | ||
196 | pid_t pid; | ||
197 | }; | ||
198 | |||
164 | struct audit_buffer; | 199 | struct audit_buffer; |
165 | struct audit_context; | 200 | struct audit_context; |
166 | struct inode; | 201 | struct inode; |
@@ -185,11 +220,16 @@ extern void audit_inode(const char *name, const struct inode *inode); | |||
185 | /* Private API (for audit.c only) */ | 220 | /* Private API (for audit.c only) */ |
186 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 221 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
187 | void *data, uid_t loginuid); | 222 | void *data, uid_t loginuid); |
188 | extern void audit_get_stamp(struct audit_context *ctx, | 223 | extern unsigned int audit_serial(void); |
189 | struct timespec *t, unsigned int *serial); | 224 | extern void auditsc_get_stamp(struct audit_context *ctx, |
225 | struct timespec *t, unsigned int *serial); | ||
190 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); | 226 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); |
191 | extern uid_t audit_get_loginuid(struct audit_context *ctx); | 227 | extern uid_t audit_get_loginuid(struct audit_context *ctx); |
192 | extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); | 228 | extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); |
229 | extern int audit_socketcall(int nargs, unsigned long *args); | ||
230 | extern int audit_sockaddr(int len, void *addr); | ||
231 | extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt); | ||
232 | extern void audit_signal_info(int sig, struct task_struct *t); | ||
193 | #else | 233 | #else |
194 | #define audit_alloc(t) ({ 0; }) | 234 | #define audit_alloc(t) ({ 0; }) |
195 | #define audit_free(t) do { ; } while (0) | 235 | #define audit_free(t) do { ; } while (0) |
@@ -198,18 +238,24 @@ extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mo | |||
198 | #define audit_getname(n) do { ; } while (0) | 238 | #define audit_getname(n) do { ; } while (0) |
199 | #define audit_putname(n) do { ; } while (0) | 239 | #define audit_putname(n) do { ; } while (0) |
200 | #define audit_inode(n,i) do { ; } while (0) | 240 | #define audit_inode(n,i) do { ; } while (0) |
241 | #define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; }) | ||
242 | #define auditsc_get_stamp(c,t,s) do { BUG(); } while (0) | ||
201 | #define audit_get_loginuid(c) ({ -1; }) | 243 | #define audit_get_loginuid(c) ({ -1; }) |
202 | #define audit_ipc_perms(q,u,g,m) ({ 0; }) | 244 | #define audit_ipc_perms(q,u,g,m) ({ 0; }) |
245 | #define audit_socketcall(n,a) ({ 0; }) | ||
246 | #define audit_sockaddr(len, addr) ({ 0; }) | ||
247 | #define audit_avc_path(dentry, mnt) ({ 0; }) | ||
248 | #define audit_signal_info(s,t) do { ; } while (0) | ||
203 | #endif | 249 | #endif |
204 | 250 | ||
205 | #ifdef CONFIG_AUDIT | 251 | #ifdef CONFIG_AUDIT |
206 | /* These are defined in audit.c */ | 252 | /* These are defined in audit.c */ |
207 | /* Public API */ | 253 | /* Public API */ |
208 | extern void audit_log(struct audit_context *ctx, | 254 | extern void audit_log(struct audit_context *ctx, int type, |
209 | const char *fmt, ...) | 255 | const char *fmt, ...) |
210 | __attribute__((format(printf,2,3))); | 256 | __attribute__((format(printf,3,4))); |
211 | 257 | ||
212 | extern struct audit_buffer *audit_log_start(struct audit_context *ctx); | 258 | extern struct audit_buffer *audit_log_start(struct audit_context *ctx,int type); |
213 | extern void audit_log_format(struct audit_buffer *ab, | 259 | extern void audit_log_format(struct audit_buffer *ab, |
214 | const char *fmt, ...) | 260 | const char *fmt, ...) |
215 | __attribute__((format(printf,2,3))); | 261 | __attribute__((format(printf,2,3))); |
@@ -229,8 +275,8 @@ extern void audit_send_reply(int pid, int seq, int type, | |||
229 | void *payload, int size); | 275 | void *payload, int size); |
230 | extern void audit_log_lost(const char *message); | 276 | extern void audit_log_lost(const char *message); |
231 | #else | 277 | #else |
232 | #define audit_log(t,f,...) do { ; } while (0) | 278 | #define audit_log(c,t,f,...) do { ; } while (0) |
233 | #define audit_log_start(t) ({ NULL; }) | 279 | #define audit_log_start(c,t) ({ NULL; }) |
234 | #define audit_log_vformat(b,f,a) do { ; } while (0) | 280 | #define audit_log_vformat(b,f,a) do { ; } while (0) |
235 | #define audit_log_format(b,f,...) do { ; } while (0) | 281 | #define audit_log_format(b,f,...) do { ; } while (0) |
236 | #define audit_log_end(b) do { ; } while (0) | 282 | #define audit_log_end(b) do { ; } while (0) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ef1afc178c0a..4a99b76c5a33 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -544,7 +544,7 @@ extern void blk_end_sync_rq(struct request *rq); | |||
544 | extern void blk_attempt_remerge(request_queue_t *, struct request *); | 544 | extern void blk_attempt_remerge(request_queue_t *, struct request *); |
545 | extern void __blk_attempt_remerge(request_queue_t *, struct request *); | 545 | extern void __blk_attempt_remerge(request_queue_t *, struct request *); |
546 | extern struct request *blk_get_request(request_queue_t *, int, int); | 546 | extern struct request *blk_get_request(request_queue_t *, int, int); |
547 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *, int); | 547 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *); |
548 | extern void blk_requeue_request(request_queue_t *, struct request *); | 548 | extern void blk_requeue_request(request_queue_t *, struct request *); |
549 | extern void blk_plug_device(request_queue_t *); | 549 | extern void blk_plug_device(request_queue_t *); |
550 | extern int blk_remove_plug(request_queue_t *); | 550 | extern int blk_remove_plug(request_queue_t *); |
diff --git a/include/linux/chio.h b/include/linux/chio.h new file mode 100644 index 000000000000..63035ae67e63 --- /dev/null +++ b/include/linux/chio.h | |||
@@ -0,0 +1,168 @@ | |||
1 | /* | ||
2 | * ioctl interface for the scsi media changer driver | ||
3 | */ | ||
4 | |||
5 | /* changer element types */ | ||
6 | #define CHET_MT 0 /* media transport element (robot) */ | ||
7 | #define CHET_ST 1 /* storage element (media slots) */ | ||
8 | #define CHET_IE 2 /* import/export element */ | ||
9 | #define CHET_DT 3 /* data transfer element (tape/cdrom/whatever) */ | ||
10 | #define CHET_V1 4 /* vendor specific #1 */ | ||
11 | #define CHET_V2 5 /* vendor specific #2 */ | ||
12 | #define CHET_V3 6 /* vendor specific #3 */ | ||
13 | #define CHET_V4 7 /* vendor specific #4 */ | ||
14 | |||
15 | |||
16 | /* | ||
17 | * CHIOGPARAMS | ||
18 | * query changer properties | ||
19 | * | ||
20 | * CHIOVGPARAMS | ||
21 | * query vendor-specific element types | ||
22 | * | ||
23 | * accessing elements works by specifing type and unit of the element. | ||
24 | * for eample, storage elements are addressed with type = CHET_ST and | ||
25 | * unit = 0 .. cp_nslots-1 | ||
26 | * | ||
27 | */ | ||
28 | struct changer_params { | ||
29 | int cp_curpicker; /* current transport element */ | ||
30 | int cp_npickers; /* number of transport elements (CHET_MT) */ | ||
31 | int cp_nslots; /* number of storage elements (CHET_ST) */ | ||
32 | int cp_nportals; /* number of import/export elements (CHET_IE) */ | ||
33 | int cp_ndrives; /* number of data transfer elements (CHET_DT) */ | ||
34 | }; | ||
35 | struct changer_vendor_params { | ||
36 | int cvp_n1; /* number of vendor specific elems (CHET_V1) */ | ||
37 | char cvp_label1[16]; | ||
38 | int cvp_n2; /* number of vendor specific elems (CHET_V2) */ | ||
39 | char cvp_label2[16]; | ||
40 | int cvp_n3; /* number of vendor specific elems (CHET_V3) */ | ||
41 | char cvp_label3[16]; | ||
42 | int cvp_n4; /* number of vendor specific elems (CHET_V4) */ | ||
43 | char cvp_label4[16]; | ||
44 | int reserved[8]; | ||
45 | }; | ||
46 | |||
47 | |||
48 | /* | ||
49 | * CHIOMOVE | ||
50 | * move a medium from one element to another | ||
51 | */ | ||
52 | struct changer_move { | ||
53 | int cm_fromtype; /* type/unit of source element */ | ||
54 | int cm_fromunit; | ||
55 | int cm_totype; /* type/unit of destination element */ | ||
56 | int cm_tounit; | ||
57 | int cm_flags; | ||
58 | }; | ||
59 | #define CM_INVERT 1 /* flag: rotate media (for double-sided like MOD) */ | ||
60 | |||
61 | |||
62 | /* | ||
63 | * CHIOEXCHANGE | ||
64 | * move one medium from element #1 to element #2, | ||
65 | * and another one from element #2 to element #3. | ||
66 | * element #1 and #3 are allowed to be identical. | ||
67 | */ | ||
68 | struct changer_exchange { | ||
69 | int ce_srctype; /* type/unit of element #1 */ | ||
70 | int ce_srcunit; | ||
71 | int ce_fdsttype; /* type/unit of element #2 */ | ||
72 | int ce_fdstunit; | ||
73 | int ce_sdsttype; /* type/unit of element #3 */ | ||
74 | int ce_sdstunit; | ||
75 | int ce_flags; | ||
76 | }; | ||
77 | #define CE_INVERT1 1 | ||
78 | #define CE_INVERT2 2 | ||
79 | |||
80 | |||
81 | /* | ||
82 | * CHIOPOSITION | ||
83 | * move the transport element (robot arm) to a specific element. | ||
84 | */ | ||
85 | struct changer_position { | ||
86 | int cp_type; | ||
87 | int cp_unit; | ||
88 | int cp_flags; | ||
89 | }; | ||
90 | #define CP_INVERT 1 | ||
91 | |||
92 | |||
93 | /* | ||
94 | * CHIOGSTATUS | ||
95 | * get element status for all elements of a specific type | ||
96 | */ | ||
97 | struct changer_element_status { | ||
98 | int ces_type; | ||
99 | unsigned char *ces_data; | ||
100 | }; | ||
101 | #define CESTATUS_FULL 0x01 /* full */ | ||
102 | #define CESTATUS_IMPEXP 0x02 /* media was imported (inserted by sysop) */ | ||
103 | #define CESTATUS_EXCEPT 0x04 /* error condition */ | ||
104 | #define CESTATUS_ACCESS 0x08 /* access allowed */ | ||
105 | #define CESTATUS_EXENAB 0x10 /* element can export media */ | ||
106 | #define CESTATUS_INENAB 0x20 /* element can import media */ | ||
107 | |||
108 | |||
109 | /* | ||
110 | * CHIOGELEM | ||
111 | * get more detailed status informtion for a single element | ||
112 | */ | ||
113 | struct changer_get_element { | ||
114 | int cge_type; /* type/unit */ | ||
115 | int cge_unit; | ||
116 | int cge_status; /* status */ | ||
117 | int cge_errno; /* errno */ | ||
118 | int cge_srctype; /* source element of the last move/exchange */ | ||
119 | int cge_srcunit; | ||
120 | int cge_id; /* scsi id (for data transfer elements) */ | ||
121 | int cge_lun; /* scsi lun (for data transfer elements) */ | ||
122 | char cge_pvoltag[36]; /* primary volume tag */ | ||
123 | char cge_avoltag[36]; /* alternate volume tag */ | ||
124 | int cge_flags; | ||
125 | }; | ||
126 | /* flags */ | ||
127 | #define CGE_ERRNO 0x01 /* errno available */ | ||
128 | #define CGE_INVERT 0x02 /* media inverted */ | ||
129 | #define CGE_SRC 0x04 /* media src available */ | ||
130 | #define CGE_IDLUN 0x08 /* ID+LUN available */ | ||
131 | #define CGE_PVOLTAG 0x10 /* primary volume tag available */ | ||
132 | #define CGE_AVOLTAG 0x20 /* alternate volume tag available */ | ||
133 | |||
134 | |||
135 | /* | ||
136 | * CHIOSVOLTAG | ||
137 | * set volume tag | ||
138 | */ | ||
139 | struct changer_set_voltag { | ||
140 | int csv_type; /* type/unit */ | ||
141 | int csv_unit; | ||
142 | char csv_voltag[36]; /* volume tag */ | ||
143 | int csv_flags; | ||
144 | }; | ||
145 | #define CSV_PVOLTAG 0x01 /* primary volume tag */ | ||
146 | #define CSV_AVOLTAG 0x02 /* alternate volume tag */ | ||
147 | #define CSV_CLEARTAG 0x04 /* clear volume tag */ | ||
148 | |||
149 | /* ioctls */ | ||
150 | #define CHIOMOVE _IOW('c', 1,struct changer_move) | ||
151 | #define CHIOEXCHANGE _IOW('c', 2,struct changer_exchange) | ||
152 | #define CHIOPOSITION _IOW('c', 3,struct changer_position) | ||
153 | #define CHIOGPICKER _IOR('c', 4,int) /* not impl. */ | ||
154 | #define CHIOSPICKER _IOW('c', 5,int) /* not impl. */ | ||
155 | #define CHIOGPARAMS _IOR('c', 6,struct changer_params) | ||
156 | #define CHIOGSTATUS _IOW('c', 8,struct changer_element_status) | ||
157 | #define CHIOGELEM _IOW('c',16,struct changer_get_element) | ||
158 | #define CHIOINITELEM _IO('c',17) | ||
159 | #define CHIOSVOLTAG _IOW('c',18,struct changer_set_voltag) | ||
160 | #define CHIOGVPARAMS _IOR('c',19,struct changer_vendor_params) | ||
161 | |||
162 | /* ---------------------------------------------------------------------- */ | ||
163 | |||
164 | /* | ||
165 | * Local variables: | ||
166 | * c-basic-offset: 8 | ||
167 | * End: | ||
168 | */ | ||
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index f21af067d015..927daa86c9b3 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -49,7 +49,7 @@ int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | |||
49 | /* Frequency values here are CPU kHz so that hardware which doesn't run | 49 | /* Frequency values here are CPU kHz so that hardware which doesn't run |
50 | * with some frequencies can complain without having to guess what per | 50 | * with some frequencies can complain without having to guess what per |
51 | * cent / per mille means. | 51 | * cent / per mille means. |
52 | * Maximum transition latency is in microseconds - if it's unknown, | 52 | * Maximum transition latency is in nanoseconds - if it's unknown, |
53 | * CPUFREQ_ETERNAL shall be used. | 53 | * CPUFREQ_ETERNAL shall be used. |
54 | */ | 54 | */ |
55 | 55 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index df94c0de53f2..7b781a72b293 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
16 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
17 | #include <linux/klist.h> | ||
17 | #include <linux/list.h> | 18 | #include <linux/list.h> |
18 | #include <linux/types.h> | 19 | #include <linux/types.h> |
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
@@ -44,14 +45,15 @@ struct device; | |||
44 | struct device_driver; | 45 | struct device_driver; |
45 | struct class; | 46 | struct class; |
46 | struct class_device; | 47 | struct class_device; |
47 | struct class_simple; | ||
48 | 48 | ||
49 | struct bus_type { | 49 | struct bus_type { |
50 | char * name; | 50 | const char * name; |
51 | 51 | ||
52 | struct subsystem subsys; | 52 | struct subsystem subsys; |
53 | struct kset drivers; | 53 | struct kset drivers; |
54 | struct kset devices; | 54 | struct kset devices; |
55 | struct klist klist_devices; | ||
56 | struct klist klist_drivers; | ||
55 | 57 | ||
56 | struct bus_attribute * bus_attrs; | 58 | struct bus_attribute * bus_attrs; |
57 | struct device_attribute * dev_attrs; | 59 | struct device_attribute * dev_attrs; |
@@ -98,17 +100,18 @@ extern int bus_create_file(struct bus_type *, struct bus_attribute *); | |||
98 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | 100 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); |
99 | 101 | ||
100 | struct device_driver { | 102 | struct device_driver { |
101 | char * name; | 103 | const char * name; |
102 | struct bus_type * bus; | 104 | struct bus_type * bus; |
103 | 105 | ||
104 | struct completion unloaded; | 106 | struct completion unloaded; |
105 | struct kobject kobj; | 107 | struct kobject kobj; |
106 | struct list_head devices; | 108 | struct klist klist_devices; |
109 | struct klist_node knode_bus; | ||
107 | 110 | ||
108 | struct module * owner; | 111 | struct module * owner; |
109 | 112 | ||
110 | int (*probe) (struct device * dev); | 113 | int (*probe) (struct device * dev); |
111 | int (*remove) (struct device * dev); | 114 | int (*remove) (struct device * dev); |
112 | void (*shutdown) (struct device * dev); | 115 | void (*shutdown) (struct device * dev); |
113 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); | 116 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); |
114 | int (*resume) (struct device * dev, u32 level); | 117 | int (*resume) (struct device * dev, u32 level); |
@@ -137,12 +140,16 @@ struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store) | |||
137 | extern int driver_create_file(struct device_driver *, struct driver_attribute *); | 140 | extern int driver_create_file(struct device_driver *, struct driver_attribute *); |
138 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); | 141 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); |
139 | 142 | ||
143 | extern int driver_for_each_device(struct device_driver * drv, struct device * start, | ||
144 | void * data, int (*fn)(struct device *, void *)); | ||
145 | |||
140 | 146 | ||
141 | /* | 147 | /* |
142 | * device classes | 148 | * device classes |
143 | */ | 149 | */ |
144 | struct class { | 150 | struct class { |
145 | char * name; | 151 | const char * name; |
152 | struct module * owner; | ||
146 | 153 | ||
147 | struct subsystem subsys; | 154 | struct subsystem subsys; |
148 | struct list_head children; | 155 | struct list_head children; |
@@ -185,6 +192,7 @@ struct class_device { | |||
185 | struct kobject kobj; | 192 | struct kobject kobj; |
186 | struct class * class; /* required */ | 193 | struct class * class; /* required */ |
187 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 194 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
195 | struct class_device_attribute *devt_attr; | ||
188 | struct device * dev; /* not necessary, but nice to have */ | 196 | struct device * dev; /* not necessary, but nice to have */ |
189 | void * class_data; /* class-specific data */ | 197 | void * class_data; /* class-specific data */ |
190 | 198 | ||
@@ -245,26 +253,28 @@ struct class_interface { | |||
245 | extern int class_interface_register(struct class_interface *); | 253 | extern int class_interface_register(struct class_interface *); |
246 | extern void class_interface_unregister(struct class_interface *); | 254 | extern void class_interface_unregister(struct class_interface *); |
247 | 255 | ||
248 | /* interface for class simple stuff */ | 256 | extern struct class *class_create(struct module *owner, char *name); |
249 | extern struct class_simple *class_simple_create(struct module *owner, char *name); | 257 | extern void class_destroy(struct class *cls); |
250 | extern void class_simple_destroy(struct class_simple *cs); | 258 | extern struct class_device *class_device_create(struct class *cls, dev_t devt, |
251 | extern struct class_device *class_simple_device_add(struct class_simple *cs, dev_t dev, struct device *device, const char *fmt, ...) | 259 | struct device *device, char *fmt, ...) |
252 | __attribute__((format(printf,4,5))); | 260 | __attribute__((format(printf,4,5))); |
253 | extern int class_simple_set_hotplug(struct class_simple *, | 261 | extern void class_device_destroy(struct class *cls, dev_t devt); |
254 | int (*hotplug)(struct class_device *dev, char **envp, int num_envp, char *buffer, int buffer_size)); | ||
255 | extern void class_simple_device_remove(dev_t dev); | ||
256 | 262 | ||
257 | 263 | ||
258 | struct device { | 264 | struct device { |
259 | struct list_head node; /* node in sibling list */ | 265 | struct klist klist_children; |
260 | struct list_head bus_list; /* node in bus's list */ | 266 | struct klist_node knode_parent; /* node in sibling list */ |
261 | struct list_head driver_list; | 267 | struct klist_node knode_driver; |
262 | struct list_head children; | 268 | struct klist_node knode_bus; |
263 | struct device * parent; | 269 | struct device * parent; |
264 | 270 | ||
265 | struct kobject kobj; | 271 | struct kobject kobj; |
266 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 272 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
267 | 273 | ||
274 | struct semaphore sem; /* semaphore to synchronize calls to | ||
275 | * its driver. | ||
276 | */ | ||
277 | |||
268 | struct bus_type * bus; /* type of bus device is on */ | 278 | struct bus_type * bus; /* type of bus device is on */ |
269 | struct device_driver *driver; /* which driver has allocated this | 279 | struct device_driver *driver; /* which driver has allocated this |
270 | device */ | 280 | device */ |
@@ -288,12 +298,6 @@ struct device { | |||
288 | void (*release)(struct device * dev); | 298 | void (*release)(struct device * dev); |
289 | }; | 299 | }; |
290 | 300 | ||
291 | static inline struct device * | ||
292 | list_to_dev(struct list_head *node) | ||
293 | { | ||
294 | return list_entry(node, struct device, node); | ||
295 | } | ||
296 | |||
297 | static inline void * | 301 | static inline void * |
298 | dev_get_drvdata (struct device *dev) | 302 | dev_get_drvdata (struct device *dev) |
299 | { | 303 | { |
@@ -321,7 +325,6 @@ extern int device_for_each_child(struct device *, void *, | |||
321 | * Manual binding of a device to driver. See drivers/base/bus.c | 325 | * Manual binding of a device to driver. See drivers/base/bus.c |
322 | * for information on use. | 326 | * for information on use. |
323 | */ | 327 | */ |
324 | extern int driver_probe_device(struct device_driver * drv, struct device * dev); | ||
325 | extern void device_bind_driver(struct device * dev); | 328 | extern void device_bind_driver(struct device * dev); |
326 | extern void device_release_driver(struct device * dev); | 329 | extern void device_release_driver(struct device * dev); |
327 | extern int device_attach(struct device * dev); | 330 | extern int device_attach(struct device * dev); |
@@ -332,8 +335,10 @@ extern void driver_attach(struct device_driver * drv); | |||
332 | 335 | ||
333 | struct device_attribute { | 336 | struct device_attribute { |
334 | struct attribute attr; | 337 | struct attribute attr; |
335 | ssize_t (*show)(struct device * dev, char * buf); | 338 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, |
336 | ssize_t (*store)(struct device * dev, const char * buf, size_t count); | 339 | char *buf); |
340 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
341 | const char *buf, size_t count); | ||
337 | }; | 342 | }; |
338 | 343 | ||
339 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ | 344 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ |
@@ -360,13 +365,12 @@ extern int (*platform_notify_remove)(struct device * dev); | |||
360 | */ | 365 | */ |
361 | extern struct device * get_device(struct device * dev); | 366 | extern struct device * get_device(struct device * dev); |
362 | extern void put_device(struct device * dev); | 367 | extern void put_device(struct device * dev); |
363 | extern struct device *device_find(const char *name, struct bus_type *bus); | ||
364 | 368 | ||
365 | 369 | ||
366 | /* drivers/base/platform.c */ | 370 | /* drivers/base/platform.c */ |
367 | 371 | ||
368 | struct platform_device { | 372 | struct platform_device { |
369 | char * name; | 373 | const char * name; |
370 | u32 id; | 374 | u32 id; |
371 | struct device dev; | 375 | struct device dev; |
372 | u32 num_resources; | 376 | u32 num_resources; |
diff --git a/include/linux/dm9000.h b/include/linux/dm9000.h new file mode 100644 index 000000000000..0008e2ad0c9f --- /dev/null +++ b/include/linux/dm9000.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* include/linux/dm9000.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * Header file for dm9000 platform data | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __DM9000_PLATFORM_DATA | ||
15 | #define __DM9000_PLATFORM_DATA __FILE__ | ||
16 | |||
17 | /* IO control flags */ | ||
18 | |||
19 | #define DM9000_PLATF_8BITONLY (0x0001) | ||
20 | #define DM9000_PLATF_16BITONLY (0x0002) | ||
21 | #define DM9000_PLATF_32BITONLY (0x0004) | ||
22 | |||
23 | /* platfrom data for platfrom device structure's platfrom_data field */ | ||
24 | |||
25 | struct dm9000_plat_data { | ||
26 | unsigned int flags; | ||
27 | |||
28 | /* allow replacement IO routines */ | ||
29 | |||
30 | void (*inblk)(void __iomem *reg, void *data, int len); | ||
31 | void (*outblk)(void __iomem *reg, void *data, int len); | ||
32 | void (*dumpblk)(void __iomem *reg, int len); | ||
33 | }; | ||
34 | |||
35 | #endif /* __DM9000_PLATFORM_DATA */ | ||
36 | |||
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 806c305332c1..2d80cc761a15 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -14,7 +14,12 @@ enum dma_data_direction { | |||
14 | }; | 14 | }; |
15 | 15 | ||
16 | #define DMA_64BIT_MASK 0xffffffffffffffffULL | 16 | #define DMA_64BIT_MASK 0xffffffffffffffffULL |
17 | #define DMA_40BIT_MASK 0x000000ffffffffffULL | ||
18 | #define DMA_39BIT_MASK 0x0000007fffffffffULL | ||
17 | #define DMA_32BIT_MASK 0x00000000ffffffffULL | 19 | #define DMA_32BIT_MASK 0x00000000ffffffffULL |
20 | #define DMA_31BIT_MASK 0x000000007fffffffULL | ||
21 | #define DMA_30BIT_MASK 0x000000003fffffffULL | ||
22 | #define DMA_29BIT_MASK 0x000000001fffffffULL | ||
18 | 23 | ||
19 | #include <asm/dma-mapping.h> | 24 | #include <asm/dma-mapping.h> |
20 | 25 | ||
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 220748b7abea..a1478258d002 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -56,18 +56,32 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * is_multicast_ether_addr - Determine if the given Ethernet address is a | ||
60 | * multicast address. | ||
61 | * | ||
62 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
63 | * | ||
64 | * Return true if the address is a multicast address. | ||
65 | */ | ||
66 | static inline int is_multicast_ether_addr(const u8 *addr) | ||
67 | { | ||
68 | return addr[0] & 0x01; | ||
69 | } | ||
70 | |||
71 | /** | ||
59 | * is_valid_ether_addr - Determine if the given Ethernet address is valid | 72 | * is_valid_ether_addr - Determine if the given Ethernet address is valid |
60 | * @addr: Pointer to a six-byte array containing the Ethernet address | 73 | * @addr: Pointer to a six-byte array containing the Ethernet address |
61 | * | 74 | * |
62 | * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not | 75 | * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not |
63 | * a multicast address, and is not FF:FF:FF:FF:FF:FF. The multicast | 76 | * a multicast address, and is not FF:FF:FF:FF:FF:FF. |
64 | * and FF:FF:... tests are combined into the single test "!(addr[0]&1)". | ||
65 | * | 77 | * |
66 | * Return true if the address is valid. | 78 | * Return true if the address is valid. |
67 | */ | 79 | */ |
68 | static inline int is_valid_ether_addr(const u8 *addr) | 80 | static inline int is_valid_ether_addr(const u8 *addr) |
69 | { | 81 | { |
70 | return !(addr[0]&1) && !is_zero_ether_addr(addr); | 82 | /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to |
83 | * explicitly check for it here. */ | ||
84 | return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); | ||
71 | } | 85 | } |
72 | 86 | ||
73 | /** | 87 | /** |
@@ -83,6 +97,6 @@ static inline void random_ether_addr(u8 *addr) | |||
83 | addr [0] &= 0xfe; /* clear multicast bit */ | 97 | addr [0] &= 0xfe; /* clear multicast bit */ |
84 | addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ | 98 | addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ |
85 | } | 99 | } |
86 | #endif | 100 | #endif /* __KERNEL__ */ |
87 | 101 | ||
88 | #endif /* _LINUX_ETHERDEVICE_H */ | 102 | #endif /* _LINUX_ETHERDEVICE_H */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c85b210490ea..a0ab26aab450 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -256,6 +256,7 @@ struct net_device; | |||
256 | u32 ethtool_op_get_link(struct net_device *dev); | 256 | u32 ethtool_op_get_link(struct net_device *dev); |
257 | u32 ethtool_op_get_tx_csum(struct net_device *dev); | 257 | u32 ethtool_op_get_tx_csum(struct net_device *dev); |
258 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); | 258 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); |
259 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); | ||
259 | u32 ethtool_op_get_sg(struct net_device *dev); | 260 | u32 ethtool_op_get_sg(struct net_device *dev); |
260 | int ethtool_op_set_sg(struct net_device *dev, u32 data); | 261 | int ethtool_op_set_sg(struct net_device *dev, u32 data); |
261 | u32 ethtool_op_get_tso(struct net_device *dev); | 262 | u32 ethtool_op_get_tso(struct net_device *dev); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 0180102dace1..9b8b696d4f15 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1657,6 +1657,52 @@ static inline void simple_transaction_set(struct file *file, size_t n) | |||
1657 | ar->size = n; | 1657 | ar->size = n; |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | /* | ||
1661 | * simple attribute files | ||
1662 | * | ||
1663 | * These attributes behave similar to those in sysfs: | ||
1664 | * | ||
1665 | * Writing to an attribute immediately sets a value, an open file can be | ||
1666 | * written to multiple times. | ||
1667 | * | ||
1668 | * Reading from an attribute creates a buffer from the value that might get | ||
1669 | * read with multiple read calls. When the attribute has been read | ||
1670 | * completely, no further read calls are possible until the file is opened | ||
1671 | * again. | ||
1672 | * | ||
1673 | * All attributes contain a text representation of a numeric value | ||
1674 | * that are accessed with the get() and set() functions. | ||
1675 | */ | ||
1676 | #define DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt) \ | ||
1677 | static int __fops ## _open(struct inode *inode, struct file *file) \ | ||
1678 | { \ | ||
1679 | __simple_attr_check_format(__fmt, 0ull); \ | ||
1680 | return simple_attr_open(inode, file, __get, __set, __fmt); \ | ||
1681 | } \ | ||
1682 | static struct file_operations __fops = { \ | ||
1683 | .owner = THIS_MODULE, \ | ||
1684 | .open = __fops ## _open, \ | ||
1685 | .release = simple_attr_close, \ | ||
1686 | .read = simple_attr_read, \ | ||
1687 | .write = simple_attr_write, \ | ||
1688 | }; | ||
1689 | |||
1690 | static inline void __attribute__((format(printf, 1, 2))) | ||
1691 | __simple_attr_check_format(const char *fmt, ...) | ||
1692 | { | ||
1693 | /* don't do anything, just let the compiler check the arguments; */ | ||
1694 | } | ||
1695 | |||
1696 | int simple_attr_open(struct inode *inode, struct file *file, | ||
1697 | u64 (*get)(void *), void (*set)(void *, u64), | ||
1698 | const char *fmt); | ||
1699 | int simple_attr_close(struct inode *inode, struct file *file); | ||
1700 | ssize_t simple_attr_read(struct file *file, char __user *buf, | ||
1701 | size_t len, loff_t *ppos); | ||
1702 | ssize_t simple_attr_write(struct file *file, const char __user *buf, | ||
1703 | size_t len, loff_t *ppos); | ||
1704 | |||
1705 | |||
1660 | #ifdef CONFIG_SECURITY | 1706 | #ifdef CONFIG_SECURITY |
1661 | static inline char *alloc_secdata(void) | 1707 | static inline char *alloc_secdata(void) |
1662 | { | 1708 | { |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index b1272f822cfa..cd623eccdbea 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -67,6 +67,8 @@ int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mo | |||
67 | void gameport_close(struct gameport *gameport); | 67 | void gameport_close(struct gameport *gameport); |
68 | void gameport_rescan(struct gameport *gameport); | 68 | void gameport_rescan(struct gameport *gameport); |
69 | 69 | ||
70 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) | ||
71 | |||
70 | void __gameport_register_port(struct gameport *gameport, struct module *owner); | 72 | void __gameport_register_port(struct gameport *gameport, struct module *owner); |
71 | static inline void gameport_register_port(struct gameport *gameport) | 73 | static inline void gameport_register_port(struct gameport *gameport) |
72 | { | 74 | { |
@@ -75,6 +77,29 @@ static inline void gameport_register_port(struct gameport *gameport) | |||
75 | 77 | ||
76 | void gameport_unregister_port(struct gameport *gameport); | 78 | void gameport_unregister_port(struct gameport *gameport); |
77 | 79 | ||
80 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) | ||
81 | __attribute__ ((format (printf, 2, 3))); | ||
82 | |||
83 | #else | ||
84 | |||
85 | static inline void gameport_register_port(struct gameport *gameport) | ||
86 | { | ||
87 | return; | ||
88 | } | ||
89 | |||
90 | static inline void gameport_unregister_port(struct gameport *gameport) | ||
91 | { | ||
92 | return; | ||
93 | } | ||
94 | |||
95 | static inline void gameport_set_phys(struct gameport *gameport, | ||
96 | const char *fmt, ...) | ||
97 | { | ||
98 | return; | ||
99 | } | ||
100 | |||
101 | #endif | ||
102 | |||
78 | static inline struct gameport *gameport_allocate_port(void) | 103 | static inline struct gameport *gameport_allocate_port(void) |
79 | { | 104 | { |
80 | struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); | 105 | struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); |
@@ -92,9 +117,6 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name | |||
92 | strlcpy(gameport->name, name, sizeof(gameport->name)); | 117 | strlcpy(gameport->name, name, sizeof(gameport->name)); |
93 | } | 118 | } |
94 | 119 | ||
95 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) | ||
96 | __attribute__ ((format (printf, 2, 3))); | ||
97 | |||
98 | /* | 120 | /* |
99 | * Use the following fucntions to manipulate gameport's per-port | 121 | * Use the following fucntions to manipulate gameport's per-port |
100 | * driver-specific data. | 122 | * driver-specific data. |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index ebc712e91066..8336dba18971 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -43,13 +43,17 @@ | |||
43 | #define __IRQ_MASK(x) ((1UL << (x))-1) | 43 | #define __IRQ_MASK(x) ((1UL << (x))-1) |
44 | 44 | ||
45 | #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) | 45 | #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) |
46 | #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) | ||
47 | #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) | 46 | #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) |
47 | #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) | ||
48 | 48 | ||
49 | #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) | 49 | #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) |
50 | #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) | 50 | #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) |
51 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) | 51 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) |
52 | 52 | ||
53 | #if PREEMPT_ACTIVE < (1 << (HARDIRQ_SHIFT + HARDIRQ_BITS)) | ||
54 | #error PREEMPT_ACTIVE is too low! | ||
55 | #endif | ||
56 | |||
53 | #define hardirq_count() (preempt_count() & HARDIRQ_MASK) | 57 | #define hardirq_count() (preempt_count() & HARDIRQ_MASK) |
54 | #define softirq_count() (preempt_count() & SOFTIRQ_MASK) | 58 | #define softirq_count() (preempt_count() & SOFTIRQ_MASK) |
55 | #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) | 59 | #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) |
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h index 503194e62fe1..ed2927ef1ff7 100644 --- a/include/linux/hdlc.h +++ b/include/linux/hdlc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Generic HDLC support routines for Linux | 2 | * Generic HDLC support routines for Linux |
3 | * | 3 | * |
4 | * Copyright (C) 1999-2003 Krzysztof Halasa <khc@pm.waw.pl> | 4 | * Copyright (C) 1999-2005 Krzysztof Halasa <khc@pm.waw.pl> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms of version 2 of the GNU General Public License | 7 | * under the terms of version 2 of the GNU General Public License |
@@ -41,6 +41,7 @@ | |||
41 | #define LMI_NONE 1 /* No LMI, all PVCs are static */ | 41 | #define LMI_NONE 1 /* No LMI, all PVCs are static */ |
42 | #define LMI_ANSI 2 /* ANSI Annex D */ | 42 | #define LMI_ANSI 2 /* ANSI Annex D */ |
43 | #define LMI_CCITT 3 /* ITU-T Annex A */ | 43 | #define LMI_CCITT 3 /* ITU-T Annex A */ |
44 | #define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */ | ||
44 | 45 | ||
45 | #define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */ | 46 | #define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */ |
46 | #define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */ | 47 | #define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */ |
@@ -89,6 +90,7 @@ typedef struct pvc_device_struct { | |||
89 | unsigned int deleted: 1; | 90 | unsigned int deleted: 1; |
90 | unsigned int fecn: 1; | 91 | unsigned int fecn: 1; |
91 | unsigned int becn: 1; | 92 | unsigned int becn: 1; |
93 | unsigned int bandwidth; /* Cisco LMI reporting only */ | ||
92 | }state; | 94 | }state; |
93 | }pvc_device; | 95 | }pvc_device; |
94 | 96 | ||
diff --git a/include/linux/i2c-sysfs.h b/include/linux/i2c-sysfs.h new file mode 100644 index 000000000000..d7bf6ce11679 --- /dev/null +++ b/include/linux/i2c-sysfs.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * i2c-sysfs.h - i2c chip driver sysfs defines | ||
3 | * | ||
4 | * Copyright (C) 2005 Yani Ioannou <yani.ioannou@gmail.com> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
19 | */ | ||
20 | #ifndef _LINUX_I2C_SYSFS_H | ||
21 | #define _LINUX_I2C_SYSFS_H | ||
22 | |||
23 | struct sensor_device_attribute{ | ||
24 | struct device_attribute dev_attr; | ||
25 | int index; | ||
26 | }; | ||
27 | #define to_sensor_dev_attr(_dev_attr) \ | ||
28 | container_of(_dev_attr, struct sensor_device_attribute, dev_attr) | ||
29 | |||
30 | #define SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index) \ | ||
31 | struct sensor_device_attribute sensor_dev_attr_##_name = { \ | ||
32 | .dev_attr = __ATTR(_name,_mode,_show,_store), \ | ||
33 | .index = _index, \ | ||
34 | } | ||
35 | |||
36 | #endif /* _LINUX_I2C_SYSFS_H */ | ||
diff --git a/include/linux/if.h b/include/linux/if.h index d73a9d62f208..ce627d9092ef 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #define IFF_LOOPBACK 0x8 /* is a loopback net */ | 33 | #define IFF_LOOPBACK 0x8 /* is a loopback net */ |
34 | #define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ | 34 | #define IFF_POINTOPOINT 0x10 /* interface is has p-p link */ |
35 | #define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ | 35 | #define IFF_NOTRAILERS 0x20 /* avoid use of trailers */ |
36 | #define IFF_RUNNING 0x40 /* resources allocated */ | 36 | #define IFF_RUNNING 0x40 /* interface running and carrier ok */ |
37 | #define IFF_NOARP 0x80 /* no ARP protocol */ | 37 | #define IFF_NOARP 0x80 /* no ARP protocol */ |
38 | #define IFF_PROMISC 0x100 /* receive all packets */ | 38 | #define IFF_PROMISC 0x100 /* receive all packets */ |
39 | #define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ | 39 | #define IFF_ALLMULTI 0x200 /* receive all multicast packets*/ |
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h index 0485b256d043..004e6f09a6e2 100644 --- a/include/linux/if_shaper.h +++ b/include/linux/if_shaper.h | |||
@@ -23,7 +23,7 @@ struct shaper | |||
23 | __u32 shapeclock; | 23 | __u32 shapeclock; |
24 | unsigned long recovery; /* Time we can next clock a packet out on | 24 | unsigned long recovery; /* Time we can next clock a packet out on |
25 | an empty queue */ | 25 | an empty queue */ |
26 | unsigned long locked; | 26 | struct semaphore sem; |
27 | struct net_device_stats stats; | 27 | struct net_device_stats stats; |
28 | struct net_device *dev; | 28 | struct net_device *dev; |
29 | int (*hard_start_xmit) (struct sk_buff *skb, | 29 | int (*hard_start_xmit) (struct sk_buff *skb, |
@@ -38,7 +38,6 @@ struct shaper | |||
38 | int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh); | 38 | int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh); |
39 | void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr); | 39 | void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr); |
40 | struct net_device_stats* (*get_stats)(struct net_device *dev); | 40 | struct net_device_stats* (*get_stats)(struct net_device *dev); |
41 | wait_queue_head_t wait_queue; | ||
42 | struct timer_list timer; | 41 | struct timer_list timer; |
43 | }; | 42 | }; |
44 | 43 | ||
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 6688b414c529..3fba9e2f5427 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #ifndef _LINUX_IF_TR_H | 19 | #ifndef _LINUX_IF_TR_H |
20 | #define _LINUX_IF_TR_H | 20 | #define _LINUX_IF_TR_H |
21 | 21 | ||
22 | #include <asm/byteorder.h> /* For __be16 */ | ||
23 | |||
22 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble | 24 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble |
23 | and FCS/CRC (frame check sequence). */ | 25 | and FCS/CRC (frame check sequence). */ |
24 | #define TR_ALEN 6 /* Octets in one token-ring addr */ | 26 | #define TR_ALEN 6 /* Octets in one token-ring addr */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 6fafb27877a7..7e1e15f934f3 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -29,6 +29,7 @@ struct ipv4_devconf | |||
29 | int no_xfrm; | 29 | int no_xfrm; |
30 | int no_policy; | 30 | int no_policy; |
31 | int force_igmp_version; | 31 | int force_igmp_version; |
32 | int promote_secondaries; | ||
32 | void *sysctl; | 33 | void *sysctl; |
33 | }; | 34 | }; |
34 | 35 | ||
@@ -71,6 +72,7 @@ struct in_device | |||
71 | #define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects) | 72 | #define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects) |
72 | #define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag) | 73 | #define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag) |
73 | #define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id) | 74 | #define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id) |
75 | #define IN_DEV_PROMOTE_SECONDARIES(in_dev) (ipv4_devconf.promote_secondaries || (in_dev)->cnf.promote_secondaries) | ||
74 | 76 | ||
75 | #define IN_DEV_RX_REDIRECTS(in_dev) \ | 77 | #define IN_DEV_RX_REDIRECTS(in_dev) \ |
76 | ((IN_DEV_FORWARD(in_dev) && \ | 78 | ((IN_DEV_FORWARD(in_dev) && \ |
diff --git a/include/linux/input.h b/include/linux/input.h index 72731d7d189e..9d9598ed760d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1015,7 +1015,7 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min | |||
1015 | dev->absbit[LONG(axis)] |= BIT(axis); | 1015 | dev->absbit[LONG(axis)] |= BIT(axis); |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | extern struct class_simple *input_class; | 1018 | extern struct class *input_class; |
1019 | 1019 | ||
1020 | #endif | 1020 | #endif |
1021 | #endif | 1021 | #endif |
diff --git a/include/linux/ip.h b/include/linux/ip.h index 8438c68591f9..31e7cedd9f84 100644 --- a/include/linux/ip.h +++ b/include/linux/ip.h | |||
@@ -81,6 +81,7 @@ | |||
81 | #ifdef __KERNEL__ | 81 | #ifdef __KERNEL__ |
82 | #include <linux/config.h> | 82 | #include <linux/config.h> |
83 | #include <linux/types.h> | 83 | #include <linux/types.h> |
84 | #include <net/request_sock.h> | ||
84 | #include <net/sock.h> | 85 | #include <net/sock.h> |
85 | #include <linux/igmp.h> | 86 | #include <linux/igmp.h> |
86 | #include <net/flow.h> | 87 | #include <net/flow.h> |
@@ -107,6 +108,26 @@ struct ip_options { | |||
107 | 108 | ||
108 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) | 109 | #define optlength(opt) (sizeof(struct ip_options) + opt->optlen) |
109 | 110 | ||
111 | struct inet_request_sock { | ||
112 | struct request_sock req; | ||
113 | u32 loc_addr; | ||
114 | u32 rmt_addr; | ||
115 | u16 rmt_port; | ||
116 | u16 snd_wscale : 4, | ||
117 | rcv_wscale : 4, | ||
118 | tstamp_ok : 1, | ||
119 | sack_ok : 1, | ||
120 | wscale_ok : 1, | ||
121 | ecn_ok : 1, | ||
122 | acked : 1; | ||
123 | struct ip_options *opt; | ||
124 | }; | ||
125 | |||
126 | static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk) | ||
127 | { | ||
128 | return (struct inet_request_sock *)sk; | ||
129 | } | ||
130 | |||
110 | struct ipv6_pinfo; | 131 | struct ipv6_pinfo; |
111 | 132 | ||
112 | struct inet_sock { | 133 | struct inet_sock { |
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index ab0d0efbf240..6fcd6a0ade24 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -193,6 +193,19 @@ struct inet6_skb_parm { | |||
193 | 193 | ||
194 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) | 194 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) |
195 | 195 | ||
196 | struct tcp6_request_sock { | ||
197 | struct tcp_request_sock req; | ||
198 | struct in6_addr loc_addr; | ||
199 | struct in6_addr rmt_addr; | ||
200 | struct sk_buff *pktopts; | ||
201 | int iif; | ||
202 | }; | ||
203 | |||
204 | static inline struct tcp6_request_sock *tcp6_rsk(const struct request_sock *sk) | ||
205 | { | ||
206 | return (struct tcp6_request_sock *)sk; | ||
207 | } | ||
208 | |||
196 | /** | 209 | /** |
197 | * struct ipv6_pinfo - ipv6 private area | 210 | * struct ipv6_pinfo - ipv6 private area |
198 | * | 211 | * |
diff --git a/include/linux/klist.h b/include/linux/klist.h new file mode 100644 index 000000000000..eebf5e5696ec --- /dev/null +++ b/include/linux/klist.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * klist.h - Some generic list helpers, extending struct list_head a bit. | ||
3 | * | ||
4 | * Implementations are found in lib/klist.c | ||
5 | * | ||
6 | * | ||
7 | * Copyright (C) 2005 Patrick Mochel | ||
8 | * | ||
9 | * This file is rleased under the GPL v2. | ||
10 | */ | ||
11 | |||
12 | #include <linux/spinlock.h> | ||
13 | #include <linux/completion.h> | ||
14 | #include <linux/kref.h> | ||
15 | #include <linux/list.h> | ||
16 | |||
17 | |||
18 | struct klist { | ||
19 | spinlock_t k_lock; | ||
20 | struct list_head k_list; | ||
21 | }; | ||
22 | |||
23 | |||
24 | extern void klist_init(struct klist * k); | ||
25 | |||
26 | |||
27 | struct klist_node { | ||
28 | struct klist * n_klist; | ||
29 | struct list_head n_node; | ||
30 | struct kref n_ref; | ||
31 | struct completion n_removed; | ||
32 | }; | ||
33 | |||
34 | extern void klist_add_tail(struct klist * k, struct klist_node * n); | ||
35 | extern void klist_add_head(struct klist * k, struct klist_node * n); | ||
36 | |||
37 | extern void klist_del(struct klist_node * n); | ||
38 | extern void klist_remove(struct klist_node * n); | ||
39 | |||
40 | extern int klist_node_attached(struct klist_node * n); | ||
41 | |||
42 | |||
43 | struct klist_iter { | ||
44 | struct klist * i_klist; | ||
45 | struct list_head * i_head; | ||
46 | struct klist_node * i_cur; | ||
47 | }; | ||
48 | |||
49 | |||
50 | extern void klist_iter_init(struct klist * k, struct klist_iter * i); | ||
51 | extern void klist_iter_init_node(struct klist * k, struct klist_iter * i, | ||
52 | struct klist_node * n); | ||
53 | extern void klist_iter_exit(struct klist_iter * i); | ||
54 | extern struct klist_node * klist_next(struct klist_iter * i); | ||
55 | |||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 765d660d3bea..3b22304f12fd 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -33,7 +33,7 @@ | |||
33 | extern u64 hotplug_seqnum; | 33 | extern u64 hotplug_seqnum; |
34 | 34 | ||
35 | struct kobject { | 35 | struct kobject { |
36 | char * k_name; | 36 | const char * k_name; |
37 | char name[KOBJ_NAME_LEN]; | 37 | char name[KOBJ_NAME_LEN]; |
38 | struct kref kref; | 38 | struct kref kref; |
39 | struct list_head entry; | 39 | struct list_head entry; |
@@ -46,7 +46,7 @@ struct kobject { | |||
46 | extern int kobject_set_name(struct kobject *, const char *, ...) | 46 | extern int kobject_set_name(struct kobject *, const char *, ...) |
47 | __attribute__((format(printf,2,3))); | 47 | __attribute__((format(printf,2,3))); |
48 | 48 | ||
49 | static inline char * kobject_name(struct kobject * kobj) | 49 | static inline const char * kobject_name(const struct kobject * kobj) |
50 | { | 50 | { |
51 | return kobj->k_name; | 51 | return kobj->k_name; |
52 | } | 52 | } |
@@ -57,7 +57,7 @@ extern void kobject_cleanup(struct kobject *); | |||
57 | extern int kobject_add(struct kobject *); | 57 | extern int kobject_add(struct kobject *); |
58 | extern void kobject_del(struct kobject *); | 58 | extern void kobject_del(struct kobject *); |
59 | 59 | ||
60 | extern int kobject_rename(struct kobject *, char *new_name); | 60 | extern int kobject_rename(struct kobject *, const char *new_name); |
61 | 61 | ||
62 | extern int kobject_register(struct kobject *); | 62 | extern int kobject_register(struct kobject *); |
63 | extern void kobject_unregister(struct kobject *); | 63 | extern void kobject_unregister(struct kobject *); |
@@ -94,7 +94,7 @@ struct kobj_type { | |||
94 | */ | 94 | */ |
95 | struct kset_hotplug_ops { | 95 | struct kset_hotplug_ops { |
96 | int (*filter)(struct kset *kset, struct kobject *kobj); | 96 | int (*filter)(struct kset *kset, struct kobject *kobj); |
97 | char *(*name)(struct kset *kset, struct kobject *kobj); | 97 | const char *(*name)(struct kset *kset, struct kobject *kobj); |
98 | int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, | 98 | int (*hotplug)(struct kset *kset, struct kobject *kobj, char **envp, |
99 | int num_envp, char *buffer, int buffer_size); | 99 | int num_envp, char *buffer, int buffer_size); |
100 | }; | 100 | }; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 1f7e2039a04e..6cd9ba63563b 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -410,6 +410,7 @@ extern u8 ata_chk_err(struct ata_port *ap); | |||
410 | extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf); | 410 | extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf); |
411 | extern int ata_port_start (struct ata_port *ap); | 411 | extern int ata_port_start (struct ata_port *ap); |
412 | extern void ata_port_stop (struct ata_port *ap); | 412 | extern void ata_port_stop (struct ata_port *ap); |
413 | extern void ata_host_stop (struct ata_host_set *host_set); | ||
413 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); | 414 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); |
414 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 415 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
415 | extern int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 416 | extern int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -420,6 +421,7 @@ extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, | |||
420 | extern unsigned int ata_dev_classify(struct ata_taskfile *tf); | 421 | extern unsigned int ata_dev_classify(struct ata_taskfile *tf); |
421 | extern void ata_dev_id_string(u16 *id, unsigned char *s, | 422 | extern void ata_dev_id_string(u16 *id, unsigned char *s, |
422 | unsigned int ofs, unsigned int len); | 423 | unsigned int ofs, unsigned int len); |
424 | extern void ata_dev_config(struct ata_port *ap, unsigned int i); | ||
423 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 425 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
424 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 426 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
425 | extern void ata_bmdma_stop(struct ata_port *ap); | 427 | extern void ata_bmdma_stop(struct ata_port *ap); |
@@ -466,12 +468,34 @@ static inline u8 ata_chk_status(struct ata_port *ap) | |||
466 | return ap->ops->check_status(ap); | 468 | return ap->ops->check_status(ap); |
467 | } | 469 | } |
468 | 470 | ||
471 | |||
472 | /** | ||
473 | * ata_pause - Flush writes and pause 400 nanoseconds. | ||
474 | * @ap: Port to wait for. | ||
475 | * | ||
476 | * LOCKING: | ||
477 | * Inherited from caller. | ||
478 | */ | ||
479 | |||
469 | static inline void ata_pause(struct ata_port *ap) | 480 | static inline void ata_pause(struct ata_port *ap) |
470 | { | 481 | { |
471 | ata_altstatus(ap); | 482 | ata_altstatus(ap); |
472 | ndelay(400); | 483 | ndelay(400); |
473 | } | 484 | } |
474 | 485 | ||
486 | |||
487 | /** | ||
488 | * ata_busy_wait - Wait for a port status register | ||
489 | * @ap: Port to wait for. | ||
490 | * | ||
491 | * Waits up to max*10 microseconds for the selected bits in the port's | ||
492 | * status register to be cleared. | ||
493 | * Returns final value of status register. | ||
494 | * | ||
495 | * LOCKING: | ||
496 | * Inherited from caller. | ||
497 | */ | ||
498 | |||
475 | static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, | 499 | static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, |
476 | unsigned int max) | 500 | unsigned int max) |
477 | { | 501 | { |
@@ -486,6 +510,18 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, | |||
486 | return status; | 510 | return status; |
487 | } | 511 | } |
488 | 512 | ||
513 | |||
514 | /** | ||
515 | * ata_wait_idle - Wait for a port to be idle. | ||
516 | * @ap: Port to wait for. | ||
517 | * | ||
518 | * Waits up to 10ms for port's BUSY and DRQ signals to clear. | ||
519 | * Returns final value of status register. | ||
520 | * | ||
521 | * LOCKING: | ||
522 | * Inherited from caller. | ||
523 | */ | ||
524 | |||
489 | static inline u8 ata_wait_idle(struct ata_port *ap) | 525 | static inline u8 ata_wait_idle(struct ata_port *ap) |
490 | { | 526 | { |
491 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 527 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
@@ -524,6 +560,18 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns | |||
524 | tf->device = ATA_DEVICE_OBS | ATA_DEV1; | 560 | tf->device = ATA_DEVICE_OBS | ATA_DEV1; |
525 | } | 561 | } |
526 | 562 | ||
563 | |||
564 | /** | ||
565 | * ata_irq_on - Enable interrupts on a port. | ||
566 | * @ap: Port on which interrupts are enabled. | ||
567 | * | ||
568 | * Enable interrupts on a legacy IDE device using MMIO or PIO, | ||
569 | * wait for idle, clear any pending interrupts. | ||
570 | * | ||
571 | * LOCKING: | ||
572 | * Inherited from caller. | ||
573 | */ | ||
574 | |||
527 | static inline u8 ata_irq_on(struct ata_port *ap) | 575 | static inline u8 ata_irq_on(struct ata_port *ap) |
528 | { | 576 | { |
529 | struct ata_ioports *ioaddr = &ap->ioaddr; | 577 | struct ata_ioports *ioaddr = &ap->ioaddr; |
@@ -543,6 +591,18 @@ static inline u8 ata_irq_on(struct ata_port *ap) | |||
543 | return tmp; | 591 | return tmp; |
544 | } | 592 | } |
545 | 593 | ||
594 | |||
595 | /** | ||
596 | * ata_irq_ack - Acknowledge a device interrupt. | ||
597 | * @ap: Port on which interrupts are enabled. | ||
598 | * | ||
599 | * Wait up to 10 ms for legacy IDE device to become idle (BUSY | ||
600 | * or BUSY+DRQ clear). Obtain dma status and port status from | ||
601 | * device. Clear the interrupt. Return port status. | ||
602 | * | ||
603 | * LOCKING: | ||
604 | */ | ||
605 | |||
546 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) | 606 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) |
547 | { | 607 | { |
548 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; | 608 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; |
diff --git a/include/linux/major.h b/include/linux/major.h index 4b62c42b842c..e36a46702d94 100644 --- a/include/linux/major.h +++ b/include/linux/major.h | |||
@@ -100,6 +100,7 @@ | |||
100 | #define I2O_MAJOR 80 /* 80->87 */ | 100 | #define I2O_MAJOR 80 /* 80->87 */ |
101 | 101 | ||
102 | #define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */ | 102 | #define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */ |
103 | #define SCSI_CHANGER_MAJOR 86 | ||
103 | 104 | ||
104 | #define IDE6_MAJOR 88 | 105 | #define IDE6_MAJOR 88 |
105 | #define IDE7_MAJOR 89 | 106 | #define IDE7_MAJOR 89 |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index b25bd02720d3..ba5d1236aa17 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -204,7 +204,7 @@ struct hh_cache | |||
204 | /* cached hardware header; allow for machine alignment needs. */ | 204 | /* cached hardware header; allow for machine alignment needs. */ |
205 | #define HH_DATA_MOD 16 | 205 | #define HH_DATA_MOD 16 |
206 | #define HH_DATA_OFF(__len) \ | 206 | #define HH_DATA_OFF(__len) \ |
207 | (HH_DATA_MOD - ((__len) & (HH_DATA_MOD - 1))) | 207 | (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1)) |
208 | #define HH_DATA_ALIGN(__len) \ | 208 | #define HH_DATA_ALIGN(__len) \ |
209 | (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) | 209 | (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) |
210 | unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; | 210 | unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; |
@@ -401,7 +401,7 @@ struct net_device | |||
401 | } reg_state; | 401 | } reg_state; |
402 | 402 | ||
403 | /* Net device features */ | 403 | /* Net device features */ |
404 | int features; | 404 | unsigned long features; |
405 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | 405 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ |
406 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | 406 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ |
407 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | 407 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ |
@@ -913,6 +913,7 @@ extern void dev_mc_discard(struct net_device *dev); | |||
913 | extern void dev_set_promiscuity(struct net_device *dev, int inc); | 913 | extern void dev_set_promiscuity(struct net_device *dev, int inc); |
914 | extern void dev_set_allmulti(struct net_device *dev, int inc); | 914 | extern void dev_set_allmulti(struct net_device *dev, int inc); |
915 | extern void netdev_state_change(struct net_device *dev); | 915 | extern void netdev_state_change(struct net_device *dev); |
916 | extern void netdev_features_change(struct net_device *dev); | ||
916 | /* Load a device via the kmod */ | 917 | /* Load a device via the kmod */ |
917 | extern void dev_load(const char *name); | 918 | extern void dev_load(const char *name); |
918 | extern void dev_mcast_init(void); | 919 | extern void dev_mcast_init(void); |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index b2738ac8bc99..561d4dc75836 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ | 14 | #define NETLINK_SELINUX 7 /* SELinux event notifications */ |
15 | #define NETLINK_ARPD 8 | 15 | #define NETLINK_ARPD 8 |
16 | #define NETLINK_AUDIT 9 /* auditing */ | 16 | #define NETLINK_AUDIT 9 /* auditing */ |
17 | #define NETLINK_FIB_LOOKUP 10 | ||
17 | #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ | 18 | #define NETLINK_ROUTE6 11 /* af_inet6 route comm channel */ |
18 | #define NETLINK_IP6_FW 13 | 19 | #define NETLINK_IP6_FW 13 |
19 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ | 20 | #define NETLINK_DNRTMSG 14 /* DECnet routing messages */ |
@@ -156,7 +157,7 @@ struct netlink_notify | |||
156 | }; | 157 | }; |
157 | 158 | ||
158 | static __inline__ struct nlmsghdr * | 159 | static __inline__ struct nlmsghdr * |
159 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len) | 160 | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) |
160 | { | 161 | { |
161 | struct nlmsghdr *nlh; | 162 | struct nlmsghdr *nlh; |
162 | int size = NLMSG_LENGTH(len); | 163 | int size = NLMSG_LENGTH(len); |
@@ -164,15 +165,31 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len) | |||
164 | nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size)); | 165 | nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size)); |
165 | nlh->nlmsg_type = type; | 166 | nlh->nlmsg_type = type; |
166 | nlh->nlmsg_len = size; | 167 | nlh->nlmsg_len = size; |
167 | nlh->nlmsg_flags = 0; | 168 | nlh->nlmsg_flags = flags; |
168 | nlh->nlmsg_pid = pid; | 169 | nlh->nlmsg_pid = pid; |
169 | nlh->nlmsg_seq = seq; | 170 | nlh->nlmsg_seq = seq; |
170 | return nlh; | 171 | return nlh; |
171 | } | 172 | } |
172 | 173 | ||
174 | #define NLMSG_NEW(skb, pid, seq, type, len, flags) \ | ||
175 | ({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) \ | ||
176 | goto nlmsg_failure; \ | ||
177 | __nlmsg_put(skb, pid, seq, type, len, flags); }) | ||
178 | |||
173 | #define NLMSG_PUT(skb, pid, seq, type, len) \ | 179 | #define NLMSG_PUT(skb, pid, seq, type, len) \ |
174 | ({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) goto nlmsg_failure; \ | 180 | NLMSG_NEW(skb, pid, seq, type, len, 0) |
175 | __nlmsg_put(skb, pid, seq, type, len); }) | 181 | |
182 | #define NLMSG_NEW_ANSWER(skb, cb, type, len, flags) \ | ||
183 | NLMSG_NEW(skb, NETLINK_CB((cb)->skb).pid, \ | ||
184 | (cb)->nlh->nlmsg_seq, type, len, flags) | ||
185 | |||
186 | #define NLMSG_END(skb, nlh) \ | ||
187 | ({ (nlh)->nlmsg_len = (skb)->tail - (unsigned char *) (nlh); \ | ||
188 | (skb)->len; }) | ||
189 | |||
190 | #define NLMSG_CANCEL(skb, nlh) \ | ||
191 | ({ skb_trim(skb, (unsigned char *) (nlh) - (skb)->data); \ | ||
192 | -1; }) | ||
176 | 193 | ||
177 | extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, | 194 | extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, |
178 | struct nlmsghdr *nlh, | 195 | struct nlmsghdr *nlh, |
diff --git a/include/linux/node.h b/include/linux/node.h index 6e0a697e594e..254dc3de650b 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -27,6 +27,7 @@ struct node { | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | extern int register_node(struct node *, int, struct node *); | 29 | extern int register_node(struct node *, int, struct node *); |
30 | extern void unregister_node(struct node *node); | ||
30 | 31 | ||
31 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 32 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
32 | 33 | ||
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 9303a003e9ab..5937dd6053c3 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -56,6 +56,7 @@ extern int notifier_call_chain(struct notifier_block **n, unsigned long val, voi | |||
56 | #define NETDEV_CHANGEADDR 0x0008 | 56 | #define NETDEV_CHANGEADDR 0x0008 |
57 | #define NETDEV_GOING_DOWN 0x0009 | 57 | #define NETDEV_GOING_DOWN 0x0009 |
58 | #define NETDEV_CHANGENAME 0x000A | 58 | #define NETDEV_CHANGENAME 0x000A |
59 | #define NETDEV_FEAT_CHANGE 0x000B | ||
59 | 60 | ||
60 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 61 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
61 | #define SYS_RESTART SYS_DOWN | 62 | #define SYS_RESTART SYS_DOWN |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 7ccbc2e4272c..b8b4ebf9abf1 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -874,6 +874,7 @@ | |||
874 | #define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 | 874 | #define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 |
875 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 | 875 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 |
876 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d | 876 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d |
877 | #define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e | ||
877 | #define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 | 878 | #define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 |
878 | #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032 | 879 | #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032 |
879 | #define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033 | 880 | #define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033 |
@@ -1230,6 +1231,12 @@ | |||
1230 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 | 1231 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 |
1231 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 | 1232 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 |
1232 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B | 1233 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B |
1234 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 | ||
1235 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | ||
1236 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | ||
1237 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | ||
1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | ||
1239 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | ||
1233 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 | 1240 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 |
1234 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 | 1241 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 |
1235 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 | 1242 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 |
@@ -2376,6 +2383,8 @@ | |||
2376 | #define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582 | 2383 | #define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582 |
2377 | #define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590 | 2384 | #define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590 |
2378 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 | 2385 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 |
2386 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 | ||
2387 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 | ||
2379 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 | 2388 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 |
2380 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 | 2389 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 |
2381 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 | 2390 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 |
diff --git a/include/linux/pfkeyv2.h b/include/linux/pfkeyv2.h index e6b519220245..724066778aff 100644 --- a/include/linux/pfkeyv2.h +++ b/include/linux/pfkeyv2.h | |||
@@ -245,6 +245,7 @@ struct sadb_x_nat_t_port { | |||
245 | 245 | ||
246 | /* Security Association flags */ | 246 | /* Security Association flags */ |
247 | #define SADB_SAFLAGS_PFS 1 | 247 | #define SADB_SAFLAGS_PFS 1 |
248 | #define SADB_SAFLAGS_NOPMTUDISC 0x20000000 | ||
248 | #define SADB_SAFLAGS_DECAP_DSCP 0x40000000 | 249 | #define SADB_SAFLAGS_DECAP_DSCP 0x40000000 |
249 | #define SADB_SAFLAGS_NOECN 0x80000000 | 250 | #define SADB_SAFLAGS_NOECN 0x80000000 |
250 | 251 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 91ac97c20777..e68dbf0bf579 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -89,6 +89,13 @@ enum { | |||
89 | RTM_GETANYCAST = 62, | 89 | RTM_GETANYCAST = 62, |
90 | #define RTM_GETANYCAST RTM_GETANYCAST | 90 | #define RTM_GETANYCAST RTM_GETANYCAST |
91 | 91 | ||
92 | RTM_NEWNEIGHTBL = 64, | ||
93 | #define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL | ||
94 | RTM_GETNEIGHTBL = 66, | ||
95 | #define RTM_GETNEIGHTBL RTM_GETNEIGHTBL | ||
96 | RTM_SETNEIGHTBL, | ||
97 | #define RTM_SETNEIGHTBL RTM_SETNEIGHTBL | ||
98 | |||
92 | __RTM_MAX, | 99 | __RTM_MAX, |
93 | #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) | 100 | #define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1) |
94 | }; | 101 | }; |
@@ -493,6 +500,106 @@ struct nda_cacheinfo | |||
493 | __u32 ndm_refcnt; | 500 | __u32 ndm_refcnt; |
494 | }; | 501 | }; |
495 | 502 | ||
503 | |||
504 | /***************************************************************** | ||
505 | * Neighbour tables specific messages. | ||
506 | * | ||
507 | * To retrieve the neighbour tables send RTM_GETNEIGHTBL with the | ||
508 | * NLM_F_DUMP flag set. Every neighbour table configuration is | ||
509 | * spread over multiple messages to avoid running into message | ||
510 | * size limits on systems with many interfaces. The first message | ||
511 | * in the sequence transports all not device specific data such as | ||
512 | * statistics, configuration, and the default parameter set. | ||
513 | * This message is followed by 0..n messages carrying device | ||
514 | * specific parameter sets. | ||
515 | * Although the ordering should be sufficient, NDTA_NAME can be | ||
516 | * used to identify sequences. The initial message can be identified | ||
517 | * by checking for NDTA_CONFIG. The device specific messages do | ||
518 | * not contain this TLV but have NDTPA_IFINDEX set to the | ||
519 | * corresponding interface index. | ||
520 | * | ||
521 | * To change neighbour table attributes, send RTM_SETNEIGHTBL | ||
522 | * with NDTA_NAME set. Changeable attribute include NDTA_THRESH[1-3], | ||
523 | * NDTA_GC_INTERVAL, and all TLVs in NDTA_PARMS unless marked | ||
524 | * otherwise. Device specific parameter sets can be changed by | ||
525 | * setting NDTPA_IFINDEX to the interface index of the corresponding | ||
526 | * device. | ||
527 | ****/ | ||
528 | |||
529 | struct ndt_stats | ||
530 | { | ||
531 | __u64 ndts_allocs; | ||
532 | __u64 ndts_destroys; | ||
533 | __u64 ndts_hash_grows; | ||
534 | __u64 ndts_res_failed; | ||
535 | __u64 ndts_lookups; | ||
536 | __u64 ndts_hits; | ||
537 | __u64 ndts_rcv_probes_mcast; | ||
538 | __u64 ndts_rcv_probes_ucast; | ||
539 | __u64 ndts_periodic_gc_runs; | ||
540 | __u64 ndts_forced_gc_runs; | ||
541 | }; | ||
542 | |||
543 | enum { | ||
544 | NDTPA_UNSPEC, | ||
545 | NDTPA_IFINDEX, /* u32, unchangeable */ | ||
546 | NDTPA_REFCNT, /* u32, read-only */ | ||
547 | NDTPA_REACHABLE_TIME, /* u64, read-only, msecs */ | ||
548 | NDTPA_BASE_REACHABLE_TIME, /* u64, msecs */ | ||
549 | NDTPA_RETRANS_TIME, /* u64, msecs */ | ||
550 | NDTPA_GC_STALETIME, /* u64, msecs */ | ||
551 | NDTPA_DELAY_PROBE_TIME, /* u64, msecs */ | ||
552 | NDTPA_QUEUE_LEN, /* u32 */ | ||
553 | NDTPA_APP_PROBES, /* u32 */ | ||
554 | NDTPA_UCAST_PROBES, /* u32 */ | ||
555 | NDTPA_MCAST_PROBES, /* u32 */ | ||
556 | NDTPA_ANYCAST_DELAY, /* u64, msecs */ | ||
557 | NDTPA_PROXY_DELAY, /* u64, msecs */ | ||
558 | NDTPA_PROXY_QLEN, /* u32 */ | ||
559 | NDTPA_LOCKTIME, /* u64, msecs */ | ||
560 | __NDTPA_MAX | ||
561 | }; | ||
562 | #define NDTPA_MAX (__NDTPA_MAX - 1) | ||
563 | |||
564 | struct ndtmsg | ||
565 | { | ||
566 | __u8 ndtm_family; | ||
567 | __u8 ndtm_pad1; | ||
568 | __u16 ndtm_pad2; | ||
569 | }; | ||
570 | |||
571 | struct ndt_config | ||
572 | { | ||
573 | __u16 ndtc_key_len; | ||
574 | __u16 ndtc_entry_size; | ||
575 | __u32 ndtc_entries; | ||
576 | __u32 ndtc_last_flush; /* delta to now in msecs */ | ||
577 | __u32 ndtc_last_rand; /* delta to now in msecs */ | ||
578 | __u32 ndtc_hash_rnd; | ||
579 | __u32 ndtc_hash_mask; | ||
580 | __u32 ndtc_hash_chain_gc; | ||
581 | __u32 ndtc_proxy_qlen; | ||
582 | }; | ||
583 | |||
584 | enum { | ||
585 | NDTA_UNSPEC, | ||
586 | NDTA_NAME, /* char *, unchangeable */ | ||
587 | NDTA_THRESH1, /* u32 */ | ||
588 | NDTA_THRESH2, /* u32 */ | ||
589 | NDTA_THRESH3, /* u32 */ | ||
590 | NDTA_CONFIG, /* struct ndt_config, read-only */ | ||
591 | NDTA_PARMS, /* nested TLV NDTPA_* */ | ||
592 | NDTA_STATS, /* struct ndt_stats, read-only */ | ||
593 | NDTA_GC_INTERVAL, /* u64, msecs */ | ||
594 | __NDTA_MAX | ||
595 | }; | ||
596 | #define NDTA_MAX (__NDTA_MAX - 1) | ||
597 | |||
598 | #define NDTA_RTA(r) ((struct rtattr*)(((char*)(r)) + \ | ||
599 | NLMSG_ALIGN(sizeof(struct ndtmsg)))) | ||
600 | #define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg)) | ||
601 | |||
602 | |||
496 | /**** | 603 | /**** |
497 | * General form of address family dependent message. | 604 | * General form of address family dependent message. |
498 | ****/ | 605 | ****/ |
@@ -789,6 +896,75 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi | |||
789 | ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ | 896 | ({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \ |
790 | goto rtattr_failure; \ | 897 | goto rtattr_failure; \ |
791 | memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); }) | 898 | memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); }) |
899 | |||
900 | #define RTA_PUT_U8(skb, attrtype, value) \ | ||
901 | ({ u8 _tmp = (value); \ | ||
902 | RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); }) | ||
903 | |||
904 | #define RTA_PUT_U16(skb, attrtype, value) \ | ||
905 | ({ u16 _tmp = (value); \ | ||
906 | RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); }) | ||
907 | |||
908 | #define RTA_PUT_U32(skb, attrtype, value) \ | ||
909 | ({ u32 _tmp = (value); \ | ||
910 | RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); }) | ||
911 | |||
912 | #define RTA_PUT_U64(skb, attrtype, value) \ | ||
913 | ({ u64 _tmp = (value); \ | ||
914 | RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); }) | ||
915 | |||
916 | #define RTA_PUT_SECS(skb, attrtype, value) \ | ||
917 | RTA_PUT_U64(skb, attrtype, (value) / HZ) | ||
918 | |||
919 | #define RTA_PUT_MSECS(skb, attrtype, value) \ | ||
920 | RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value)) | ||
921 | |||
922 | #define RTA_PUT_STRING(skb, attrtype, value) \ | ||
923 | RTA_PUT(skb, attrtype, strlen(value) + 1, value) | ||
924 | |||
925 | #define RTA_PUT_FLAG(skb, attrtype) \ | ||
926 | RTA_PUT(skb, attrtype, 0, NULL); | ||
927 | |||
928 | #define RTA_NEST(skb, type) \ | ||
929 | ({ struct rtattr *__start = (struct rtattr *) (skb)->tail; \ | ||
930 | RTA_PUT(skb, type, 0, NULL); \ | ||
931 | __start; }) | ||
932 | |||
933 | #define RTA_NEST_END(skb, start) \ | ||
934 | ({ (start)->rta_len = ((skb)->tail - (unsigned char *) (start)); \ | ||
935 | (skb)->len; }) | ||
936 | |||
937 | #define RTA_NEST_CANCEL(skb, start) \ | ||
938 | ({ if (start) \ | ||
939 | skb_trim(skb, (unsigned char *) (start) - (skb)->data); \ | ||
940 | -1; }) | ||
941 | |||
942 | #define RTA_GET_U8(rta) \ | ||
943 | ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) \ | ||
944 | goto rtattr_failure; \ | ||
945 | *(u8 *) RTA_DATA(rta); }) | ||
946 | |||
947 | #define RTA_GET_U16(rta) \ | ||
948 | ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) \ | ||
949 | goto rtattr_failure; \ | ||
950 | *(u16 *) RTA_DATA(rta); }) | ||
951 | |||
952 | #define RTA_GET_U32(rta) \ | ||
953 | ({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) \ | ||
954 | goto rtattr_failure; \ | ||
955 | *(u32 *) RTA_DATA(rta); }) | ||
956 | |||
957 | #define RTA_GET_U64(rta) \ | ||
958 | ({ u64 _tmp; \ | ||
959 | if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) \ | ||
960 | goto rtattr_failure; \ | ||
961 | memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); \ | ||
962 | _tmp; }) | ||
963 | |||
964 | #define RTA_GET_FLAG(rta) (!!(rta)) | ||
965 | |||
966 | #define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ) | ||
967 | #define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta))) | ||
792 | 968 | ||
793 | static inline struct rtattr * | 969 | static inline struct rtattr * |
794 | __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) | 970 | __rta_reserve(struct sk_buff *skb, int attrtype, int attrlen) |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 0a98f5ec5cae..7be18b5e2fb4 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -231,10 +231,8 @@ extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | |||
231 | extern long do_sigpending(void __user *, unsigned long); | 231 | extern long do_sigpending(void __user *, unsigned long); |
232 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 232 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
233 | 233 | ||
234 | #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER | ||
235 | struct pt_regs; | 234 | struct pt_regs; |
236 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 235 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
237 | #endif | ||
238 | 236 | ||
239 | #endif /* __KERNEL__ */ | 237 | #endif /* __KERNEL__ */ |
240 | 238 | ||
diff --git a/include/linux/slab.h b/include/linux/slab.h index 7d66385ae750..76cf7e60216c 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -64,6 +64,7 @@ extern int kmem_cache_shrink(kmem_cache_t *); | |||
64 | extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); | 64 | extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); |
65 | extern void kmem_cache_free(kmem_cache_t *, void *); | 65 | extern void kmem_cache_free(kmem_cache_t *, void *); |
66 | extern unsigned int kmem_cache_size(kmem_cache_t *); | 66 | extern unsigned int kmem_cache_size(kmem_cache_t *); |
67 | extern const char *kmem_cache_name(kmem_cache_t *); | ||
67 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); | 68 | extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags); |
68 | 69 | ||
69 | /* Size description struct for general caches. */ | 70 | /* Size description struct for general caches. */ |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 772998147e3e..a17745c80a91 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -346,6 +346,7 @@ enum | |||
346 | NET_TCP_MODERATE_RCVBUF=106, | 346 | NET_TCP_MODERATE_RCVBUF=106, |
347 | NET_TCP_TSO_WIN_DIVISOR=107, | 347 | NET_TCP_TSO_WIN_DIVISOR=107, |
348 | NET_TCP_BIC_BETA=108, | 348 | NET_TCP_BIC_BETA=108, |
349 | NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109, | ||
349 | }; | 350 | }; |
350 | 351 | ||
351 | enum { | 352 | enum { |
@@ -399,6 +400,7 @@ enum | |||
399 | NET_IPV4_CONF_FORCE_IGMP_VERSION=17, | 400 | NET_IPV4_CONF_FORCE_IGMP_VERSION=17, |
400 | NET_IPV4_CONF_ARP_ANNOUNCE=18, | 401 | NET_IPV4_CONF_ARP_ANNOUNCE=18, |
401 | NET_IPV4_CONF_ARP_IGNORE=19, | 402 | NET_IPV4_CONF_ARP_IGNORE=19, |
403 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, | ||
402 | __NET_IPV4_CONF_MAX | 404 | __NET_IPV4_CONF_MAX |
403 | }; | 405 | }; |
404 | 406 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 38b58b30814a..392da5a6dacb 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -16,13 +16,13 @@ struct kobject; | |||
16 | struct module; | 16 | struct module; |
17 | 17 | ||
18 | struct attribute { | 18 | struct attribute { |
19 | char * name; | 19 | const char * name; |
20 | struct module * owner; | 20 | struct module * owner; |
21 | mode_t mode; | 21 | mode_t mode; |
22 | }; | 22 | }; |
23 | 23 | ||
24 | struct attribute_group { | 24 | struct attribute_group { |
25 | char * name; | 25 | const char * name; |
26 | struct attribute ** attrs; | 26 | struct attribute ** attrs; |
27 | }; | 27 | }; |
28 | 28 | ||
@@ -73,6 +73,7 @@ struct sysfs_dirent { | |||
73 | int s_type; | 73 | int s_type; |
74 | umode_t s_mode; | 74 | umode_t s_mode; |
75 | struct dentry * s_dentry; | 75 | struct dentry * s_dentry; |
76 | struct iattr * s_iattr; | ||
76 | }; | 77 | }; |
77 | 78 | ||
78 | #define SYSFS_ROOT 0x0001 | 79 | #define SYSFS_ROOT 0x0001 |
@@ -105,11 +106,11 @@ sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode); | |||
105 | extern void | 106 | extern void |
106 | sysfs_remove_file(struct kobject *, const struct attribute *); | 107 | sysfs_remove_file(struct kobject *, const struct attribute *); |
107 | 108 | ||
108 | extern int | 109 | extern int |
109 | sysfs_create_link(struct kobject * kobj, struct kobject * target, char * name); | 110 | sysfs_create_link(struct kobject * kobj, struct kobject * target, const char * name); |
110 | 111 | ||
111 | extern void | 112 | extern void |
112 | sysfs_remove_link(struct kobject *, char * name); | 113 | sysfs_remove_link(struct kobject *, const char * name); |
113 | 114 | ||
114 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); | 115 | int sysfs_create_bin_file(struct kobject * kobj, struct bin_attribute * attr); |
115 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); | 116 | int sysfs_remove_bin_file(struct kobject * kobj, struct bin_attribute * attr); |
@@ -153,12 +154,12 @@ static inline void sysfs_remove_file(struct kobject * k, const struct attribute | |||
153 | ; | 154 | ; |
154 | } | 155 | } |
155 | 156 | ||
156 | static inline int sysfs_create_link(struct kobject * k, struct kobject * t, char * n) | 157 | static inline int sysfs_create_link(struct kobject * k, struct kobject * t, const char * n) |
157 | { | 158 | { |
158 | return 0; | 159 | return 0; |
159 | } | 160 | } |
160 | 161 | ||
161 | static inline void sysfs_remove_link(struct kobject * k, char * name) | 162 | static inline void sysfs_remove_link(struct kobject * k, const char * name) |
162 | { | 163 | { |
163 | ; | 164 | ; |
164 | } | 165 | } |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index aa6b48bb4dcd..a6b2cc530af5 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -56,6 +56,36 @@ enum | |||
56 | TCF_META_ID_TCCLASSID, | 56 | TCF_META_ID_TCCLASSID, |
57 | TCF_META_ID_RTCLASSID, | 57 | TCF_META_ID_RTCLASSID, |
58 | TCF_META_ID_RTIIF, | 58 | TCF_META_ID_RTIIF, |
59 | TCF_META_ID_SK_FAMILY, | ||
60 | TCF_META_ID_SK_STATE, | ||
61 | TCF_META_ID_SK_REUSE, | ||
62 | TCF_META_ID_SK_BOUND_IF, | ||
63 | TCF_META_ID_SK_REFCNT, | ||
64 | TCF_META_ID_SK_SHUTDOWN, | ||
65 | TCF_META_ID_SK_PROTO, | ||
66 | TCF_META_ID_SK_TYPE, | ||
67 | TCF_META_ID_SK_RCVBUF, | ||
68 | TCF_META_ID_SK_RMEM_ALLOC, | ||
69 | TCF_META_ID_SK_WMEM_ALLOC, | ||
70 | TCF_META_ID_SK_OMEM_ALLOC, | ||
71 | TCF_META_ID_SK_WMEM_QUEUED, | ||
72 | TCF_META_ID_SK_RCV_QLEN, | ||
73 | TCF_META_ID_SK_SND_QLEN, | ||
74 | TCF_META_ID_SK_ERR_QLEN, | ||
75 | TCF_META_ID_SK_FORWARD_ALLOCS, | ||
76 | TCF_META_ID_SK_SNDBUF, | ||
77 | TCF_META_ID_SK_ALLOCS, | ||
78 | TCF_META_ID_SK_ROUTE_CAPS, | ||
79 | TCF_META_ID_SK_HASHENT, | ||
80 | TCF_META_ID_SK_LINGERTIME, | ||
81 | TCF_META_ID_SK_ACK_BACKLOG, | ||
82 | TCF_META_ID_SK_MAX_ACK_BACKLOG, | ||
83 | TCF_META_ID_SK_PRIO, | ||
84 | TCF_META_ID_SK_RCVLOWAT, | ||
85 | TCF_META_ID_SK_RCVTIMEO, | ||
86 | TCF_META_ID_SK_SNDTIMEO, | ||
87 | TCF_META_ID_SK_SENDMSG_OFF, | ||
88 | TCF_META_ID_SK_WRITE_PENDING, | ||
59 | __TCF_META_ID_MAX | 89 | __TCF_META_ID_MAX |
60 | }; | 90 | }; |
61 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) | 91 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) |
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index 14a55e3e3a50..97a7c9e03df5 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -230,6 +230,17 @@ struct tcp_options_received { | |||
230 | __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ | 230 | __u16 mss_clamp; /* Maximal mss, negotiated at connection setup */ |
231 | }; | 231 | }; |
232 | 232 | ||
233 | struct tcp_request_sock { | ||
234 | struct inet_request_sock req; | ||
235 | __u32 rcv_isn; | ||
236 | __u32 snt_isn; | ||
237 | }; | ||
238 | |||
239 | static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req) | ||
240 | { | ||
241 | return (struct tcp_request_sock *)req; | ||
242 | } | ||
243 | |||
233 | struct tcp_sock { | 244 | struct tcp_sock { |
234 | /* inet_sock has to be the first member of tcp_sock */ | 245 | /* inet_sock has to be the first member of tcp_sock */ |
235 | struct inet_sock inet; | 246 | struct inet_sock inet; |
@@ -368,22 +379,7 @@ struct tcp_sock { | |||
368 | 379 | ||
369 | __u32 total_retrans; /* Total retransmits for entire connection */ | 380 | __u32 total_retrans; /* Total retransmits for entire connection */ |
370 | 381 | ||
371 | /* The syn_wait_lock is necessary only to avoid proc interface having | 382 | struct request_sock_queue accept_queue; /* FIFO of established children */ |
372 | * to grab the main lock sock while browsing the listening hash | ||
373 | * (otherwise it's deadlock prone). | ||
374 | * This lock is acquired in read mode only from listening_get_next() | ||
375 | * and it's acquired in write mode _only_ from code that is actively | ||
376 | * changing the syn_wait_queue. All readers that are holding | ||
377 | * the master sock lock don't need to grab this lock in read mode | ||
378 | * too as the syn_wait_queue writes are always protected from | ||
379 | * the main sock lock. | ||
380 | */ | ||
381 | rwlock_t syn_wait_lock; | ||
382 | struct tcp_listen_opt *listen_opt; | ||
383 | |||
384 | /* FIFO of established children */ | ||
385 | struct open_request *accept_queue; | ||
386 | struct open_request *accept_queue_tail; | ||
387 | 383 | ||
388 | unsigned int keepalive_time; /* time before keep alive takes place */ | 384 | unsigned int keepalive_time; /* time before keep alive takes place */ |
389 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ | 385 | unsigned int keepalive_intvl; /* time interval between keep alive probes */ |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 41d1a644c9d4..3d508bf08402 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -287,15 +287,14 @@ struct usb_bus { | |||
287 | 287 | ||
288 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ | 288 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ |
289 | 289 | ||
290 | struct class_device class_dev; /* class device for this bus */ | 290 | struct class_device *class_dev; /* class device for this bus */ |
291 | struct kref kref; /* handles reference counting this bus */ | ||
291 | void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ | 292 | void (*release)(struct usb_bus *bus); /* function to destroy this bus's memory */ |
292 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) | 293 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) |
293 | struct mon_bus *mon_bus; /* non-null when associated */ | 294 | struct mon_bus *mon_bus; /* non-null when associated */ |
294 | int monitored; /* non-zero when monitored */ | 295 | int monitored; /* non-zero when monitored */ |
295 | #endif | 296 | #endif |
296 | }; | 297 | }; |
297 | #define to_usb_bus(d) container_of(d, struct usb_bus, class_dev) | ||
298 | |||
299 | 298 | ||
300 | /* -------------------------------------------------------------------------- */ | 299 | /* -------------------------------------------------------------------------- */ |
301 | 300 | ||
@@ -796,6 +795,10 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); | |||
796 | * of the iso_frame_desc array, and the number of errors is reported in | 795 | * of the iso_frame_desc array, and the number of errors is reported in |
797 | * error_count. Completion callbacks for ISO transfers will normally | 796 | * error_count. Completion callbacks for ISO transfers will normally |
798 | * (re)submit URBs to ensure a constant transfer rate. | 797 | * (re)submit URBs to ensure a constant transfer rate. |
798 | * | ||
799 | * Note that even fields marked "public" should not be touched by the driver | ||
800 | * when the urb is owned by the hcd, that is, since the call to | ||
801 | * usb_submit_urb() till the entry into the completion routine. | ||
799 | */ | 802 | */ |
800 | struct urb | 803 | struct urb |
801 | { | 804 | { |
@@ -803,12 +806,12 @@ struct urb | |||
803 | struct kref kref; /* reference count of the URB */ | 806 | struct kref kref; /* reference count of the URB */ |
804 | spinlock_t lock; /* lock for the URB */ | 807 | spinlock_t lock; /* lock for the URB */ |
805 | void *hcpriv; /* private data for host controller */ | 808 | void *hcpriv; /* private data for host controller */ |
806 | struct list_head urb_list; /* list pointer to all active urbs */ | ||
807 | int bandwidth; /* bandwidth for INT/ISO request */ | 809 | int bandwidth; /* bandwidth for INT/ISO request */ |
808 | atomic_t use_count; /* concurrent submissions counter */ | 810 | atomic_t use_count; /* concurrent submissions counter */ |
809 | u8 reject; /* submissions will fail */ | 811 | u8 reject; /* submissions will fail */ |
810 | 812 | ||
811 | /* public, documented fields in the urb that can be used by drivers */ | 813 | /* public, documented fields in the urb that can be used by drivers */ |
814 | struct list_head urb_list; /* list head for use by the urb owner */ | ||
812 | struct usb_device *dev; /* (in) pointer to associated device */ | 815 | struct usb_device *dev; /* (in) pointer to associated device */ |
813 | unsigned int pipe; /* (in) pipe information */ | 816 | unsigned int pipe; /* (in) pipe information */ |
814 | int status; /* (return) non-ISO status */ | 817 | int status; /* (return) non-ISO status */ |
diff --git a/include/linux/wireless.h b/include/linux/wireless.h index 2f51f2b6562e..ae485f9c916e 100644 --- a/include/linux/wireless.h +++ b/include/linux/wireless.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * This file define a set of standard wireless extensions | 2 | * This file define a set of standard wireless extensions |
3 | * | 3 | * |
4 | * Version : 17 21.6.04 | 4 | * Version : 18 12.3.05 |
5 | * | 5 | * |
6 | * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> | 6 | * Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com> |
7 | * Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved. | 7 | * Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef _LINUX_WIRELESS_H | 10 | #ifndef _LINUX_WIRELESS_H |
@@ -82,7 +82,7 @@ | |||
82 | * (there is some stuff that will be added in the future...) | 82 | * (there is some stuff that will be added in the future...) |
83 | * I just plan to increment with each new version. | 83 | * I just plan to increment with each new version. |
84 | */ | 84 | */ |
85 | #define WIRELESS_EXT 17 | 85 | #define WIRELESS_EXT 18 |
86 | 86 | ||
87 | /* | 87 | /* |
88 | * Changes : | 88 | * Changes : |
@@ -182,6 +182,21 @@ | |||
182 | * - Document (struct iw_quality *)->updated, add new flags (INVALID) | 182 | * - Document (struct iw_quality *)->updated, add new flags (INVALID) |
183 | * - Wireless Event capability in struct iw_range | 183 | * - Wireless Event capability in struct iw_range |
184 | * - Add support for relative TxPower (yick !) | 184 | * - Add support for relative TxPower (yick !) |
185 | * | ||
186 | * V17 to V18 (From Jouni Malinen <jkmaline@cc.hut.fi>) | ||
187 | * ---------- | ||
188 | * - Add support for WPA/WPA2 | ||
189 | * - Add extended encoding configuration (SIOCSIWENCODEEXT and | ||
190 | * SIOCGIWENCODEEXT) | ||
191 | * - Add SIOCSIWGENIE/SIOCGIWGENIE | ||
192 | * - Add SIOCSIWMLME | ||
193 | * - Add SIOCSIWPMKSA | ||
194 | * - Add struct iw_range bit field for supported encoding capabilities | ||
195 | * - Add optional scan request parameters for SIOCSIWSCAN | ||
196 | * - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA | ||
197 | * related parameters (extensible up to 4096 parameter values) | ||
198 | * - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE, | ||
199 | * IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND | ||
185 | */ | 200 | */ |
186 | 201 | ||
187 | /**************************** CONSTANTS ****************************/ | 202 | /**************************** CONSTANTS ****************************/ |
@@ -256,6 +271,30 @@ | |||
256 | #define SIOCSIWPOWER 0x8B2C /* set Power Management settings */ | 271 | #define SIOCSIWPOWER 0x8B2C /* set Power Management settings */ |
257 | #define SIOCGIWPOWER 0x8B2D /* get Power Management settings */ | 272 | #define SIOCGIWPOWER 0x8B2D /* get Power Management settings */ |
258 | 273 | ||
274 | /* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM). | ||
275 | * This ioctl uses struct iw_point and data buffer that includes IE id and len | ||
276 | * fields. More than one IE may be included in the request. Setting the generic | ||
277 | * IE to empty buffer (len=0) removes the generic IE from the driver. Drivers | ||
278 | * are allowed to generate their own WPA/RSN IEs, but in these cases, drivers | ||
279 | * are required to report the used IE as a wireless event, e.g., when | ||
280 | * associating with an AP. */ | ||
281 | #define SIOCSIWGENIE 0x8B30 /* set generic IE */ | ||
282 | #define SIOCGIWGENIE 0x8B31 /* get generic IE */ | ||
283 | |||
284 | /* WPA : IEEE 802.11 MLME requests */ | ||
285 | #define SIOCSIWMLME 0x8B16 /* request MLME operation; uses | ||
286 | * struct iw_mlme */ | ||
287 | /* WPA : Authentication mode parameters */ | ||
288 | #define SIOCSIWAUTH 0x8B32 /* set authentication mode params */ | ||
289 | #define SIOCGIWAUTH 0x8B33 /* get authentication mode params */ | ||
290 | |||
291 | /* WPA : Extended version of encoding configuration */ | ||
292 | #define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */ | ||
293 | #define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */ | ||
294 | |||
295 | /* WPA2 : PMKSA cache management */ | ||
296 | #define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */ | ||
297 | |||
259 | /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ | 298 | /* -------------------- DEV PRIVATE IOCTL LIST -------------------- */ |
260 | 299 | ||
261 | /* These 32 ioctl are wireless device private, for 16 commands. | 300 | /* These 32 ioctl are wireless device private, for 16 commands. |
@@ -297,6 +336,34 @@ | |||
297 | #define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */ | 336 | #define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */ |
298 | #define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */ | 337 | #define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */ |
299 | #define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */ | 338 | #define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */ |
339 | #define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..) | ||
340 | * (scan results); This includes id and | ||
341 | * length fields. One IWEVGENIE may | ||
342 | * contain more than one IE. Scan | ||
343 | * results may contain one or more | ||
344 | * IWEVGENIE events. */ | ||
345 | #define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure | ||
346 | * (struct iw_michaelmicfailure) | ||
347 | */ | ||
348 | #define IWEVASSOCREQIE 0x8C07 /* IEs used in (Re)Association Request. | ||
349 | * The data includes id and length | ||
350 | * fields and may contain more than one | ||
351 | * IE. This event is required in | ||
352 | * Managed mode if the driver | ||
353 | * generates its own WPA/RSN IE. This | ||
354 | * should be sent just before | ||
355 | * IWEVREGISTERED event for the | ||
356 | * association. */ | ||
357 | #define IWEVASSOCRESPIE 0x8C08 /* IEs used in (Re)Association | ||
358 | * Response. The data includes id and | ||
359 | * length fields and may contain more | ||
360 | * than one IE. This may be sent | ||
361 | * between IWEVASSOCREQIE and | ||
362 | * IWEVREGISTERED events for the | ||
363 | * association. */ | ||
364 | #define IWEVPMKIDCAND 0x8C09 /* PMKID candidate for RSN | ||
365 | * pre-authentication | ||
366 | * (struct iw_pmkid_cand) */ | ||
300 | 367 | ||
301 | #define IWEVFIRST 0x8C00 | 368 | #define IWEVFIRST 0x8C00 |
302 | 369 | ||
@@ -432,12 +499,94 @@ | |||
432 | #define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */ | 499 | #define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */ |
433 | #define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */ | 500 | #define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */ |
434 | #define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */ | 501 | #define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */ |
502 | /* struct iw_scan_req scan_type */ | ||
503 | #define IW_SCAN_TYPE_ACTIVE 0 | ||
504 | #define IW_SCAN_TYPE_PASSIVE 1 | ||
435 | /* Maximum size of returned data */ | 505 | /* Maximum size of returned data */ |
436 | #define IW_SCAN_MAX_DATA 4096 /* In bytes */ | 506 | #define IW_SCAN_MAX_DATA 4096 /* In bytes */ |
437 | 507 | ||
438 | /* Max number of char in custom event - use multiple of them if needed */ | 508 | /* Max number of char in custom event - use multiple of them if needed */ |
439 | #define IW_CUSTOM_MAX 256 /* In bytes */ | 509 | #define IW_CUSTOM_MAX 256 /* In bytes */ |
440 | 510 | ||
511 | /* Generic information element */ | ||
512 | #define IW_GENERIC_IE_MAX 1024 | ||
513 | |||
514 | /* MLME requests (SIOCSIWMLME / struct iw_mlme) */ | ||
515 | #define IW_MLME_DEAUTH 0 | ||
516 | #define IW_MLME_DISASSOC 1 | ||
517 | |||
518 | /* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */ | ||
519 | #define IW_AUTH_INDEX 0x0FFF | ||
520 | #define IW_AUTH_FLAGS 0xF000 | ||
521 | /* SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095) | ||
522 | * (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the | ||
523 | * parameter that is being set/get to; value will be read/written to | ||
524 | * struct iw_param value field) */ | ||
525 | #define IW_AUTH_WPA_VERSION 0 | ||
526 | #define IW_AUTH_CIPHER_PAIRWISE 1 | ||
527 | #define IW_AUTH_CIPHER_GROUP 2 | ||
528 | #define IW_AUTH_KEY_MGMT 3 | ||
529 | #define IW_AUTH_TKIP_COUNTERMEASURES 4 | ||
530 | #define IW_AUTH_DROP_UNENCRYPTED 5 | ||
531 | #define IW_AUTH_80211_AUTH_ALG 6 | ||
532 | #define IW_AUTH_WPA_ENABLED 7 | ||
533 | #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 | ||
534 | #define IW_AUTH_ROAMING_CONTROL 9 | ||
535 | #define IW_AUTH_PRIVACY_INVOKED 10 | ||
536 | |||
537 | /* IW_AUTH_WPA_VERSION values (bit field) */ | ||
538 | #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 | ||
539 | #define IW_AUTH_WPA_VERSION_WPA 0x00000002 | ||
540 | #define IW_AUTH_WPA_VERSION_WPA2 0x00000004 | ||
541 | |||
542 | /* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */ | ||
543 | #define IW_AUTH_CIPHER_NONE 0x00000001 | ||
544 | #define IW_AUTH_CIPHER_WEP40 0x00000002 | ||
545 | #define IW_AUTH_CIPHER_TKIP 0x00000004 | ||
546 | #define IW_AUTH_CIPHER_CCMP 0x00000008 | ||
547 | #define IW_AUTH_CIPHER_WEP104 0x00000010 | ||
548 | |||
549 | /* IW_AUTH_KEY_MGMT values (bit field) */ | ||
550 | #define IW_AUTH_KEY_MGMT_802_1X 1 | ||
551 | #define IW_AUTH_KEY_MGMT_PSK 2 | ||
552 | |||
553 | /* IW_AUTH_80211_AUTH_ALG values (bit field) */ | ||
554 | #define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001 | ||
555 | #define IW_AUTH_ALG_SHARED_KEY 0x00000002 | ||
556 | #define IW_AUTH_ALG_LEAP 0x00000004 | ||
557 | |||
558 | /* IW_AUTH_ROAMING_CONTROL values */ | ||
559 | #define IW_AUTH_ROAMING_ENABLE 0 /* driver/firmware based roaming */ | ||
560 | #define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming | ||
561 | * control */ | ||
562 | |||
563 | /* SIOCSIWENCODEEXT definitions */ | ||
564 | #define IW_ENCODE_SEQ_MAX_SIZE 8 | ||
565 | /* struct iw_encode_ext ->alg */ | ||
566 | #define IW_ENCODE_ALG_NONE 0 | ||
567 | #define IW_ENCODE_ALG_WEP 1 | ||
568 | #define IW_ENCODE_ALG_TKIP 2 | ||
569 | #define IW_ENCODE_ALG_CCMP 3 | ||
570 | /* struct iw_encode_ext ->ext_flags */ | ||
571 | #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 | ||
572 | #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 | ||
573 | #define IW_ENCODE_EXT_GROUP_KEY 0x00000004 | ||
574 | #define IW_ENCODE_EXT_SET_TX_KEY 0x00000008 | ||
575 | |||
576 | /* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */ | ||
577 | #define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */ | ||
578 | #define IW_MICFAILURE_GROUP 0x00000004 | ||
579 | #define IW_MICFAILURE_PAIRWISE 0x00000008 | ||
580 | #define IW_MICFAILURE_STAKEY 0x00000010 | ||
581 | #define IW_MICFAILURE_COUNT 0x00000060 /* 1 or 2 (0 = count not supported) | ||
582 | */ | ||
583 | |||
584 | /* Bit field values for enc_capa in struct iw_range */ | ||
585 | #define IW_ENC_CAPA_WPA 0x00000001 | ||
586 | #define IW_ENC_CAPA_WPA2 0x00000002 | ||
587 | #define IW_ENC_CAPA_CIPHER_TKIP 0x00000004 | ||
588 | #define IW_ENC_CAPA_CIPHER_CCMP 0x00000008 | ||
589 | |||
441 | /* Event capability macros - in (struct iw_range *)->event_capa | 590 | /* Event capability macros - in (struct iw_range *)->event_capa |
442 | * Because we have more than 32 possible events, we use an array of | 591 | * Because we have more than 32 possible events, we use an array of |
443 | * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ | 592 | * 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */ |
@@ -546,6 +695,132 @@ struct iw_thrspy | |||
546 | struct iw_quality high; /* High threshold */ | 695 | struct iw_quality high; /* High threshold */ |
547 | }; | 696 | }; |
548 | 697 | ||
698 | /* | ||
699 | * Optional data for scan request | ||
700 | * | ||
701 | * Note: these optional parameters are controlling parameters for the | ||
702 | * scanning behavior, these do not apply to getting scan results | ||
703 | * (SIOCGIWSCAN). Drivers are expected to keep a local BSS table and | ||
704 | * provide a merged results with all BSSes even if the previous scan | ||
705 | * request limited scanning to a subset, e.g., by specifying an SSID. | ||
706 | * Especially, scan results are required to include an entry for the | ||
707 | * current BSS if the driver is in Managed mode and associated with an AP. | ||
708 | */ | ||
709 | struct iw_scan_req | ||
710 | { | ||
711 | __u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */ | ||
712 | __u8 essid_len; | ||
713 | __u8 num_channels; /* num entries in channel_list; | ||
714 | * 0 = scan all allowed channels */ | ||
715 | __u8 flags; /* reserved as padding; use zero, this may | ||
716 | * be used in the future for adding flags | ||
717 | * to request different scan behavior */ | ||
718 | struct sockaddr bssid; /* ff:ff:ff:ff:ff:ff for broadcast BSSID or | ||
719 | * individual address of a specific BSS */ | ||
720 | |||
721 | /* | ||
722 | * Use this ESSID if IW_SCAN_THIS_ESSID flag is used instead of using | ||
723 | * the current ESSID. This allows scan requests for specific ESSID | ||
724 | * without having to change the current ESSID and potentially breaking | ||
725 | * the current association. | ||
726 | */ | ||
727 | __u8 essid[IW_ESSID_MAX_SIZE]; | ||
728 | |||
729 | /* | ||
730 | * Optional parameters for changing the default scanning behavior. | ||
731 | * These are based on the MLME-SCAN.request from IEEE Std 802.11. | ||
732 | * TU is 1.024 ms. If these are set to 0, driver is expected to use | ||
733 | * reasonable default values. min_channel_time defines the time that | ||
734 | * will be used to wait for the first reply on each channel. If no | ||
735 | * replies are received, next channel will be scanned after this. If | ||
736 | * replies are received, total time waited on the channel is defined by | ||
737 | * max_channel_time. | ||
738 | */ | ||
739 | __u32 min_channel_time; /* in TU */ | ||
740 | __u32 max_channel_time; /* in TU */ | ||
741 | |||
742 | struct iw_freq channel_list[IW_MAX_FREQUENCIES]; | ||
743 | }; | ||
744 | |||
745 | /* ------------------------- WPA SUPPORT ------------------------- */ | ||
746 | |||
747 | /* | ||
748 | * Extended data structure for get/set encoding (this is used with | ||
749 | * SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and IW_ENCODE_* | ||
750 | * flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and | ||
751 | * only the data contents changes (key data -> this structure, including | ||
752 | * key data). | ||
753 | * | ||
754 | * If the new key is the first group key, it will be set as the default | ||
755 | * TX key. Otherwise, default TX key index is only changed if | ||
756 | * IW_ENCODE_EXT_SET_TX_KEY flag is set. | ||
757 | * | ||
758 | * Key will be changed with SIOCSIWENCODEEXT in all cases except for | ||
759 | * special "change TX key index" operation which is indicated by setting | ||
760 | * key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY. | ||
761 | * | ||
762 | * tx_seq/rx_seq are only used when respective | ||
763 | * IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal | ||
764 | * TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start | ||
765 | * TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally | ||
766 | * used only by an Authenticator (AP or an IBSS station) to get the | ||
767 | * current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and | ||
768 | * RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for | ||
769 | * debugging/testing. | ||
770 | */ | ||
771 | struct iw_encode_ext | ||
772 | { | ||
773 | __u32 ext_flags; /* IW_ENCODE_EXT_* */ | ||
774 | __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ | ||
775 | __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ | ||
776 | struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast | ||
777 | * (group) keys or unicast address for | ||
778 | * individual keys */ | ||
779 | __u16 alg; /* IW_ENCODE_ALG_* */ | ||
780 | __u16 key_len; | ||
781 | __u8 key[0]; | ||
782 | }; | ||
783 | |||
784 | /* SIOCSIWMLME data */ | ||
785 | struct iw_mlme | ||
786 | { | ||
787 | __u16 cmd; /* IW_MLME_* */ | ||
788 | __u16 reason_code; | ||
789 | struct sockaddr addr; | ||
790 | }; | ||
791 | |||
792 | /* SIOCSIWPMKSA data */ | ||
793 | #define IW_PMKSA_ADD 1 | ||
794 | #define IW_PMKSA_REMOVE 2 | ||
795 | #define IW_PMKSA_FLUSH 3 | ||
796 | |||
797 | #define IW_PMKID_LEN 16 | ||
798 | |||
799 | struct iw_pmksa | ||
800 | { | ||
801 | __u32 cmd; /* IW_PMKSA_* */ | ||
802 | struct sockaddr bssid; | ||
803 | __u8 pmkid[IW_PMKID_LEN]; | ||
804 | }; | ||
805 | |||
806 | /* IWEVMICHAELMICFAILURE data */ | ||
807 | struct iw_michaelmicfailure | ||
808 | { | ||
809 | __u32 flags; | ||
810 | struct sockaddr src_addr; | ||
811 | __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ | ||
812 | }; | ||
813 | |||
814 | /* IWEVPMKIDCAND data */ | ||
815 | #define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled */ | ||
816 | struct iw_pmkid_cand | ||
817 | { | ||
818 | __u32 flags; /* IW_PMKID_CAND_* */ | ||
819 | __u32 index; /* the smaller the index, the higher the | ||
820 | * priority */ | ||
821 | struct sockaddr bssid; | ||
822 | }; | ||
823 | |||
549 | /* ------------------------ WIRELESS STATS ------------------------ */ | 824 | /* ------------------------ WIRELESS STATS ------------------------ */ |
550 | /* | 825 | /* |
551 | * Wireless statistics (used for /proc/net/wireless) | 826 | * Wireless statistics (used for /proc/net/wireless) |
@@ -725,6 +1000,8 @@ struct iw_range | |||
725 | struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */ | 1000 | struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */ |
726 | /* Note : this frequency list doesn't need to fit channel numbers, | 1001 | /* Note : this frequency list doesn't need to fit channel numbers, |
727 | * because each entry contain its channel index */ | 1002 | * because each entry contain its channel index */ |
1003 | |||
1004 | __u32 enc_capa; /* IW_ENC_CAPA_* bit field */ | ||
728 | }; | 1005 | }; |
729 | 1006 | ||
730 | /* | 1007 | /* |
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index fd2ef742a9fd..f0d423300d84 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -174,6 +174,8 @@ enum xfrm_attr_type_t { | |||
174 | XFRMA_ALG_COMP, /* struct xfrm_algo */ | 174 | XFRMA_ALG_COMP, /* struct xfrm_algo */ |
175 | XFRMA_ENCAP, /* struct xfrm_algo + struct xfrm_encap_tmpl */ | 175 | XFRMA_ENCAP, /* struct xfrm_algo + struct xfrm_encap_tmpl */ |
176 | XFRMA_TMPL, /* 1 or more struct xfrm_user_tmpl */ | 176 | XFRMA_TMPL, /* 1 or more struct xfrm_user_tmpl */ |
177 | XFRMA_SA, | ||
178 | XFRMA_POLICY, | ||
177 | __XFRMA_MAX | 179 | __XFRMA_MAX |
178 | 180 | ||
179 | #define XFRMA_MAX (__XFRMA_MAX - 1) | 181 | #define XFRMA_MAX (__XFRMA_MAX - 1) |
@@ -194,6 +196,7 @@ struct xfrm_usersa_info { | |||
194 | __u8 flags; | 196 | __u8 flags; |
195 | #define XFRM_STATE_NOECN 1 | 197 | #define XFRM_STATE_NOECN 1 |
196 | #define XFRM_STATE_DECAP_DSCP 2 | 198 | #define XFRM_STATE_DECAP_DSCP 2 |
199 | #define XFRM_STATE_NOPMTUDISC 4 | ||
197 | }; | 200 | }; |
198 | 201 | ||
199 | struct xfrm_usersa_id { | 202 | struct xfrm_usersa_id { |
@@ -257,5 +260,7 @@ struct xfrm_usersa_flush { | |||
257 | 260 | ||
258 | #define XFRMGRP_ACQUIRE 1 | 261 | #define XFRMGRP_ACQUIRE 1 |
259 | #define XFRMGRP_EXPIRE 2 | 262 | #define XFRMGRP_EXPIRE 2 |
263 | #define XFRMGRP_SA 4 | ||
264 | #define XFRMGRP_POLICY 8 | ||
260 | 265 | ||
261 | #endif /* _LINUX_XFRM_H */ | 266 | #endif /* _LINUX_XFRM_H */ |