用Linux做wifi热点/无线路由

用Linux做wifi热点/无线路由

全文阅读 分步阅读

以fedora14为例安装hostapd,将Linux笔记本部署为一台高性能无限路由器,顺便说一句,我的fedora14安装在一台10英寸的上网本上。

工具/原料

  • 有无线网卡、有线网卡的笔记本一台

  • 安装Linux操作系统,我使用的是fedora14

方法/步骤

  1. 检查确认笔记本网卡支持master模式

    首先要安装一个iw:yum install iw -y

    然后执行命令:iw list

    在命令执行结果中如果看到了下面的内容,就说明这张网卡是支持用于ap做路由的

    Supported interface modes:

    * IBSS

    * managed

    * AP

    * AP/VLAN

    * monitor

    * mesh point


  2. 安装hostapd

    通过 yum install hostapd -y 安装,如果是其它红帽系列的可以安装epel的源,或者找一下hostapd的rpm,下载对应自己发行版的进行安装。其它Linux可以通过源码安装。

  3. 修改配置文件

    # vim /etc/hostapd/hostapd.conf

    修改成如下状态

    ctrl_interface=/var/run/hostapd

    ctrl_interface_group=wheel

    macaddr_acl=0

    auth_algs=1

    ignore_broadcast_ssid=0

    wpa=3

    wpa_key_mgmt=WPA-PSK

    wpa_pairwise=TKIP

    rsn_pairwise=CCMP

    wpa_passphrase=ap_password

    driver=nl80211

    interface=wlan0

    hw_mode=g

    channel=9

    ssid=ap_name


    注意修改涉及到的ssid和密码


  4. 安装和配置dhcp

    # yum install dhcpd -y

    # vim /etc/dhcp/dhcpd.conf

    将此文件改成如下:

    option domain-name-servers 211.161.45.222,10.141.146.10;

    default-lease-time 3600;

    max-lease-time 7200;

    log-facility local7;

    subnet 192.168.7.0 netmask 255.255.255.0 {

     range  192.168.7.77 192.168.7.99;

     option broadcast-address 192.168.7.255;

     option routers 192.168.7.7;

    }


    注意将第一行的nameserver添加成你isp提供的dns,这样解析的速度会快一些,不知道的话就改成谷歌的8.8.8.8好了。subnet 里面设置的是分配给连接无线路由的设备的ip段,可以根据自己需求进行调整,这里给了192.168.7.77-99

    需要注意的是,option routers要写成这台机器的wlan0的ip,这个是手动设置的

    # ifconfig wlan0 192.168.7.7

  5. 配置SNAT

    Linux可以很方便的通过iptables配置SNAT服务器,命令如下:

    iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
    iptables -A FORWARD -s 192.168.4.0/24 -j ACCEPT
    iptables -A FORWARD -d 192.168.4.0/24 -j ACCEPT

    其中第一条表示将通过本机的转发数据包从eth0(外网)这个网卡发出去,另外两条表示只转发192.168.4.0/24这个网段过来的数据包,这个网段正好是wlan0其它设备连上本机以后分配的网段。

    还需要在打开内核的ip转发功能:

    # vim /etc/sysctl.conf

    添加或修改这样一段:

    net.ipv4.conf.default.rp_filter = 1

    然后执行命令

    # sysctl -p

  1. 启动相关服务

    /etc/init.d/dhcpd start

    /etc/init.d/hostapd start


参考资料

http://bbs.konotes.org/thread-2000-1-1.html
经验内容仅供参考,如果您需要解决具体问题(尤其在法律、医学等领域),建议您详细咨询相关领域专业人士。





http://blog.chinaunix.net/uid-26547792-id-3152196.html

linux无线网卡 2012-03-28 18:14:55

分类: LINUX

若要安装以 Broadcom BCM4311、BCM4312、BCM4313、BCM4321 或 BCM4322 为基础的无线网络卡,请遵照以下的步骤:
第 1 步:辨认无线网络芯片及安装时依赖的组件

首先,请确定你是位「拥有 Broadcom BCM43xx 无线网络卡的幸运儿」:
[user@host ~]$ /sbin/lspci | grep Broadcom
0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
辨认完无线网络芯片型号之后,请确定你不会欠缺编译及安装时所需的组件:
[root@host]# yum install kernel-headers kernel-devel gcc
当然,假若你要为 Xen 内核(kernel-xen)编译驱动程序,你必须安装 kernel-xen-devel 而不是 kernel-devel。
第 2 步:下载并解压 Broadcom 驱动程序的压缩档
请从  Broadcom 的官方网站下载 Broadcom BCM43xx 的 linux 驱动程序压缩档到你的机器并将它解压到 /usr/local/src/hybrid-wl,请随你所需将这个目录的拥有者改为无特权的用户:
[root@host ~]# mkdir -p /usr/local/src/hybrid-wl
[root@host hybrid-wl]# cd /usr/local/src/hybrid-wl
[root@host hybrid-wl]# tar xvfz /path/to/the/tarball/hybrid-portsrc-x86_64-v5.10.91.9.3.tar.gz(下载档的名称)
[root@host hybrid-wl]# chown -R someuser.somegroup /usr/local/src/hybrid-wl
注:为什么不随便将它解压到一个位置并保留缺省的拥有者?
原因是上面的做法会把驱动模块的源代码保留在系统上 —— 在你放置它们的位置 —— 好让你可以随时按需要创建驱动程序(譬如:你将内核升了级 —— 因为驱动模块永远根据某个内核来编译),还有,就是你可以用无特权的用户来编译!
第 3 步:编译 Broadcom 驱动模块

驱动模块可以这样编译:
[user@host hybrid-wl]$ make -C /lib/modules/`uname -r`/build/ M=`pwd`
请留意引号(也就反引号)。
现在你很可能会获得一个错误信息,而不是一个编译好的驱动模块(实际上,本作者仍未遇过这个信息以外的情况)。这则信息的内容大致上是:
make: Entering directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
LD /tmp/hybrid/hybrid/hybrid/built-in.o
CC [M] /tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_linux.o
In file included from /tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_linux.c:20:
/tmp/hybrid/hybrid/hybrid/src/include/typedefs.h:70: error: conflicting types for ‘bool’
include/linux/types.h:36: error: previous declaration of ‘bool’ was here
make[1]: *** [/tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_linux.o] Error 1
make: *** [_module_/tmp/hybrid/hybrid/hybrid] Error 2
make: Leaving directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
正如你所见, typedefs.h 这个文件的第 70 行出了一个问题。要解决它,请将第 70 行的代码改为注释,好让它变成:
/*
#ifndef TYPEDEF_BOOL
typedef unsigned char bool;
#endif
*/
你亦可以通过在标头档加入以下内容(勿论这一行是否已经存在)来简单地解决这个问题:
#define TYPEDEF_BOOL
现在,请尝试再次编译驱动模块:
[user@host hybrid-wl]$ make -C /lib/modules/`uname -r`/build/ M=`pwd`
编译器的输出大致上是这样:
make: Entering directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
CC [M] /tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_linux.o
CC [M] /tmp/hybrid/hybrid/hybrid/src/wl/sys/wl_iw.o
CC [M] /tmp/hybrid/hybrid/hybrid/src/shared/linux_osl.o
LD [M] /tmp/hybrid/hybrid/hybrid/wl.o
Building modules, stage 2.
MODPOST
CC /tmp/hybrid/hybrid/hybrid/wl.mod.o
LD [M] /tmp/hybrid/hybrid/hybrid/wl.ko
make: Leaving directory `/usr/src/kernels/2.6.18-164.el5-x86_64'
一旦这个模块被建成,你便可以删除不必要的符号:
[user@host hybrid-wl]$ strip --strip-debug wl.ko
你会发现驱动模块的文件尺寸会明显地缩小(由 2.2MB 降至 1.5MB)。而且,你的驱动模块仍能正常运作 
第 4 步上:将驱动模块装入内核中
当你成功地编译了驱动模块后,你便可以将它装入内核中,并设置在开机时自动装入这个驱动程序(要这样做,你必须利用 root 的权限)。当然,做这一切之先,你必须从内核删除现在的无线驱动模块(假如有的话):
[root@host ~]# rmmod bcm43xx
[root@host ~]# rmmod b43
[root@host ~]# rmmod b43legacy
[root@host ~]# rmmod ndiswrapper
现在我们装入驱动模块:
[root@host hybrid-wl]# modprobe wl.ko
你也可采用:
[root@host hybrid-wl]# insmod wl.ko
假如你在无线驱动程序以外没有应用 ndiswrapper 这个内核模块,你可以删除它,但这并非必需的。
第 4 步下:在开机时将驱动模块装入内核中
首先,请将驱动模块的文件复制到一个可以让内核找到它的地方:
[root@host hybrid-wl]# cp -vi /usr/local/src/hybrid-wl/wl.ko /lib/modules/`uname -r`/extra/
这样做是为了与其它已经/将会从 kmod 组件安装的外置模块(例如:fuse、ntfs-3g、等)保持一贯性。
按着,请执行:
[root@host ~]# depmod $(uname -r)
以便能创建一个模块的互赖性清单。
编译  /etc/modprobe.d/blacklist 这个文件并加入以下内容:
blacklist bcm43xx
blacklist ndiswrapper
blacklist b43
blacklist b43legacy
通过这样做,你可以避免这些模块在开机时被装入内核中。此外,假如你在  /etc/modprobe.conf 内有一行是指定无线界面的驱动程序,例如:
alias eth1 bcm43xx

alias eth1 b43

alias eth1 b43legacy
请将这行注释掉:
#alias eth1 bcm43xx

#alias eth1 b43

#alias eth1 b43legacy
并为你的无线网络卡加入新的驱动程序别名:
alias eth1 wl
这一切都假设你的无线网络界面设备档是 eth1。
现在,请编译  /etc/modprobe.d/modprobe.conf.dist 这个文件并加入以下内容:
alias ieee80211_crypt_tkip ieee80211_crypt_tkip
alias eth1 wl
现在你的驱动应该在每次开机时都会被装入(当然除了在你安装了新内核之后,到时你必须依照以上步骤将它重新编译)。





http://blog.bokhorst.biz/3395/computers-and-internet/asrock-ion-330ht-as-wireless-access-point/

Asrock ION 330HT as Wireless Access Point

If you know how to do it, most things are simple. Figuring out how to make my Asrock ION 330HT-BD (running Ubuntu Karmic) a wireless access point took me a couple of hours. For my own reference and maybe to save you some time I wrote down all steps.

How-to

  • Check wireless adapter type
    • lspci -v | grep Network
      • Should be AR9285
  • Enable IP forwarding
    • sudo gedit /etc/sysctl.conf
      • Uncomment
        • net.ipv4.ip_forward = 1
    • Live change
      • sudo echo 1 > /proc/sys/net/ipv4/ip_forward
    • Check
      • cat /proc/sys/net/ipv4/ip_forward
  • Give wireless adapter a static address
    • sudo gedit /etc/network/interfaces
      • Add code below
    • Live change
      • sudo /etc/init.d/networking restart
    • Check
      • ifconfig wlan0
auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
    address 192.168.0.1
    netmask 255.255.255.0
    broadcast 192.168.0.255
  • Download latest Linux wireless drivers (currently version 2.6)
    • Extract archive
    • Build/install
      • cd compat-wireless-*
      • ./scripts/driver-select ath9k
      • make
      • sudo make unload
      • sudo make install
      • Redo when new kernel
    • Live change
      • sudo modprobe ath9k
    • Check
      • grep ath9k /var/log/syslog
  • Install hostapd
    • sudo apt-get install hostapd
    • sudo gedit /etc/default/hostapd
      • Uncomment
        • RUN_DAEMON=”yes”
        • DAEMON_CONF=”/etc/hostapd/hostapd.conf”
    • sudo gedit /etc/hostapd/hostapd.conf
      • Add
        • driver=nl80211
      • Change
        • ssid=
        • hw_mode=g
        • auth_algs=1
        • wpa=2
        • wpa_passphrase=
        • wpa_pairwise=TKIP
    • Live change
      • sudo /etc/init.d/hostapd restart
    • Check
      • grep hostapd /var/log/syslog
  • Install dnsmasq
    • sudo apt-get install dnsmasq
    • sudo gedit /etc/default/dnsmasq
      • Uncomment
        • DNSMASQ_OPTS=”–conf-file=/etc/dnsmasq.conf”
      • Comment
        • #CONFIG_DIR=/etc/dnsmasq.d
    • sudo gedit /etc/dnsmasq.conf
      • Add
        • interface=wlan0
        • dhcp-range=192.168.0.2,192.168.0.127,12h
    • Live change
      • sudo /etc/init.d/dnsmasq restart
    • Check
      • grep dnsmasq /var/log/syslog
  • Routing
    • Give the Asrock a static IP 192.168.1.x
      • Preferable by your local DHCP server (based on MAC address)
    • Add a static route 192.168.0.0/255.255.255.0 > 192.168.1.x
      • In your modem/router
  • Now you should be able to connect

Links

  • Linux Network Configuration
  • CategoryWireless
 Posted by Marcel at 8:37  Tagged with: en

 9 Responses to “Asrock ION 330HT as Wireless Access Point”

  1. I am having a Broadcom 4312 driver in my dell inspiron 1545 will your setup will work in my PC, Kindly give your suggestion.

    • To start with, you should do the first step of the how-to to discover your exact adapter type. After that you’ll have to check if your adapter is supported by the Linux wireless drivers and if so, select the correct driver (see build/install).

  2. I have a slightly different setup:

    A separate firewall/DHCP server.
    A Zotac IONITX-P-E (just like John above).

    I would like to use the Zotac (also) as a transparent access point (no masquerading).
    Is it possible?
    What should I change?

    • You could try to relay DCHP requests, but I’ve no idea about how to do the routing without a separate sub-net.

    • In fact, I have a similar setup. DSL router + firewall + DHCP server and an internal (wired) 192.168.1.x network. My first approach was to create one big internal network (wired and wireless in the same network, sharing the same DHCP server, behind the same firewall).

      I didn’t get this to work and went for 2 separate networks. Perhaps it will work with DHCP relay, my old AP, a Linksys WAP54G does basically the same. I think it’s better to create an extra network, eg. 192.168.0.x for wireless. You can easily achieve this with dnsmasq.

      I’m not sure how this situation should work on one big network: a wired device, let’s say 192.168.1.2 wants to connect to a wireless device, let’s say 192.168.1.4. How does it “know” it has to send it’s request to 192.168.1.3, the wired interface of the AP?

  3. Hi Marcel,

    Thanks, this gave me a nice jump start. I have a Zotac IONITX-P-E, with the same wireless card.
    To enable 802.11n, in hostapd.conf you should also set:
    ieee80211n=1
    wmm_enabled=1
    ht_capab=[HT40-][HT40+][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

    For other cards, use ‘iw list’ to check your cards HT capabilities (ht_capab).

  4. THanks Marcel,

    This has got my Asrock running nicely on Ubuntu 9.10 Kernel 2.6.31-20.
    The only thing I had to do differently was that I had to use iptables rather the route to configure my wireless lan to the internet ie.
    iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
    This nicely redirects all traffic from the wireless network through to the wired network.

  5. Hi Marcel,

    Nice blog! I have done basically the same thing and found this posting very informative. I’m using a Dell Mini 9 running Ubuntu 9.10. It is acting as a NAT router/firewall (UFW with NAT rules), DHCP server (dhcp3-server) and AP (hostapd with Atheros AR928x based card). My question is related to the performance of your AP. While my AP configuration seems to work for the most part, my clients drop their connection regularly. Based on syslog this seems to be due to some kind of deauthentication/authentication issue. The only way to get the clients to reconnect is to manually restart hostapd.

    I’m curious to know if you have seen this behavior on your AP as well. If you have, how have you resolved the issue?

    Thanks!

    • Actually I haven’t used the access point very much, because it appeared to be unstable when I use NFS (the PC/Ubuntu stops responding completely; this doesn’t happen when I use the wired connection) and the wireless range was limited (the Asrock has no external antenna).

      I didn’t see your deauthentication/authentication problem. Maybe it has to do with encryption. I used WPA2 only.



黑苹果系统下Atheros系列网卡性能比较研究

 

博主的淘宝店铺:http://ideatrust.taobao.com/

或者大家可以搜索店铺:黑苹果软硬件解决方案旗舰店

 

黑苹果爱好者为了是自己的黑苹果系统在Mac os X下能够完美wifi无线上网,大家在PCbeta Forum里有对Atheros系列多种型号进行讨论的帖子,然而到底哪种型号是真正完美的最佳的可用的方案,大家仍停留在经验讨论中,没有一个帖子能够给出最好且让大家信服的方案来。另外,仍有大部分的朋友仍在用版本号来推算Atheros系列网卡性能的高低,这基本上可以算是一种很错误的理念。下面我将为大家带来Atheros可支持Mac os X各种型号的比较分析。
现在论坛里讨论的Atheros系列网卡基本的版本号9280往后的,而且经笔者翻阅资料发现,可支持且性能稍好且能够支持Mac os X的网卡也正是大家讨论的这些型号(见表1)。

表1 Atheros主要支持MacosX网卡技术参数[1]

Chipset

Chips used

Interface

PHY modes

MOMI status[3]

  AR9280(Merlin)

PCIe

abgn

2×2:2

  AR9281(Merlin)

PCIe

bgn

1×2:2

  AR9283(Merlin)

PCIe

bgn

2×2:2

  AR9285 (Kite)

PCIe

bgn

1×1:1

  AR9287 (Kite)

PCIe

bgn

2×2:2

AR9002WB-1NGCD

AR9285 (Kite) + AR3011(bluetooth)

PCIe

bgn

1×1:1

AR9002WB-2NG

AR9287 (Kiwi) + AR3011 (bluetooth)

PCIe

bgn

2×2:2

  AR93 AR928780

PCIe

abgn

3×3:3

通过分析此表不难发现AR9280、AR9002WB-2NG、AR9380最先胜出的,这三个中间AR9380新能最优,频段同时支持abgn,支持3-stream 11n MIMO,最高支持450mbps;而AR9280是频段也同时支持abgn,支持2-stream 11n MIMO,最高支持300mbps;AR9002WB-2NG为蓝牙和无线二合一设计,无线频段仅支持bgn,少a频段支持,支持2-stream 11n MIMO,最高支持300mbps。
接下来呢,无线收发性能优胜从大到小依次为AR9287>AR9283> AR9281 >AR9285。其中所有的卡频段支持都bgn,AR9287、AR9283 MOMI属性是一样的,代表数据吞吐量一样,但是大家应该注意到AR9287的开发代号为Kiwi,而其余型号的代号皆为Merlin,(这里可以这样理解,开发时间上AR9287是晚于AR9283的,按照技术进步的优势,一定程度上可以认为AR9287性能高于AR9283,但是这并无从考证。因为一款产品的推出是跟市场需求有关而不是技术水平,诸如诺基亚是技术力量很强的企业,但售价为200元低性能功能手机一直占领着市场是同一道理。)在数据吞吐量MIMO属性,AR9287/ AR9283为收发数据最高均为300mbps,AR9281为收300mbps发150mbps,AR9285收发都为150mbps。

综上,在不考虑蓝牙的情况下,上述网卡性能从优到劣的次序为:AR9380>AR9280/AR9283/AR9287/> AR9281 >AR9285。

因此,如果你想实现wifi+bluetooth方案的话,建议你使用AR9002WB-1NGCD,虽然此方案wifi性能最低,但是由于bluetooth的存在,这是一个相对较好的wifi+bluetooth[2]。虽然还有高性能的AR9002WB-2NG方案,但是由于AR9287到目前为止驱动仍然非常困难,所以现在仍然不建议选此方案。

那么,上述网卡中到底哪个才能真正实现免驱呢,因为AR9280/ AR9281/AR9283这三个卡,虽然系能高低不一,但是他们具有相同的开发代号,应该会采用相同的芯片,所以理论上来讲,这三个卡都可以实现完美免驱。在笔者翻阅大家实际使用经验帖子,也再次证明了这三个卡应该都能完美免驱。

(这里大家需要注意的是,即使AR9280/ AR9281/AR9283采用的是同样的芯片,但也有可能无法驱动。原因有很多,总结有两点,一是你所使用的环境,软件的问题;而是卡本身的问题,这个三个卡使用了同样的芯片,为什么性能高低不一呢,这应该是厂商做的一硬件限制而使它们出现性能高低之分,以及应用的不同机器、使用地区等等,也是因为这些限制导致了采用的是同样的芯片,但也有可能无法驱动。)

所以大家在购买AR928x的网卡过程中,卖家实际在真实MAC环境下测试过才是真正好用,因为这里可以推荐购买的型号就有AR9280/ AR9281/AR9283,大家可以按照新能高低选择自己所需要的型号。这里再这三个性能做比较:AR9280/AR9283收发均为300mbps,AR9281为收300mbps,发150Mbps 。三者性能从能高到底AR9280=AR9283 >AR9281。(因为数据接收能够达到300mbps,即使发为150Mbps已经完全不影响到我们的正常使用)

最后说AR9380这些卡中性能最高,三天线设计,最高450mbps收发,而且为mac air 笔记本原生采用卡,但缺点是价格有点太高,基本在150元左右,但如果有这经济实力是推荐。

注:AR9380/AR9280都有原生的去全高和半高的。之前我在论坛看到大家都以为AR9380/AR9280只有全高卡,经笔者翻阅资料发现事实不是这样的,全高AR9380/AR9280多为Atheros官方和苹果oem卡,半高的多为采用同样芯片的oem卡(这些oem卡应用很广,笔者发现光AR9280芯片的半高卡,在ACER、HP、Dell、Lenovo等大的电脑厂商的笔记本上都存在过,因此你的机器如果是半高卡,这些采用AR9280芯片的OEM卡是你最好的选择)。

::关于MOMI status的解读见文后的英文资料[3],这里我就不做翻译了,大家可以自行参看。::

 

笔者相关文章推荐:
PC黑苹果系统构建无线模块最佳解决方案,http://www.ideatrust.net/2013/03/13/the-pc-black-apple-building-wireless-module-solutions
黑苹果系统系统下硬件驱动通用解决方案,
http://www.ideatrust.net/2013/03/12/black-apple-system-system-hardware-drivers-universal-solution

笔记本刷白名单评测建议方案,http://www.ideatrust.net/2013/03/18/notebook-to-whitewashed-list-evaluation-proposal

参考文献
[1] Atheros,http://www.wikidevi.com/wiki/Atheros
[1] 购买AR5B195或者笔记本AR3011蓝牙MAC无法驱动的请看, http://bbs.pcbeta.com/viewthread-1153759-1-1.html
[3]见参考资料

参考资料
Proprietary MIMO technology can be found in some Wireless-G devices. Both the access point and the adapter must support the same technology as MIMO is not standardized in 802.11g. Often, two radios are used to double the bandwidth to 108Mbps.
MIMO is a part of the 802.11n specification. Different notations may be used to describe the MIMO capabilities of a given device.
TxR:S
T: Number of transmit radio chains
R: Number of receive radio chains
S: Number of spatial data streams
1×1:1 – 150Mbps transmitting and receiving
1×2:2 – 150Mbps transmitting, 300Mbps receiving
2×2:2 – 300Mbps transmitting and receiving
2×3:2 – 300Mbps transmitting and receiving
3×3:2 – 300Mbps transmitting and receiving
3×3:3 – 450Mbps transmitting and receiving

更新:

20130329 部分表述和更详尽的性能比较更新;可用于黑苹果无线网卡推荐推荐范围更新;




http://linuxwireless.org/en/users/Drivers/ath9k/

Go back –> Atheros Linux wireless drivers

About ath9k

ath9k is a completely FOSS wireless driver for all Atheros IEEE 802.11n PCI/PCI-Express and AHB WLAN based chipsets.

Contents

  1. About ath9k
  2. Subscribe to this page!
  3. Mailing list
  4. Get the latest ath9k driver
  5. Enabling ath9k
  6. Bluetooth coexistence
  7. supported chipsets
  8. Available devices
  9. Features and modes of operation
    1. Modes of operation
    2. Features
  10. A little history on ath9k
    1. When it went in
    2. Early distributions which picked it up
  11. Statistics on contributions
  12. Other sections

Subscribe to this page!

You should subscribe to this page so you can get e-mail updates on changes and news for ath9k automatically. You'll get an e-mail as soon as this page gets updated.

Mailing list

Our mailing list for this driver is:

https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Get the latest ath9k driver

Any distribution shipping a kernel >= 2.6.27 will have ath9k present but the ath9k driver on 2.6.32 is the oldest one recommended, anything older than that is completely unsupported. Below is a list of the minimal distribution requirements to either use ath9k from 2.6.27 or from compat-wireless, which lets you install newer drivers on older kernels.

  • Ubuntu Intrepid (8.10)
  • Fedora Core 10
  • openSUSE 11.1
  • Mandriva Linux 2009.0 (formally known as Mandrake Linux)
  • ARCH Linux
  • Gentoo Linux
  • Red Flag Linux 7.0 (based on Fedora 10)
  • RHEL5 using 2.6.32 ath9k backported to 2.6.18

If you want to get the latest ath9k driver you have several options:

  • compat-wireless stable releases of ath9k - ath9k as it is in newer stable kernels releases backported for older kernels

  • compat-wireless daily linux-next.git snapshots of ath9k - ath9k as it is present in the development tree for 802.11 backported for older kernels

  • wireless-testing: through the 802.11 development git tree used by developers working on ath9k

To read more about the wireless-testing and development on ath9k you can read our our git-guide and the development process, please be also sure to read the bug fix propagation, our documentation on reporting bugs, and how we handle adding additional critical fix patches to ath9k.

It should be noted that some Linux distributions already use the stable compat-wireless releases as packages in their Linux distribution. Examples are ChromeOS, Ubuntu, Gentoo and Openwrt. Openwrt in particular uses compat-wireless snapshots based on wireless-testing, and the releases are updated regularly after some evaluation by OpenWrt's developers and the community. If you are using the any of the compat-wireless releases, you can enable only to compile and install ath9k by issuing the following commands.

Please note that for AP mode of operation the Minstrel rate control algorithm performs much better than the Atheros rate control algorithm and a separate driver-select option is provided below to enable you to use Minstrel for AP.

# If you are using ath9k as STA device:
./scripts/driver-select ath9k

# If you are using ath9k as an AP:
./scripts/driver-select ath9k_ap

make sudo make install }}}

Enabling ath9k

To enable ath9k, you must first enable mac80211 through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable ath9k through make menuconfig.

Networking  --->
  Wireless  --->
     Improved wireless configuration API
     Generic IEEE 802.11 Networking Stack (mac80211)

You can then enable ath9k in the kernel configuration under

Device Drivers  --->
  [*] Network device support  --->
        Wireless LAN  --->
             Atheros 802.11n wireless cards support

Bluetooth coexistence

ath9k supports 2-wire and 3-wire Bluetooth coexistence, for details see the ath9k btcoex page.

supported chipsets

SB = single-band 2.4GHz DB = dual-band 2.4GHz or 5GHz

Legacy:

  • AR2427 (>= 2.6.32.16, no 802.11n hardware support, its bonded out) 1x1 SB PCIe

AR5008:

  • AR5418+AR5133 (>= 2.6.27) AR5418 = DB 11n PCIe, AR5133 = 3x3 DB 11n

  • AR5416+AR5133 (>= 2.6.27) AR5416 = DB 11n PCI

  • AR5416+AR2133 (>= 2.6.27) AR2133 = 3x3 SB 11n

AR9001:

  • AR9160 (>= 2.6.27) DB 11n

  • AR9102 (>= 2.6.30, AHB) 2x2 SB 11n

  • AR9103 (>= 2.6.30, AHB) 3x3 SB 11n

AR9002:

  • AR9220 (>= 2.6.27, an AR9280 card over PCI) 2x2 DB 11n PCI

  • AR9280 (>= 2.6.27) 2x2 DB 11n PCIe

  • AR9281 (>= 2.6.27) 2x2 SB 11n PCIe

  • AR9285 (>= 2.6.29) 1x1 SB 11n PCIe

  • AR9287 (>= 2.6.32) 2x2 SB 11n PCIe

AR9003:

  • AR9380 (>= 2.6.36) 3x3 DB 11n PCIe

  • AR9382 (>= 2.6.36) 2x2 DB 11n PCIe

AR9004:

  • AR9485 (>= 2.6.39) 1x1 SB 11n PCIe

  • AR9462 (>= 3.2) 2x2 DB 11n PCIe

  • AR9565 (development in progress) 1x1 SB 11n PCIe

Available devices

See the ath9k device list.

Features and modes of operation

All of these modes of operation are supported and should work on all ath9k cards.

Modes of operation

  • Station Mode

  • AP Mode

  • IBSS Mode

  • Monitor Mode

  • Mesh point with HT support, as well as RSN

  • WDS (as of >= 2.6.37)

  • P2P GO/CLIENT

Features

  • 802.11abg
  • 802.11n
    • HT20
    • HT40
    • AMPDU
    • Short GI (Both 20 and 40 MHz)
    • LDPC
    • TX/RX STBC
  • 802.11i
    • WEP 64 / 127
    • WPA1 / WPA2
  • 802.11d
  • 802.11h
  • 802.11w/D7.0
  • WPS client side (use wpa_gui-qt4 from wpa_supplicant for now)
  • WMM
  • LED
  • RFKILL
  • BT co-existence
  • 64-bit support / big endian, small endian
  • AHB and PCI bus
  • TDLS
  • WoW
  • Antenna Diversity

A little history on ath9k

When it went in

ath9k was announced to have been merged into Linux-2.6.27-rc3 by Linus on Tue, 12 Aug 2008 19:33:16 -0700 (PDT), and consisted of 58.8% of the entire rc3 patch.

Early distributions which picked it up

OpenWrt became the first distribution to pick up ath9k and contribute to it.

Statistics on contributions

Below are stats on contributions between Qualcomm Atheros and the community on ath9k.

Other sections

For more information please see:

  • ath9k module size and its dependents

  • power consumption - power consumption details with ath9k

  • ath9k btcoex support

  • ath9k bugs

  • ath9k TODO page

  • ath9k debugging

  • products with supported ath9k cards

  • ath9k_hw module - documentation about the ath9k_hw module

  • ath.ko module - used for shared code between Atheros devices

  • Solaris ath9k port - arn

  • Print View
  • Login
  • About this site

你可能感兴趣的:(用Linux做wifi热点/无线路由)