diff options
69 files changed, 323 insertions, 751 deletions
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX index 02e56d447a8f..c485ee028bd9 100644 --- a/Documentation/networking/00-INDEX +++ b/Documentation/networking/00-INDEX | |||
@@ -84,9 +84,6 @@ policy-routing.txt | |||
84 | - IP policy-based routing | 84 | - IP policy-based routing |
85 | ray_cs.txt | 85 | ray_cs.txt |
86 | - Raylink Wireless LAN card driver info. | 86 | - Raylink Wireless LAN card driver info. |
87 | sk98lin.txt | ||
88 | - Marvell Yukon Chipset / SysKonnect SK-98xx compliant Gigabit | ||
89 | Ethernet Adapter family driver info | ||
90 | skfp.txt | 87 | skfp.txt |
91 | - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. | 88 | - SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info. |
92 | smc9.txt | 89 | smc9.txt |
diff --git a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt deleted file mode 100644 index 8590a954df1d..000000000000 --- a/Documentation/networking/sk98lin.txt +++ /dev/null | |||
@@ -1,568 +0,0 @@ | |||
1 | (C)Copyright 1999-2004 Marvell(R). | ||
2 | All rights reserved | ||
3 | =========================================================================== | ||
4 | |||
5 | sk98lin.txt created 13-Feb-2004 | ||
6 | |||
7 | Readme File for sk98lin v6.23 | ||
8 | Marvell Yukon/SysKonnect SK-98xx Gigabit Ethernet Adapter family driver for LINUX | ||
9 | |||
10 | This file contains | ||
11 | 1 Overview | ||
12 | 2 Required Files | ||
13 | 3 Installation | ||
14 | 3.1 Driver Installation | ||
15 | 3.2 Inclusion of adapter at system start | ||
16 | 4 Driver Parameters | ||
17 | 4.1 Per-Port Parameters | ||
18 | 4.2 Adapter Parameters | ||
19 | 5 Large Frame Support | ||
20 | 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad) | ||
21 | 7 Troubleshooting | ||
22 | |||
23 | =========================================================================== | ||
24 | |||
25 | |||
26 | 1 Overview | ||
27 | =========== | ||
28 | |||
29 | The sk98lin driver supports the Marvell Yukon and SysKonnect | ||
30 | SK-98xx/SK-95xx compliant Gigabit Ethernet Adapter on Linux. It has | ||
31 | been tested with Linux on Intel/x86 machines. | ||
32 | *** | ||
33 | |||
34 | |||
35 | 2 Required Files | ||
36 | ================= | ||
37 | |||
38 | The linux kernel source. | ||
39 | No additional files required. | ||
40 | *** | ||
41 | |||
42 | |||
43 | 3 Installation | ||
44 | =============== | ||
45 | |||
46 | It is recommended to download the latest version of the driver from the | ||
47 | SysKonnect web site www.syskonnect.com. If you have downloaded the latest | ||
48 | driver, the Linux kernel has to be patched before the driver can be | ||
49 | installed. For details on how to patch a Linux kernel, refer to the | ||
50 | patch.txt file. | ||
51 | |||
52 | 3.1 Driver Installation | ||
53 | ------------------------ | ||
54 | |||
55 | The following steps describe the actions that are required to install | ||
56 | the driver and to start it manually. These steps should be carried | ||
57 | out for the initial driver setup. Once confirmed to be ok, they can | ||
58 | be included in the system start. | ||
59 | |||
60 | NOTE 1: To perform the following tasks you need 'root' access. | ||
61 | |||
62 | NOTE 2: In case of problems, please read the section "Troubleshooting" | ||
63 | below. | ||
64 | |||
65 | The driver can either be integrated into the kernel or it can be compiled | ||
66 | as a module. Select the appropriate option during the kernel | ||
67 | configuration. | ||
68 | |||
69 | Compile/use the driver as a module | ||
70 | ---------------------------------- | ||
71 | To compile the driver, go to the directory /usr/src/linux and | ||
72 | execute the command "make menuconfig" or "make xconfig" and proceed as | ||
73 | follows: | ||
74 | |||
75 | To integrate the driver permanently into the kernel, proceed as follows: | ||
76 | |||
77 | 1. Select the menu "Network device support" and then "Ethernet(1000Mbit)" | ||
78 | 2. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" | ||
79 | with (*) | ||
80 | 3. Build a new kernel when the configuration of the above options is | ||
81 | finished. | ||
82 | 4. Install the new kernel. | ||
83 | 5. Reboot your system. | ||
84 | |||
85 | To use the driver as a module, proceed as follows: | ||
86 | |||
87 | 1. Enable 'loadable module support' in the kernel. | ||
88 | 2. For automatic driver start, enable the 'Kernel module loader'. | ||
89 | 3. Select the menu "Network device support" and then "Ethernet(1000Mbit)" | ||
90 | 4. Mark "Marvell Yukon Chipset / SysKonnect SK-98xx family support" | ||
91 | with (M) | ||
92 | 5. Execute the command "make modules". | ||
93 | 6. Execute the command "make modules_install". | ||
94 | The appropriate modules will be installed. | ||
95 | 7. Reboot your system. | ||
96 | |||
97 | |||
98 | Load the module manually | ||
99 | ------------------------ | ||
100 | To load the module manually, proceed as follows: | ||
101 | |||
102 | 1. Enter "modprobe sk98lin". | ||
103 | 2. If a Marvell Yukon or SysKonnect SK-98xx adapter is installed in | ||
104 | your computer and you have a /proc file system, execute the command: | ||
105 | "ls /proc/net/sk98lin/" | ||
106 | This should produce an output containing a line with the following | ||
107 | format: | ||
108 | eth0 eth1 ... | ||
109 | which indicates that your adapter has been found and initialized. | ||
110 | |||
111 | NOTE 1: If you have more than one Marvell Yukon or SysKonnect SK-98xx | ||
112 | adapter installed, the adapters will be listed as 'eth0', | ||
113 | 'eth1', 'eth2', etc. | ||
114 | For each adapter, repeat steps 3 and 4 below. | ||
115 | |||
116 | NOTE 2: If you have other Ethernet adapters installed, your Marvell | ||
117 | Yukon or SysKonnect SK-98xx adapter will be mapped to the | ||
118 | next available number, e.g. 'eth1'. The mapping is executed | ||
119 | automatically. | ||
120 | The module installation message (displayed either in a system | ||
121 | log file or on the console) prints a line for each adapter | ||
122 | found containing the corresponding 'ethX'. | ||
123 | |||
124 | 3. Select an IP address and assign it to the respective adapter by | ||
125 | entering: | ||
126 | ifconfig eth0 <ip-address> | ||
127 | With this command, the adapter is connected to the Ethernet. | ||
128 | |||
129 | SK-98xx Gigabit Ethernet Server Adapters: The yellow LED on the adapter | ||
130 | is now active, the link status LED of the primary port is active and | ||
131 | the link status LED of the secondary port (on dual port adapters) is | ||
132 | blinking (if the ports are connected to a switch or hub). | ||
133 | SK-98xx V2.0 Gigabit Ethernet Adapters: The link status LED is active. | ||
134 | In addition, you will receive a status message on the console stating | ||
135 | "ethX: network connection up using port Y" and showing the selected | ||
136 | connection parameters (x stands for the ethernet device number | ||
137 | (0,1,2, etc), y stands for the port name (A or B)). | ||
138 | |||
139 | NOTE: If you are in doubt about IP addresses, ask your network | ||
140 | administrator for assistance. | ||
141 | |||
142 | 4. Your adapter should now be fully operational. | ||
143 | Use 'ping <otherstation>' to verify the connection to other computers | ||
144 | on your network. | ||
145 | 5. To check the adapter configuration view /proc/net/sk98lin/[devicename]. | ||
146 | For example by executing: | ||
147 | "cat /proc/net/sk98lin/eth0" | ||
148 | |||
149 | Unload the module | ||
150 | ----------------- | ||
151 | To stop and unload the driver modules, proceed as follows: | ||
152 | |||
153 | 1. Execute the command "ifconfig eth0 down". | ||
154 | 2. Execute the command "rmmod sk98lin". | ||
155 | |||
156 | 3.2 Inclusion of adapter at system start | ||
157 | ----------------------------------------- | ||
158 | |||
159 | Since a large number of different Linux distributions are | ||
160 | available, we are unable to describe a general installation procedure | ||
161 | for the driver module. | ||
162 | Because the driver is now integrated in the kernel, installation should | ||
163 | be easy, using the standard mechanism of your distribution. | ||
164 | Refer to the distribution's manual for installation of ethernet adapters. | ||
165 | |||
166 | *** | ||
167 | |||
168 | 4 Driver Parameters | ||
169 | ==================== | ||
170 | |||
171 | Parameters can be set at the command line after the module has been | ||
172 | loaded with the command 'modprobe'. | ||
173 | In some distributions, the configuration tools are able to pass parameters | ||
174 | to the driver module. | ||
175 | |||
176 | If you use the kernel module loader, you can set driver parameters | ||
177 | in the file /etc/modprobe.conf (or /etc/modules.conf in 2.4 or earlier). | ||
178 | To set the driver parameters in this file, proceed as follows: | ||
179 | |||
180 | 1. Insert a line of the form : | ||
181 | options sk98lin ... | ||
182 | For "...", the same syntax is required as described for the command | ||
183 | line parameters of modprobe below. | ||
184 | 2. To activate the new parameters, either reboot your computer | ||
185 | or | ||
186 | unload and reload the driver. | ||
187 | The syntax of the driver parameters is: | ||
188 | |||
189 | modprobe sk98lin parameter=value1[,value2[,value3...]] | ||
190 | |||
191 | where value1 refers to the first adapter, value2 to the second etc. | ||
192 | |||
193 | NOTE: All parameters are case sensitive. Write them exactly as shown | ||
194 | below. | ||
195 | |||
196 | Example: | ||
197 | Suppose you have two adapters. You want to set auto-negotiation | ||
198 | on the first adapter to ON and on the second adapter to OFF. | ||
199 | You also want to set DuplexCapabilities on the first adapter | ||
200 | to FULL, and on the second adapter to HALF. | ||
201 | Then, you must enter: | ||
202 | |||
203 | modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half | ||
204 | |||
205 | NOTE: The number of adapters that can be configured this way is | ||
206 | limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM). | ||
207 | The current limit is 16. If you happen to install | ||
208 | more adapters, adjust this and recompile. | ||
209 | |||
210 | |||
211 | 4.1 Per-Port Parameters | ||
212 | ------------------------ | ||
213 | |||
214 | These settings are available for each port on the adapter. | ||
215 | In the following description, '?' stands for the port for | ||
216 | which you set the parameter (A or B). | ||
217 | |||
218 | Speed | ||
219 | ----- | ||
220 | Parameter: Speed_? | ||
221 | Values: 10, 100, 1000, Auto | ||
222 | Default: Auto | ||
223 | |||
224 | This parameter is used to set the speed capabilities. It is only valid | ||
225 | for the SK-98xx V2.0 copper adapters. | ||
226 | Usually, the speed is negotiated between the two ports during link | ||
227 | establishment. If this fails, a port can be forced to a specific setting | ||
228 | with this parameter. | ||
229 | |||
230 | Auto-Negotiation | ||
231 | ---------------- | ||
232 | Parameter: AutoNeg_? | ||
233 | Values: On, Off, Sense | ||
234 | Default: On | ||
235 | |||
236 | The "Sense"-mode automatically detects whether the link partner supports | ||
237 | auto-negotiation or not. | ||
238 | |||
239 | Duplex Capabilities | ||
240 | ------------------- | ||
241 | Parameter: DupCap_? | ||
242 | Values: Half, Full, Both | ||
243 | Default: Both | ||
244 | |||
245 | This parameters is only relevant if auto-negotiation for this port is | ||
246 | not set to "Sense". If auto-negotiation is set to "On", all three values | ||
247 | are possible. If it is set to "Off", only "Full" and "Half" are allowed. | ||
248 | This parameter is useful if your link partner does not support all | ||
249 | possible combinations. | ||
250 | |||
251 | Flow Control | ||
252 | ------------ | ||
253 | Parameter: FlowCtrl_? | ||
254 | Values: Sym, SymOrRem, LocSend, None | ||
255 | Default: SymOrRem | ||
256 | |||
257 | This parameter can be used to set the flow control capabilities the | ||
258 | port reports during auto-negotiation. It can be set for each port | ||
259 | individually. | ||
260 | Possible modes: | ||
261 | -- Sym = Symmetric: both link partners are allowed to send | ||
262 | PAUSE frames | ||
263 | -- SymOrRem = SymmetricOrRemote: both or only remote partner | ||
264 | are allowed to send PAUSE frames | ||
265 | -- LocSend = LocalSend: only local link partner is allowed | ||
266 | to send PAUSE frames | ||
267 | -- None = no link partner is allowed to send PAUSE frames | ||
268 | |||
269 | NOTE: This parameter is ignored if auto-negotiation is set to "Off". | ||
270 | |||
271 | Role in Master-Slave-Negotiation (1000Base-T only) | ||
272 | -------------------------------------------------- | ||
273 | Parameter: Role_? | ||
274 | Values: Auto, Master, Slave | ||
275 | Default: Auto | ||
276 | |||
277 | This parameter is only valid for the SK-9821 and SK-9822 adapters. | ||
278 | For two 1000Base-T ports to communicate, one must take the role of the | ||
279 | master (providing timing information), while the other must be the | ||
280 | slave. Usually, this is negotiated between the two ports during link | ||
281 | establishment. If this fails, a port can be forced to a specific setting | ||
282 | with this parameter. | ||
283 | |||
284 | |||
285 | 4.2 Adapter Parameters | ||
286 | ----------------------- | ||
287 | |||
288 | Connection Type (SK-98xx V2.0 copper adapters only) | ||
289 | --------------- | ||
290 | Parameter: ConType | ||
291 | Values: Auto, 100FD, 100HD, 10FD, 10HD | ||
292 | Default: Auto | ||
293 | |||
294 | The parameter 'ConType' is a combination of all five per-port parameters | ||
295 | within one single parameter. This simplifies the configuration of both ports | ||
296 | of an adapter card! The different values of this variable reflect the most | ||
297 | meaningful combinations of port parameters. | ||
298 | |||
299 | The following table shows the values of 'ConType' and the corresponding | ||
300 | combinations of the per-port parameters: | ||
301 | |||
302 | ConType | DupCap AutoNeg FlowCtrl Role Speed | ||
303 | ----------+------------------------------------------------------ | ||
304 | Auto | Both On SymOrRem Auto Auto | ||
305 | 100FD | Full Off None Auto (ignored) 100 | ||
306 | 100HD | Half Off None Auto (ignored) 100 | ||
307 | 10FD | Full Off None Auto (ignored) 10 | ||
308 | 10HD | Half Off None Auto (ignored) 10 | ||
309 | |||
310 | Stating any other port parameter together with this 'ConType' variable | ||
311 | will result in a merged configuration of those settings. This due to | ||
312 | the fact, that the per-port parameters (e.g. Speed_? ) have a higher | ||
313 | priority than the combined variable 'ConType'. | ||
314 | |||
315 | NOTE: This parameter is always used on both ports of the adapter card. | ||
316 | |||
317 | Interrupt Moderation | ||
318 | -------------------- | ||
319 | Parameter: Moderation | ||
320 | Values: None, Static, Dynamic | ||
321 | Default: None | ||
322 | |||
323 | Interrupt moderation is employed to limit the maximum number of interrupts | ||
324 | the driver has to serve. That is, one or more interrupts (which indicate any | ||
325 | transmit or receive packet to be processed) are queued until the driver | ||
326 | processes them. When queued interrupts are to be served, is determined by the | ||
327 | 'IntsPerSec' parameter, which is explained later below. | ||
328 | |||
329 | Possible modes: | ||
330 | |||
331 | -- None - No interrupt moderation is applied on the adapter card. | ||
332 | Therefore, each transmit or receive interrupt is served immediately | ||
333 | as soon as it appears on the interrupt line of the adapter card. | ||
334 | |||
335 | -- Static - Interrupt moderation is applied on the adapter card. | ||
336 | All transmit and receive interrupts are queued until a complete | ||
337 | moderation interval ends. If such a moderation interval ends, all | ||
338 | queued interrupts are processed in one big bunch without any delay. | ||
339 | The term 'static' reflects the fact, that interrupt moderation is | ||
340 | always enabled, regardless how much network load is currently | ||
341 | passing via a particular interface. In addition, the duration of | ||
342 | the moderation interval has a fixed length that never changes while | ||
343 | the driver is operational. | ||
344 | |||
345 | -- Dynamic - Interrupt moderation might be applied on the adapter card, | ||
346 | depending on the load of the system. If the driver detects that the | ||
347 | system load is too high, the driver tries to shield the system against | ||
348 | too much network load by enabling interrupt moderation. If - at a later | ||
349 | time - the CPU utilization decreases again (or if the network load is | ||
350 | negligible) the interrupt moderation will automatically be disabled. | ||
351 | |||
352 | Interrupt moderation should be used when the driver has to handle one or more | ||
353 | interfaces with a high network load, which - as a consequence - leads also to a | ||
354 | high CPU utilization. When moderation is applied in such high network load | ||
355 | situations, CPU load might be reduced by 20-30%. | ||
356 | |||
357 | NOTE: The drawback of using interrupt moderation is an increase of the round- | ||
358 | trip-time (RTT), due to the queueing and serving of interrupts at dedicated | ||
359 | moderation times. | ||
360 | |||
361 | Interrupts per second | ||
362 | --------------------- | ||
363 | Parameter: IntsPerSec | ||
364 | Values: 30...40000 (interrupts per second) | ||
365 | Default: 2000 | ||
366 | |||
367 | This parameter is only used if either static or dynamic interrupt moderation | ||
368 | is used on a network adapter card. Using this parameter if no moderation is | ||
369 | applied will lead to no action performed. | ||
370 | |||
371 | This parameter determines the length of any interrupt moderation interval. | ||
372 | Assuming that static interrupt moderation is to be used, an 'IntsPerSec' | ||
373 | parameter value of 2000 will lead to an interrupt moderation interval of | ||
374 | 500 microseconds. | ||
375 | |||
376 | NOTE: The duration of the moderation interval is to be chosen with care. | ||
377 | At first glance, selecting a very long duration (e.g. only 100 interrupts per | ||
378 | second) seems to be meaningful, but the increase of packet-processing delay | ||
379 | is tremendous. On the other hand, selecting a very short moderation time might | ||
380 | compensate the use of any moderation being applied. | ||
381 | |||
382 | |||
383 | Preferred Port | ||
384 | -------------- | ||
385 | Parameter: PrefPort | ||
386 | Values: A, B | ||
387 | Default: A | ||
388 | |||
389 | This is used to force the preferred port to A or B (on dual-port network | ||
390 | adapters). The preferred port is the one that is used if both are detected | ||
391 | as fully functional. | ||
392 | |||
393 | RLMT Mode (Redundant Link Management Technology) | ||
394 | ------------------------------------------------ | ||
395 | Parameter: RlmtMode | ||
396 | Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet | ||
397 | Default: CheckLinkState | ||
398 | |||
399 | RLMT monitors the status of the port. If the link of the active port | ||
400 | fails, RLMT switches immediately to the standby link. The virtual link is | ||
401 | maintained as long as at least one 'physical' link is up. | ||
402 | |||
403 | Possible modes: | ||
404 | |||
405 | -- CheckLinkState - Check link state only: RLMT uses the link state | ||
406 | reported by the adapter hardware for each individual port to | ||
407 | determine whether a port can be used for all network traffic or | ||
408 | not. | ||
409 | |||
410 | -- CheckLocalPort - In this mode, RLMT monitors the network path | ||
411 | between the two ports of an adapter by regularly exchanging packets | ||
412 | between them. This mode requires a network configuration in which | ||
413 | the two ports are able to "see" each other (i.e. there must not be | ||
414 | any router between the ports). | ||
415 | |||
416 | -- CheckSeg - Check local port and segmentation: This mode supports the | ||
417 | same functions as the CheckLocalPort mode and additionally checks | ||
418 | network segmentation between the ports. Therefore, this mode is only | ||
419 | to be used if Gigabit Ethernet switches are installed on the network | ||
420 | that have been configured to use the Spanning Tree protocol. | ||
421 | |||
422 | -- DualNet - In this mode, ports A and B are used as separate devices. | ||
423 | If you have a dual port adapter, port A will be configured as eth0 | ||
424 | and port B as eth1. Both ports can be used independently with | ||
425 | distinct IP addresses. The preferred port setting is not used. | ||
426 | RLMT is turned off. | ||
427 | |||
428 | NOTE: RLMT modes CLP and CLPSS are designed to operate in configurations | ||
429 | where a network path between the ports on one adapter exists. | ||
430 | Moreover, they are not designed to work where adapters are connected | ||
431 | back-to-back. | ||
432 | *** | ||
433 | |||
434 | |||
435 | 5 Large Frame Support | ||
436 | ====================== | ||
437 | |||
438 | The driver supports large frames (also called jumbo frames). Using large | ||
439 | frames can result in an improved throughput if transferring large amounts | ||
440 | of data. | ||
441 | To enable large frames, set the MTU (maximum transfer unit) of the | ||
442 | interface to the desired value (up to 9000), execute the following | ||
443 | command: | ||
444 | ifconfig eth0 mtu 9000 | ||
445 | This will only work if you have two adapters connected back-to-back | ||
446 | or if you use a switch that supports large frames. When using a switch, | ||
447 | it should be configured to allow large frames and auto-negotiation should | ||
448 | be set to OFF. The setting must be configured on all adapters that can be | ||
449 | reached by the large frames. If one adapter is not set to receive large | ||
450 | frames, it will simply drop them. | ||
451 | |||
452 | You can switch back to the standard ethernet frame size by executing the | ||
453 | following command: | ||
454 | ifconfig eth0 mtu 1500 | ||
455 | |||
456 | To permanently configure this setting, add a script with the 'ifconfig' | ||
457 | line to the system startup sequence (named something like "S99sk98lin" | ||
458 | in /etc/rc.d/rc2.d). | ||
459 | *** | ||
460 | |||
461 | |||
462 | 6 VLAN and Link Aggregation Support (IEEE 802.1, 802.1q, 802.3ad) | ||
463 | ================================================================== | ||
464 | |||
465 | The Marvell Yukon/SysKonnect Linux drivers are able to support VLAN and | ||
466 | Link Aggregation according to IEEE standards 802.1, 802.1q, and 802.3ad. | ||
467 | These features are only available after installation of open source | ||
468 | modules available on the Internet: | ||
469 | For VLAN go to: http://www.candelatech.com/~greear/vlan.html | ||
470 | For Link Aggregation go to: http://www.st.rim.or.jp/~yumo | ||
471 | |||
472 | NOTE: SysKonnect GmbH does not offer any support for these open source | ||
473 | modules and does not take the responsibility for any kind of | ||
474 | failures or problems arising in connection with these modules. | ||
475 | |||
476 | NOTE: Configuring Link Aggregation on a SysKonnect dual link adapter may | ||
477 | cause problems when unloading the driver. | ||
478 | |||
479 | |||
480 | 7 Troubleshooting | ||
481 | ================== | ||
482 | |||
483 | If any problems occur during the installation process, check the | ||
484 | following list: | ||
485 | |||
486 | |||
487 | Problem: The SK-98xx adapter cannot be found by the driver. | ||
488 | Solution: In /proc/pci search for the following entry: | ||
489 | 'Ethernet controller: SysKonnect SK-98xx ...' | ||
490 | If this entry exists, the SK-98xx or SK-98xx V2.0 adapter has | ||
491 | been found by the system and should be operational. | ||
492 | If this entry does not exist or if the file '/proc/pci' is not | ||
493 | found, there may be a hardware problem or the PCI support may | ||
494 | not be enabled in your kernel. | ||
495 | The adapter can be checked using the diagnostics program which | ||
496 | is available on the SysKonnect web site: | ||
497 | www.syskonnect.com | ||
498 | |||
499 | Some COMPAQ machines have problems dealing with PCI under Linux. | ||
500 | This problem is described in the 'PCI howto' document | ||
501 | (included in some distributions or available from the | ||
502 | web, e.g. at 'www.linux.org'). | ||
503 | |||
504 | |||
505 | Problem: Programs such as 'ifconfig' or 'route' cannot be found or the | ||
506 | error message 'Operation not permitted' is displayed. | ||
507 | Reason: You are not logged in as user 'root'. | ||
508 | Solution: Logout and login as 'root' or change to 'root' via 'su'. | ||
509 | |||
510 | |||
511 | Problem: Upon use of the command 'ping <address>' the message | ||
512 | "ping: sendto: Network is unreachable" is displayed. | ||
513 | Reason: Your route is not set correctly. | ||
514 | Solution: If you are using RedHat, you probably forgot to set up the | ||
515 | route in the 'network configuration'. | ||
516 | Check the existing routes with the 'route' command and check | ||
517 | if an entry for 'eth0' exists, and if so, if it is set correctly. | ||
518 | |||
519 | |||
520 | Problem: The driver can be started, the adapter is connected to the | ||
521 | network, but you cannot receive or transmit any packets; | ||
522 | e.g. 'ping' does not work. | ||
523 | Reason: There is an incorrect route in your routing table. | ||
524 | Solution: Check the routing table with the command 'route' and read the | ||
525 | manual help pages dealing with routes (enter 'man route'). | ||
526 | |||
527 | NOTE: Although the 2.2.x kernel versions generate the routing entry | ||
528 | automatically, problems of this kind may occur here as well. We've | ||
529 | come across a situation in which the driver started correctly at | ||
530 | system start, but after the driver has been removed and reloaded, | ||
531 | the route of the adapter's network pointed to the 'dummy0'device | ||
532 | and had to be corrected manually. | ||
533 | |||
534 | |||
535 | Problem: Your computer should act as a router between multiple | ||
536 | IP subnetworks (using multiple adapters), but computers in | ||
537 | other subnetworks cannot be reached. | ||
538 | Reason: Either the router's kernel is not configured for IP forwarding | ||
539 | or the routing table and gateway configuration of at least one | ||
540 | computer is not working. | ||
541 | |||
542 | Problem: Upon driver start, the following error message is displayed: | ||
543 | "eth0: -- ERROR -- | ||
544 | Class: internal Software error | ||
545 | Nr: 0xcc | ||
546 | Msg: SkGeInitPort() cannot init running ports" | ||
547 | Reason: You are using a driver compiled for single processor machines | ||
548 | on a multiprocessor machine with SMP (Symmetric MultiProcessor) | ||
549 | kernel. | ||
550 | Solution: Configure your kernel appropriately and recompile the kernel or | ||
551 | the modules. | ||
552 | |||
553 | |||
554 | |||
555 | If your problem is not listed here, please contact SysKonnect's technical | ||
556 | support for help (linux@syskonnect.de). | ||
557 | When contacting our technical support, please ensure that the following | ||
558 | information is available: | ||
559 | - System Manufacturer and HW Informations (CPU, Memory... ) | ||
560 | - PCI-Boards in your system | ||
561 | - Distribution | ||
562 | - Kernel version | ||
563 | - Driver version | ||
564 | *** | ||
565 | |||
566 | |||
567 | |||
568 | ***End of Readme File*** | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 47c57a4294b7..98099f526d82 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -978,6 +978,7 @@ static int fs_open(struct atm_vcc *atm_vcc) | |||
978 | /* Docs are vague about this atm_hdr field. By the way, the FS | 978 | /* Docs are vague about this atm_hdr field. By the way, the FS |
979 | * chip makes odd errors if lower bits are set.... -- REW */ | 979 | * chip makes odd errors if lower bits are set.... -- REW */ |
980 | tc->atm_hdr = (vpi << 20) | (vci << 4); | 980 | tc->atm_hdr = (vpi << 20) | (vci << 4); |
981 | tmc0 = 0; | ||
981 | { | 982 | { |
982 | int pcr = atm_pcr_goal (txtp); | 983 | int pcr = atm_pcr_goal (txtp); |
983 | 984 | ||
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 2e3395b7e8c1..ffc4a5a41946 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -3000,8 +3000,7 @@ he_proc_read(struct atm_dev *dev, loff_t *pos, char *page) | |||
3000 | 3000 | ||
3001 | /* eeprom routines -- see 4.7 */ | 3001 | /* eeprom routines -- see 4.7 */ |
3002 | 3002 | ||
3003 | u8 | 3003 | static u8 read_prom_byte(struct he_dev *he_dev, int addr) |
3004 | read_prom_byte(struct he_dev *he_dev, int addr) | ||
3005 | { | 3004 | { |
3006 | u32 val = 0, tmp_read = 0; | 3005 | u32 val = 0, tmp_read = 0; |
3007 | int i, j = 0; | 3006 | int i, j = 0; |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index b967919fb7e2..28d77b5195de 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -2016,8 +2016,7 @@ idt77252_send_skb(struct atm_vcc *vcc, struct sk_buff *skb, int oam) | |||
2016 | return 0; | 2016 | return 0; |
2017 | } | 2017 | } |
2018 | 2018 | ||
2019 | int | 2019 | static int idt77252_send(struct atm_vcc *vcc, struct sk_buff *skb) |
2020 | idt77252_send(struct atm_vcc *vcc, struct sk_buff *skb) | ||
2021 | { | 2020 | { |
2022 | return idt77252_send_skb(vcc, skb, 0); | 2021 | return idt77252_send_skb(vcc, skb, 0); |
2023 | } | 2022 | } |
@@ -3072,8 +3071,7 @@ idt77252_dev_open(struct idt77252_dev *card) | |||
3072 | return 0; | 3071 | return 0; |
3073 | } | 3072 | } |
3074 | 3073 | ||
3075 | void | 3074 | static void idt77252_dev_close(struct atm_dev *dev) |
3076 | idt77252_dev_close(struct atm_dev *dev) | ||
3077 | { | 3075 | { |
3078 | struct idt77252_dev *card = dev->dev_data; | 3076 | struct idt77252_dev *card = dev->dev_data; |
3079 | u32 conf; | 3077 | u32 conf; |
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index ef52452640e0..670c093ed25f 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -958,6 +958,7 @@ static void ia_suni_pm7345_init (IADEV *iadev) | |||
958 | 958 | ||
959 | /***************************** IA_LIB END *****************************/ | 959 | /***************************** IA_LIB END *****************************/ |
960 | 960 | ||
961 | #ifdef CONFIG_ATM_IA_DEBUG | ||
961 | static int tcnter = 0; | 962 | static int tcnter = 0; |
962 | static void xdump( u_char* cp, int length, char* prefix ) | 963 | static void xdump( u_char* cp, int length, char* prefix ) |
963 | { | 964 | { |
@@ -992,6 +993,7 @@ static void xdump( u_char* cp, int length, char* prefix ) | |||
992 | } | 993 | } |
993 | 994 | ||
994 | } /* close xdump(... */ | 995 | } /* close xdump(... */ |
996 | #endif /* CONFIG_ATM_IA_DEBUG */ | ||
995 | 997 | ||
996 | 998 | ||
997 | static struct atm_dev *ia_boards = NULL; | 999 | static struct atm_dev *ia_boards = NULL; |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index fe7b5ec09708..3a0b20afec7b 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2635,7 +2635,7 @@ config NIU | |||
2635 | 2635 | ||
2636 | config PASEMI_MAC | 2636 | config PASEMI_MAC |
2637 | tristate "PA Semi 1/10Gbit MAC" | 2637 | tristate "PA Semi 1/10Gbit MAC" |
2638 | depends on PPC64 && PCI | 2638 | depends on PPC_PASEMI && PCI |
2639 | select PHYLIB | 2639 | select PHYLIB |
2640 | select INET_LRO | 2640 | select INET_LRO |
2641 | help | 2641 | help |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index c993a32b3f50..26b2dd5016cd 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -575,7 +575,6 @@ adjust_head: | |||
575 | static int bf537mac_hard_start_xmit(struct sk_buff *skb, | 575 | static int bf537mac_hard_start_xmit(struct sk_buff *skb, |
576 | struct net_device *dev) | 576 | struct net_device *dev) |
577 | { | 577 | { |
578 | struct bf537mac_local *lp = netdev_priv(dev); | ||
579 | unsigned int data; | 578 | unsigned int data; |
580 | 579 | ||
581 | current_tx_ptr->skb = skb; | 580 | current_tx_ptr->skb = skb; |
@@ -634,7 +633,6 @@ out: | |||
634 | static void bf537mac_rx(struct net_device *dev) | 633 | static void bf537mac_rx(struct net_device *dev) |
635 | { | 634 | { |
636 | struct sk_buff *skb, *new_skb; | 635 | struct sk_buff *skb, *new_skb; |
637 | struct bf537mac_local *lp = netdev_priv(dev); | ||
638 | unsigned short len; | 636 | unsigned short len; |
639 | 637 | ||
640 | /* allocate a new skb for next time receive */ | 638 | /* allocate a new skb for next time receive */ |
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 90a1f31e8e63..979c2d05ff9c 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -341,6 +341,7 @@ static ssize_t bonding_store_slaves(struct device *d, | |||
341 | 341 | ||
342 | if (command[0] == '-') { | 342 | if (command[0] == '-') { |
343 | dev = NULL; | 343 | dev = NULL; |
344 | original_mtu = 0; | ||
344 | bond_for_each_slave(bond, slave, i) | 345 | bond_for_each_slave(bond, slave, i) |
345 | if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) { | 346 | if (strnicmp(slave->dev->name, ifname, IFNAMSIZ) == 0) { |
346 | dev = slave->dev; | 347 | dev = slave->dev; |
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 6f7e3fde9e7c..980c2c229a71 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -1854,6 +1854,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1854 | struct ring_desc* start_tx; | 1854 | struct ring_desc* start_tx; |
1855 | struct ring_desc* prev_tx; | 1855 | struct ring_desc* prev_tx; |
1856 | struct nv_skb_map* prev_tx_ctx; | 1856 | struct nv_skb_map* prev_tx_ctx; |
1857 | unsigned long flags; | ||
1857 | 1858 | ||
1858 | /* add fragments to entries count */ | 1859 | /* add fragments to entries count */ |
1859 | for (i = 0; i < fragments; i++) { | 1860 | for (i = 0; i < fragments; i++) { |
@@ -1863,10 +1864,10 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1863 | 1864 | ||
1864 | empty_slots = nv_get_empty_tx_slots(np); | 1865 | empty_slots = nv_get_empty_tx_slots(np); |
1865 | if (unlikely(empty_slots <= entries)) { | 1866 | if (unlikely(empty_slots <= entries)) { |
1866 | spin_lock_irq(&np->lock); | 1867 | spin_lock_irqsave(&np->lock, flags); |
1867 | netif_stop_queue(dev); | 1868 | netif_stop_queue(dev); |
1868 | np->tx_stop = 1; | 1869 | np->tx_stop = 1; |
1869 | spin_unlock_irq(&np->lock); | 1870 | spin_unlock_irqrestore(&np->lock, flags); |
1870 | return NETDEV_TX_BUSY; | 1871 | return NETDEV_TX_BUSY; |
1871 | } | 1872 | } |
1872 | 1873 | ||
@@ -1929,13 +1930,13 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1929 | tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ? | 1930 | tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ? |
1930 | NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; | 1931 | NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; |
1931 | 1932 | ||
1932 | spin_lock_irq(&np->lock); | 1933 | spin_lock_irqsave(&np->lock, flags); |
1933 | 1934 | ||
1934 | /* set tx flags */ | 1935 | /* set tx flags */ |
1935 | start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); | 1936 | start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); |
1936 | np->put_tx.orig = put_tx; | 1937 | np->put_tx.orig = put_tx; |
1937 | 1938 | ||
1938 | spin_unlock_irq(&np->lock); | 1939 | spin_unlock_irqrestore(&np->lock, flags); |
1939 | 1940 | ||
1940 | dprintk(KERN_DEBUG "%s: nv_start_xmit: entries %d queued for transmission. tx_flags_extra: %x\n", | 1941 | dprintk(KERN_DEBUG "%s: nv_start_xmit: entries %d queued for transmission. tx_flags_extra: %x\n", |
1941 | dev->name, entries, tx_flags_extra); | 1942 | dev->name, entries, tx_flags_extra); |
@@ -1971,6 +1972,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) | |||
1971 | struct ring_desc_ex* prev_tx; | 1972 | struct ring_desc_ex* prev_tx; |
1972 | struct nv_skb_map* prev_tx_ctx; | 1973 | struct nv_skb_map* prev_tx_ctx; |
1973 | struct nv_skb_map* start_tx_ctx; | 1974 | struct nv_skb_map* start_tx_ctx; |
1975 | unsigned long flags; | ||
1974 | 1976 | ||
1975 | /* add fragments to entries count */ | 1977 | /* add fragments to entries count */ |
1976 | for (i = 0; i < fragments; i++) { | 1978 | for (i = 0; i < fragments; i++) { |
@@ -1980,10 +1982,10 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) | |||
1980 | 1982 | ||
1981 | empty_slots = nv_get_empty_tx_slots(np); | 1983 | empty_slots = nv_get_empty_tx_slots(np); |
1982 | if (unlikely(empty_slots <= entries)) { | 1984 | if (unlikely(empty_slots <= entries)) { |
1983 | spin_lock_irq(&np->lock); | 1985 | spin_lock_irqsave(&np->lock, flags); |
1984 | netif_stop_queue(dev); | 1986 | netif_stop_queue(dev); |
1985 | np->tx_stop = 1; | 1987 | np->tx_stop = 1; |
1986 | spin_unlock_irq(&np->lock); | 1988 | spin_unlock_irqrestore(&np->lock, flags); |
1987 | return NETDEV_TX_BUSY; | 1989 | return NETDEV_TX_BUSY; |
1988 | } | 1990 | } |
1989 | 1991 | ||
@@ -2059,7 +2061,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) | |||
2059 | start_tx->txvlan = 0; | 2061 | start_tx->txvlan = 0; |
2060 | } | 2062 | } |
2061 | 2063 | ||
2062 | spin_lock_irq(&np->lock); | 2064 | spin_lock_irqsave(&np->lock, flags); |
2063 | 2065 | ||
2064 | if (np->tx_limit) { | 2066 | if (np->tx_limit) { |
2065 | /* Limit the number of outstanding tx. Setup all fragments, but | 2067 | /* Limit the number of outstanding tx. Setup all fragments, but |
@@ -2085,7 +2087,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev) | |||
2085 | start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); | 2087 | start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra); |
2086 | np->put_tx.ex = put_tx; | 2088 | np->put_tx.ex = put_tx; |
2087 | 2089 | ||
2088 | spin_unlock_irq(&np->lock); | 2090 | spin_unlock_irqrestore(&np->lock, flags); |
2089 | 2091 | ||
2090 | dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n", | 2092 | dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n", |
2091 | dev->name, entries, tx_flags_extra); | 2093 | dev->name, entries, tx_flags_extra); |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 0789802d59ed..378a23963495 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -1242,8 +1242,8 @@ static int emac_close(struct net_device *ndev) | |||
1242 | static inline u16 emac_tx_csum(struct emac_instance *dev, | 1242 | static inline u16 emac_tx_csum(struct emac_instance *dev, |
1243 | struct sk_buff *skb) | 1243 | struct sk_buff *skb) |
1244 | { | 1244 | { |
1245 | if (emac_has_feature(dev, EMAC_FTR_HAS_TAH && | 1245 | if (emac_has_feature(dev, EMAC_FTR_HAS_TAH) && |
1246 | skb->ip_summed == CHECKSUM_PARTIAL)) { | 1246 | (skb->ip_summed == CHECKSUM_PARTIAL)) { |
1247 | ++dev->stats.tx_packets_csum; | 1247 | ++dev->stats.tx_packets_csum; |
1248 | return EMAC_TX_CTRL_TAH_CSUM; | 1248 | return EMAC_TX_CTRL_TAH_CSUM; |
1249 | } | 1249 | } |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 3c915b82e199..c082cf0b1ac6 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -84,7 +84,7 @@ | |||
84 | #include "s2io.h" | 84 | #include "s2io.h" |
85 | #include "s2io-regs.h" | 85 | #include "s2io-regs.h" |
86 | 86 | ||
87 | #define DRV_VERSION "2.0.26.15-2" | 87 | #define DRV_VERSION "2.0.26.20" |
88 | 88 | ||
89 | /* S2io Driver name & version. */ | 89 | /* S2io Driver name & version. */ |
90 | static char s2io_driver_name[] = "Neterion"; | 90 | static char s2io_driver_name[] = "Neterion"; |
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c index 206918bad539..da2206f6021d 100644 --- a/drivers/net/tulip/eeprom.c +++ b/drivers/net/tulip/eeprom.c | |||
@@ -343,6 +343,12 @@ int __devinit tulip_read_eeprom(struct net_device *dev, int location, int addr_l | |||
343 | void __iomem *ee_addr = tp->base_addr + CSR9; | 343 | void __iomem *ee_addr = tp->base_addr + CSR9; |
344 | int read_cmd = location | (EE_READ_CMD << addr_len); | 344 | int read_cmd = location | (EE_READ_CMD << addr_len); |
345 | 345 | ||
346 | /* If location is past the end of what we can address, don't | ||
347 | * read some other location (ie truncate). Just return zero. | ||
348 | */ | ||
349 | if (location > (1 << addr_len) - 1) | ||
350 | return 0; | ||
351 | |||
346 | iowrite32(EE_ENB & ~EE_CS, ee_addr); | 352 | iowrite32(EE_ENB & ~EE_CS, ee_addr); |
347 | iowrite32(EE_ENB, ee_addr); | 353 | iowrite32(EE_ENB, ee_addr); |
348 | 354 | ||
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index ed600bf56e78..82f404b76d81 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -1437,6 +1437,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1437 | EEPROM. | 1437 | EEPROM. |
1438 | */ | 1438 | */ |
1439 | ee_data = tp->eeprom; | 1439 | ee_data = tp->eeprom; |
1440 | memset(ee_data, 0, sizeof(tp->eeprom)); | ||
1440 | sum = 0; | 1441 | sum = 0; |
1441 | if (chip_idx == LC82C168) { | 1442 | if (chip_idx == LC82C168) { |
1442 | for (i = 0; i < 3; i++) { | 1443 | for (i = 0; i < 3; i++) { |
@@ -1458,8 +1459,12 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1458 | /* A serial EEPROM interface, we read now and sort it out later. */ | 1459 | /* A serial EEPROM interface, we read now and sort it out later. */ |
1459 | int sa_offset = 0; | 1460 | int sa_offset = 0; |
1460 | int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6; | 1461 | int ee_addr_size = tulip_read_eeprom(dev, 0xff, 8) & 0x40000 ? 8 : 6; |
1462 | int ee_max_addr = ((1 << ee_addr_size) - 1) * sizeof(u16); | ||
1461 | 1463 | ||
1462 | for (i = 0; i < sizeof(tp->eeprom); i+=2) { | 1464 | if (ee_max_addr > sizeof(tp->eeprom)) |
1465 | ee_max_addr = sizeof(tp->eeprom); | ||
1466 | |||
1467 | for (i = 0; i < ee_max_addr ; i += sizeof(u16)) { | ||
1463 | u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size); | 1468 | u16 data = tulip_read_eeprom(dev, i/2, ee_addr_size); |
1464 | ee_data[i] = data & 0xff; | 1469 | ee_data[i] = data & 0xff; |
1465 | ee_data[i + 1] = data >> 8; | 1470 | ee_data[i + 1] = data >> 8; |
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index a12c9c41b217..0604f3faf043 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
@@ -129,7 +129,7 @@ config USB_USBNET | |||
129 | 129 | ||
130 | config USB_NET_AX8817X | 130 | config USB_NET_AX8817X |
131 | tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" | 131 | tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" |
132 | depends on USB_USBNET && NET_ETHERNET | 132 | depends on USB_USBNET |
133 | select CRC32 | 133 | select CRC32 |
134 | default y | 134 | default y |
135 | help | 135 | help |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 0343b00cf1fd..01660f68943a 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -354,7 +354,7 @@ static void dm9601_set_multicast(struct net_device *net) | |||
354 | struct dev_mc_list *mc_list = net->mc_list; | 354 | struct dev_mc_list *mc_list = net->mc_list; |
355 | int i; | 355 | int i; |
356 | 356 | ||
357 | for (i = 0; i < net->mc_count; i++) { | 357 | for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) { |
358 | u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; | 358 | u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; |
359 | hashes[crc >> 3] |= 1 << (crc & 0x7); | 359 | hashes[crc >> 3] |= 1 << (crc & 0x7); |
360 | } | 360 | } |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index d1ed68a11e70..b588c890ea70 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
@@ -1128,12 +1128,8 @@ pegasus_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) | |||
1128 | { | 1128 | { |
1129 | pegasus_t *pegasus; | 1129 | pegasus_t *pegasus; |
1130 | 1130 | ||
1131 | if (in_atomic()) | ||
1132 | return 0; | ||
1133 | |||
1134 | pegasus = netdev_priv(dev); | 1131 | pegasus = netdev_priv(dev); |
1135 | mii_ethtool_gset(&pegasus->mii, ecmd); | 1132 | mii_ethtool_gset(&pegasus->mii, ecmd); |
1136 | |||
1137 | return 0; | 1133 | return 0; |
1138 | } | 1134 | } |
1139 | 1135 | ||
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index fb37b8095231..824df3b5ea49 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c | |||
@@ -58,7 +58,7 @@ struct lapbethdev { | |||
58 | struct net_device_stats stats; /* some statistics */ | 58 | struct net_device_stats stats; /* some statistics */ |
59 | }; | 59 | }; |
60 | 60 | ||
61 | static struct list_head lapbeth_devices = LIST_HEAD_INIT(lapbeth_devices); | 61 | static LIST_HEAD(lapbeth_devices); |
62 | 62 | ||
63 | /* ------------------------------------------------------------------------ */ | 63 | /* ------------------------------------------------------------------------ */ |
64 | 64 | ||
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index cfbc1a26f601..948eb1fe916b 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -619,6 +619,7 @@ static int setup_rx_descbuffer(struct b43_dmaring *ring, | |||
619 | } | 619 | } |
620 | 620 | ||
621 | if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) { | 621 | if (b43_dma_mapping_error(ring, dmaaddr, ring->rx_buffersize, 0)) { |
622 | b43err(ring->dev->wl, "RX DMA buffer allocation failed\n"); | ||
622 | dev_kfree_skb_any(skb); | 623 | dev_kfree_skb_any(skb); |
623 | return -EIO; | 624 | return -EIO; |
624 | } | 625 | } |
@@ -874,8 +875,12 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev, | |||
874 | DMA_TO_DEVICE); | 875 | DMA_TO_DEVICE); |
875 | 876 | ||
876 | if (b43_dma_mapping_error(ring, dma_test, | 877 | if (b43_dma_mapping_error(ring, dma_test, |
877 | b43_txhdr_size(dev), 1)) | 878 | b43_txhdr_size(dev), 1)) { |
879 | |||
880 | b43err(dev->wl, | ||
881 | "TXHDR DMA allocation failed\n"); | ||
878 | goto err_kfree_txhdr_cache; | 882 | goto err_kfree_txhdr_cache; |
883 | } | ||
879 | } | 884 | } |
880 | 885 | ||
881 | dma_unmap_single(dev->dev->dev, | 886 | dma_unmap_single(dev->dev->dev, |
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c index b79a6bd5396d..371e4a119511 100644 --- a/drivers/net/wireless/b43/pcmcia.c +++ b/drivers/net/wireless/b43/pcmcia.c | |||
@@ -91,6 +91,8 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
91 | 91 | ||
92 | dev->conf.ConfigBase = parse.config.base; | 92 | dev->conf.ConfigBase = parse.config.base; |
93 | dev->conf.Present = parse.config.rmask[0]; | 93 | dev->conf.Present = parse.config.rmask[0]; |
94 | dev->conf.Attributes = CONF_ENABLE_IRQ; | ||
95 | dev->conf.IntType = INT_MEMORY_AND_IO; | ||
94 | 96 | ||
95 | dev->io.BasePort2 = 0; | 97 | dev->io.BasePort2 = 0; |
96 | dev->io.NumPorts2 = 0; | 98 | dev->io.NumPorts2 = 0; |
@@ -112,8 +114,8 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) | |||
112 | if (res != CS_SUCCESS) | 114 | if (res != CS_SUCCESS) |
113 | goto err_disable; | 115 | goto err_disable; |
114 | 116 | ||
115 | dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_FIRST_SHARED; | 117 | dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; |
116 | dev->irq.IRQInfo1 = IRQ_LEVEL_ID | IRQ_SHARE_ID; | 118 | dev->irq.IRQInfo1 = IRQ_LEVEL_ID; |
117 | dev->irq.Handler = NULL; /* The handler is registered later. */ | 119 | dev->irq.Handler = NULL; /* The handler is registered later. */ |
118 | dev->irq.Instance = NULL; | 120 | dev->irq.Instance = NULL; |
119 | res = pcmcia_request_irq(dev, &dev->irq); | 121 | res = pcmcia_request_irq(dev, &dev->irq); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index d727de8b96fe..65767570be68 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -4589,7 +4589,7 @@ static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv, | |||
4589 | 4589 | ||
4590 | if (sta_ht_inf) { | 4590 | if (sta_ht_inf) { |
4591 | if ((!sta_ht_inf->ht_supported) || | 4591 | if ((!sta_ht_inf->ht_supported) || |
4592 | (!sta_ht_inf->cap & IEEE80211_HT_CAP_SUP_WIDTH)) | 4592 | (!(sta_ht_inf->cap & IEEE80211_HT_CAP_SUP_WIDTH))) |
4593 | return 0; | 4593 | return 0; |
4594 | } | 4594 | } |
4595 | 4595 | ||
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 5a9cadb97503..038c66a98f15 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c | |||
@@ -677,9 +677,7 @@ sbi_get_int_status_exit: | |||
677 | 677 | ||
678 | /* Card has a command result for us */ | 678 | /* Card has a command result for us */ |
679 | if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) { | 679 | if (*ireg & IF_CS_C_S_CMD_UPLD_RDY) { |
680 | spin_lock(&priv->driver_lock); | ||
681 | ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len); | 680 | ret = if_cs_receive_cmdres(priv, priv->upld_buf, &priv->upld_len); |
682 | spin_unlock(&priv->driver_lock); | ||
683 | if (ret < 0) | 681 | if (ret < 0) |
684 | lbs_pr_err("could not receive cmd from card\n"); | 682 | lbs_pr_err("could not receive cmd from card\n"); |
685 | } | 683 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index bd305f7f3efd..e873a39fcce3 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -1393,11 +1393,20 @@ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state) | |||
1393 | 1393 | ||
1394 | exit: | 1394 | exit: |
1395 | /* | 1395 | /* |
1396 | * Set device mode to sleep for power management. | 1396 | * Set device mode to sleep for power management, |
1397 | * on some hardware this call seems to consistently fail. | ||
1398 | * From the specifications it is hard to tell why it fails, | ||
1399 | * and if this is a "bad thing". | ||
1400 | * Overall it is safe to just ignore the failure and | ||
1401 | * continue suspending. The only downside is that the | ||
1402 | * device will not be in optimal power save mode, but with | ||
1403 | * the radio and the other components already disabled the | ||
1404 | * device is as good as disabled. | ||
1397 | */ | 1405 | */ |
1398 | retval = rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP); | 1406 | retval = rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP); |
1399 | if (retval) | 1407 | if (retval) |
1400 | return retval; | 1408 | WARNING(rt2x00dev, "Device failed to enter sleep state, " |
1409 | "continue suspending.\n"); | ||
1401 | 1410 | ||
1402 | return 0; | 1411 | return 0; |
1403 | } | 1412 | } |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a2f003239c85..ee81906b5164 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -383,9 +383,11 @@ static inline void __napi_complete(struct napi_struct *n) | |||
383 | 383 | ||
384 | static inline void napi_complete(struct napi_struct *n) | 384 | static inline void napi_complete(struct napi_struct *n) |
385 | { | 385 | { |
386 | local_irq_disable(); | 386 | unsigned long flags; |
387 | |||
388 | local_irq_save(flags); | ||
387 | __napi_complete(n); | 389 | __napi_complete(n); |
388 | local_irq_enable(); | 390 | local_irq_restore(flags); |
389 | } | 391 | } |
390 | 392 | ||
391 | /** | 393 | /** |
@@ -1072,12 +1074,14 @@ static inline int netif_is_multiqueue(const struct net_device *dev) | |||
1072 | } | 1074 | } |
1073 | 1075 | ||
1074 | /* Use this variant when it is known for sure that it | 1076 | /* Use this variant when it is known for sure that it |
1075 | * is executing from interrupt context. | 1077 | * is executing from hardware interrupt context or with hardware interrupts |
1078 | * disabled. | ||
1076 | */ | 1079 | */ |
1077 | extern void dev_kfree_skb_irq(struct sk_buff *skb); | 1080 | extern void dev_kfree_skb_irq(struct sk_buff *skb); |
1078 | 1081 | ||
1079 | /* Use this variant in places where it could be invoked | 1082 | /* Use this variant in places where it could be invoked |
1080 | * either from interrupt or non-interrupt context. | 1083 | * from either hardware interrupt or other context, with hardware interrupts |
1084 | * either disabled or enabled. | ||
1081 | */ | 1085 | */ |
1082 | extern void dev_kfree_skb_any(struct sk_buff *skb); | 1086 | extern void dev_kfree_skb_any(struct sk_buff *skb); |
1083 | 1087 | ||
diff --git a/include/net/llc.h b/include/net/llc.h index f5024583fc8b..7940da1606e7 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
@@ -65,7 +65,6 @@ struct llc_sap { | |||
65 | 65 | ||
66 | extern struct list_head llc_sap_list; | 66 | extern struct list_head llc_sap_list; |
67 | extern rwlock_t llc_sap_list_lock; | 67 | extern rwlock_t llc_sap_list_lock; |
68 | extern unsigned char llc_station_mac_sa[ETH_ALEN]; | ||
69 | 68 | ||
70 | extern int llc_rcv(struct sk_buff *skb, struct net_device *dev, | 69 | extern int llc_rcv(struct sk_buff *skb, struct net_device *dev, |
71 | struct packet_type *pt, struct net_device *orig_dev); | 70 | struct packet_type *pt, struct net_device *orig_dev); |
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index 4a8f58b17e43..75b8e2968c9b 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -381,7 +381,7 @@ static inline void llc_pdu_init_as_xid_cmd(struct sk_buff *skb, | |||
381 | xid_info->fmt_id = LLC_XID_FMT_ID; /* 0x81 */ | 381 | xid_info->fmt_id = LLC_XID_FMT_ID; /* 0x81 */ |
382 | xid_info->type = svcs_supported; | 382 | xid_info->type = svcs_supported; |
383 | xid_info->rw = rx_window << 1; /* size of receive window */ | 383 | xid_info->rw = rx_window << 1; /* size of receive window */ |
384 | skb_put(skb, 3); | 384 | skb_put(skb, sizeof(struct llc_xid_info)); |
385 | } | 385 | } |
386 | 386 | ||
387 | /** | 387 | /** |
@@ -406,7 +406,7 @@ static inline void llc_pdu_init_as_xid_rsp(struct sk_buff *skb, | |||
406 | xid_info->fmt_id = LLC_XID_FMT_ID; | 406 | xid_info->fmt_id = LLC_XID_FMT_ID; |
407 | xid_info->type = svcs_supported; | 407 | xid_info->type = svcs_supported; |
408 | xid_info->rw = rx_window << 1; | 408 | xid_info->rw = rx_window << 1; |
409 | skb_put(skb, 3); | 409 | skb_put(skb, sizeof(struct llc_xid_info)); |
410 | } | 410 | } |
411 | 411 | ||
412 | /* LLC Type 2 FRMR response information field format */ | 412 | /* LLC Type 2 FRMR response information field format */ |
diff --git a/include/net/llc_sap.h b/include/net/llc_sap.h index 2c56dbece729..ed25bec2f648 100644 --- a/include/net/llc_sap.h +++ b/include/net/llc_sap.h | |||
@@ -1,5 +1,8 @@ | |||
1 | #ifndef LLC_SAP_H | 1 | #ifndef LLC_SAP_H |
2 | #define LLC_SAP_H | 2 | #define LLC_SAP_H |
3 | |||
4 | #include <asm/types.h> | ||
5 | |||
3 | /* | 6 | /* |
4 | * Copyright (c) 1997 by Procom Technology,Inc. | 7 | * Copyright (c) 1997 by Procom Technology,Inc. |
5 | * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 8 | * 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
@@ -19,8 +22,8 @@ struct sock; | |||
19 | extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); | 22 | extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); |
20 | extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb, | 23 | extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb, |
21 | unsigned char prim); | 24 | unsigned char prim); |
22 | extern struct sk_buff *llc_alloc_frame(struct sock *sk, | 25 | extern struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev, |
23 | struct net_device *dev); | 26 | u8 type, u32 data_size); |
24 | 27 | ||
25 | extern void llc_build_and_send_test_pkt(struct llc_sap *sap, | 28 | extern void llc_build_and_send_test_pkt(struct llc_sap *sap, |
26 | struct sk_buff *skb, | 29 | struct sk_buff *skb, |
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index dbc81b965096..b33410abfd6b 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -374,17 +374,35 @@ static void vlan_sync_address(struct net_device *dev, | |||
374 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); | 374 | memcpy(vlan->real_dev_addr, dev->dev_addr, ETH_ALEN); |
375 | } | 375 | } |
376 | 376 | ||
377 | static void __vlan_device_event(struct net_device *dev, unsigned long event) | ||
378 | { | ||
379 | switch (event) { | ||
380 | case NETDEV_CHANGENAME: | ||
381 | vlan_proc_rem_dev(dev); | ||
382 | if (vlan_proc_add_dev(dev) < 0) | ||
383 | pr_warning("8021q: failed to change proc name for %s\n", | ||
384 | dev->name); | ||
385 | break; | ||
386 | } | ||
387 | } | ||
388 | |||
377 | static int vlan_device_event(struct notifier_block *unused, unsigned long event, | 389 | static int vlan_device_event(struct notifier_block *unused, unsigned long event, |
378 | void *ptr) | 390 | void *ptr) |
379 | { | 391 | { |
380 | struct net_device *dev = ptr; | 392 | struct net_device *dev = ptr; |
381 | struct vlan_group *grp = __vlan_find_group(dev->ifindex); | 393 | struct vlan_group *grp; |
382 | int i, flgs; | 394 | int i, flgs; |
383 | struct net_device *vlandev; | 395 | struct net_device *vlandev; |
384 | 396 | ||
385 | if (dev->nd_net != &init_net) | 397 | if (dev->nd_net != &init_net) |
386 | return NOTIFY_DONE; | 398 | return NOTIFY_DONE; |
387 | 399 | ||
400 | if (is_vlan_dev(dev)) { | ||
401 | __vlan_device_event(dev, event); | ||
402 | goto out; | ||
403 | } | ||
404 | |||
405 | grp = __vlan_find_group(dev->ifindex); | ||
388 | if (!grp) | 406 | if (!grp) |
389 | goto out; | 407 | goto out; |
390 | 408 | ||
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h index 73efcc715ccb..51271aea402b 100644 --- a/net/8021q/vlan.h +++ b/net/8021q/vlan.h | |||
@@ -45,4 +45,9 @@ void vlan_netlink_fini(void); | |||
45 | 45 | ||
46 | extern struct rtnl_link_ops vlan_link_ops; | 46 | extern struct rtnl_link_ops vlan_link_ops; |
47 | 47 | ||
48 | static inline int is_vlan_dev(struct net_device *dev) | ||
49 | { | ||
50 | return dev->priv_flags & IFF_802_1Q_VLAN; | ||
51 | } | ||
52 | |||
48 | #endif /* !(__BEN_VLAN_802_1Q_INC__) */ | 53 | #endif /* !(__BEN_VLAN_802_1Q_INC__) */ |
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c index 146cfb0e9882..9671aa51af2c 100644 --- a/net/8021q/vlanproc.c +++ b/net/8021q/vlanproc.c | |||
@@ -210,11 +210,6 @@ int vlan_proc_rem_dev(struct net_device *vlandev) | |||
210 | * The following few functions build the content of /proc/net/vlan/config | 210 | * The following few functions build the content of /proc/net/vlan/config |
211 | */ | 211 | */ |
212 | 212 | ||
213 | static inline int is_vlan_dev(struct net_device *dev) | ||
214 | { | ||
215 | return dev->priv_flags & IFF_802_1Q_VLAN; | ||
216 | } | ||
217 | |||
218 | /* start read of /proc/net/vlan/config */ | 213 | /* start read of /proc/net/vlan/config */ |
219 | static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) | 214 | static void *vlan_seq_start(struct seq_file *seq, loff_t *pos) |
220 | __acquires(dev_base_lock) | 215 | __acquires(dev_base_lock) |
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 1220d8a41eb5..d366423c8392 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -53,6 +53,30 @@ | |||
53 | /* Bluetooth sockets */ | 53 | /* Bluetooth sockets */ |
54 | #define BT_MAX_PROTO 8 | 54 | #define BT_MAX_PROTO 8 |
55 | static struct net_proto_family *bt_proto[BT_MAX_PROTO]; | 55 | static struct net_proto_family *bt_proto[BT_MAX_PROTO]; |
56 | |||
57 | static struct lock_class_key bt_slock_key[BT_MAX_PROTO]; | ||
58 | static struct lock_class_key bt_lock_key[BT_MAX_PROTO]; | ||
59 | static const char *bt_key_strings[BT_MAX_PROTO] = { | ||
60 | "sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP", | ||
61 | "sk_lock-AF_BLUETOOTH-BTPROTO_HCI", | ||
62 | "sk_lock-AF_BLUETOOTH-BTPROTO_SCO", | ||
63 | "sk_lock-AF_BLUETOOTH-BTPROTO_RFCOMM", | ||
64 | "sk_lock-AF_BLUETOOTH-BTPROTO_BNEP", | ||
65 | "sk_lock-AF_BLUETOOTH-BTPROTO_CMTP", | ||
66 | "sk_lock-AF_BLUETOOTH-BTPROTO_HIDP", | ||
67 | "sk_lock-AF_BLUETOOTH-BTPROTO_AVDTP", | ||
68 | }; | ||
69 | |||
70 | static const char *bt_slock_key_strings[BT_MAX_PROTO] = { | ||
71 | "slock-AF_BLUETOOTH-BTPROTO_L2CAP", | ||
72 | "slock-AF_BLUETOOTH-BTPROTO_HCI", | ||
73 | "slock-AF_BLUETOOTH-BTPROTO_SCO", | ||
74 | "slock-AF_BLUETOOTH-BTPROTO_RFCOMM", | ||
75 | "slock-AF_BLUETOOTH-BTPROTO_BNEP", | ||
76 | "slock-AF_BLUETOOTH-BTPROTO_CMTP", | ||
77 | "slock-AF_BLUETOOTH-BTPROTO_HIDP", | ||
78 | "slock-AF_BLUETOOTH-BTPROTO_AVDTP", | ||
79 | }; | ||
56 | static DEFINE_RWLOCK(bt_proto_lock); | 80 | static DEFINE_RWLOCK(bt_proto_lock); |
57 | 81 | ||
58 | int bt_sock_register(int proto, struct net_proto_family *ops) | 82 | int bt_sock_register(int proto, struct net_proto_family *ops) |
@@ -95,6 +119,21 @@ int bt_sock_unregister(int proto) | |||
95 | } | 119 | } |
96 | EXPORT_SYMBOL(bt_sock_unregister); | 120 | EXPORT_SYMBOL(bt_sock_unregister); |
97 | 121 | ||
122 | static void bt_reclassify_sock_lock(struct socket *sock, int proto) | ||
123 | { | ||
124 | struct sock *sk = sock->sk; | ||
125 | |||
126 | if (!sk) | ||
127 | return; | ||
128 | BUG_ON(sock_owned_by_user(sk)); | ||
129 | |||
130 | sock_lock_init_class_and_name(sk, | ||
131 | bt_slock_key_strings[proto], | ||
132 | &bt_slock_key[proto], | ||
133 | bt_key_strings[proto], | ||
134 | &bt_lock_key[proto]); | ||
135 | } | ||
136 | |||
98 | static int bt_sock_create(struct net *net, struct socket *sock, int proto) | 137 | static int bt_sock_create(struct net *net, struct socket *sock, int proto) |
99 | { | 138 | { |
100 | int err; | 139 | int err; |
@@ -117,6 +156,7 @@ static int bt_sock_create(struct net *net, struct socket *sock, int proto) | |||
117 | 156 | ||
118 | if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { | 157 | if (bt_proto[proto] && try_module_get(bt_proto[proto]->owner)) { |
119 | err = bt_proto[proto]->create(net, sock, proto); | 158 | err = bt_proto[proto]->create(net, sock, proto); |
159 | bt_reclassify_sock_lock(sock, proto); | ||
120 | module_put(bt_proto[proto]->owner); | 160 | module_put(bt_proto[proto]->owner); |
121 | } | 161 | } |
122 | 162 | ||
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index b5d4019d3572..1d36c093523b 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -84,7 +84,7 @@ static struct hci_sec_filter hci_sec_filter = { | |||
84 | }; | 84 | }; |
85 | 85 | ||
86 | static struct bt_sock_list hci_sk_list = { | 86 | static struct bt_sock_list hci_sk_list = { |
87 | .lock = RW_LOCK_UNLOCKED | 87 | .lock = __RW_LOCK_UNLOCKED(hci_sk_list.lock) |
88 | }; | 88 | }; |
89 | 89 | ||
90 | /* Send frame to RAW socket */ | 90 | /* Send frame to RAW socket */ |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 34f8bf98bc05..2957df4b6c0b 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -62,7 +62,7 @@ static u32 l2cap_feat_mask = 0x0000; | |||
62 | static const struct proto_ops l2cap_sock_ops; | 62 | static const struct proto_ops l2cap_sock_ops; |
63 | 63 | ||
64 | static struct bt_sock_list l2cap_sk_list = { | 64 | static struct bt_sock_list l2cap_sk_list = { |
65 | .lock = RW_LOCK_UNLOCKED | 65 | .lock = __RW_LOCK_UNLOCKED(l2cap_sk_list.lock) |
66 | }; | 66 | }; |
67 | 67 | ||
68 | static void __l2cap_sock_close(struct sock *sk, int reason); | 68 | static void __l2cap_sock_close(struct sock *sk, int reason); |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 0c2c93735e93..eb62558e9b09 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) | |||
423 | 423 | ||
424 | rfcomm_dlc_lock(d); | 424 | rfcomm_dlc_lock(d); |
425 | d->state = BT_CLOSED; | 425 | d->state = BT_CLOSED; |
426 | d->state_change(d, err); | ||
427 | rfcomm_dlc_unlock(d); | 426 | rfcomm_dlc_unlock(d); |
427 | d->state_change(d, err); | ||
428 | 428 | ||
429 | skb_queue_purge(&d->tx_queue); | 429 | skb_queue_purge(&d->tx_queue); |
430 | rfcomm_dlc_unlink(d); | 430 | rfcomm_dlc_unlink(d); |
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c index c46d51035e77..af4e3934ee84 100644 --- a/net/bluetooth/rfcomm/sock.c +++ b/net/bluetooth/rfcomm/sock.c | |||
@@ -60,7 +60,7 @@ | |||
60 | static const struct proto_ops rfcomm_sock_ops; | 60 | static const struct proto_ops rfcomm_sock_ops; |
61 | 61 | ||
62 | static struct bt_sock_list rfcomm_sk_list = { | 62 | static struct bt_sock_list rfcomm_sk_list = { |
63 | .lock = RW_LOCK_UNLOCKED | 63 | .lock = __RW_LOCK_UNLOCKED(rfcomm_sk_list.lock) |
64 | }; | 64 | }; |
65 | 65 | ||
66 | static void rfcomm_sock_close(struct sock *sk); | 66 | static void rfcomm_sock_close(struct sock *sk); |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index e4c779bb8d76..c3f749abb2d0 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -570,12 +570,7 @@ static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err) | |||
570 | return; | 570 | return; |
571 | 571 | ||
572 | rfcomm_dev_del(dev); | 572 | rfcomm_dev_del(dev); |
573 | /* We have to drop DLC lock here, otherwise | ||
574 | rfcomm_dev_put() will dead lock if it's | ||
575 | the last reference. */ | ||
576 | rfcomm_dlc_unlock(dlc); | ||
577 | rfcomm_dev_put(dev); | 573 | rfcomm_dev_put(dev); |
578 | rfcomm_dlc_lock(dlc); | ||
579 | } | 574 | } |
580 | } else | 575 | } else |
581 | tty_hangup(dev->tty); | 576 | tty_hangup(dev->tty); |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index b91d3c81a73c..cd887cdca426 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -58,7 +58,7 @@ | |||
58 | static const struct proto_ops sco_sock_ops; | 58 | static const struct proto_ops sco_sock_ops; |
59 | 59 | ||
60 | static struct bt_sock_list sco_sk_list = { | 60 | static struct bt_sock_list sco_sk_list = { |
61 | .lock = RW_LOCK_UNLOCKED | 61 | .lock = __RW_LOCK_UNLOCKED(sco_sk_list.lock) |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent); | 64 | static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, struct sock *parent); |
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index f3ceca31aa45..4e73e5708e70 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -336,7 +336,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) | |||
336 | struct scatterlist *asg; | 336 | struct scatterlist *asg; |
337 | int err = -EINVAL; | 337 | int err = -EINVAL; |
338 | 338 | ||
339 | if (!pskb_may_pull(skb, sizeof(*esph))) | 339 | if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) |
340 | goto out; | 340 | goto out; |
341 | 341 | ||
342 | if (elen <= 0) | 342 | if (elen <= 0) |
diff --git a/net/ipv4/inet_fragment.c b/net/ipv4/inet_fragment.c index 724d69aed031..a0a3c78cb5e0 100644 --- a/net/ipv4/inet_fragment.c +++ b/net/ipv4/inet_fragment.c | |||
@@ -86,7 +86,10 @@ EXPORT_SYMBOL(inet_frags_fini); | |||
86 | void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f) | 86 | void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f) |
87 | { | 87 | { |
88 | nf->low_thresh = 0; | 88 | nf->low_thresh = 0; |
89 | |||
90 | local_bh_disable(); | ||
89 | inet_frag_evictor(nf, f); | 91 | inet_frag_evictor(nf, f); |
92 | local_bh_enable(); | ||
90 | } | 93 | } |
91 | EXPORT_SYMBOL(inet_frags_exit_net); | 94 | EXPORT_SYMBOL(inet_frags_exit_net); |
92 | 95 | ||
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index 0b3b328d82db..a4506c8cfef0 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c | |||
@@ -85,7 +85,7 @@ int ip_forward(struct sk_buff *skb) | |||
85 | if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway) | 85 | if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway) |
86 | goto sr_failed; | 86 | goto sr_failed; |
87 | 87 | ||
88 | if (unlikely(skb->len > dst_mtu(&rt->u.dst) && | 88 | if (unlikely(skb->len > dst_mtu(&rt->u.dst) && !skb_is_gso(skb) && |
89 | (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) { | 89 | (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) { |
90 | IP_INC_STATS(IPSTATS_MIB_FRAGFAILS); | 90 | IP_INC_STATS(IPSTATS_MIB_FRAGFAILS); |
91 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, | 91 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, |
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index fe05da41d6ba..4dc162894cb2 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -588,11 +588,9 @@ static int __init ip_queue_init(void) | |||
588 | } | 588 | } |
589 | 589 | ||
590 | #ifdef CONFIG_PROC_FS | 590 | #ifdef CONFIG_PROC_FS |
591 | proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net); | 591 | proc = proc_create(IPQ_PROC_FS_NAME, 0, init_net.proc_net, |
592 | if (proc) { | 592 | &ip_queue_proc_fops); |
593 | proc->owner = THIS_MODULE; | 593 | if (!proc) { |
594 | proc->proc_fops = &ip_queue_proc_fops; | ||
595 | } else { | ||
596 | printk(KERN_ERR "ip_queue: failed to create proc entry\n"); | 594 | printk(KERN_ERR "ip_queue: failed to create proc entry\n"); |
597 | goto cleanup_ipqnl; | 595 | goto cleanup_ipqnl; |
598 | } | 596 | } |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index c6cf84c77611..52926c8e3cc1 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -167,14 +167,13 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, __be32 ip, | |||
167 | 167 | ||
168 | /* create proc dir entry */ | 168 | /* create proc dir entry */ |
169 | sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); | 169 | sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); |
170 | c->pde = create_proc_entry(buffer, S_IWUSR|S_IRUSR, | 170 | c->pde = proc_create(buffer, S_IWUSR|S_IRUSR, |
171 | clusterip_procdir); | 171 | clusterip_procdir, &clusterip_proc_fops); |
172 | if (!c->pde) { | 172 | if (!c->pde) { |
173 | kfree(c); | 173 | kfree(c); |
174 | return NULL; | 174 | return NULL; |
175 | } | 175 | } |
176 | } | 176 | } |
177 | c->pde->proc_fops = &clusterip_proc_fops; | ||
178 | c->pde->data = c; | 177 | c->pde->data = c; |
179 | #endif | 178 | #endif |
180 | 179 | ||
diff --git a/net/ipv4/netfilter/ipt_recent.c b/net/ipv4/netfilter/ipt_recent.c index 8e8f0425a8ed..50e06690eb5b 100644 --- a/net/ipv4/netfilter/ipt_recent.c +++ b/net/ipv4/netfilter/ipt_recent.c | |||
@@ -276,12 +276,11 @@ recent_mt_check(const char *tablename, const void *ip, | |||
276 | for (i = 0; i < ip_list_hash_size; i++) | 276 | for (i = 0; i < ip_list_hash_size; i++) |
277 | INIT_LIST_HEAD(&t->iphash[i]); | 277 | INIT_LIST_HEAD(&t->iphash[i]); |
278 | #ifdef CONFIG_PROC_FS | 278 | #ifdef CONFIG_PROC_FS |
279 | t->proc = create_proc_entry(t->name, ip_list_perms, proc_dir); | 279 | t->proc = proc_create(t->name, ip_list_perms, proc_dir, &recent_fops); |
280 | if (t->proc == NULL) { | 280 | if (t->proc == NULL) { |
281 | kfree(t); | 281 | kfree(t); |
282 | goto out; | 282 | goto out; |
283 | } | 283 | } |
284 | t->proc->proc_fops = &recent_fops; | ||
285 | t->proc->uid = ip_list_uid; | 284 | t->proc->uid = ip_list_uid; |
286 | t->proc->gid = ip_list_gid; | 285 | t->proc->gid = ip_list_gid; |
287 | t->proc->data = t; | 286 | t->proc->data = t; |
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index 089252e82c01..f500b0fdaef4 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -395,13 +395,10 @@ int __init nf_conntrack_ipv4_compat_init(void) | |||
395 | if (!proc_exp) | 395 | if (!proc_exp) |
396 | goto err2; | 396 | goto err2; |
397 | 397 | ||
398 | proc_stat = create_proc_entry("ip_conntrack", S_IRUGO, init_net.proc_net_stat); | 398 | proc_stat = proc_create("ip_conntrack", S_IRUGO, |
399 | init_net.proc_net_stat, &ct_cpu_seq_fops); | ||
399 | if (!proc_stat) | 400 | if (!proc_stat) |
400 | goto err3; | 401 | goto err3; |
401 | |||
402 | proc_stat->proc_fops = &ct_cpu_seq_fops; | ||
403 | proc_stat->owner = THIS_MODULE; | ||
404 | |||
405 | return 0; | 402 | return 0; |
406 | 403 | ||
407 | err3: | 404 | err3: |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 7ea1b67b6de1..1704c1474ea1 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1556,14 +1556,14 @@ static void *udp_seq_start(struct seq_file *seq, loff_t *pos) | |||
1556 | __acquires(udp_hash_lock) | 1556 | __acquires(udp_hash_lock) |
1557 | { | 1557 | { |
1558 | read_lock(&udp_hash_lock); | 1558 | read_lock(&udp_hash_lock); |
1559 | return *pos ? udp_get_idx(seq, *pos-1) : (void *)1; | 1559 | return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN; |
1560 | } | 1560 | } |
1561 | 1561 | ||
1562 | static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos) | 1562 | static void *udp_seq_next(struct seq_file *seq, void *v, loff_t *pos) |
1563 | { | 1563 | { |
1564 | struct sock *sk; | 1564 | struct sock *sk; |
1565 | 1565 | ||
1566 | if (v == (void *)1) | 1566 | if (v == SEQ_START_TOKEN) |
1567 | sk = udp_get_idx(seq, 0); | 1567 | sk = udp_get_idx(seq, 0); |
1568 | else | 1568 | else |
1569 | sk = udp_get_next(seq, v); | 1569 | sk = udp_get_next(seq, v); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 101e0e70ba27..e7a1882db048 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -776,6 +776,7 @@ static int ipv6_create_tempaddr(struct inet6_ifaddr *ifp, struct inet6_ifaddr *i | |||
776 | struct inet6_dev *idev = ifp->idev; | 776 | struct inet6_dev *idev = ifp->idev; |
777 | struct in6_addr addr, *tmpaddr; | 777 | struct in6_addr addr, *tmpaddr; |
778 | unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_cstamp, tmp_tstamp; | 778 | unsigned long tmp_prefered_lft, tmp_valid_lft, tmp_cstamp, tmp_tstamp; |
779 | unsigned long regen_advance; | ||
779 | int tmp_plen; | 780 | int tmp_plen; |
780 | int ret = 0; | 781 | int ret = 0; |
781 | int max_addresses; | 782 | int max_addresses; |
@@ -836,8 +837,23 @@ retry: | |||
836 | tmp_tstamp = ifp->tstamp; | 837 | tmp_tstamp = ifp->tstamp; |
837 | spin_unlock_bh(&ifp->lock); | 838 | spin_unlock_bh(&ifp->lock); |
838 | 839 | ||
840 | regen_advance = idev->cnf.regen_max_retry * | ||
841 | idev->cnf.dad_transmits * | ||
842 | idev->nd_parms->retrans_time / HZ; | ||
839 | write_unlock(&idev->lock); | 843 | write_unlock(&idev->lock); |
840 | 844 | ||
845 | /* A temporary address is created only if this calculated Preferred | ||
846 | * Lifetime is greater than REGEN_ADVANCE time units. In particular, | ||
847 | * an implementation must not create a temporary address with a zero | ||
848 | * Preferred Lifetime. | ||
849 | */ | ||
850 | if (tmp_prefered_lft <= regen_advance) { | ||
851 | in6_ifa_put(ifp); | ||
852 | in6_dev_put(idev); | ||
853 | ret = -1; | ||
854 | goto out; | ||
855 | } | ||
856 | |||
841 | addr_flags = IFA_F_TEMPORARY; | 857 | addr_flags = IFA_F_TEMPORARY; |
842 | /* set in addrconf_prefix_rcv() */ | 858 | /* set in addrconf_prefix_rcv() */ |
843 | if (ifp->flags & IFA_F_OPTIMISTIC) | 859 | if (ifp->flags & IFA_F_OPTIMISTIC) |
@@ -1831,6 +1847,9 @@ ok: | |||
1831 | * lifetimes of an existing temporary address | 1847 | * lifetimes of an existing temporary address |
1832 | * when processing a Prefix Information Option. | 1848 | * when processing a Prefix Information Option. |
1833 | */ | 1849 | */ |
1850 | if (ifp != ift->ifpub) | ||
1851 | continue; | ||
1852 | |||
1834 | spin_lock(&ift->lock); | 1853 | spin_lock(&ift->lock); |
1835 | flags = ift->flags; | 1854 | flags = ift->flags; |
1836 | if (ift->valid_lft > valid_lft && | 1855 | if (ift->valid_lft > valid_lft && |
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 0ec1402320ea..c6bb4c6d24b3 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
@@ -282,7 +282,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) | |||
282 | struct scatterlist *sg; | 282 | struct scatterlist *sg; |
283 | struct scatterlist *asg; | 283 | struct scatterlist *asg; |
284 | 284 | ||
285 | if (!pskb_may_pull(skb, sizeof(*esph))) { | 285 | if (!pskb_may_pull(skb, sizeof(*esph) + crypto_aead_ivsize(aead))) { |
286 | ret = -EINVAL; | 286 | ret = -EINVAL; |
287 | goto out; | 287 | goto out; |
288 | } | 288 | } |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 121d517bf91c..f204a7275a0d 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -436,10 +436,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
436 | } | 436 | } |
437 | 437 | ||
438 | if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) | 438 | if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) |
439 | goto out; | 439 | goto out_dst_release; |
440 | 440 | ||
441 | if (ip6_dst_lookup(sk, &dst2, &fl)) | 441 | if (ip6_dst_lookup(sk, &dst2, &fl)) |
442 | goto out; | 442 | goto out_dst_release; |
443 | 443 | ||
444 | err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP); | 444 | err = xfrm_lookup(&dst2, &fl, sk, XFRM_LOOKUP_ICMP); |
445 | if (err == -ENOENT) { | 445 | if (err == -ENOENT) { |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 178aebc0427a..98ab4f459905 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -239,8 +239,7 @@ int ip6_mc_input(struct sk_buff *skb) | |||
239 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); | 239 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_INMCASTPKTS); |
240 | 240 | ||
241 | hdr = ipv6_hdr(skb); | 241 | hdr = ipv6_hdr(skb); |
242 | deliver = unlikely(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) || | 242 | deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL); |
243 | ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL); | ||
244 | 243 | ||
245 | /* | 244 | /* |
246 | * IPv6 multicast router mode isnt currently supported. | 245 | * IPv6 multicast router mode isnt currently supported. |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index cc2f9afcf808..8d366f7f2a9a 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
@@ -591,11 +591,9 @@ static int __init ip6_queue_init(void) | |||
591 | } | 591 | } |
592 | 592 | ||
593 | #ifdef CONFIG_PROC_FS | 593 | #ifdef CONFIG_PROC_FS |
594 | proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net); | 594 | proc = proc_create(IPQ_PROC_FS_NAME, 0, init_net.proc_net, |
595 | if (proc) { | 595 | &ip6_queue_proc_fops); |
596 | proc->owner = THIS_MODULE; | 596 | if (!proc) { |
597 | proc->proc_fops = &ip6_queue_proc_fops; | ||
598 | } else { | ||
599 | printk(KERN_ERR "ip6_queue: failed to create proc entry\n"); | 597 | printk(KERN_ERR "ip6_queue: failed to create proc entry\n"); |
600 | goto cleanup_ipqnl; | 598 | goto cleanup_ipqnl; |
601 | } | 599 | } |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 2a0d698b24d5..24c0d03095bf 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -171,7 +171,9 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq) | |||
171 | 171 | ||
172 | static void nf_ct_frag6_evictor(void) | 172 | static void nf_ct_frag6_evictor(void) |
173 | { | 173 | { |
174 | local_bh_disable(); | ||
174 | inet_frag_evictor(&nf_init_frags, &nf_frags); | 175 | inet_frag_evictor(&nf_init_frags, &nf_frags); |
176 | local_bh_enable(); | ||
175 | } | 177 | } |
176 | 178 | ||
177 | static void nf_ct_frag6_expire(unsigned long data) | 179 | static void nf_ct_frag6_expire(unsigned long data) |
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 46cf962f7f88..8c50eb430c19 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -155,6 +155,9 @@ static int llc_ui_create(struct net *net, struct socket *sock, int protocol) | |||
155 | struct sock *sk; | 155 | struct sock *sk; |
156 | int rc = -ESOCKTNOSUPPORT; | 156 | int rc = -ESOCKTNOSUPPORT; |
157 | 157 | ||
158 | if (!capable(CAP_NET_RAW)) | ||
159 | return -EPERM; | ||
160 | |||
158 | if (net != &init_net) | 161 | if (net != &init_net) |
159 | return -EAFNOSUPPORT; | 162 | return -EAFNOSUPPORT; |
160 | 163 | ||
diff --git a/net/llc/llc_c_ac.c b/net/llc/llc_c_ac.c index 860140caa6e0..71a00225bdb3 100644 --- a/net/llc/llc_c_ac.c +++ b/net/llc/llc_c_ac.c | |||
@@ -198,7 +198,7 @@ int llc_conn_ac_send_disc_cmd_p_set_x(struct sock *sk, struct sk_buff *skb) | |||
198 | { | 198 | { |
199 | int rc = -ENOBUFS; | 199 | int rc = -ENOBUFS; |
200 | struct llc_sock *llc = llc_sk(sk); | 200 | struct llc_sock *llc = llc_sk(sk); |
201 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 201 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); |
202 | 202 | ||
203 | if (nskb) { | 203 | if (nskb) { |
204 | struct llc_sap *sap = llc->sap; | 204 | struct llc_sap *sap = llc->sap; |
@@ -223,7 +223,7 @@ int llc_conn_ac_send_dm_rsp_f_set_p(struct sock *sk, struct sk_buff *skb) | |||
223 | { | 223 | { |
224 | int rc = -ENOBUFS; | 224 | int rc = -ENOBUFS; |
225 | struct llc_sock *llc = llc_sk(sk); | 225 | struct llc_sock *llc = llc_sk(sk); |
226 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 226 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); |
227 | 227 | ||
228 | if (nskb) { | 228 | if (nskb) { |
229 | struct llc_sap *sap = llc->sap; | 229 | struct llc_sap *sap = llc->sap; |
@@ -249,7 +249,7 @@ int llc_conn_ac_send_dm_rsp_f_set_1(struct sock *sk, struct sk_buff *skb) | |||
249 | { | 249 | { |
250 | int rc = -ENOBUFS; | 250 | int rc = -ENOBUFS; |
251 | struct llc_sock *llc = llc_sk(sk); | 251 | struct llc_sock *llc = llc_sk(sk); |
252 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 252 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); |
253 | 253 | ||
254 | if (nskb) { | 254 | if (nskb) { |
255 | struct llc_sap *sap = llc->sap; | 255 | struct llc_sap *sap = llc->sap; |
@@ -282,7 +282,8 @@ int llc_conn_ac_send_frmr_rsp_f_set_x(struct sock *sk, struct sk_buff *skb) | |||
282 | llc_pdu_decode_pf_bit(skb, &f_bit); | 282 | llc_pdu_decode_pf_bit(skb, &f_bit); |
283 | else | 283 | else |
284 | f_bit = 0; | 284 | f_bit = 0; |
285 | nskb = llc_alloc_frame(sk, llc->dev); | 285 | nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, |
286 | sizeof(struct llc_frmr_info)); | ||
286 | if (nskb) { | 287 | if (nskb) { |
287 | struct llc_sap *sap = llc->sap; | 288 | struct llc_sap *sap = llc->sap; |
288 | 289 | ||
@@ -306,7 +307,8 @@ int llc_conn_ac_resend_frmr_rsp_f_set_0(struct sock *sk, struct sk_buff *skb) | |||
306 | { | 307 | { |
307 | int rc = -ENOBUFS; | 308 | int rc = -ENOBUFS; |
308 | struct llc_sock *llc = llc_sk(sk); | 309 | struct llc_sock *llc = llc_sk(sk); |
309 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 310 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, |
311 | sizeof(struct llc_frmr_info)); | ||
310 | 312 | ||
311 | if (nskb) { | 313 | if (nskb) { |
312 | struct llc_sap *sap = llc->sap; | 314 | struct llc_sap *sap = llc->sap; |
@@ -336,7 +338,8 @@ int llc_conn_ac_resend_frmr_rsp_f_set_p(struct sock *sk, struct sk_buff *skb) | |||
336 | struct llc_sock *llc = llc_sk(sk); | 338 | struct llc_sock *llc = llc_sk(sk); |
337 | 339 | ||
338 | llc_pdu_decode_pf_bit(skb, &f_bit); | 340 | llc_pdu_decode_pf_bit(skb, &f_bit); |
339 | nskb = llc_alloc_frame(sk, llc->dev); | 341 | nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, |
342 | sizeof(struct llc_frmr_info)); | ||
340 | if (nskb) { | 343 | if (nskb) { |
341 | struct llc_sap *sap = llc->sap; | 344 | struct llc_sap *sap = llc->sap; |
342 | struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); | 345 | struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); |
@@ -424,7 +427,7 @@ int llc_conn_ac_resend_i_xxx_x_set_0_or_send_rr(struct sock *sk, | |||
424 | struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); | 427 | struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb); |
425 | int rc = -ENOBUFS; | 428 | int rc = -ENOBUFS; |
426 | struct llc_sock *llc = llc_sk(sk); | 429 | struct llc_sock *llc = llc_sk(sk); |
427 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 430 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); |
428 | 431 | ||
429 | if (nskb) { | 432 | if (nskb) { |
430 | struct llc_sap *sap = llc->sap; | 433 | struct llc_sap *sap = llc->sap; |
@@ -459,7 +462,7 @@ int llc_conn_ac_send_rej_cmd_p_set_1(struct sock *sk, struct sk_buff *skb) | |||
459 | { | 462 | { |
460 | int rc = -ENOBUFS; | 463 | int rc = -ENOBUFS; |
461 | struct llc_sock *llc = llc_sk(sk); | 464 | struct llc_sock *llc = llc_sk(sk); |
462 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 465 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
463 | 466 | ||
464 | if (nskb) { | 467 | if (nskb) { |
465 | struct llc_sap *sap = llc->sap; | 468 | struct llc_sap *sap = llc->sap; |
@@ -483,7 +486,7 @@ int llc_conn_ac_send_rej_rsp_f_set_1(struct sock *sk, struct sk_buff *skb) | |||
483 | { | 486 | { |
484 | int rc = -ENOBUFS; | 487 | int rc = -ENOBUFS; |
485 | struct llc_sock *llc = llc_sk(sk); | 488 | struct llc_sock *llc = llc_sk(sk); |
486 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 489 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
487 | 490 | ||
488 | if (nskb) { | 491 | if (nskb) { |
489 | struct llc_sap *sap = llc->sap; | 492 | struct llc_sap *sap = llc->sap; |
@@ -507,7 +510,7 @@ int llc_conn_ac_send_rej_xxx_x_set_0(struct sock *sk, struct sk_buff *skb) | |||
507 | { | 510 | { |
508 | int rc = -ENOBUFS; | 511 | int rc = -ENOBUFS; |
509 | struct llc_sock *llc = llc_sk(sk); | 512 | struct llc_sock *llc = llc_sk(sk); |
510 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 513 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
511 | 514 | ||
512 | if (nskb) { | 515 | if (nskb) { |
513 | struct llc_sap *sap = llc->sap; | 516 | struct llc_sap *sap = llc->sap; |
@@ -531,7 +534,7 @@ int llc_conn_ac_send_rnr_cmd_p_set_1(struct sock *sk, struct sk_buff *skb) | |||
531 | { | 534 | { |
532 | int rc = -ENOBUFS; | 535 | int rc = -ENOBUFS; |
533 | struct llc_sock *llc = llc_sk(sk); | 536 | struct llc_sock *llc = llc_sk(sk); |
534 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 537 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
535 | 538 | ||
536 | if (nskb) { | 539 | if (nskb) { |
537 | struct llc_sap *sap = llc->sap; | 540 | struct llc_sap *sap = llc->sap; |
@@ -555,7 +558,7 @@ int llc_conn_ac_send_rnr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb) | |||
555 | { | 558 | { |
556 | int rc = -ENOBUFS; | 559 | int rc = -ENOBUFS; |
557 | struct llc_sock *llc = llc_sk(sk); | 560 | struct llc_sock *llc = llc_sk(sk); |
558 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 561 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
559 | 562 | ||
560 | if (nskb) { | 563 | if (nskb) { |
561 | struct llc_sap *sap = llc->sap; | 564 | struct llc_sap *sap = llc->sap; |
@@ -579,7 +582,7 @@ int llc_conn_ac_send_rnr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb) | |||
579 | { | 582 | { |
580 | int rc = -ENOBUFS; | 583 | int rc = -ENOBUFS; |
581 | struct llc_sock *llc = llc_sk(sk); | 584 | struct llc_sock *llc = llc_sk(sk); |
582 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 585 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
583 | 586 | ||
584 | if (nskb) { | 587 | if (nskb) { |
585 | struct llc_sap *sap = llc->sap; | 588 | struct llc_sap *sap = llc->sap; |
@@ -615,7 +618,7 @@ int llc_conn_ac_opt_send_rnr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb) | |||
615 | { | 618 | { |
616 | int rc = -ENOBUFS; | 619 | int rc = -ENOBUFS; |
617 | struct llc_sock *llc = llc_sk(sk); | 620 | struct llc_sock *llc = llc_sk(sk); |
618 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 621 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
619 | 622 | ||
620 | if (nskb) { | 623 | if (nskb) { |
621 | struct llc_sap *sap = llc->sap; | 624 | struct llc_sap *sap = llc->sap; |
@@ -639,7 +642,7 @@ int llc_conn_ac_send_rr_cmd_p_set_1(struct sock *sk, struct sk_buff *skb) | |||
639 | { | 642 | { |
640 | int rc = -ENOBUFS; | 643 | int rc = -ENOBUFS; |
641 | struct llc_sock *llc = llc_sk(sk); | 644 | struct llc_sock *llc = llc_sk(sk); |
642 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 645 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
643 | 646 | ||
644 | if (nskb) { | 647 | if (nskb) { |
645 | struct llc_sap *sap = llc->sap; | 648 | struct llc_sap *sap = llc->sap; |
@@ -663,7 +666,7 @@ int llc_conn_ac_send_rr_rsp_f_set_1(struct sock *sk, struct sk_buff *skb) | |||
663 | { | 666 | { |
664 | int rc = -ENOBUFS; | 667 | int rc = -ENOBUFS; |
665 | struct llc_sock *llc = llc_sk(sk); | 668 | struct llc_sock *llc = llc_sk(sk); |
666 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 669 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
667 | 670 | ||
668 | if (nskb) { | 671 | if (nskb) { |
669 | struct llc_sap *sap = llc->sap; | 672 | struct llc_sap *sap = llc->sap; |
@@ -688,7 +691,7 @@ int llc_conn_ac_send_ack_rsp_f_set_1(struct sock *sk, struct sk_buff *skb) | |||
688 | { | 691 | { |
689 | int rc = -ENOBUFS; | 692 | int rc = -ENOBUFS; |
690 | struct llc_sock *llc = llc_sk(sk); | 693 | struct llc_sock *llc = llc_sk(sk); |
691 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 694 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
692 | 695 | ||
693 | if (nskb) { | 696 | if (nskb) { |
694 | struct llc_sap *sap = llc->sap; | 697 | struct llc_sap *sap = llc->sap; |
@@ -712,7 +715,7 @@ int llc_conn_ac_send_rr_xxx_x_set_0(struct sock *sk, struct sk_buff *skb) | |||
712 | { | 715 | { |
713 | int rc = -ENOBUFS; | 716 | int rc = -ENOBUFS; |
714 | struct llc_sock *llc = llc_sk(sk); | 717 | struct llc_sock *llc = llc_sk(sk); |
715 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 718 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
716 | 719 | ||
717 | if (nskb) { | 720 | if (nskb) { |
718 | struct llc_sap *sap = llc->sap; | 721 | struct llc_sap *sap = llc->sap; |
@@ -736,7 +739,7 @@ int llc_conn_ac_send_ack_xxx_x_set_0(struct sock *sk, struct sk_buff *skb) | |||
736 | { | 739 | { |
737 | int rc = -ENOBUFS; | 740 | int rc = -ENOBUFS; |
738 | struct llc_sock *llc = llc_sk(sk); | 741 | struct llc_sock *llc = llc_sk(sk); |
739 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 742 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
740 | 743 | ||
741 | if (nskb) { | 744 | if (nskb) { |
742 | struct llc_sap *sap = llc->sap; | 745 | struct llc_sap *sap = llc->sap; |
@@ -770,7 +773,7 @@ int llc_conn_ac_send_sabme_cmd_p_set_x(struct sock *sk, struct sk_buff *skb) | |||
770 | { | 773 | { |
771 | int rc = -ENOBUFS; | 774 | int rc = -ENOBUFS; |
772 | struct llc_sock *llc = llc_sk(sk); | 775 | struct llc_sock *llc = llc_sk(sk); |
773 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 776 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); |
774 | 777 | ||
775 | if (nskb) { | 778 | if (nskb) { |
776 | struct llc_sap *sap = llc->sap; | 779 | struct llc_sap *sap = llc->sap; |
@@ -799,7 +802,7 @@ int llc_conn_ac_send_ua_rsp_f_set_p(struct sock *sk, struct sk_buff *skb) | |||
799 | u8 f_bit; | 802 | u8 f_bit; |
800 | int rc = -ENOBUFS; | 803 | int rc = -ENOBUFS; |
801 | struct llc_sock *llc = llc_sk(sk); | 804 | struct llc_sock *llc = llc_sk(sk); |
802 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 805 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_U, 0); |
803 | 806 | ||
804 | llc_pdu_decode_pf_bit(skb, &f_bit); | 807 | llc_pdu_decode_pf_bit(skb, &f_bit); |
805 | if (nskb) { | 808 | if (nskb) { |
@@ -956,7 +959,7 @@ static int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk, | |||
956 | { | 959 | { |
957 | int rc = -ENOBUFS; | 960 | int rc = -ENOBUFS; |
958 | struct llc_sock *llc = llc_sk(sk); | 961 | struct llc_sock *llc = llc_sk(sk); |
959 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev); | 962 | struct sk_buff *nskb = llc_alloc_frame(sk, llc->dev, LLC_PDU_TYPE_S, 0); |
960 | 963 | ||
961 | if (nskb) { | 964 | if (nskb) { |
962 | struct llc_sap *sap = llc->sap; | 965 | struct llc_sap *sap = llc->sap; |
diff --git a/net/llc/llc_core.c b/net/llc/llc_core.c index 248b5903bb13..50d5b10e23a2 100644 --- a/net/llc/llc_core.c +++ b/net/llc/llc_core.c | |||
@@ -25,8 +25,6 @@ | |||
25 | LIST_HEAD(llc_sap_list); | 25 | LIST_HEAD(llc_sap_list); |
26 | DEFINE_RWLOCK(llc_sap_list_lock); | 26 | DEFINE_RWLOCK(llc_sap_list_lock); |
27 | 27 | ||
28 | unsigned char llc_station_mac_sa[ETH_ALEN]; | ||
29 | |||
30 | /** | 28 | /** |
31 | * llc_sap_alloc - allocates and initializes sap. | 29 | * llc_sap_alloc - allocates and initializes sap. |
32 | * | 30 | * |
@@ -37,8 +35,8 @@ static struct llc_sap *llc_sap_alloc(void) | |||
37 | struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC); | 35 | struct llc_sap *sap = kzalloc(sizeof(*sap), GFP_ATOMIC); |
38 | 36 | ||
39 | if (sap) { | 37 | if (sap) { |
38 | /* sap->laddr.mac - leave as a null, it's filled by bind */ | ||
40 | sap->state = LLC_SAP_STATE_ACTIVE; | 39 | sap->state = LLC_SAP_STATE_ACTIVE; |
41 | memcpy(sap->laddr.mac, llc_station_mac_sa, ETH_ALEN); | ||
42 | rwlock_init(&sap->sk_list.lock); | 40 | rwlock_init(&sap->sk_list.lock); |
43 | atomic_set(&sap->refcnt, 1); | 41 | atomic_set(&sap->refcnt, 1); |
44 | } | 42 | } |
@@ -167,10 +165,6 @@ static int __init llc_init(void) | |||
167 | if (dev != NULL) | 165 | if (dev != NULL) |
168 | dev = next_net_device(dev); | 166 | dev = next_net_device(dev); |
169 | 167 | ||
170 | if (dev != NULL) | ||
171 | memcpy(llc_station_mac_sa, dev->dev_addr, ETH_ALEN); | ||
172 | else | ||
173 | memset(llc_station_mac_sa, 0, ETH_ALEN); | ||
174 | dev_add_pack(&llc_packet_type); | 168 | dev_add_pack(&llc_packet_type); |
175 | dev_add_pack(&llc_tr_packet_type); | 169 | dev_add_pack(&llc_tr_packet_type); |
176 | return 0; | 170 | return 0; |
@@ -185,7 +179,6 @@ static void __exit llc_exit(void) | |||
185 | module_init(llc_init); | 179 | module_init(llc_init); |
186 | module_exit(llc_exit); | 180 | module_exit(llc_exit); |
187 | 181 | ||
188 | EXPORT_SYMBOL(llc_station_mac_sa); | ||
189 | EXPORT_SYMBOL(llc_sap_list); | 182 | EXPORT_SYMBOL(llc_sap_list); |
190 | EXPORT_SYMBOL(llc_sap_list_lock); | 183 | EXPORT_SYMBOL(llc_sap_list_lock); |
191 | EXPORT_SYMBOL(llc_sap_find); | 184 | EXPORT_SYMBOL(llc_sap_find); |
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c index c40c9b2a345a..bfd2567dd365 100644 --- a/net/llc/llc_input.c +++ b/net/llc/llc_input.c | |||
@@ -117,8 +117,12 @@ static inline int llc_fixup_skb(struct sk_buff *skb) | |||
117 | skb_pull(skb, llc_len); | 117 | skb_pull(skb, llc_len); |
118 | if (skb->protocol == htons(ETH_P_802_2)) { | 118 | if (skb->protocol == htons(ETH_P_802_2)) { |
119 | __be16 pdulen = eth_hdr(skb)->h_proto; | 119 | __be16 pdulen = eth_hdr(skb)->h_proto; |
120 | u16 data_size = ntohs(pdulen) - llc_len; | 120 | s32 data_size = ntohs(pdulen) - llc_len; |
121 | 121 | ||
122 | if (data_size < 0 || | ||
123 | ((skb_tail_pointer(skb) - | ||
124 | (u8 *)pdu) - llc_len) < data_size) | ||
125 | return 0; | ||
122 | if (unlikely(pskb_trim_rcsum(skb, data_size))) | 126 | if (unlikely(pskb_trim_rcsum(skb, data_size))) |
123 | return 0; | 127 | return 0; |
124 | } | 128 | } |
diff --git a/net/llc/llc_pdu.c b/net/llc/llc_pdu.c index fa8324396db3..2e6cb79196bb 100644 --- a/net/llc/llc_pdu.c +++ b/net/llc/llc_pdu.c | |||
@@ -241,7 +241,7 @@ void llc_pdu_init_as_frmr_rsp(struct sk_buff *skb, struct llc_pdu_sn *prev_pdu, | |||
241 | FRMR_INFO_SET_PDU_INFO_2LONG_IND(frmr_info, vzyxw); | 241 | FRMR_INFO_SET_PDU_INFO_2LONG_IND(frmr_info, vzyxw); |
242 | FRMR_INFO_SET_PDU_INVALID_Nr_IND(frmr_info, vzyxw); | 242 | FRMR_INFO_SET_PDU_INVALID_Nr_IND(frmr_info, vzyxw); |
243 | FRMR_INFO_SET_PDU_INVALID_Ns_IND(frmr_info, vzyxw); | 243 | FRMR_INFO_SET_PDU_INVALID_Ns_IND(frmr_info, vzyxw); |
244 | skb_put(skb, 5); | 244 | skb_put(skb, sizeof(struct llc_frmr_info)); |
245 | } | 245 | } |
246 | 246 | ||
247 | /** | 247 | /** |
diff --git a/net/llc/llc_s_ac.c b/net/llc/llc_s_ac.c index ac3d93b210d2..a94bd56bcac6 100644 --- a/net/llc/llc_s_ac.c +++ b/net/llc/llc_s_ac.c | |||
@@ -103,7 +103,8 @@ int llc_sap_action_send_xid_r(struct llc_sap *sap, struct sk_buff *skb) | |||
103 | llc_pdu_decode_sa(skb, mac_da); | 103 | llc_pdu_decode_sa(skb, mac_da); |
104 | llc_pdu_decode_da(skb, mac_sa); | 104 | llc_pdu_decode_da(skb, mac_sa); |
105 | llc_pdu_decode_ssap(skb, &dsap); | 105 | llc_pdu_decode_ssap(skb, &dsap); |
106 | nskb = llc_alloc_frame(NULL, skb->dev); | 106 | nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, |
107 | sizeof(struct llc_xid_info)); | ||
107 | if (!nskb) | 108 | if (!nskb) |
108 | goto out; | 109 | goto out; |
109 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, | 110 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, |
@@ -144,11 +145,15 @@ int llc_sap_action_send_test_r(struct llc_sap *sap, struct sk_buff *skb) | |||
144 | u8 mac_da[ETH_ALEN], mac_sa[ETH_ALEN], dsap; | 145 | u8 mac_da[ETH_ALEN], mac_sa[ETH_ALEN], dsap; |
145 | struct sk_buff *nskb; | 146 | struct sk_buff *nskb; |
146 | int rc = 1; | 147 | int rc = 1; |
148 | u32 data_size; | ||
147 | 149 | ||
148 | llc_pdu_decode_sa(skb, mac_da); | 150 | llc_pdu_decode_sa(skb, mac_da); |
149 | llc_pdu_decode_da(skb, mac_sa); | 151 | llc_pdu_decode_da(skb, mac_sa); |
150 | llc_pdu_decode_ssap(skb, &dsap); | 152 | llc_pdu_decode_ssap(skb, &dsap); |
151 | nskb = llc_alloc_frame(NULL, skb->dev); | 153 | |
154 | /* The test request command is type U (llc_len = 3) */ | ||
155 | data_size = ntohs(eth_hdr(skb)->h_proto) - 3; | ||
156 | nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, data_size); | ||
152 | if (!nskb) | 157 | if (!nskb) |
153 | goto out; | 158 | goto out; |
154 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, | 159 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, sap->laddr.lsap, dsap, |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index 2525165e2e8f..e2ddde755019 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -24,20 +24,41 @@ | |||
24 | #include <net/tcp_states.h> | 24 | #include <net/tcp_states.h> |
25 | #include <linux/llc.h> | 25 | #include <linux/llc.h> |
26 | 26 | ||
27 | static int llc_mac_header_len(unsigned short devtype) | ||
28 | { | ||
29 | switch (devtype) { | ||
30 | case ARPHRD_ETHER: | ||
31 | case ARPHRD_LOOPBACK: | ||
32 | return sizeof(struct ethhdr); | ||
33 | #ifdef CONFIG_TR | ||
34 | case ARPHRD_IEEE802_TR: | ||
35 | return sizeof(struct trh_hdr); | ||
36 | #endif | ||
37 | } | ||
38 | return 0; | ||
39 | } | ||
40 | |||
27 | /** | 41 | /** |
28 | * llc_alloc_frame - allocates sk_buff for frame | 42 | * llc_alloc_frame - allocates sk_buff for frame |
29 | * @dev: network device this skb will be sent over | 43 | * @dev: network device this skb will be sent over |
44 | * @type: pdu type to allocate | ||
45 | * @data_size: data size to allocate | ||
30 | * | 46 | * |
31 | * Allocates an sk_buff for frame and initializes sk_buff fields. | 47 | * Allocates an sk_buff for frame and initializes sk_buff fields. |
32 | * Returns allocated skb or %NULL when out of memory. | 48 | * Returns allocated skb or %NULL when out of memory. |
33 | */ | 49 | */ |
34 | struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev) | 50 | struct sk_buff *llc_alloc_frame(struct sock *sk, struct net_device *dev, |
51 | u8 type, u32 data_size) | ||
35 | { | 52 | { |
36 | struct sk_buff *skb = alloc_skb(128, GFP_ATOMIC); | 53 | int hlen = type == LLC_PDU_TYPE_U ? 3 : 4; |
54 | struct sk_buff *skb; | ||
55 | |||
56 | hlen += llc_mac_header_len(dev->type); | ||
57 | skb = alloc_skb(hlen + data_size, GFP_ATOMIC); | ||
37 | 58 | ||
38 | if (skb) { | 59 | if (skb) { |
39 | skb_reset_mac_header(skb); | 60 | skb_reset_mac_header(skb); |
40 | skb_reserve(skb, 50); | 61 | skb_reserve(skb, hlen); |
41 | skb_reset_network_header(skb); | 62 | skb_reset_network_header(skb); |
42 | skb_reset_transport_header(skb); | 63 | skb_reset_transport_header(skb); |
43 | skb->protocol = htons(ETH_P_802_2); | 64 | skb->protocol = htons(ETH_P_802_2); |
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c index 6f2ea2090322..83da13339490 100644 --- a/net/llc/llc_station.c +++ b/net/llc/llc_station.c | |||
@@ -253,13 +253,14 @@ static int llc_station_ac_inc_xid_r_cnt_by_1(struct sk_buff *skb) | |||
253 | static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb) | 253 | static int llc_station_ac_send_null_dsap_xid_c(struct sk_buff *skb) |
254 | { | 254 | { |
255 | int rc = 1; | 255 | int rc = 1; |
256 | struct sk_buff *nskb = llc_alloc_frame(NULL, skb->dev); | 256 | struct sk_buff *nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, |
257 | sizeof(struct llc_xid_info)); | ||
257 | 258 | ||
258 | if (!nskb) | 259 | if (!nskb) |
259 | goto out; | 260 | goto out; |
260 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD); | 261 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, 0, LLC_PDU_CMD); |
261 | llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127); | 262 | llc_pdu_init_as_xid_cmd(nskb, LLC_XID_NULL_CLASS_2, 127); |
262 | rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, llc_station_mac_sa); | 263 | rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, skb->dev->dev_addr); |
263 | if (unlikely(rc)) | 264 | if (unlikely(rc)) |
264 | goto free; | 265 | goto free; |
265 | llc_station_send_pdu(nskb); | 266 | llc_station_send_pdu(nskb); |
@@ -274,7 +275,8 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb) | |||
274 | { | 275 | { |
275 | u8 mac_da[ETH_ALEN], dsap; | 276 | u8 mac_da[ETH_ALEN], dsap; |
276 | int rc = 1; | 277 | int rc = 1; |
277 | struct sk_buff* nskb = llc_alloc_frame(NULL, skb->dev); | 278 | struct sk_buff *nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, |
279 | sizeof(struct llc_xid_info)); | ||
278 | 280 | ||
279 | if (!nskb) | 281 | if (!nskb) |
280 | goto out; | 282 | goto out; |
@@ -283,7 +285,7 @@ static int llc_station_ac_send_xid_r(struct sk_buff *skb) | |||
283 | llc_pdu_decode_ssap(skb, &dsap); | 285 | llc_pdu_decode_ssap(skb, &dsap); |
284 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); | 286 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); |
285 | llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127); | 287 | llc_pdu_init_as_xid_rsp(nskb, LLC_XID_NULL_CLASS_2, 127); |
286 | rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da); | 288 | rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da); |
287 | if (unlikely(rc)) | 289 | if (unlikely(rc)) |
288 | goto free; | 290 | goto free; |
289 | llc_station_send_pdu(nskb); | 291 | llc_station_send_pdu(nskb); |
@@ -298,7 +300,12 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb) | |||
298 | { | 300 | { |
299 | u8 mac_da[ETH_ALEN], dsap; | 301 | u8 mac_da[ETH_ALEN], dsap; |
300 | int rc = 1; | 302 | int rc = 1; |
301 | struct sk_buff *nskb = llc_alloc_frame(NULL, skb->dev); | 303 | u32 data_size; |
304 | struct sk_buff *nskb; | ||
305 | |||
306 | /* The test request command is type U (llc_len = 3) */ | ||
307 | data_size = ntohs(eth_hdr(skb)->h_proto) - 3; | ||
308 | nskb = llc_alloc_frame(NULL, skb->dev, LLC_PDU_TYPE_U, data_size); | ||
302 | 309 | ||
303 | if (!nskb) | 310 | if (!nskb) |
304 | goto out; | 311 | goto out; |
@@ -307,7 +314,7 @@ static int llc_station_ac_send_test_r(struct sk_buff *skb) | |||
307 | llc_pdu_decode_ssap(skb, &dsap); | 314 | llc_pdu_decode_ssap(skb, &dsap); |
308 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); | 315 | llc_pdu_header_init(nskb, LLC_PDU_TYPE_U, 0, dsap, LLC_PDU_RSP); |
309 | llc_pdu_init_as_test_rsp(nskb, skb); | 316 | llc_pdu_init_as_test_rsp(nskb, skb); |
310 | rc = llc_mac_hdr_init(nskb, llc_station_mac_sa, mac_da); | 317 | rc = llc_mac_hdr_init(nskb, skb->dev->dev_addr, mac_da); |
311 | if (unlikely(rc)) | 318 | if (unlikely(rc)) |
312 | goto free; | 319 | goto free; |
313 | llc_station_send_pdu(nskb); | 320 | llc_station_send_pdu(nskb); |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 28bcdf9fc3df..8e586390a2ef 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -286,6 +286,18 @@ static int ieee80211_open(struct net_device *dev) | |||
286 | if (need_hw_reconfig) | 286 | if (need_hw_reconfig) |
287 | ieee80211_hw_config(local); | 287 | ieee80211_hw_config(local); |
288 | 288 | ||
289 | /* | ||
290 | * ieee80211_sta_work is disabled while network interface | ||
291 | * is down. Therefore, some configuration changes may not | ||
292 | * yet be effective. Trigger execution of ieee80211_sta_work | ||
293 | * to fix this. | ||
294 | */ | ||
295 | if(sdata->vif.type == IEEE80211_IF_TYPE_STA || | ||
296 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { | ||
297 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | ||
298 | queue_work(local->hw.workqueue, &ifsta->work); | ||
299 | } | ||
300 | |||
289 | netif_start_queue(dev); | 301 | netif_start_queue(dev); |
290 | 302 | ||
291 | return 0; | 303 | return 0; |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 9aeed5320228..e0c72d04584b 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -319,7 +319,7 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, | |||
319 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; | 319 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; |
320 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 320 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
321 | bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; | 321 | bool use_protection = (erp_value & WLAN_ERP_USE_PROTECTION) != 0; |
322 | bool preamble_mode = (erp_value & WLAN_ERP_BARKER_PREAMBLE) != 0; | 322 | bool use_short_preamble = (erp_value & WLAN_ERP_BARKER_PREAMBLE) == 0; |
323 | DECLARE_MAC_BUF(mac); | 323 | DECLARE_MAC_BUF(mac); |
324 | u32 changed = 0; | 324 | u32 changed = 0; |
325 | 325 | ||
@@ -335,16 +335,15 @@ static u32 ieee80211_handle_erp_ie(struct ieee80211_sub_if_data *sdata, | |||
335 | changed |= BSS_CHANGED_ERP_CTS_PROT; | 335 | changed |= BSS_CHANGED_ERP_CTS_PROT; |
336 | } | 336 | } |
337 | 337 | ||
338 | if (preamble_mode != bss_conf->use_short_preamble) { | 338 | if (use_short_preamble != bss_conf->use_short_preamble) { |
339 | if (net_ratelimit()) { | 339 | if (net_ratelimit()) { |
340 | printk(KERN_DEBUG "%s: switched to %s barker preamble" | 340 | printk(KERN_DEBUG "%s: switched to %s barker preamble" |
341 | " (BSSID=%s)\n", | 341 | " (BSSID=%s)\n", |
342 | sdata->dev->name, | 342 | sdata->dev->name, |
343 | (preamble_mode == WLAN_ERP_PREAMBLE_SHORT) ? | 343 | use_short_preamble ? "short" : "long", |
344 | "short" : "long", | ||
345 | print_mac(mac, ifsta->bssid)); | 344 | print_mac(mac, ifsta->bssid)); |
346 | } | 345 | } |
347 | bss_conf->use_short_preamble = preamble_mode; | 346 | bss_conf->use_short_preamble = use_short_preamble; |
348 | changed |= BSS_CHANGED_ERP_PREAMBLE; | 347 | changed |= BSS_CHANGED_ERP_PREAMBLE; |
349 | } | 348 | } |
350 | 349 | ||
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index e88e96af613d..8599068050ec 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -395,7 +395,7 @@ EXPORT_SYMBOL_GPL(nf_ct_log_invalid); | |||
395 | static int __init nf_conntrack_standalone_init(void) | 395 | static int __init nf_conntrack_standalone_init(void) |
396 | { | 396 | { |
397 | #ifdef CONFIG_PROC_FS | 397 | #ifdef CONFIG_PROC_FS |
398 | struct proc_dir_entry *proc, *proc_stat; | 398 | struct proc_dir_entry *proc; |
399 | #endif | 399 | #endif |
400 | int ret = 0; | 400 | int ret = 0; |
401 | 401 | ||
@@ -407,12 +407,9 @@ static int __init nf_conntrack_standalone_init(void) | |||
407 | proc = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); | 407 | proc = proc_net_fops_create(&init_net, "nf_conntrack", 0440, &ct_file_ops); |
408 | if (!proc) goto cleanup_init; | 408 | if (!proc) goto cleanup_init; |
409 | 409 | ||
410 | proc_stat = create_proc_entry("nf_conntrack", S_IRUGO, init_net.proc_net_stat); | 410 | if (!proc_create("nf_conntrack", S_IRUGO, |
411 | if (!proc_stat) | 411 | init_net.proc_net_stat, &ct_cpu_seq_fops)) |
412 | goto cleanup_proc; | 412 | goto cleanup_proc; |
413 | |||
414 | proc_stat->proc_fops = &ct_cpu_seq_fops; | ||
415 | proc_stat->owner = THIS_MODULE; | ||
416 | #endif | 413 | #endif |
417 | #ifdef CONFIG_SYSCTL | 414 | #ifdef CONFIG_SYSCTL |
418 | nf_ct_sysctl_header = register_sysctl_paths(nf_ct_path, | 415 | nf_ct_sysctl_header = register_sysctl_paths(nf_ct_path, |
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c index cec9976aecbf..bc11d7092032 100644 --- a/net/netfilter/nf_log.c +++ b/net/netfilter/nf_log.c | |||
@@ -168,13 +168,9 @@ static const struct file_operations nflog_file_ops = { | |||
168 | int __init netfilter_log_init(void) | 168 | int __init netfilter_log_init(void) |
169 | { | 169 | { |
170 | #ifdef CONFIG_PROC_FS | 170 | #ifdef CONFIG_PROC_FS |
171 | struct proc_dir_entry *pde; | 171 | if (!proc_create("nf_log", S_IRUGO, |
172 | 172 | proc_net_netfilter, &nflog_file_ops)) | |
173 | pde = create_proc_entry("nf_log", S_IRUGO, proc_net_netfilter); | ||
174 | if (!pde) | ||
175 | return -1; | 173 | return -1; |
176 | |||
177 | pde->proc_fops = &nflog_file_ops; | ||
178 | #endif | 174 | #endif |
179 | return 0; | 175 | return 0; |
180 | } | 176 | } |
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index ddc80ea114cd..bbd26893c0c4 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -348,12 +348,9 @@ static const struct file_operations nfqueue_file_ops = { | |||
348 | int __init netfilter_queue_init(void) | 348 | int __init netfilter_queue_init(void) |
349 | { | 349 | { |
350 | #ifdef CONFIG_PROC_FS | 350 | #ifdef CONFIG_PROC_FS |
351 | struct proc_dir_entry *pde; | 351 | if (!proc_create("nf_queue", S_IRUGO, |
352 | 352 | proc_net_netfilter, &nfqueue_file_ops)) | |
353 | pde = create_proc_entry("nf_queue", S_IRUGO, proc_net_netfilter); | ||
354 | if (!pde) | ||
355 | return -1; | 353 | return -1; |
356 | pde->proc_fops = &nfqueue_file_ops; | ||
357 | #endif | 354 | #endif |
358 | return 0; | 355 | return 0; |
359 | } | 356 | } |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index bf3f19b21fe4..b8173af8c24a 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -923,9 +923,6 @@ static const struct file_operations nful_file_ops = { | |||
923 | static int __init nfnetlink_log_init(void) | 923 | static int __init nfnetlink_log_init(void) |
924 | { | 924 | { |
925 | int i, status = -ENOMEM; | 925 | int i, status = -ENOMEM; |
926 | #ifdef CONFIG_PROC_FS | ||
927 | struct proc_dir_entry *proc_nful; | ||
928 | #endif | ||
929 | 926 | ||
930 | for (i = 0; i < INSTANCE_BUCKETS; i++) | 927 | for (i = 0; i < INSTANCE_BUCKETS; i++) |
931 | INIT_HLIST_HEAD(&instance_table[i]); | 928 | INIT_HLIST_HEAD(&instance_table[i]); |
@@ -943,11 +940,9 @@ static int __init nfnetlink_log_init(void) | |||
943 | } | 940 | } |
944 | 941 | ||
945 | #ifdef CONFIG_PROC_FS | 942 | #ifdef CONFIG_PROC_FS |
946 | proc_nful = create_proc_entry("nfnetlink_log", 0440, | 943 | if (!proc_create("nfnetlink_log", 0440, |
947 | proc_net_netfilter); | 944 | proc_net_netfilter, &nful_file_ops)) |
948 | if (!proc_nful) | ||
949 | goto cleanup_subsys; | 945 | goto cleanup_subsys; |
950 | proc_nful->proc_fops = &nful_file_ops; | ||
951 | #endif | 946 | #endif |
952 | return status; | 947 | return status; |
953 | 948 | ||
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 012cb6910820..10522c04ed24 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -896,9 +896,6 @@ static const struct file_operations nfqnl_file_ops = { | |||
896 | static int __init nfnetlink_queue_init(void) | 896 | static int __init nfnetlink_queue_init(void) |
897 | { | 897 | { |
898 | int i, status = -ENOMEM; | 898 | int i, status = -ENOMEM; |
899 | #ifdef CONFIG_PROC_FS | ||
900 | struct proc_dir_entry *proc_nfqueue; | ||
901 | #endif | ||
902 | 899 | ||
903 | for (i = 0; i < INSTANCE_BUCKETS; i++) | 900 | for (i = 0; i < INSTANCE_BUCKETS; i++) |
904 | INIT_HLIST_HEAD(&instance_table[i]); | 901 | INIT_HLIST_HEAD(&instance_table[i]); |
@@ -911,11 +908,9 @@ static int __init nfnetlink_queue_init(void) | |||
911 | } | 908 | } |
912 | 909 | ||
913 | #ifdef CONFIG_PROC_FS | 910 | #ifdef CONFIG_PROC_FS |
914 | proc_nfqueue = create_proc_entry("nfnetlink_queue", 0440, | 911 | if (!proc_create("nfnetlink_queue", 0440, |
915 | proc_net_netfilter); | 912 | proc_net_netfilter, &nfqnl_file_ops)) |
916 | if (!proc_nfqueue) | ||
917 | goto cleanup_subsys; | 913 | goto cleanup_subsys; |
918 | proc_nfqueue->proc_fops = &nfqnl_file_ops; | ||
919 | #endif | 914 | #endif |
920 | 915 | ||
921 | register_netdevice_notifier(&nfqnl_dev_notifier); | 916 | register_netdevice_notifier(&nfqnl_dev_notifier); |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index 5418ce59ac3a..dc29007c52cd 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -237,14 +237,14 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, int family) | |||
237 | hinfo->family = family; | 237 | hinfo->family = family; |
238 | hinfo->rnd_initialized = 0; | 238 | hinfo->rnd_initialized = 0; |
239 | spin_lock_init(&hinfo->lock); | 239 | spin_lock_init(&hinfo->lock); |
240 | hinfo->pde = create_proc_entry(minfo->name, 0, | 240 | hinfo->pde = proc_create(minfo->name, 0, |
241 | family == AF_INET ? hashlimit_procdir4 : | 241 | family == AF_INET ? hashlimit_procdir4 : |
242 | hashlimit_procdir6); | 242 | hashlimit_procdir6, |
243 | &dl_file_ops); | ||
243 | if (!hinfo->pde) { | 244 | if (!hinfo->pde) { |
244 | vfree(hinfo); | 245 | vfree(hinfo); |
245 | return -1; | 246 | return -1; |
246 | } | 247 | } |
247 | hinfo->pde->proc_fops = &dl_file_ops; | ||
248 | hinfo->pde->data = hinfo; | 248 | hinfo->pde->data = hinfo; |
249 | 249 | ||
250 | setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo); | 250 | setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo); |
@@ -301,14 +301,14 @@ static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, | |||
301 | hinfo->rnd_initialized = 0; | 301 | hinfo->rnd_initialized = 0; |
302 | spin_lock_init(&hinfo->lock); | 302 | spin_lock_init(&hinfo->lock); |
303 | 303 | ||
304 | hinfo->pde = create_proc_entry(minfo->name, 0, | 304 | hinfo->pde = proc_create(minfo->name, 0, |
305 | family == AF_INET ? hashlimit_procdir4 : | 305 | family == AF_INET ? hashlimit_procdir4 : |
306 | hashlimit_procdir6); | 306 | hashlimit_procdir6, |
307 | &dl_file_ops); | ||
307 | if (hinfo->pde == NULL) { | 308 | if (hinfo->pde == NULL) { |
308 | vfree(hinfo); | 309 | vfree(hinfo); |
309 | return -1; | 310 | return -1; |
310 | } | 311 | } |
311 | hinfo->pde->proc_fops = &dl_file_ops; | ||
312 | hinfo->pde->data = hinfo; | 312 | hinfo->pde->data = hinfo; |
313 | 313 | ||
314 | setup_timer(&hinfo->timer, htable_gc, (unsigned long)hinfo); | 314 | setup_timer(&hinfo->timer, htable_gc, (unsigned long)hinfo); |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 4a31a81059ab..063cbc5c26b1 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -598,17 +598,24 @@ static int rose_release(struct socket *sock) | |||
598 | 598 | ||
599 | if (sk == NULL) return 0; | 599 | if (sk == NULL) return 0; |
600 | 600 | ||
601 | sock_hold(sk); | ||
602 | sock_orphan(sk); | ||
603 | lock_sock(sk); | ||
601 | rose = rose_sk(sk); | 604 | rose = rose_sk(sk); |
602 | 605 | ||
603 | switch (rose->state) { | 606 | switch (rose->state) { |
604 | case ROSE_STATE_0: | 607 | case ROSE_STATE_0: |
608 | release_sock(sk); | ||
605 | rose_disconnect(sk, 0, -1, -1); | 609 | rose_disconnect(sk, 0, -1, -1); |
610 | lock_sock(sk); | ||
606 | rose_destroy_socket(sk); | 611 | rose_destroy_socket(sk); |
607 | break; | 612 | break; |
608 | 613 | ||
609 | case ROSE_STATE_2: | 614 | case ROSE_STATE_2: |
610 | rose->neighbour->use--; | 615 | rose->neighbour->use--; |
616 | release_sock(sk); | ||
611 | rose_disconnect(sk, 0, -1, -1); | 617 | rose_disconnect(sk, 0, -1, -1); |
618 | lock_sock(sk); | ||
612 | rose_destroy_socket(sk); | 619 | rose_destroy_socket(sk); |
613 | break; | 620 | break; |
614 | 621 | ||
@@ -633,6 +640,8 @@ static int rose_release(struct socket *sock) | |||
633 | } | 640 | } |
634 | 641 | ||
635 | sock->sk = NULL; | 642 | sock->sk = NULL; |
643 | release_sock(sk); | ||
644 | sock_put(sk); | ||
636 | 645 | ||
637 | return 0; | 646 | return 0; |
638 | } | 647 | } |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 10b5c0887fff..b741618e4d54 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -184,10 +184,22 @@ static inline int qdisc_restart(struct net_device *dev) | |||
184 | 184 | ||
185 | void __qdisc_run(struct net_device *dev) | 185 | void __qdisc_run(struct net_device *dev) |
186 | { | 186 | { |
187 | do { | 187 | unsigned long start_time = jiffies; |
188 | if (!qdisc_restart(dev)) | 188 | |
189 | while (qdisc_restart(dev)) { | ||
190 | if (netif_queue_stopped(dev)) | ||
191 | break; | ||
192 | |||
193 | /* | ||
194 | * Postpone processing if | ||
195 | * 1. another process needs the CPU; | ||
196 | * 2. we've been doing it for too long. | ||
197 | */ | ||
198 | if (need_resched() || jiffies != start_time) { | ||
199 | netif_schedule(dev); | ||
189 | break; | 200 | break; |
190 | } while (!netif_queue_stopped(dev)); | 201 | } |
202 | } | ||
191 | 203 | ||
192 | clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state); | 204 | clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state); |
193 | } | 205 | } |