# Intel 4965 AGN WiFi

## Ologon

Hi!   :Very Happy: 

I'm trying to get my wireless card Intel 4965 AGN WiFi working on my gentoo. Searching on the internet I saw that I'm supposed to use the iwlwifi drivers (associated with iwl4965-ucode). Before I tried to use ndiswrapper instead since I'm more familiar with it but it all ended with a kernel panic when I tried to modprobe ndiswapper (probably because that was a guide for kubuntu, not for gentoo). 

So now I'm trying to get iwlwifi drivers working. I successfully emerged iwl4965-ucode, and when I try to emerge iwlwifi this is what I get:

```
ACCEPT_KEYWORDS="~x86" emerge -pv iwlwifi

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild  NS   ] sys-kernel/gentoo-sources-2.6.22-r10  USE="-build -symlink" 23,090 kB

[ebuild  N    ] net-wireless/iwl3945-ucode-2.14.1.5  65 kB

[ebuild  N    ] net-wireless/iwlwifi-1.2.23  USE="-ipw3945 -ipw4965" 355 kB

Total: 3 packages (2 new, 1 in new slot), Size of downloads: 23,509 kB

```

No error in it, still I don't understand why emerge wants to compile an older kernel? Maybe iwlwifi is with kernel 2.6.24 wich I'm using now? If so, how can I get it up?

Thanks!   :Smile: 

----------

## Punchcutter

Sorry I can't answer your question, but.... I'm also just at the stage of installing on my Thinkpad X61 tablet where I need to get the wifi working (it's also a 4965).  For me, iwlwifi is masked.  Isn't it masked for you also?  Can I also ask why you're using USE flags -ipw3945 and -ipw4965, and what function are these supposed to serve?

Thanks,

Dave

----------

## Ologon

It was masked for me too. All you have to do is to add a file called package.unmask in /etc/portage/ and unmask iwlwifi in it, with this commad:

```
echo "net-wireless/iwlwifi" >> /etc/portage/package.unmask
```

after run ACCEPT_KEYWORDS="~x86" emerge iwlwifi  , and it should go fine ^^

I don't know why it is using those USE flags (I'm using the default desktop profile), but I think they may be required.

----------

## Punchcutter

OK, I'm with you now.  I don't need the ACCEPT_KEYWORDS, as long as I add the package name to the package.unmask file, as you specified.

And I've added "ipw4965" to the USE variable in my /etc/make.conf.  If you specify this USE flag, it will prevent iwl3945-ucode from being merged (which presumably we don't need).  We do need iwl4965-ucode, though, so make sure you merge that.

Now back to working on the question of why an old gentoo-sources is being merged.... any help from more knowledgeable folks...?

Thanks,

Dave

----------

## Punchcutter

D'oh!  I think I've found the easy answer for myself.... no need to merge iwlwifi at all!   :Very Happy:   It's included within the latest kernels (I'm running 2.6.24-r4) as a module.  So I only had to do "modprobe iwl4965" and my wifi seems to be working.... at least I have a wlan0 interface that I can do a scan on.  For today that's good enough for me....

Dave

----------

## derekho55

Uhh.. I also have kernel 2.6.24-r4, but I can't seem to find that option in menuconfig. I searched for "iwlwifi"  on the search screen; its in the search results, but when I try to look for it, its not where the search result claimed it was. Am I missing "prerequisite" kernel options that would trigger "iwlwifi" as available?

Thanks in advance. 

Derek

----------

## swimmer

You have to check "General Setup -> [*] Prompt for development and/or incomplete code/drivers" ...

And don't forget to emerge the latest net-wireless/iwl4965-ucode  :Wink: 

HTH

swimmer

----------

## Ologon

Solved!   :Very Happy: 

The module is included in the kernel, and although I had compiled my kernel with genkernell all, the Intel wifi was excluded. So I had to recompile the kernel

with genkernel --menuconfig all and configure the options as explained in this page: http://www.danyelceccaldi.com/wiki/Intel_4965AGN#Linux_Kernel_configuration

After rebooting the new kernel the iwl4965 was present and working and a wlan0 interface was added. After I installed network manager following this wiki: http://gentoo-wiki.com/NetworkManager and now my wlan is up and working! ^^

I hope this will be helpful for someone in the future   :Wink: 

Thanks everyone.

----------

## rockclimber88

the iwlwifi option still doesn't appear in menuconfig for me.

I checked  [*] Prompt for development and/or incomplete code/drivers

and 

```
cat /usr/src/linux/.config | grep "IWL"
```

 returns nothing.

I'm compiling the latest kernel and I tried to get this working on 2.6.24 as well.

any suggestions?

----------

## TequilaTR

you also need mac80211, did you enable this in the kernel? Maybe then the iwl4965 module also shows up...

----------

## rockclimber88

Thanks! that worked.

----------

