aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-class-net-mesh9
-rw-r--r--Documentation/DocBook/80211.tmpl2
-rw-r--r--Documentation/devicetree/bindings/net/mdio-mux-gpio.txt127
-rw-r--r--Documentation/devicetree/bindings/net/mdio-mux.txt136
-rw-r--r--Documentation/networking/batman-adv.txt19
-rw-r--r--Documentation/networking/ip-sysctl.txt19
-rw-r--r--Documentation/networking/mac80211-auth-assoc-deauth.txt10
-rw-r--r--Documentation/networking/stmmac.txt29
-rw-r--r--Documentation/nfc/nfc-hci.txt155
-rw-r--r--Documentation/sysctl/net.txt7
10 files changed, 488 insertions, 25 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh
index b218e0f8bdb3..c81fe89c4c46 100644
--- a/Documentation/ABI/testing/sysfs-class-net-mesh
+++ b/Documentation/ABI/testing/sysfs-class-net-mesh
@@ -14,6 +14,15 @@ Description:
14 mesh will be sent using multiple interfaces at the 14 mesh will be sent using multiple interfaces at the
15 same time (if available). 15 same time (if available).
16 16
17What: /sys/class/net/<mesh_iface>/mesh/bridge_loop_avoidance
18Date: November 2011
19Contact: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
20Description:
21 Indicates whether the bridge loop avoidance feature
22 is enabled. This feature detects and avoids loops
23 between the mesh and devices bridged with the soft
24 interface <mesh_iface>.
25
17What: /sys/class/net/<mesh_iface>/mesh/fragmentation 26What: /sys/class/net/<mesh_iface>/mesh/fragmentation
18Date: October 2010 27Date: October 2010
19Contact: Andreas Langer <an.langer@gmx.de> 28Contact: Andreas Langer <an.langer@gmx.de>
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl
index c5ac6929c41c..f3e214f9e256 100644
--- a/Documentation/DocBook/80211.tmpl
+++ b/Documentation/DocBook/80211.tmpl
@@ -516,7 +516,7 @@
516!Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe 516!Finclude/net/mac80211.h ieee80211_start_tx_ba_cb_irqsafe
517!Finclude/net/mac80211.h ieee80211_stop_tx_ba_session 517!Finclude/net/mac80211.h ieee80211_stop_tx_ba_session
518!Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe 518!Finclude/net/mac80211.h ieee80211_stop_tx_ba_cb_irqsafe
519!Finclude/net/mac80211.h rate_control_changed 519!Finclude/net/mac80211.h ieee80211_rate_control_changed
520!Finclude/net/mac80211.h ieee80211_tx_rate_control 520!Finclude/net/mac80211.h ieee80211_tx_rate_control
521!Finclude/net/mac80211.h rate_control_send_low 521!Finclude/net/mac80211.h rate_control_send_low
522 </chapter> 522 </chapter>
diff --git a/Documentation/devicetree/bindings/net/mdio-mux-gpio.txt b/Documentation/devicetree/bindings/net/mdio-mux-gpio.txt
new file mode 100644
index 000000000000..79384113c2b0
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mdio-mux-gpio.txt
@@ -0,0 +1,127 @@
1Properties for an MDIO bus multiplexer/switch controlled by GPIO pins.
2
3This is a special case of a MDIO bus multiplexer. One or more GPIO
4lines are used to control which child bus is connected.
5
6Required properties in addition to the generic multiplexer properties:
7
8- compatible : mdio-mux-gpio.
9- gpios : GPIO specifiers for each GPIO line. One or more must be specified.
10
11
12Example :
13
14 /* The parent MDIO bus. */
15 smi1: mdio@1180000001900 {
16 compatible = "cavium,octeon-3860-mdio";
17 #address-cells = <1>;
18 #size-cells = <0>;
19 reg = <0x11800 0x00001900 0x0 0x40>;
20 };
21
22 /*
23 An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
24 pair of GPIO lines. Child busses 2 and 3 populated with 4
25 PHYs each.
26 */
27 mdio-mux {
28 compatible = "mdio-mux-gpio";
29 gpios = <&gpio1 3 0>, <&gpio1 4 0>;
30 mdio-parent-bus = <&smi1>;
31 #address-cells = <1>;
32 #size-cells = <0>;
33
34 mdio@2 {
35 reg = <2>;
36 #address-cells = <1>;
37 #size-cells = <0>;
38
39 phy11: ethernet-phy@1 {
40 reg = <1>;
41 compatible = "marvell,88e1149r";
42 marvell,reg-init = <3 0x10 0 0x5777>,
43 <3 0x11 0 0x00aa>,
44 <3 0x12 0 0x4105>,
45 <3 0x13 0 0x0a60>;
46 interrupt-parent = <&gpio>;
47 interrupts = <10 8>; /* Pin 10, active low */
48 };
49 phy12: ethernet-phy@2 {
50 reg = <2>;
51 compatible = "marvell,88e1149r";
52 marvell,reg-init = <3 0x10 0 0x5777>,
53 <3 0x11 0 0x00aa>,
54 <3 0x12 0 0x4105>,
55 <3 0x13 0 0x0a60>;
56 interrupt-parent = <&gpio>;
57 interrupts = <10 8>; /* Pin 10, active low */
58 };
59 phy13: ethernet-phy@3 {
60 reg = <3>;
61 compatible = "marvell,88e1149r";
62 marvell,reg-init = <3 0x10 0 0x5777>,
63 <3 0x11 0 0x00aa>,
64 <3 0x12 0 0x4105>,
65 <3 0x13 0 0x0a60>;
66 interrupt-parent = <&gpio>;
67 interrupts = <10 8>; /* Pin 10, active low */
68 };
69 phy14: ethernet-phy@4 {
70 reg = <4>;
71 compatible = "marvell,88e1149r";
72 marvell,reg-init = <3 0x10 0 0x5777>,
73 <3 0x11 0 0x00aa>,
74 <3 0x12 0 0x4105>,
75 <3 0x13 0 0x0a60>;
76 interrupt-parent = <&gpio>;
77 interrupts = <10 8>; /* Pin 10, active low */
78 };
79 };
80
81 mdio@3 {
82 reg = <3>;
83 #address-cells = <1>;
84 #size-cells = <0>;
85
86 phy21: ethernet-phy@1 {
87 reg = <1>;
88 compatible = "marvell,88e1149r";
89 marvell,reg-init = <3 0x10 0 0x5777>,
90 <3 0x11 0 0x00aa>,
91 <3 0x12 0 0x4105>,
92 <3 0x13 0 0x0a60>;
93 interrupt-parent = <&gpio>;
94 interrupts = <12 8>; /* Pin 12, active low */
95 };
96 phy22: ethernet-phy@2 {
97 reg = <2>;
98 compatible = "marvell,88e1149r";
99 marvell,reg-init = <3 0x10 0 0x5777>,
100 <3 0x11 0 0x00aa>,
101 <3 0x12 0 0x4105>,
102 <3 0x13 0 0x0a60>;
103 interrupt-parent = <&gpio>;
104 interrupts = <12 8>; /* Pin 12, active low */
105 };
106 phy23: ethernet-phy@3 {
107 reg = <3>;
108 compatible = "marvell,88e1149r";
109 marvell,reg-init = <3 0x10 0 0x5777>,
110 <3 0x11 0 0x00aa>,
111 <3 0x12 0 0x4105>,
112 <3 0x13 0 0x0a60>;
113 interrupt-parent = <&gpio>;
114 interrupts = <12 8>; /* Pin 12, active low */
115 };
116 phy24: ethernet-phy@4 {
117 reg = <4>;
118 compatible = "marvell,88e1149r";
119 marvell,reg-init = <3 0x10 0 0x5777>,
120 <3 0x11 0 0x00aa>,
121 <3 0x12 0 0x4105>,
122 <3 0x13 0 0x0a60>;
123 interrupt-parent = <&gpio>;
124 interrupts = <12 8>; /* Pin 12, active low */
125 };
126 };
127 };
diff --git a/Documentation/devicetree/bindings/net/mdio-mux.txt b/Documentation/devicetree/bindings/net/mdio-mux.txt
new file mode 100644
index 000000000000..f65606f8d632
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/mdio-mux.txt
@@ -0,0 +1,136 @@
1Common MDIO bus multiplexer/switch properties.
2
3An MDIO bus multiplexer/switch will have several child busses that are
4numbered uniquely in a device dependent manner. The nodes for an MDIO
5bus multiplexer/switch will have one child node for each child bus.
6
7Required properties:
8- mdio-parent-bus : phandle to the parent MDIO bus.
9- #address-cells = <1>;
10- #size-cells = <0>;
11
12Optional properties:
13- Other properties specific to the multiplexer/switch hardware.
14
15Required properties for child nodes:
16- #address-cells = <1>;
17- #size-cells = <0>;
18- reg : The sub-bus number.
19
20
21Example :
22
23 /* The parent MDIO bus. */
24 smi1: mdio@1180000001900 {
25 compatible = "cavium,octeon-3860-mdio";
26 #address-cells = <1>;
27 #size-cells = <0>;
28 reg = <0x11800 0x00001900 0x0 0x40>;
29 };
30
31 /*
32 An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
33 pair of GPIO lines. Child busses 2 and 3 populated with 4
34 PHYs each.
35 */
36 mdio-mux {
37 compatible = "mdio-mux-gpio";
38 gpios = <&gpio1 3 0>, <&gpio1 4 0>;
39 mdio-parent-bus = <&smi1>;
40 #address-cells = <1>;
41 #size-cells = <0>;
42
43 mdio@2 {
44 reg = <2>;
45 #address-cells = <1>;
46 #size-cells = <0>;
47
48 phy11: ethernet-phy@1 {
49 reg = <1>;
50 compatible = "marvell,88e1149r";
51 marvell,reg-init = <3 0x10 0 0x5777>,
52 <3 0x11 0 0x00aa>,
53 <3 0x12 0 0x4105>,
54 <3 0x13 0 0x0a60>;
55 interrupt-parent = <&gpio>;
56 interrupts = <10 8>; /* Pin 10, active low */
57 };
58 phy12: ethernet-phy@2 {
59 reg = <2>;
60 compatible = "marvell,88e1149r";
61 marvell,reg-init = <3 0x10 0 0x5777>,
62 <3 0x11 0 0x00aa>,
63 <3 0x12 0 0x4105>,
64 <3 0x13 0 0x0a60>;
65 interrupt-parent = <&gpio>;
66 interrupts = <10 8>; /* Pin 10, active low */
67 };
68 phy13: ethernet-phy@3 {
69 reg = <3>;
70 compatible = "marvell,88e1149r";
71 marvell,reg-init = <3 0x10 0 0x5777>,
72 <3 0x11 0 0x00aa>,
73 <3 0x12 0 0x4105>,
74 <3 0x13 0 0x0a60>;
75 interrupt-parent = <&gpio>;
76 interrupts = <10 8>; /* Pin 10, active low */
77 };
78 phy14: ethernet-phy@4 {
79 reg = <4>;
80 compatible = "marvell,88e1149r";
81 marvell,reg-init = <3 0x10 0 0x5777>,
82 <3 0x11 0 0x00aa>,
83 <3 0x12 0 0x4105>,
84 <3 0x13 0 0x0a60>;
85 interrupt-parent = <&gpio>;
86 interrupts = <10 8>; /* Pin 10, active low */
87 };
88 };
89
90 mdio@3 {
91 reg = <3>;
92 #address-cells = <1>;
93 #size-cells = <0>;
94
95 phy21: ethernet-phy@1 {
96 reg = <1>;
97 compatible = "marvell,88e1149r";
98 marvell,reg-init = <3 0x10 0 0x5777>,
99 <3 0x11 0 0x00aa>,
100 <3 0x12 0 0x4105>,
101 <3 0x13 0 0x0a60>;
102 interrupt-parent = <&gpio>;
103 interrupts = <12 8>; /* Pin 12, active low */
104 };
105 phy22: ethernet-phy@2 {
106 reg = <2>;
107 compatible = "marvell,88e1149r";
108 marvell,reg-init = <3 0x10 0 0x5777>,
109 <3 0x11 0 0x00aa>,
110 <3 0x12 0 0x4105>,
111 <3 0x13 0 0x0a60>;
112 interrupt-parent = <&gpio>;
113 interrupts = <12 8>; /* Pin 12, active low */
114 };
115 phy23: ethernet-phy@3 {
116 reg = <3>;
117 compatible = "marvell,88e1149r";
118 marvell,reg-init = <3 0x10 0 0x5777>,
119 <3 0x11 0 0x00aa>,
120 <3 0x12 0 0x4105>,
121 <3 0x13 0 0x0a60>;
122 interrupt-parent = <&gpio>;
123 interrupts = <12 8>; /* Pin 12, active low */
124 };
125 phy24: ethernet-phy@4 {
126 reg = <4>;
127 compatible = "marvell,88e1149r";
128 marvell,reg-init = <3 0x10 0 0x5777>,
129 <3 0x11 0 0x00aa>,
130 <3 0x12 0 0x4105>,
131 <3 0x13 0 0x0a60>;
132 interrupt-parent = <&gpio>;
133 interrupts = <12 8>; /* Pin 12, active low */
134 };
135 };
136 };
diff --git a/Documentation/networking/batman-adv.txt b/Documentation/networking/batman-adv.txt
index 221ad0cdf11f..220a58c2fb11 100644
--- a/Documentation/networking/batman-adv.txt
+++ b/Documentation/networking/batman-adv.txt
@@ -67,18 +67,18 @@ To deactivate an interface you have to write "none" into its
67All mesh wide settings can be found in batman's own interface 67All mesh wide settings can be found in batman's own interface
68folder: 68folder:
69 69
70# ls /sys/class/net/bat0/mesh/ 70# ls /sys/class/net/bat0/mesh/
71# aggregated_ogms fragmentation gw_sel_class vis_mode 71# aggregated_ogms fragmentation hop_penalty
72# ap_isolation gw_bandwidth hop_penalty 72# ap_isolation gw_bandwidth log_level
73# bonding gw_mode orig_interval 73# bonding gw_mode orig_interval
74# bridge_loop_avoidance gw_sel_class vis_mode
74 75
75 76
76There is a special folder for debugging information: 77There is a special folder for debugging information:
77 78
78# ls /sys/kernel/debug/batman_adv/bat0/ 79# ls /sys/kernel/debug/batman_adv/bat0/
79# gateways socket transtable_global vis_data 80# bla_claim_table log socket transtable_local
80# originators softif_neigh transtable_local 81# gateways originators transtable_global vis_data
81
82 82
83Some of the files contain all sort of status information regard- 83Some of the files contain all sort of status information regard-
84ing the mesh network. For example, you can view the table of 84ing the mesh network. For example, you can view the table of
@@ -202,12 +202,13 @@ abled during run time. Following log_levels are defined:
2021 - Enable messages related to routing / flooding / broadcasting 2021 - Enable messages related to routing / flooding / broadcasting
2032 - Enable messages related to route added / changed / deleted 2032 - Enable messages related to route added / changed / deleted
2044 - Enable messages related to translation table operations 2044 - Enable messages related to translation table operations
2057 - Enable all messages 2058 - Enable messages related to bridge loop avoidance
20615 - enable all messages
206 207
207The debug output can be changed at runtime using the file 208The debug output can be changed at runtime using the file
208/sys/class/net/bat0/mesh/log_level. e.g. 209/sys/class/net/bat0/mesh/log_level. e.g.
209 210
210# echo 2 > /sys/class/net/bat0/mesh/log_level 211# echo 6 > /sys/class/net/bat0/mesh/log_level
211 212
212will enable debug messages for when routes change. 213will enable debug messages for when routes change.
213 214
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index 1619a8c80873..90b0c4fd275b 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -190,6 +190,20 @@ tcp_cookie_size - INTEGER
190tcp_dsack - BOOLEAN 190tcp_dsack - BOOLEAN
191 Allows TCP to send "duplicate" SACKs. 191 Allows TCP to send "duplicate" SACKs.
192 192
193tcp_early_retrans - INTEGER
194 Enable Early Retransmit (ER), per RFC 5827. ER lowers the threshold
195 for triggering fast retransmit when the amount of outstanding data is
196 small and when no previously unsent data can be transmitted (such
197 that limited transmit could be used).
198 Possible values:
199 0 disables ER
200 1 enables ER
201 2 enables ER but delays fast recovery and fast retransmit
202 by a fourth of RTT. This mitigates connection falsely
203 recovers when network has a small degree of reordering
204 (less than 3 packets).
205 Default: 2
206
193tcp_ecn - INTEGER 207tcp_ecn - INTEGER
194 Enable Explicit Congestion Notification (ECN) in TCP. ECN is only 208 Enable Explicit Congestion Notification (ECN) in TCP. ECN is only
195 used when both ends of the TCP flow support it. It is useful to 209 used when both ends of the TCP flow support it. It is useful to
@@ -1484,11 +1498,8 @@ addr_scope_policy - INTEGER
1484 1498
1485 1499
1486/proc/sys/net/core/* 1500/proc/sys/net/core/*
1487dev_weight - INTEGER 1501 Please see: Documentation/sysctl/net.txt for descriptions of these entries.
1488 The maximum number of packets that kernel can handle on a NAPI
1489 interrupt, it's a Per-CPU variable.
1490 1502
1491 Default: 64
1492 1503
1493/proc/sys/net/unix/* 1504/proc/sys/net/unix/*
1494max_dgram_qlen - INTEGER 1505max_dgram_qlen - INTEGER
diff --git a/Documentation/networking/mac80211-auth-assoc-deauth.txt b/Documentation/networking/mac80211-auth-assoc-deauth.txt
index e0a2aa585ca3..d7a15fe91bf7 100644
--- a/Documentation/networking/mac80211-auth-assoc-deauth.txt
+++ b/Documentation/networking/mac80211-auth-assoc-deauth.txt
@@ -23,7 +23,7 @@ BA session stop & deauth/disassoc frames
23end note 23end note
24end 24end
25 25
26mac80211->driver: config(channel, non-HT) 26mac80211->driver: config(channel, channel type)
27mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap) 27mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
28mac80211->driver: sta_state(AP, exists) 28mac80211->driver: sta_state(AP, exists)
29 29
@@ -51,7 +51,7 @@ note over mac80211,driver: cleanup like for authenticate
51end 51end
52 52
53alt not previously authenticated (FT) 53alt not previously authenticated (FT)
54mac80211->driver: config(channel, non-HT) 54mac80211->driver: config(channel, channel type)
55mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap) 55mac80211->driver: bss_info_changed(set BSSID, basic rate bitmap)
56mac80211->driver: sta_state(AP, exists) 56mac80211->driver: sta_state(AP, exists)
57mac80211->driver: sta_state(AP, authenticated) 57mac80211->driver: sta_state(AP, authenticated)
@@ -67,10 +67,6 @@ end
67 67
68mac80211->driver: set up QoS parameters 68mac80211->driver: set up QoS parameters
69 69
70alt is HT channel
71mac80211->driver: config(channel, HT params)
72end
73
74mac80211->driver: bss_info_changed(QoS, HT, associated with AID) 70mac80211->driver: bss_info_changed(QoS, HT, associated with AID)
75mac80211->userspace: associated 71mac80211->userspace: associated
76 72
@@ -95,5 +91,5 @@ mac80211->driver: sta_state(AP,exists)
95mac80211->driver: sta_state(AP,not-exists) 91mac80211->driver: sta_state(AP,not-exists)
96mac80211->driver: turn off powersave 92mac80211->driver: turn off powersave
97mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...) 93mac80211->driver: bss_info_changed(clear BSSID, not associated, no QoS, ...)
98mac80211->driver: config(non-HT channel type) 94mac80211->driver: config(channel type to non-HT)
99mac80211->userspace: disconnected 95mac80211->userspace: disconnected
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index d0aeeadd264b..ab1e8d7004c5 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -111,11 +111,12 @@ and detailed below as well:
111 int phy_addr; 111 int phy_addr;
112 int interface; 112 int interface;
113 struct stmmac_mdio_bus_data *mdio_bus_data; 113 struct stmmac_mdio_bus_data *mdio_bus_data;
114 int pbl; 114 struct stmmac_dma_cfg *dma_cfg;
115 int clk_csr; 115 int clk_csr;
116 int has_gmac; 116 int has_gmac;
117 int enh_desc; 117 int enh_desc;
118 int tx_coe; 118 int tx_coe;
119 int rx_coe;
119 int bugged_jumbo; 120 int bugged_jumbo;
120 int pmt; 121 int pmt;
121 int force_sf_dma_mode; 122 int force_sf_dma_mode;
@@ -136,10 +137,12 @@ Where:
136 o pbl: the Programmable Burst Length is maximum number of beats to 137 o pbl: the Programmable Burst Length is maximum number of beats to
137 be transferred in one DMA transaction. 138 be transferred in one DMA transaction.
138 GMAC also enables the 4xPBL by default. 139 GMAC also enables the 4xPBL by default.
139 o clk_csr: CSR Clock range selection. 140 o clk_csr: fixed CSR Clock range selection.
140 o has_gmac: uses the GMAC core. 141 o has_gmac: uses the GMAC core.
141 o enh_desc: if sets the MAC will use the enhanced descriptor structure. 142 o enh_desc: if sets the MAC will use the enhanced descriptor structure.
142 o tx_coe: core is able to perform the tx csum in HW. 143 o tx_coe: core is able to perform the tx csum in HW.
144 o rx_coe: the supports three check sum offloading engine types:
145 type_1, type_2 (full csum) and no RX coe.
143 o bugged_jumbo: some HWs are not able to perform the csum in HW for 146 o bugged_jumbo: some HWs are not able to perform the csum in HW for
144 over-sized frames due to limited buffer sizes. 147 over-sized frames due to limited buffer sizes.
145 Setting this flag the csum will be done in SW on 148 Setting this flag the csum will be done in SW on
@@ -160,7 +163,7 @@ Where:
160 o custom_cfg: this is a custom configuration that can be passed while 163 o custom_cfg: this is a custom configuration that can be passed while
161 initialising the resources. 164 initialising the resources.
162 165
163The we have: 166For MDIO bus The we have:
164 167
165 struct stmmac_mdio_bus_data { 168 struct stmmac_mdio_bus_data {
166 int bus_id; 169 int bus_id;
@@ -177,10 +180,28 @@ Where:
177 o irqs: list of IRQs, one per PHY. 180 o irqs: list of IRQs, one per PHY.
178 o probed_phy_irq: if irqs is NULL, use this for probed PHY. 181 o probed_phy_irq: if irqs is NULL, use this for probed PHY.
179 182
183
184For DMA engine we have the following internal fields that should be
185tuned according to the HW capabilities.
186
187struct stmmac_dma_cfg {
188 int pbl;
189 int fixed_burst;
190 int burst_len_supported;
191};
192
193Where:
194 o pbl: Programmable Burst Length
195 o fixed_burst: program the DMA to use the fixed burst mode
196 o burst_len: this is the value we put in the register
197 supported values are provided as macros in
198 linux/stmmac.h header file.
199
200---
201
180Below an example how the structures above are using on ST platforms. 202Below an example how the structures above are using on ST platforms.
181 203
182 static struct plat_stmmacenet_data stxYYY_ethernet_platform_data = { 204 static struct plat_stmmacenet_data stxYYY_ethernet_platform_data = {
183 .pbl = 32,
184 .has_gmac = 0, 205 .has_gmac = 0,
185 .enh_desc = 0, 206 .enh_desc = 0,
186 .fix_mac_speed = stxYYY_ethernet_fix_mac_speed, 207 .fix_mac_speed = stxYYY_ethernet_fix_mac_speed,
diff --git a/Documentation/nfc/nfc-hci.txt b/Documentation/nfc/nfc-hci.txt
new file mode 100644
index 000000000000..216b7254fcc3
--- /dev/null
+++ b/Documentation/nfc/nfc-hci.txt
@@ -0,0 +1,155 @@
1HCI backend for NFC Core
2
3Author: Eric Lapuyade, Samuel Ortiz
4Contact: eric.lapuyade@intel.com, samuel.ortiz@intel.com
5
6General
7-------
8
9The HCI layer implements much of the ETSI TS 102 622 V10.2.0 specification. It
10enables easy writing of HCI-based NFC drivers. The HCI layer runs as an NFC Core
11backend, implementing an abstract nfc device and translating NFC Core API
12to HCI commands and events.
13
14HCI
15---
16
17HCI registers as an nfc device with NFC Core. Requests coming from userspace are
18routed through netlink sockets to NFC Core and then to HCI. From this point,
19they are translated in a sequence of HCI commands sent to the HCI layer in the
20host controller (the chip). The sending context blocks while waiting for the
21response to arrive.
22HCI events can also be received from the host controller. They will be handled
23and a translation will be forwarded to NFC Core as needed.
24HCI uses 2 execution contexts:
25- one if for executing commands : nfc_hci_msg_tx_work(). Only one command
26can be executing at any given moment.
27- one if for dispatching received events and responses : nfc_hci_msg_rx_work()
28
29HCI Session initialization:
30---------------------------
31
32The Session initialization is an HCI standard which must unfortunately
33support proprietary gates. This is the reason why the driver will pass a list
34of proprietary gates that must be part of the session. HCI will ensure all
35those gates have pipes connected when the hci device is set up.
36
37HCI Gates and Pipes
38-------------------
39
40A gate defines the 'port' where some service can be found. In order to access
41a service, one must create a pipe to that gate and open it. In this
42implementation, pipes are totally hidden. The public API only knows gates.
43This is consistent with the driver need to send commands to proprietary gates
44without knowing the pipe connected to it.
45
46Driver interface
47----------------
48
49A driver would normally register itself with HCI and provide the following
50entry points:
51
52struct nfc_hci_ops {
53 int (*open)(struct nfc_hci_dev *hdev);
54 void (*close)(struct nfc_hci_dev *hdev);
55 int (*xmit)(struct nfc_hci_dev *hdev, struct sk_buff *skb);
56 int (*start_poll)(struct nfc_hci_dev *hdev, u32 protocols);
57 int (*target_from_gate)(struct nfc_hci_dev *hdev, u8 gate,
58 struct nfc_target *target);
59};
60
61open() and close() shall turn the hardware on and off. xmit() shall simply
62write a frame to the chip. start_poll() is an optional entrypoint that shall
63set the hardware in polling mode. This must be implemented only if the hardware
64uses proprietary gates or a mechanism slightly different from the HCI standard.
65target_from_gate() is another optional entrypoint to return the protocols
66corresponding to a proprietary gate.
67
68On the rx path, the driver is responsible to push incoming HCP frames to HCI
69using nfc_hci_recv_frame(). HCI will take care of re-aggregation and handling
70This must be done from a context that can sleep.
71
72SHDLC
73-----
74
75Most chips use shdlc to ensure integrity and delivery ordering of the HCP
76frames between the host controller (the chip) and hosts (entities connected
77to the chip, like the cpu). In order to simplify writing the driver, an shdlc
78layer is available for use by the driver.
79When used, the driver actually registers with shdlc, and shdlc will register
80with HCI. HCI sees shdlc as the driver and thus send its HCP frames
81through shdlc->xmit.
82SHDLC adds a new execution context (nfc_shdlc_sm_work()) to run its state
83machine and handle both its rx and tx path.
84
85Included Drivers
86----------------
87
88An HCI based driver for an NXP PN544, connected through I2C bus, and using
89shdlc is included.
90
91Execution Contexts
92------------------
93
94The execution contexts are the following:
95- IRQ handler (IRQH):
96fast, cannot sleep. stores incoming frames into an shdlc rx queue
97
98- SHDLC State Machine worker (SMW)
99handles shdlc rx & tx queues. Dispatches HCI cmd responses.
100
101- HCI Tx Cmd worker (MSGTXWQ)
102Serialize execution of HCI commands. Complete execution in case of resp timeout.
103
104- HCI Rx worker (MSGRXWQ)
105Dispatches incoming HCI commands or events.
106
107- Syscall context from a userspace call (SYSCALL)
108Any entrypoint in HCI called from NFC Core
109
110Workflow executing an HCI command (using shdlc)
111-----------------------------------------------
112
113Executing an HCI command can easily be performed synchronously using the
114following API:
115
116int nfc_hci_send_cmd (struct nfc_hci_dev *hdev, u8 gate, u8 cmd,
117 const u8 *param, size_t param_len, struct sk_buff **skb)
118
119The API must be invoked from a context that can sleep. Most of the time, this
120will be the syscall context. skb will return the result that was received in
121the response.
122
123Internally, execution is asynchronous. So all this API does is to enqueue the
124HCI command, setup a local wait queue on stack, and wait_event() for completion.
125The wait is not interruptible because it is guaranteed that the command will
126complete after some short timeout anyway.
127
128MSGTXWQ context will then be scheduled and invoke nfc_hci_msg_tx_work().
129This function will dequeue the next pending command and send its HCP fragments
130to the lower layer which happens to be shdlc. It will then start a timer to be
131able to complete the command with a timeout error if no response arrive.
132
133SMW context gets scheduled and invokes nfc_shdlc_sm_work(). This function
134handles shdlc framing in and out. It uses the driver xmit to send frames and
135receives incoming frames in an skb queue filled from the driver IRQ handler.
136SHDLC I(nformation) frames payload are HCP fragments. They are agregated to
137form complete HCI frames, which can be a response, command, or event.
138
139HCI Responses are dispatched immediately from this context to unblock
140waiting command execution. Reponse processing involves invoking the completion
141callback that was provided by nfc_hci_msg_tx_work() when it sent the command.
142The completion callback will then wake the syscall context.
143
144Workflow receiving an HCI event or command
145------------------------------------------
146
147HCI commands or events are not dispatched from SMW context. Instead, they are
148queued to HCI rx_queue and will be dispatched from HCI rx worker
149context (MSGRXWQ). This is done this way to allow a cmd or event handler
150to also execute other commands (for example, handling the
151NFC_HCI_EVT_TARGET_DISCOVERED event from PN544 requires to issue an
152ANY_GET_PARAMETER to the reader A gate to get information on the target
153that was discovered).
154
155Typically, such an event will be propagated to NFC Core from MSGRXWQ context.
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index 3201a7097e4d..98335b7a5337 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -43,6 +43,13 @@ Values :
43 1 - enable the JIT 43 1 - enable the JIT
44 2 - enable the JIT and ask the compiler to emit traces on kernel log. 44 2 - enable the JIT and ask the compiler to emit traces on kernel log.
45 45
46dev_weight
47--------------
48
49The maximum number of packets that kernel can handle on a NAPI interrupt,
50it's a Per-CPU variable.
51Default: 64
52
46rmem_default 53rmem_default
47------------ 54------------
48 55