xref: /openbsd/share/man/man4/mtw.4 (revision d415bd75)
1.\" $OpenBSD: mtw.4,v 1.2 2021/12/24 07:08:04 jmc Exp $
2.\"
3.\" Copyright (c) 2021 James Hastings <hastings@openbsd.org>
4.\" Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
5.\"
6.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above
8.\" copyright notice and this permission notice appear in all copies.
9.\"
10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\"
18.Dd $Mdocdate: December 24 2021 $
19.Dt MTW 4
20.Os
21.Sh NAME
22.Nm mtw
23.Nd MediaTek USB IEEE 802.11b/g/n wireless network device
24.Sh SYNOPSIS
25.Cd "mtw* at uhub? port ?"
26.Sh DESCRIPTION
27The
28.Nm
29driver supports USB 2.0 wireless adapters based on the MediaTek
30MT7601U chipset.
31.Pp
32These are the modes the
33.Nm
34driver can operate in:
35.Bl -tag -width "IBSS-masterXX"
36.It BSS mode
37Also known as
38.Em infrastructure
39mode, this is used when associating with an access point, through
40which all traffic passes.
41This mode is the default.
42.It monitor mode
43In this mode the driver is able to receive packets without
44associating with an access point.
45This disables the internal receive filter and enables the card to
46capture packets from networks which it wouldn't normally have access to,
47or to scan for access points.
48.El
49.Pp
50The
51.Nm
52driver can be configured to use
53Wired Equivalent Privacy (WEP) or
54Wi-Fi Protected Access (WPA1 and WPA2).
55WPA2 is the current encryption standard for wireless networks.
56It is strongly recommended that neither WEP nor WPA1
57are used as the sole mechanism to secure wireless communication,
58due to serious weaknesses.
59WPA1 is disabled by default and may be enabled using the option
60.Qq Cm wpaprotos Ar wpa1,wpa2 .
61For standard WPA networks which use pre-shared keys (PSK),
62keys are configured using the
63.Qq Cm wpakey
64option.
65WPA-Enterprise networks require use of the wpa_supplicant package.
66The
67.Nm
68driver offloads both encryption and decryption of data frames to the
69hardware for the WEP40, WEP104, TKIP(+MIC) and CCMP ciphers.
70.Pp
71The
72.Nm
73driver can be configured at runtime with
74.Xr ifconfig 8
75or on boot with
76.Xr hostname.if 5 .
77.Sh FILES
78The driver needs the following firmware files,
79which are loaded when an interface is brought up:
80.Pp
81.Bl -tag -width Ds -offset indent -compact
82.It /etc/firmware/mtw-mt7601u
83.El
84.Sh HARDWARE
85The following adapters should work:
86.Pp
87.Bl -tag -width Ds -offset indent -compact
88.It ASUS USB-N10 v2
89.It D-Link DWA-127 rev B1
90.It Edimax EW-7711UAn v2
91.It Edimax EW-7711ULn v2
92.It Foxconn WFU03
93.It Tenda U2
94.It Tenda W311MI v2
95.It TP-LINK TL-WN727N v4
96.It Yealink WF40
97.El
98.Sh EXAMPLES
99The following example scans for available networks:
100.Pp
101.Dl # ifconfig mtw0 scan
102.Pp
103The following
104.Xr hostname.if 5
105example configures mtw0 to join network
106.Dq mynwid ,
107using WPA key
108.Dq mywpakey ,
109obtaining an IP address using DHCP:
110.Bd -literal -offset indent
111join mynwid wpakey mywpakey
112inet autoconf
113.Ed
114.Sh DIAGNOSTICS
115.Bl -diag
116.It "mtw0: error N, could not read firmware ..."
117For some reason, the driver was unable to read the microcode file from the
118filesystem.
119The file might be missing or corrupted.
120.It "mtw0: could not load firmware"
121An error occurred while attempting to upload the microcode to the onboard 8051
122microcontroller unit.
123.It "mtw0: device timeout"
124A frame dispatched to the hardware for transmission did not complete in time.
125The driver will reset the hardware.
126This should not happen.
127.El
128.Sh SEE ALSO
129.Xr arp 4 ,
130.Xr ifmedia 4 ,
131.Xr intro 4 ,
132.Xr netintro 4 ,
133.Xr usb 4 ,
134.Xr hostname.if 5 ,
135.Xr ifconfig 8
136.Sh HISTORY
137The
138.Nm
139driver first appeared in
140.Ox 7.1 .
141.Sh AUTHORS
142.An -nosplit
143The
144.Nm
145driver was written by
146.An James Hastings Aq Mt hastings@openbsd.org
147based on the
148.Xr run 4
149driver by
150.An Damien Bergamini Aq Mt damien.bergamini@free.fr .
151.Sh CAVEATS
152The
153.Nm
154driver does not support any of the 802.11n capabilities offered by the
155MT7601U chipset.
156Additional work is required in
157.Xr ieee80211 9
158before those features can be supported.
159.Pp
160This driver does not support powersave mode.
161