# ath9k with gentoo-sources-3.8.13 and genkernel

## leonixyz

My current kernel was generated with genkernel from gentoo-sources-3.5.7 for my first Gentoo installation and works well up to now.

After emerging world i noticed that gentoo-sources-3.8.13 is available, and I've like to upgrade the kernel (for no particular reason but for have a newer and maybe "better" version).

This version is marked as stable, and my 3.5.7 is no more in http://packages.gentoo.org , why? Shall I upgrade the kernel?

A full manual configuration of the kernel is too difficult for me, so I thought genkernel could be helpful.

After the first compilation (--no-menuconfig) my wlan0 wasn't obviously in "ifconfig -a", and "modprobe ath9k" gave me an error.

I recompiled the kernel (--menuconfig) in this way:

```

networking support ->

        wireless ->

                <*>   cfg80211 - wireless configuration API

                [ ]     nl80211 testmode command

                [ ]     enable developer warnings

                [ ]     cfg80211 regulatory debugging

                [*]     enable powersave by default

                [ ]     cfg80211 DebugFS entries

                [ ]     cfg80211 wireless extensions compatibility

                [ ]   lib80211 debugging messages

                <*>   Generic IEEE 802.11 Networking Stack (mac80211)

                Default rate control algorithm (Minstrel)  --->

                [ ]   Enable mac80211 mesh networking (pre-802.11s) support

                -*-   Enable LED triggers

                [ ]   Export mac80211 internals in DebugFS

                [ ]   Trace all mac80211 debug messages

                [ ]   Select mac80211 debugging features  ---> 

```

```

device drivers ->

        network device support ->

                wireless LAN ->

                        <*>   Atheros Wireless Cards  ---> 

                                [ ]   Atheros wireless debugging

                                < >   Atheros 5xxx wireless cards support

                                [ ]   Atheros 5xxx PCI bus support

                                [*]   Atheros bluetooth coexistence support

                                <*>   Atheros 802.11n wireless cards support

                                [*]     Atheros ath9k PCI/PCIe bus support

                                [ ]     Atheros ath9k AHB bus support

                                [ ]     Atheros ath9k debugging

                                [*]   Atheros ath9k rate control

                                < >   Atheros HTC based wireless cards support

                                < >   Linux Community AR9170 802.11n USB support

                                < >   Atheros mobile chipsets support

                                < >   Atheros AR5523 wireless driver support

                                < >   Wilocity 60g WiFi card wil6210 support 

```

Now the wlan0 is recognized, but if I try to connect to the LAN i get some errors...

This is the card (from lspci now that I write this post, while running the 3.5.7 kernel)

```

02:00.0 Network controller: Atheros Communications Inc. AR9485 Wireless Network Adapter (rev 01)

   Subsystem: Lite-On Communications Inc Device 6617

   Flags: bus master, fast devsel, latency 0, IRQ 17

   Memory at 54000000 (64-bit, non-prefetchable) [size=512K]

   Expansion ROM at 51000000 [disabled] [size=64K]

   Capabilities: [40] Power Management version 2

   Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+

   Capabilities: [70] Express Endpoint, MSI 00

   Capabilities: [100] Advanced Error Reporting

   Capabilities: [140] Virtual Channel

   Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00

   Kernel driver in use: ath9k

```

and this is the error I get (3.8.13 kernel) if I try to connect

```

# ifconfig wlan0 down

# ifconfigl wlan0 up

# ifconfig wlan0 down

# ifconfigl wlan0 up                  // double down/up just as a test

# dhcpcd wlan0

......

......                                            // seems ok

#wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

ioctl[SIOCSIWMODE]: Operation not supported

ioctl[SIOCGIWRANGE]: Operation not supported

ioctl[SIOCGIWMODE]: Operation not supported

ioctl[SIOCSIWAP]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWENCODEEXT]: Operation not supported

ioctl[SIOCSIWENCODE]: Operation not supported

ioctl[SIOCSIWSCAN]: Operation not supported

Failed to initiate AP scan.

ioctl[SIOCGIWMODE]: Operation not supported

Failed to initiate AP scan.

ioctl[SIOCGIWMODE]: Operation not supported

Failed to initiate AP scan.

ioctl[SIOCSIWAP]: Operation not supported

Failed to initiate AP scan.

CTRL-EVENT-TERMINATING - signal 2 received

```

