Skip to contentSkip to conversation

Enabling MSI interrupts in ath9k driver

ath9k-devel Felix Radensky 2 participants 3 messages Dec 16, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to use Sparklan WPEA-110N mini-PCI-E module (based on Atheros AR9280 chipset)
on Freescale P2020RDB board running 2.6.32 kernel. Due to a problem with interrupt routing
on this board legacy PCI-E interrupts cannot be used with mini-PCI-E slot. Freescale developers
suggested switching ath9k driver to use MSI interrupts. Ralink 2860 card is known to work fine
in this slot (it uses MSI).

I've modified ath9k driver to call pci_enable_msi() before request_irq() and pci_disable_msi()
after free_irq(). The MSI interrupt seems to be allocated successfully, but no interrupts are
actually arriving to the card. Below are relevant lines from dmesg.

ath: EEPROM regdomain: 0x37
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: AT
ath: Regpair used: 0x37
phy0: Selected rate control algorithm 'ath9k_rate_control'
cfg80211: Calling CRDA for country: AT
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
irq: irq 0 on host /soc at ffe00000/msi at 41600 mapped to virtual irq 18
phy0: Atheros AR9280 MAC/BB Rev:2 AR5133 RF Rev:d0: mem=0xf2160000, irq=18

My hostapd.conf looks like this:

interface=wlan0
driver=nl80211
ssid=FSL_AP1
channel=1
hw_mode=g
ieee80211n=1

On startup hostapd prints

Configuration file: /etc/hostapd-wlan0.conf
Opening raw packet socket for ifindex 1
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
nl80211: Added 802.11b mode based on 802.11g information RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x6
RATE[3] rate=110 flags=0x6
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11g Channel: 1 Frequency: 2412 MHz
Using interface wlan0 with hwaddr 00:0e:8e:1f:42:3b and ssid 'FSL_AP1'
wlan0: Setup of interface done.

What am I missing ?

Thanks a lot in advance.

Felix.

#1 lore raw
Quoted 66 lines · Felix Radensky

Hi,

I'm trying to use Sparklan WPEA-110N mini-PCI-E module (based on Atheros AR9280 chipset)
on Freescale P2020RDB board running 2.6.32 kernel. Due to a problem with interrupt routing
on this board legacy PCI-E interrupts cannot be used with mini-PCI-E slot. Freescale developers
suggested switching ath9k driver to use MSI interrupts. Ralink 2860 card is known to work fine
in this slot (it uses MSI).

I've modified ath9k driver to call pci_enable_msi() before request_irq() and pci_disable_msi()
after free_irq(). The MSI interrupt seems to be allocated successfully, but no interrupts are
actually arriving to the card. Below are relevant lines from dmesg.

ath: EEPROM regdomain: 0x37
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: AT
ath: Regpair used: 0x37
phy0: Selected rate control algorithm 'ath9k_rate_control'
cfg80211: Calling CRDA for country: AT
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
irq: irq 0 on host /soc at ffe00000/msi at 41600 mapped to virtual irq 18
phy0: Atheros AR9280 MAC/BB Rev:2 AR5133 RF Rev:d0: mem=0xf2160000, irq=18

My hostapd.conf looks like this:

interface=wlan0
driver=nl80211
ssid=FSL_AP1
channel=1
hw_mode=g
ieee80211n=1

On startup hostapd prints

Configuration file: /etc/hostapd-wlan0.conf
Opening raw packet socket for ifindex 1
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
nl80211: Added 802.11b mode based on 802.11g information RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x6
RATE[3] rate=110 flags=0x6
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11g ?Channel: 1 ?Frequency: 2412 MHz
Using interface wlan0 with hwaddr 00:0e:8e:1f:42:3b and ssid 'FSL_AP1'
wlan0: Setup of interface done.

Quoted 1 line

What am I missing ?

Long ago in a galaxy far far away I tried enabling this since it seemed from our systems team that although this was never tested it *may* work. I enabled it, did some poking but it didn't so gave up. So no -- its not supported but if you get it going feel free to send a patch :)

Luis

#2 lore raw

Hi, Luis

Quoted 68 lines · Luis R. Rodriguez
Quoted 66 lines · Felix Radensky

Hi,

I'm trying to use Sparklan WPEA-110N mini-PCI-E module (based on Atheros AR9280 chipset)
on Freescale P2020RDB board running 2.6.32 kernel. Due to a problem with interrupt routing
on this board legacy PCI-E interrupts cannot be used with mini-PCI-E slot. Freescale developers
suggested switching ath9k driver to use MSI interrupts. Ralink 2860 card is known to work fine
in this slot (it uses MSI).

I've modified ath9k driver to call pci_enable_msi() before request_irq() and pci_disable_msi()
after free_irq(). The MSI interrupt seems to be allocated successfully, but no interrupts are
actually arriving to the card. Below are relevant lines from dmesg.

ath: EEPROM regdomain: 0x37
ath: EEPROM indicates we should expect a direct regpair map
ath: Country alpha2 being used: AT
ath: Regpair used: 0x37
phy0: Selected rate control algorithm 'ath9k_rate_control'
cfg80211: Calling CRDA for country: AT
Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
irq: irq 0 on host /soc at ffe00000/msi at 41600 mapped to virtual irq 18
phy0: Atheros AR9280 MAC/BB Rev:2 AR5133 RF Rev:d0: mem=0xf2160000, irq=18

My hostapd.conf looks like this:

interface=wlan0
driver=nl80211
ssid=FSL_AP1
channel=1
hw_mode=g
ieee80211n=1

On startup hostapd prints

Configuration file: /etc/hostapd-wlan0.conf
Opening raw packet socket for ifindex 1
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
nl80211: Added 802.11b mode based on 802.11g information RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x6
RATE[3] rate=110 flags=0x6
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11g Channel: 1 Frequency: 2412 MHz
Using interface wlan0 with hwaddr 00:0e:8e:1f:42:3b and ssid 'FSL_AP1'
wlan0: Setup of interface done.

Quoted 9 lines
Quoted 2 lines

What am I missing ?

Long ago in a galaxy far far away I tried enabling this since it seemed from our systems team that although this was never tested it *may* work. I enabled it, did some poking but it didn't so gave up. So no -- its not supported but if you get it going feel free to send a patch :)

There are definitions of AR_PCIE_MSI and AR_PCIE_MSI_ENABLE in reg.h Since I don't have chip data sheet, can you explain when this bit should be set up,
and whether there are other bits in AR_PCIE_MSI that may be relevant.

Thanks.

Felix.

Quoted 2 lines

Luis