Add information to the wireless networking section about the atheros
driver and the NDISulator. PR: docs/72545 Submitted by: Phil Bowens <phil@bowens.cc>
This commit is contained in:
parent
bc8bac2d56
commit
dca8f17356
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=22917
1 changed files with 113 additions and 2 deletions
|
@ -1075,7 +1075,7 @@ wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|
|||
</sect4>
|
||||
|
||||
<sect4>
|
||||
<title>Clients</title>
|
||||
<title>802.11b Clients</title>
|
||||
|
||||
<para>Almost all 802.11b wireless cards are currently supported
|
||||
under FreeBSD. Most cards based on Prism, Spectrum24, Hermes,
|
||||
|
@ -1083,8 +1083,119 @@ wi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
|
|||
IBSS (ad-hoc, peer-to-peer, and BSS) mode.</para>
|
||||
|
||||
</sect4>
|
||||
</sect3>
|
||||
|
||||
<sect4>
|
||||
<title>802.11a & 802.11g Clients</title>
|
||||
|
||||
<para>The &man.ath.4; device driver supports 802.11a and 802.11g.
|
||||
If your card is based is based on an Atheros chipset, you may
|
||||
be able to use this driver.</para>
|
||||
|
||||
<para>Unfortunately, there are still many vendors that do not
|
||||
provide schematics for their drivers to the open source
|
||||
community because they regard such information as trade
|
||||
secrets. Consequently, the developers of FreeBSD and other
|
||||
operating systems are left two choices-- develop the drivers by
|
||||
a long and pain-staking process of reverse engineering or using
|
||||
the existing driver binaries available for the
|
||||
µsoft.windows; platforms. Most developers, including those
|
||||
involved with FreeBSD, have taken the latter approach.</para>
|
||||
|
||||
<para>Thanks to the contributions of Bill Paul (wpaul), as of
|
||||
<emphasis>FreeBSD 5.3-RELEASE</emphasis> there is "native"
|
||||
support for the Network Driver Interface Specification
|
||||
(NDIS). The FreeBSD NDISulator (otherwise known as Project Evil)
|
||||
takes a &windows; driver binary and basically tricks it into
|
||||
thinking it is running on &windows;. This feature is still
|
||||
relatively new, but most test cases seem to work
|
||||
adequately.</para>
|
||||
|
||||
<para>In order to use the NDISulator, you need three things:</para>
|
||||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>Kernel sources</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&windowsxp; driver binary
|
||||
(<filename>.SYS</filename> extension)</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>&windowsxp; driver configuration file
|
||||
(<filename>.INF</filename> extension)</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>You may need to compile the &man.ndis.4; mini port driver
|
||||
wrapper module. As <username>root</username>:</para>
|
||||
|
||||
<screen>&prompt.root; cd /usr/src/sys/modules/ndis
|
||||
&prompt.root; make && make install</screen>
|
||||
|
||||
<para>Locate the files for your specific card. Generally, they can
|
||||
be found on the included CDs or at the vendors' websites. In the
|
||||
following examples, we will use
|
||||
<filename>W32DRIVER.SYS</filename> and
|
||||
<filename>W32DRIVER.INF</filename>.</para>
|
||||
|
||||
<para>The next step is to compile the driver binary into a
|
||||
loadable kernel module. To accomplish this, as
|
||||
<username>root</username>, go into the
|
||||
<filename>if_ndis</filename> module directory and copy the
|
||||
Windows driver files into it:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>cd /usr/src/sys/modules/if_ndis</userinput>
|
||||
&prompt.root; <userinput>cp <replaceable>/path/to/driver/W32DRIVER.SYS</replaceable> ./</userinput>
|
||||
&prompt.root; <userinput>cp <replaceable>/path/to/driver/W32DRIVER.INF</replaceable> ./</userinput></screen>
|
||||
|
||||
<para>We will now use the <command>ndiscvt</command> utility to
|
||||
create the driver definition header
|
||||
<filename>ndis_driver_data.h</filename> to build the
|
||||
module:</para>
|
||||
|
||||
<screen>&prompt.root; ndiscvt -i <replaceable>W32DRIVER.INF</replaceable> -s <replaceable>W32DRIVER.SYS</replaceable> -o ndis_driver_data.h</screen>
|
||||
|
||||
<para>The <option>-i</option> and <option>-s</option> options specify
|
||||
the configuration and binary files, respectively. We use the
|
||||
<option>-o ndis_driver_data.h</option> option because the
|
||||
<filename>Makefile</filename> will be looking for this file when it
|
||||
comes time to build the module. </para>
|
||||
|
||||
<note>
|
||||
<para>Some &windows; drivers require additional files to operate. You
|
||||
may include them with <command>ndiscvt</command> by using the
|
||||
<option>-f</option> option. Consult the &man.ndiscvt.8; manual page
|
||||
for more information.</para>
|
||||
</note>
|
||||
|
||||
<para>Finally, we can build and install the driver module:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>make && make install</userinput></screen>
|
||||
|
||||
<para>To use the driver, you must load the appropriate modules:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kldload ndis</userinput>
|
||||
&prompt.root; <userinput>kldload if_ndis</userinput></screen>
|
||||
|
||||
<para>The first command loads the NDIS miniport driver wrapper;
|
||||
The second loads the actual network interface. Check
|
||||
&man.dmesg.8; to see if there were any errors loading. If all
|
||||
went well, you should get output resembling the
|
||||
following:</para>
|
||||
|
||||
<screen>ndis0: <Wireless-G PCI Adapter> mem 0xf4100000-0xf4101fff irq 3 at device 8.0 on pci1
|
||||
ndis0: NDIS API version: 5.0
|
||||
ndis0: Ethernet address: 0a:b1:2c:d3:4e:f5
|
||||
ndis0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
|
||||
ndis0: 11g rates: 6Mbps 9Mbps 12Mbps 18Mbps 36Mbps 48Mbps 54Mbps</screen>
|
||||
|
||||
<para>From here you can treat the <devicename>ndis0</devicename> device
|
||||
like any other wireless device (e.g. <devicename>wi0</devicename>) and
|
||||
consult the earlier sections of this chapter.</para>
|
||||
|
||||
</sect4>
|
||||
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue