Fedora Linux Support Community & Resources Center
  #1  
Old 26th July 2008, 08:06 PM
daves2357 Offline
Registered User
 
Join Date: May 2006
Posts: 15
ath9k

Hi,

I have an Atheros card that is working with Madwifi. As soon as possible though, I would like to abandon Madwifi and its evil propriety HAL.

I recently heard about the freshly-opened ath9k. My card's chipset is (supposedly) supported by it.

Has anyone been able to successfully build this for Fedora and verify that it works? I'll try to build it myself in a few days when I can get some more memory for this workstation, and see if I can get back to all FOSS.
Reply With Quote
  #2  
Old 28th July 2008, 10:47 PM
daves2357 Offline
Registered User
 
Join Date: May 2006
Posts: 15
I had access to a Fedora box today with an actual hard disk, so I could do some compiling. I'm posting via the ath9k driver right now.

The compile for Fedora is relatively straightforward. If anyone else wants to build the driver now, the following is what I did. (Just copy and paste the code sections into a terminal.)

First, follow along these steps until you get through "Get the Source". We don't need to rebuild everything; there are just a few kernel headers needed that aren't in the kernel-devel RPM.

Next, make sure you have the basics:
Code:
yum -y install gcc git kernel-devel make
Get the ath9k source:
Code:
cd /usr/src
git clone git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/ath9k.git
cd ath9k
Red Hat apparently hates list.h; they remove a lot of functions from kernel.org's version. Luckily, the only missing function required by ath9k is a simple one. It can be replaced with a macro for our purposes:
Code:
echo '#define list_is_singular(head) !list_empty(head) && ((head)->next == (head)->prev)' >> /usr/src/kernels/`uname -r`/include/linux/list.h
If you followed the steps to create the Red Hat's kernel source directory, we need to borrow a few headers:
Code:
cp ~/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.x86_64/net/mac80211/{ieee80211_i,key,rate,sta_info}.h /usr/src/kernels/`uname -r`/net/mac80211
Now, (while still in the ath9k directory) make the module:
Code:
make
You shouldn't get any errors at this point. Add it to /lib/modules:
Code:
make install
Now everything should be good to go. You should be able to load the module, restart NetworkManager, and connect wirelessly:
Code:
modprobe ath9k
service NetworkManager restart
I haven't done much in the realm of building Fedora packages. Please let me know if I am doing something stupid like missing an RPM that would fix some of those steps.
Reply With Quote
  #3  
Old 28th July 2008, 11:49 PM
Nokia's Avatar
Nokia Offline
Registered User
 
Join Date: Aug 2006
Location: /dev/realm/{Abba,Carpenters,...stage}
Posts: 3,286
Thanks for this useful post/thread. I don't know much about compiling in Fedora, but afaik it's recommended to do the install in RedHat/Fedora's way, and that implies building a rpm file. My guess is that after the make command, instead of make install there should be a rpm -ba --target of some sort, or better yet, a dkms mkrpm command to address the loss of connectivity when changing kernels.

Please don't be offended. I'm just guessing here about how it should be done. Right now I have not time to learn this things - otherwise I would have done it myself - but hopefully some of the more knowledgeable people on this forum would step in and make the necessary considerations on the matter.
__________________
For safer browsing, use OpenDNS nameservers 208.67.222.222 and 208.67.220.220

SELinux User Guide

AutoPager
Reply With Quote
  #4  
Old 17th August 2008, 07:45 PM
partha Offline
Registered User
 
Join Date: Jun 2005
Posts: 217
The only thing missing seems to be the rate.h header. It does not exist in the kernel source that gets downloaded.

Where are you getting that?

Thanks,
Partha
Reply With Quote
  #5  
Old 17th August 2008, 08:09 PM
partha Offline
Registered User
 
Join Date: Jun 2005
Posts: 217
Quote:
Originally Posted by partha
The only thing missing seems to be the rate.h header. It does not exist in the kernel source that gets downloaded.

Where are you getting that?

Thanks,
Partha
I could not find the rate.h file in the redhat kernel tree. I copied it from the 2.6.26.2 tree. In any case, I am getting the following errors:
Code:
/usr/src/ath9k/ksrc/hw.c: In function ‘ath9k_hw_reset’:
/usr/src/ath9k/ksrc/hw.c:5949: error: implicit declaration of function ‘get_unaligned_le32’
/usr/src/ath9k/ksrc/hw.c:5950: error: implicit declaration of function ‘get_unaligned_le16’
make[3]: *** [/usr/src/ath9k/ksrc/hw.o] Error 1
make[2]: *** [/usr/src/ath9k/ksrc] Error 2
make[1]: *** [_module_/usr/src/ath9k] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.25.14-108.fc9.i686'
make: *** [modules] Error 2
Can you help?

Thanks,
Partha
Reply With Quote
  #6  
Old 18th August 2008, 01:37 PM
daves2357 Offline
Registered User
 
Join Date: May 2006
Posts: 15
Hi,

It seems they have updated ath9k since I first built it. At first glance, it looks like the file that defines what you need in 2.6.26 is "include/linux/unaligned/le_struct.h" in the kernel source. You can try adding that include line in hw.c .

I am currently without an ISP at home, but once I get reconnected, I will spend some more time with this to build the new version for Fedora.
Reply With Quote
  #7  
Old 19th August 2008, 12:05 AM
partha Offline
Registered User
 
Join Date: Jun 2005
Posts: 217
Thanks - but no dice. Since I am not sure what else is missing. I tried simply including that file in the ksrc directory and #include in the hw.c file. Now I get that I am missing packed_struct.h

Thanks,
Partha
Reply With Quote
  #8  
Old 14th September 2008, 10:02 PM
partha Offline
Registered User
 
Join Date: Jun 2005
Posts: 217
Replying to myself ...
It is fairly easy now to build the ath9k driver. As you may know the driver is built into the 2.6.27 kernel tree. If you have a 2.6 version kernel then you can download all the wireless drivers and follow the instructions here.

HTH,

Partha
Reply With Quote
  #9  
Old 14th September 2008, 11:42 PM
daves2357 Offline
Registered User
 
Join Date: May 2006
Posts: 15
Sorry, I forgot that I left this thread hanging. A while ago when I did a rawhide install, I noticed the ath9k driver was included with their build of the 2.6.27 kernel.
Reply With Quote
Reply

Tags
ath9k

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weak connection from ath9k junxuan Servers & Networking 2 7th July 2009 02:21 PM
F9 kernel update adds ath9k driver. nyjetshead Servers & Networking 1 26th January 2009 02:01 PM
DWA-556 ATH9k not working on F10 final release download dvd Broly Servers & Networking 5 7th January 2009 11:50 PM
ath9k - Atheros unveils free Linux driver for its 802.11n devices Nokia Linux Chat 11 28th November 2008 09:33 AM
ath9k (ar9281) and NetworkManager and N-routers partha Alpha, Beta & Snapshots Discussions (Fedora 10 Only) 21 9th November 2008 01:04 AM


Current GMT-time: 17:05 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat