Commit 20dcc15
committed
openthread: Move OpenThread implementation from net to modules
Move OpenThread-related code from
zephyr/subsys/net/l2/openthread/openthread.c to
zephyr/modules/openthread/openthread_module.c.
The primary goal of this refactor is to enable the use
of OpenThread as an independent module, without the necessity
of Zephyr's networking layer.
This change is particularly beneficial for simple applications
that have their own implementation of the IEEE802.15.4 driver
and do not require a networking layer. These applications can
now disable Zephyr's L2 and IEEE802.15.4 shim layers and
directly use the OpenThread module, saving valuable kilobytes
of memory.
In this approach if the CONFIG_NET_L2_OPENTHREAD
Kconfig option is set, Zephyr's L2 and IEEE802.15.4 layer
will be used, and everything will function as before.
The main difference is the Zephyr's L2 layer now uses
the OpenThread module, no longer implementing it.
If the CONFIG_NET_L2_OPENTHREAD Kconfig option is
not set, the opentherad_init function will be called at
system boot in the POST_KERNEL phase.
While most of the functions in include/net/openthread.h
have been deprecated, they are still available for use to
maintain backwards compatibility.
These functions now act as an interface to the new ones
defined in modules/openthread.
Signed-off-by: Arkadiusz Balys <[email protected]>1 parent 63c239c commit 20dcc15
File tree
7 files changed
+692
-488
lines changed- include/zephyr/net
- modules/openthread
- subsys/net/l2/openthread
7 files changed
+692
-488
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
| |||
62 | 59 | | |
63 | 60 | | |
64 | 61 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 62 | + | |
| 63 | + | |
76 | 64 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 65 | | |
81 | | - | |
82 | 66 | | |
83 | 67 | | |
84 | 68 | | |
| |||
111 | 95 | | |
112 | 96 | | |
113 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
114 | 106 | | |
115 | 107 | | |
116 | 108 | | |
117 | 109 | | |
118 | 110 | | |
119 | 111 | | |
120 | | - | |
| 112 | + | |
121 | 113 | | |
122 | 114 | | |
123 | 115 | | |
| 116 | + | |
| 117 | + | |
124 | 118 | | |
125 | 119 | | |
126 | 120 | | |
127 | 121 | | |
128 | 122 | | |
129 | | - | |
| 123 | + | |
130 | 124 | | |
131 | 125 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 126 | | |
138 | 127 | | |
139 | 128 | | |
| |||
143 | 132 | | |
144 | 133 | | |
145 | 134 | | |
146 | | - | |
| 135 | + | |
147 | 136 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 137 | | |
166 | 138 | | |
167 | 139 | | |
| |||
170 | 142 | | |
171 | 143 | | |
172 | 144 | | |
173 | | - | |
| 145 | + | |
174 | 146 | | |
175 | 147 | | |
| 148 | + | |
| 149 | + | |
176 | 150 | | |
177 | 151 | | |
178 | 152 | | |
| |||
183 | 157 | | |
184 | 158 | | |
185 | 159 | | |
186 | | - | |
| 160 | + | |
187 | 161 | | |
188 | 162 | | |
| 163 | + | |
| 164 | + | |
189 | 165 | | |
190 | 166 | | |
191 | 167 | | |
192 | 168 | | |
193 | | - | |
| 169 | + | |
194 | 170 | | |
195 | 171 | | |
196 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| |||
0 commit comments