Something is missing but I can't find out what.

Thanks

----------

## quilosaq

¡Hi!

Read the output "dmesg" looking for errors about firmware.

----------

## leonixyz

I read whole dmesg but couldn't find it helpful... the only thing that caught my attention were these, but I can't understand deeply what's happening:

```

...

[    2.723072] apm: BIOS not found.

...

[    3.460055] ACPI: Deprecated procfs I/F for AC is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared

[    3.460501] ACPI: AC Adapter [ACAD] (off-line)

[    3.463839] ACPI: Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared

[    3.463991] ACPI: Battery Slot [BAT1] (battery present)

...

[    4.176768] TCP: cubic registered

[    4.176849] NET: Registered protocol family 17

[    4.177466] Using IPI No-Shortcut mode

[    4.177958] registered taskstats version 1

[    4.178673] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

...

[    6.692934] NCR53c406a: no available ports found

[    7.186727] scsi: <fdomain> Detection failed (no card)

[    7.268072] GDT-HA: Storage RAID Controller Driver. Version: 3.05

[    7.900034] Failed initialization of WD-7000 SCSI card!

...

[   17.120555] EXT3-fs (sda5): error: couldn't mount because of unsupported optional features (240)

[   17.120909] EXT2-fs (sda5): error: couldn't mount because of unsupported optional features (240)

[   17.144554] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)

...

[    7.460673] qlogicfas: no cards were found, please specify I/O address and IRQ using iobase= and irq= options

[   21.032556] ACPI Warning:

[   21.032566] 0x00000428-0x0000042f SystemIO conflicts with Region \PMBA 1 (20121018/utaddress-251)

[   21.032576] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver

[   21.032584] ACPI Warning: 0x00000530-0x0000053f SystemIO conflicts with Region \GPIO 1 (20121018/utaddress-251)

[   21.032598] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver

[   21.032603] ACPI Warning: 0x00000500-0x0000052f SystemIO conflicts with Region \GPIO 1 (20121018/utaddress-251)

[   21.032617] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver

[   21.032621] lpc_ich: Resource conflict(s) found affecting gpio_ich

...

[   21.833157] hda_codec: ALC269VB: SKU not ready 0x598301f0

...

```

the full dmesg output is here http://www.leonixyz.net/dmesg.txt

and /var/log/rc.log is here http://www.leonixyz.net/rc.log

thanks

----------

## quilosaq

 *leonixyz wrote:*   

> My current kernel was generated with genkernel from gentoo-sources-3.5.7...
> 
> I recompiled the kernel (--menuconfig) in this way:
> 
> ```
> ...

 

Set this option in your kernel too:

```
                [ ]     cfg80211 wireless extensions compatibility
```

----------

## broken_chaos

 *quilosaq wrote:*   

> Set this option in your kernel too:
> 
> ```
>                 [ ]     cfg80211 wireless extensions compatibility
> ```
> ...

 

This is a good idea (setting it, I mean -- so it shows [*] at the beginning rather than [ ]), as lots of tools still require wext (iwconfig, many wifi monitors, etc.).

If you just want to get a connection, you could also use wpa_supplicant with -Dnl80211 instead of -Dwext to make use of the newer config interface. (Or, perhaps better yet, you could do both of these to make use of the newer interface for wpa_supplicant, but still retain compatibility with older tools. The newer interface has some benefits, like more detailed error reporting to wpa_supplicant, for instance.)

----------

