-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
194 lines (194 loc) · 6.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GSoC 2023 progress blog</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<header>
<h1>Summer of Code 2023 work submission</h1>
<p class="subtitle">NetBSD</p>
<p class="subtitle">Update Atheros Wi-Fi driver(s) for new Wi-Fi stack</p>
<p class="subtitle">Jeandre Kruger</p>
<p class="subtitle">
Submitted
<time datetime="2023-08-24">24<sup>th</sup> August, 2023</time>
NZST
</p>
</header>
<main>
<p><a href="blog.html">View blog</a></p>
<p><a href="#code">Jump to code</a></p>
<h2>Background and goals</h2>
<p>
<a href="https://netbsd.org/">NetBSD</a> is an open-source operating
system in the BSD family. The NetBSD Project has been
<a href="https://wiki.netbsd.org/Wifi_renewal_on_hg/">
working to adapt the latest FreeBSD Wi-Fi stack</a>. This will
result in various improvements in functionality. For example, NetBSD
will support IEEE 802.11n, and one can use multiple virtual access
points (VAPs) with the same physical Wi-Fi adapter (use cases include
multiple access points, etc.). Consequently NetBSD's wireless drivers
are being converted to work with the new stack, and this Google Summer
of Code, I set out to do that for those for Atheros hardware.
Originally I intended to convert
<a href="https://man.netbsd.org/athn.4">athn(4)</a>
followed by
<a href="https://man.netbsd.org/ath.4">ath(4)</a>, if time allowed.
</p>
<h2>What was done</h2>
<p>
I ended up first converting ath(4). I got Wi-Fi to begin to work on
<a href="blog.html#wifi-working-ath-4">6 June</a>, and it was
basically functional by <a href="blog.html#encap-caps-ath-4">22 June</a>
(about three weeks before the midterm evaluation).
</p>
<p>
I began converting athn(4) on 27 June and by 8 July I had it in a
working state. Later my mentor let me know of an existing patch that
had been written for athn(4) by James Browning in 2022. In some ways
it was similar; in other ways better, so I started over based on that
patch (getting it to a point were it compiled and worked didn't take
very long, using my existing conversion for reference).
</p>
<p>
From then I made some other fixes and changes to both ath(4) and
athn(4) (e.g. <a href="blog.html#rate-adaption">rate adaption</a>).
The <a href="blog.html">blog</a> has more details on what I did, and
there are emails between myself and Martin and others on NetBSD's
tech-net mailing list.
</p>
<p>
On 11 August my latter patch for athn(4) based on James Browning's was
merged into the wifi topic of NetBSD's Mercurial repository (but not
ath yet – athn is the preferred driver for the chipsets it
supports).
</p>
<p>
Initially, I didn't have any plan of converting athn(4) for USB (in
addition to PCI and CardBus) since I had no hardware. But since there
was still plenty of time, I did end up trying to do this, in spite of
not yet being able to test it, and I have ordered an Atheros USB dongle
which will arrive in a month or two.
</p>
<h2>What to do from here</h2>
<p>
When that arrives I will know if what I've done for USB works, and then
I plan on getting it to work if it doesn't (which should not take
long). Then the best approach for converting athn(4) at USB (with or
without usbwifi) can be evaluated (which is the intention).
</p>
<p>
Since ath(4) is working, I hope to likely have the code merged into the
wifi topic of NetBSD's Mercurial repository soon (after making any
changes in response to feedback I receive from Martin). In the case of
ath(4) there is one kludge (a constant was defined both in the Atheros
HAL and the new Wi-Fi stack, so I added an #ifndef to the former) that
should probably still be dealt with.
</p>
<p>
After this I expect to help convert more of the remaining Wi-Fi
drivers; Martin might be able to send me more USB adapters.
</p>
<hr>
<h2><a id="code">Code</a></h2>
<h3><a href="https://github.com/jeandrek/netbsd-src-gsoc">GitHub repository</a></h3>
<p>
All code is on the GitHub repository
<a href="https://github.com/jeandrek/netbsd-src-gsoc">here</a>. It
has the NetBSD source tree (from the wifi topic), with my changes (not a
clone of the NetBSD mercurial repository with all its history).
</p>
<p>
These branches matter:
</p>
<table>
<tr class="midtable">
<th>main</th>
<td>Conversion of ath(4)</td>
</tr>
<tr class="midtable">
<th>athn</th>
<td>Old conversion of athn(4)</td>
</tr>
<tr class="midtable">
<th>athn2</th>
<td>
Conversion working from James Browning's patch (now the same as
main)
</td>
</tr>
<tr>
<th>athn-usb</th>
<td rowspan="3">athn(4) USB (untested as of now, first 2 compile)</td>
</tr>
<tr><th>usbwifi</th></tr>
<tr><th>usbwifi-alternative</th></tr>
</table>
<p>
Some of the most important files (to get a better idea, look at the
commit history or patches; all the following are in
<a href="https://github.com/jeandrek/netbsd-src-gsoc/tree/main/sys/dev/ic">
sys/dev/ic</a>):
<table>
<tr class="midtable">
<th>ath(4)</th>
<td>
<a href="https://github.com/jeandrek/netbsd-src-gsoc/blob/main/sys/dev/ic/athvar.h">
athvar.h</a>
<a href="https://github.com/jeandrek/netbsd-src-gsoc/blob/main/sys/dev/ic/ath.c">
ath.c</a>
</td>
</tr>
<tr>
<th>athn(4)</th>
<td>
<a href="https://github.com/jeandrek/netbsd-src-gsoc/blob/main/sys/dev/ic/athnvar.h">
athnvar.h</a>
<a href="https://github.com/jeandrek/netbsd-src-gsoc/blob/main/sys/dev/ic/athn.c">
athn.c</a>
<a href="https://github.com/jeandrek/netbsd-src-gsoc/blob/main/sys/dev/ic/arn5008.c">
arn5008.c</a>
<a href="https://github.com/jeandrek/netbsd-src-gsoc/blob/main/sys/dev/ic/arn9003.c">
arn9003.c</a>
</td>
</tr>
</table>
</p>
<h3>Patches</h3>
<table>
<tr class="midtable">
<th>ath(4) conversion</th>
<td><a href="ath-progress.patch">Patch</a></td>
</tr>
<tr>
<th rowspan="4">athn(4) conversion</th>
<td>
<a href="athn-diff.patch">
Diff against code w/ James Browning's patch</a>
</td>
</tr>
<tr>
<td>
<a href="athn-progress.patch">
Complete patch against unconverted driver</a>
(same code as above)
</td>
</tr>
<tr>
<td>
<a href="athnusb1.patch">Patch for USB w/o usbwifi</a>
(against converted driver; untested)
</td>
</tr>
<tr>
<td>
<a href="athnusb2.patch">Patch for USB w/ usbwifi</a>
(against converted driver; untested)
</td>
</tr>
</table>
</main>
</body>
</html>