* bug build error
From: Paul S @ 2009-09-18 18:16 UTC (permalink / raw)
To: linux-wireless
I can't build the daily (Sep 18) compat-wireless on ubuntu 9.04 with the
following error.
paul :~/Desktop/compat-wireless-2009-09-18$ make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.28-15-generic/build
M=/home/paul/Desktop/compat-wireless-2009-09-18 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/misc/eeprom/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/misc/eeprom/eeprom_93cx6.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/cdc_ether.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/rndis_host.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/usbnet.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/main.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/regd.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/usb.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/main.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/cmd.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/mac.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/phy.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/led.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/ar9170usb.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/caps.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/initvals.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/eeprom.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/gpio.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/desc.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/dma.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/qcu.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/pcu.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/phy.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/reset.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/attach.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/base.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/led.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/rfkill.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/ath5k.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/hw.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom_def.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom_4k.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom_9287.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/mac.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/calib.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/ani.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/phy.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/beacon.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/main.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/recv.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/xmit.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/virtual.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/rc.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/btcoex.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/pci.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/ath9k.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.o
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:
In function ‘b43_do_interrupt’:
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:1888:
error: ‘IRQ_WAKE_THREAD’ undeclared (first use in this function)
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:1888:
error: (Each undeclared identifier is reported only once
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:1888:
error: for each function it appears in.)
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:
In function ‘b43_request_firmware’:
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:2218:
warning: format not a string literal and no format arguments
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:
In function ‘b43_wireless_core_start’:
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:3867:
error: implicit declaration of function ‘request_threaded_irq’
make[4]: ***
[/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.o]
Error 1
make[3]: ***
[/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43]
Error 2
make[2]: ***
[/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless] Error 2
make[1]: *** [_module_/home/paul/Desktop/compat-wireless-2009-09-18] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
make: *** [modules] Error 2
Someone suggested I try the older version from Sep 6 and it will build
successfully.
However, I'd like to keep the latest version.
TIA
^ permalink raw reply
* bug build error
From: Paul Sedor @ 2009-09-18 18:14 UTC (permalink / raw)
To: linux-wireless
I can't build the daily (Sep 18) compat-wireless on ubuntu 9.04 with the
following error.
paul :~/Desktop/compat-wireless-2009-09-18$ make
./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
make -C /lib/modules/2.6.28-15-generic/build
M=/home/paul/Desktop/compat-wireless-2009-09-18 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/misc/eeprom/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/misc/eeprom/eeprom_93cx6.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/cdc_ether.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/rndis_host.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/usb/usbnet.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/main.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/regd.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/usb.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/main.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/cmd.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/mac.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/phy.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/led.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ar9170/ar9170usb.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/caps.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/initvals.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/eeprom.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/gpio.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/desc.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/dma.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/qcu.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/pcu.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/phy.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/reset.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/attach.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/base.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/led.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/rfkill.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath5k/ath5k.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/hw.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom_def.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom_4k.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/eeprom_9287.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/mac.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/calib.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/ani.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/phy.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/beacon.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/main.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/recv.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/xmit.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/virtual.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/rc.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/btcoex.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/pci.o
LD [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/ath/ath9k/ath9k.o
LD
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/built-in.o
CC [M]
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.o
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:
In function ‘b43_do_interrupt’:
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:1888:
error: ‘IRQ_WAKE_THREAD’ undeclared (first use in this function)
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:1888:
error: (Each undeclared identifier is reported only once
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:1888:
error: for each function it appears in.)
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:
In function ‘b43_request_firmware’:
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:2218:
warning: format not a string literal and no format arguments
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:
In function ‘b43_wireless_core_start’:
/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.c:3867:
error: implicit declaration of function ‘request_threaded_irq’
make[4]: ***
[/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43/main.o]
Error 1
make[3]: ***
[/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless/b43]
Error 2
make[2]: ***
[/home/paul/Desktop/compat-wireless-2009-09-18/drivers/net/wireless] Error 2
make[1]: *** [_module_/home/paul/Desktop/compat-wireless-2009-09-18] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
make: *** [modules] Error 2
Someone suggested I try the older version from Sep 6 and it will build
successfully.
However, I'd like to keep the latest version.
TIA
^ permalink raw reply
* Re: [origin tree build failure] [PATCH] Fix: (.text+0x22ec88): undefined reference to `ieee80211_unregister_hw'
From: Kalle Valo @ 2009-09-18 18:09 UTC (permalink / raw)
To: Ingo Molnar
Cc: David Miller, Bob Copeland, Coelho Luciano (Nokia-D/Helsinki),
Oikarinen Juuso (Nokia-D/Tampere), torvalds@linux-foundation.org,
akpm@linux-foundation.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, John W. Linville, linux-wireless
In-Reply-To: <20090915114958.GA26902@elte.hu>
Ingo Molnar <mingo@elte.hu> writes:
> FYI, -tip testing found that something in this lot broke the build with
> certain configs (attached):
>
> drivers/built-in.o: In function `wl1251_free_hw':
> (.text+0x22ec88): undefined reference to `ieee80211_unregister_hw'
> drivers/built-in.o: In function `wl1251_free_hw':
> (.text+0x22ecf5): undefined reference to `ieee80211_free_hw'
> drivers/built-in.o: In function `wl1251_op_bss_info_changed':
> wl1251_main.c:(.text+0x22f161): undefined reference to `ieee80211_beacon_get'
> drivers/built-in.o: In function `wl1251_op_config':
> wl1251_main.c:(.text+0x22f2f8): undefined reference to `ieee80211_frequency_to_channel'
> drivers/built-in.o: In function `wl1251_op_stop':
> wl1251_main.c:(.text+0x22f554): undefined reference to `ieee80211_scan_completed'
> drivers/built-in.o: In function `wl1251_op_tx':
> wl1251_main.c:(.text+0x22f6a5): undefined reference to `ieee80211_queue_work'
> wl1251_main.c:(.text+0x22f6b6): undefined reference to `ieee80211_stop_queues'
> drivers/built-in.o: In function `wl1251_alloc_hw':
> (.text+0x22f710): undefined reference to `ieee80211_alloc_hw'
> drivers/built-in.o: In function `wl1251_alloc_hw':
> (.text+0x22f9e4): undefined reference to `ieee80211_free_hw'
> drivers/built-in.o: In function `wl1251_init_ieee80211':
> (.text+0x2305df): undefined reference to `ieee80211_register_hw'
> drivers/built-in.o: In function `wl1251_event_handle':
> (.text+0x2306c4): undefined reference to `ieee80211_scan_completed'
> drivers/built-in.o: In function `wl1251_tx_flush':
> (.text+0x230810): undefined reference to `ieee80211_tx_status'
> drivers/built-in.o: In function `wl1251_tx_flush':
> (.text+0x230846): undefined reference to `ieee80211_tx_status'
> drivers/built-in.o: In function `wl1251_tx_frame':
> wl1251_tx.c:(.text+0x230a97): undefined reference to `ieee80211_hdrlen'
> drivers/built-in.o: In function `wl1251_tx_complete':
> (.text+0x230d30): undefined reference to `ieee80211_get_hdrlen_from_skb'
> drivers/built-in.o: In function `wl1251_tx_complete':
> (.text+0x230d58): undefined reference to `ieee80211_tx_status'
> drivers/built-in.o: In function `wl1251_tx_complete':
> (.text+0x230dc0): undefined reference to `ieee80211_wake_queues'
> drivers/built-in.o: In function `wl1251_tx_work':
> (.text+0x230f57): undefined reference to `ieee80211_stop_queues'
> drivers/built-in.o: In function `wl1251_rx':
> (.text+0x231187): undefined reference to `ieee80211_channel_to_frequency'
> drivers/built-in.o: In function `wl1251_rx':
> (.text+0x2311e4): undefined reference to `ieee80211_rx'
>
> Turning CONFIG_WL1251 off makes it build.
>
> A (very) quick first look suggests that not all prior dependencies were
> carried over to the new drivers in drivers/net/wireless/wl12xx/Kconfig:
>
> -config WL12XX
> - tristate "TI wl1251/wl1271 support"
> - depends on MAC80211 && WLAN_80211 && SPI_MASTER &&
> GENERIC_HARDIRQS && EXPERIMENTAL
> +menuconfig WL12XX
> + boolean "TI wl12xx driver support"
> + depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
> + ---help---
> + This will enable TI wl12xx driver support. The drivers make
> + use of the mac80211 stack.
> +
> +config WL1251
> + tristate "TI wl1251 support"
> + depends on WL12XX && GENERIC_HARDIRQS
>
> the friction is between modular/build-in mode:
>
> CONFIG_WL1251=y
> CONFIG_MAC80211=m
>
> Kconfig does not carry over the modular dependency from WL12XX to
> WL1251. An explicit rule via the patch below turns CONFIG_WL1251 into a
> modular entry as well:
>
> CONFIG_WL12XX=y
> CONFIG_WL1251=m
>
> ( Note: i have tested this patch with this particular config and it
> solves the problem there but have not investigated any deeper. )
>
> Ingo
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
I missed this state entirely, thanks for fixing this.
Acked-by: Kalle Valo <kalle.valo@nokia.com>
"wl1251:" prefix is just missing from the commit summary.
Who is going to take the patch? Should I send this to John?
--
Kalle Valo
^ permalink raw reply
* Re: Makefile ref to non-existent CONFIG_ATHEROS_AR71XX
From: Florian Fainelli @ 2009-09-18 18:04 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <alpine.LFD.2.00.0909180959550.9988@localhost>
Hi Robert,
Le vendredi 18 septembre 2009 16:01:25, Robert P. J. Day a écrit :
> searching for Makefile references to Kconfig variables that don't
> exist, and i find:
>
> ===== ATHEROS_AR71XX =====
> ./drivers/net/wireless/ath/ath9k/Makefile:ath9k-$(CONFIG_ATHEROS_AR71XX) +=
> ahb.o
We need it in OpenWrt and plan to send Atheros AR71xx SoC support soon, do not
consider this for removal. Thanks
--
Best regards, Florian Fainelli
Email: florian@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------
^ permalink raw reply
* Re: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
From: Dan Williams @ 2009-09-18 17:37 UTC (permalink / raw)
To: Holger Schurig
Cc: Sebastian Andrzej Siewior, Andrey Yurovsky, Bing Zhao,
Amitkumar Karwar, linux-wireless@vger.kernel.org,
libertas-dev@lists.infradead.org
In-Reply-To: <200909180937.42727.hs4233@mail.mn-solutions.de>
On Fri, 2009-09-18 at 09:37 +0200, Holger Schurig wrote:
> > I agree on this. Debugfs is for debug only and should stay
> > that way. What do other driver in regard to this?
>
> I see this now as an example where a Manufacturer (Marvell)
> starts to work with the community, has a nice feature (probably
> bacause of customer-request) and cannot get this into the kernel
> because of this issue :-)
We've been over this for a long time actually. I'm the one that removed
all the private vendor ioctls in the first place back in 2006 from the
vendor driver. The reasons were known then, and are still the same.
But Bing probably wasn't involved then, and he doesn't need to bear the
brunt of that :) I'm very happy to be getting more active contributions
from Marvell and we should work this sort of thing out.
The major issue then was that iwpriv is a "quick fix" that is not
standardized and *is* kernel API that cannot/should not change. Thus,
unless it's well-designed and generic, it probably shouldn't even go in
in the first place.
We (Woodhouse, I, and Marcelo Tosatti) pushed back on Michail and
Marvell at the time and nobody (Michail in particular) was not willing
to spend the time to _do it right_ and help out with nl80211. Getting
attributes Marvell wanted into nl80211 would have been fine, and still
would be fine, but there's a process to follow and it will take longer
than a single iwpriv patch.
> Debugfs isn't suitable for anything except debugging. It is, per
> definition, an interface for developers that want to debug it.
> The idea is that a kernel for end-user devices won't even have
> debugfs compiled in.
Correct; that's the point: if we can't find a generic API to put this
into, it probably shouldn't go in, because the interface hasn't been
thought out well enough. Yes, that means a little more work, but it's
much more maintainable in the long run.
> If libertas currently does use debugfs for something !=
> debugging? I don't know, but than that has been a lapse, an
> oversight. Let's not do that oversight again.
>
>
> So you can use
>
> * iwpriv
No.
> * sysfs
No, it's basically the same thing as iwpriv just in a file. Slightly
better (since there's the rule of one-value-per-file) but not much.
> * kernel module parameters
No, because they usually cannot be changed at runtime.
> * nl80211/cfg80211
Yes.
> * Maybe the new "stable debugfs" proposed by Rostedt (see the
> Article "A stable debugfs" on http://lwn.net/Articles/350463/,
> but here it's not even clear that this will come).
No, if the value isn't for debugging.
> For me, iwpriv seems the best candidate as long as libertas
> doesn't have a cfg80211/nl80211 interface.
Then maybe we should convert it to cfg80211/nl80211. We should anyway.
>
>
> > I hardly belive that the libertas driver is the only "deep
> > sleep" user.
>
> I think that ATH6K WLAN devices might be candidates for this,
> too. If the interface is "iwpriv XXX deepsleep 0" / "iwpriv XXX
> deepsleep 1" I don't see a reason they could do it similar.
So if libertas isn't the only user, then we can make a more generic
interface for this that uses 'iw' and cfg80211.
Dan
>
> > iwconfig has an interface for this I think:
> > |interface power {period N|timeout N|saving N|off}
>
> That's something very differently.
>
>
^ permalink raw reply
* Re: [RFC] nl80211: introduce NL80211_ATTR_SCAN_EXPIRE
From: Johannes Berg @ 2009-09-18 17:10 UTC (permalink / raw)
To: Holger Schurig; +Cc: linux-wireless@vger.kernel.org, John W Linville
In-Reply-To: <200909181849.22302.hs4233@mail.mn-solutions.de>
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
On Fri, 2009-09-18 at 18:49 +0200, Holger Schurig wrote:
> This attribute allows user-space to override or turn of the default
> BSS expiration time for NL80211_CMD_GET_SCAN.
>
> It also allows to set an expiration for NL80211_CMD_TRIGGER_SCAN. Setting
> the expiration to 0 will clean the whole BSS list.
tbh, I don't really understand the need for it. changing your AP
settings doesn't seem like a use case anyone would really care about
that much.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [RFC] nl80211: introduce NL80211_ATTR_SCAN_EXPIRE
From: Holger Schurig @ 2009-09-18 16:49 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org, John W Linville; +Cc: Johannes Berg
This attribute allows user-space to override or turn of the default
BSS expiration time for NL80211_CMD_GET_SCAN.
It also allows to set an expiration for NL80211_CMD_TRIGGER_SCAN. Setting
the expiration to 0 will clean the whole BSS list.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
---
Currently, I'm using the user-space AS-IS. Maybe I should do
export = nla_get_u32(..) * HZ
or, if we want to specify this in ms:
export = nla_get_u32(..) * HZ / 1000
???
A simple demo patch for iw that swaps behavior (expire all BSS at scan time,
never expire at dump time) is here:
xx iw.orig/scan.c 2009-09-18 16:28:07.000000000 +0200
xx iw/scan.c 2009-09-18 16:45:41.000000000 +0200
xx -102,6 +102,8 @@ static int handle_scan(struct nl80211_st
if (have_freqs)
nla_put_nested(msg, NL80211_ATTR_SCAN_FREQUENCIES, freqs);
+ NLA_PUT_U32(msg, 83 /* NL80211_ATTR_SCAN_EXPIRE */, 0);
+
err = 0;
nla_put_failure:
nlmsg_free(ssids);
xx -871,7 +873,10 @@ static int handle_scan_dump(struct nl802
nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, print_bss_handler,
&scan_params);
+ NLA_PUT_U32(msg, 83 /* NL80211_ATTR_SCAN_EXPIRE */, 0);
return 0;
+nla_put_failure:
+ return 2;
}
static int handle_scan_combined(struct nl80211_state *state,
Index: linux-wl/net/wireless/core.h
===================================================================
--- linux-wl.orig/net/wireless/core.h 2009-09-18 14:49:42.000000000 +0200
+++ linux-wl/net/wireless/core.h 2009-09-18 17:31:05.000000000 +0200
@@ -270,7 +270,9 @@ void ieee80211_set_bitrate_flags(struct
void wiphy_update_regulatory(struct wiphy *wiphy,
enum nl80211_reg_initiator setby);
-void cfg80211_bss_expire(struct cfg80211_registered_device *dev);
+#define IEEE80211_SCAN_RESULT_EXPIRE (15 * HZ)
+
+void cfg80211_bss_expire(struct cfg80211_registered_device *dev, int expire);
void cfg80211_bss_age(struct cfg80211_registered_device *dev,
unsigned long age_secs);
Index: linux-wl/net/wireless/nl80211.c
===================================================================
--- linux-wl.orig/net/wireless/nl80211.c 2009-09-18 14:49:42.000000000 +0200
+++ linux-wl/net/wireless/nl80211.c 2009-09-18 17:36:04.000000000 +0200
@@ -138,6 +138,7 @@ static struct nla_policy nl80211_policy[
[NL80211_ATTR_CIPHER_SUITE_GROUP] = { .type = NLA_U32 },
[NL80211_ATTR_WPA_VERSIONS] = { .type = NLA_U32 },
[NL80211_ATTR_PID] = { .type = NLA_U32 },
+ [NL80211_ATTR_SCAN_EXPIRE] = { .type = NLA_U32 },
};
/* policy for the attributes */
@@ -2945,6 +2946,13 @@ static int nl80211_trigger_scan(struct s
goto out;
}
+ if (info->attrs[NL80211_ATTR_SCAN_EXPIRE]) {
+ u32 expire = nla_get_u32(info->attrs[NL80211_ATTR_SCAN_EXPIRE]);
+ spin_lock_bh(&rdev->bss_lock);
+ cfg80211_bss_expire(rdev, expire);
+ spin_unlock_bh(&rdev->bss_lock);
+ }
+
if (info->attrs[NL80211_ATTR_SCAN_FREQUENCIES]) {
n_channels = validate_scan_freqs(
info->attrs[NL80211_ATTR_SCAN_FREQUENCIES]);
@@ -3158,11 +3166,13 @@ static int nl80211_dump_scan(struct sk_b
int ifidx = cb->args[0];
int start = cb->args[1], idx = 0;
int err;
+ u32 expire = IEEE80211_SCAN_RESULT_EXPIRE;
+
+ err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
+ nl80211_fam.attrbuf, nl80211_fam.maxattr,
+ nl80211_policy);
if (!ifidx) {
- err = nlmsg_parse(cb->nlh, GENL_HDRLEN + nl80211_fam.hdrsize,
- nl80211_fam.attrbuf, nl80211_fam.maxattr,
- nl80211_policy);
if (err)
return err;
@@ -3187,9 +3197,20 @@ static int nl80211_dump_scan(struct sk_b
wdev = dev->ieee80211_ptr;
+ /*
+ * If expire is set (the default), expire the BSS list before
+ * returning values. However, user-space can set a different
+ * expire time via NL80211_ATTR_SCAN_EXPIRE. It can also set
+ * no expire-time at all, then we skip the expiration.
+ */
+ if (!err && nl80211_fam.attrbuf[NL80211_ATTR_SCAN_EXPIRE])
+ expire =
+ nla_get_u32(nl80211_fam.attrbuf[NL80211_ATTR_SCAN_EXPIRE]);
+
wdev_lock(wdev);
spin_lock_bh(&rdev->bss_lock);
- cfg80211_bss_expire(rdev);
+ if (expire)
+ cfg80211_bss_expire(rdev, expire);
list_for_each_entry(scan, &rdev->bss_list, list) {
if (++idx <= start)
Index: linux-wl/net/wireless/scan.c
===================================================================
--- linux-wl.orig/net/wireless/scan.c 2009-09-18 14:49:42.000000000 +0200
+++ linux-wl/net/wireless/scan.c 2009-09-18 17:32:08.000000000 +0200
@@ -16,8 +16,6 @@
#include "nl80211.h"
#include "wext-compat.h"
-#define IEEE80211_SCAN_RESULT_EXPIRE (15 * HZ)
-
void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak)
{
struct cfg80211_scan_request *request;
@@ -121,7 +119,7 @@ void cfg80211_bss_age(struct cfg80211_re
}
/* must hold dev->bss_lock! */
-void cfg80211_bss_expire(struct cfg80211_registered_device *dev)
+void cfg80211_bss_expire(struct cfg80211_registered_device *dev, int expire)
{
struct cfg80211_internal_bss *bss, *tmp;
bool expired = false;
@@ -129,7 +127,11 @@ void cfg80211_bss_expire(struct cfg80211
list_for_each_entry_safe(bss, tmp, &dev->bss_list, list) {
if (atomic_read(&bss->hold))
continue;
- if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE))
+ /*
+ * If expire==0, then expire all BSS from the list,
+ * else only expire those that are older than expire.
+ */
+ if (expire && !time_after(jiffies, bss->ts + expire))
continue;
list_del(&bss->list);
rb_erase(&bss->rbn, &dev->bss_tree);
@@ -970,9 +972,11 @@ static int ieee80211_scan_results(struct
char *current_ev = buf;
char *end_buf = buf + len;
struct cfg80211_internal_bss *bss;
+ u32 expire = IEEE80211_SCAN_RESULT_EXPIRE;
spin_lock_bh(&dev->bss_lock);
- cfg80211_bss_expire(dev);
+ if (expire)
+ cfg80211_bss_expire(dev, expire);
list_for_each_entry(bss, &dev->bss_list, list) {
if (buf + len - current_ev <= IW_EV_ADDR_LEN) {
Index: linux-wl/include/linux/nl80211.h
===================================================================
--- linux-wl.orig/include/linux/nl80211.h 2009-09-18 15:10:53.000000000 +0200
+++ linux-wl/include/linux/nl80211.h 2009-09-18 15:11:44.000000000 +0200
@@ -481,6 +481,7 @@ enum nl80211_commands {
* @NL80211_ATTR_SCAN_SSIDS: nested attribute with SSIDs, leave out for passive
* scanning and include a zero-length SSID (wildcard) for wildcard scan
* @NL80211_ATTR_BSS: scan result BSS
+ * @NL80211_ATTR_SCAN: expire time for cached bss list
*
* @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
* currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
@@ -714,6 +715,8 @@ enum nl80211_attrs {
NL80211_ATTR_PID,
+ NL80211_ATTR_SCAN_EXPIRE,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
--
http://www.holgerschurig.de
^ permalink raw reply
* Re: [PATCH] iwlwifi: drop lib80211 dependency
From: reinette chatre @ 2009-09-18 16:22 UTC (permalink / raw)
To: Christian Lamparter
Cc: linux-wireless, Johannes Berg, Zhu, Yi, Intel Linux Wireless,
linville@tuxdriver.com
In-Reply-To: <200909181820.04078.chunkeey@googlemail.com>
On Fri, 2009-09-18 at 09:20 -0700, Christian Lamparter wrote:
> Ever since Johannes' "iwlwifi: improve scan support" iwlwifi
> no longer needs any of lib80211's functions or definitions.
>
> This patch updates iwlwifi's Kconfig _selections_ and
> removes all left lib80211.h inclusions from the source files.
>
> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> ---
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Thank you very much
Reinette
^ permalink raw reply
* [PATCH] iwlwifi: drop lib80211 dependency
From: Christian Lamparter @ 2009-09-18 16:20 UTC (permalink / raw)
To: linux-wireless
Cc: Johannes Berg, Zhu Yi, Reinette Chatre, Intel Linux Wireless,
linville
Ever since Johannes' "iwlwifi: improve scan support" iwlwifi
no longer needs any of lib80211's functions or definitions.
This patch updates iwlwifi's Kconfig _selections_ and
removes all left lib80211.h inclusions from the source files.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index 99310c0..eb62c20 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -1,7 +1,6 @@
config IWLWIFI
tristate "Intel Wireless Wifi"
depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL
- select LIB80211
select FW_LOADER
select MAC80211_LEDS if IWLWIFI_LEDS
select LEDS_CLASS if IWLWIFI_LEDS
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index 4f3a108..41f9a06 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -27,7 +27,6 @@
*****************************************************************************/
#include <linux/types.h>
#include <linux/etherdevice.h>
-#include <net/lib80211.h>
#include <net/mac80211.h>
#include "iwl-eeprom.h"
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 0909668..34e6af6 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -41,7 +41,6 @@
#include <linux/if_arp.h>
#include <net/ieee80211_radiotap.h>
-#include <net/lib80211.h>
#include <net/mac80211.h>
#include <asm/div64.h>
^ permalink raw reply related
* Re: Life-time of scan-results?
From: Holger Schurig @ 2009-09-18 14:12 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
In-Reply-To: <200909181507.59420.hs4233@mail.mn-solutions.de>
Currently, before returning scan results, cfg80211_bss_expire()
get's called. It deletes BSSs that are older than
IEEE80211_SCAN_RESULT_EXPIRE.
I propose to change cfg80211_bss_expire() so that it doesn't
hard-code NL80211_CMD_TRIGGER_SCAN anymore, but has a new
parameter, say "int expire".
Then NL80211_CMD_TRIGGER_SCAN get's a new optional attribute, say
NL80211_ATTR_SCAN_EXPIRE.
If that attribut exists when calling NL80211_CMD_TRIGGER_SCAN,
it's value will be used to call cfg80211_bss_expire(). If the
value is zero, cfg80211_bss_expire() triggers the whole
rdev->bss_list. That means we do a completely fresh scan.
If it doesn't exists, cfg80211_bss_expire() won't be called at
scan-trigger time.
NL80211_CMD_GET_SCAN could get this attribute as well. If
not specified, then the default of NL80211_CMD_TRIGGER_SCAN will
be used. That is, just right now, the rdev->bss_list will expire
like now.
However, if a value will be specified, then the bss_list will be
expired with the specified expiry time.
Specifying zero doesn't make sense here, because that would zap
the freshly made bss list. So a zero could mean "Don't expire
anything".
That way user-space could ask for what has scanned the last time,
even when this has been one hour ago --- with no scans in the
meantime.
Does this make sense?
--
http://www.holgerschurig.de
^ permalink raw reply
* Makefile ref to non-existent CONFIG_ATHEROS_AR71XX
From: Robert P. J. Day @ 2009-09-18 14:01 UTC (permalink / raw)
To: linux-wireless, ath9k-devel
searching for Makefile references to Kconfig variables that don't
exist, and i find:
===== ATHEROS_AR71XX =====
./drivers/net/wireless/ath/ath9k/Makefile:ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o
just FYI.
rday
--
========================================================================
Robert P. J. Day Waterloo, Ontario, CANADA
Linux Consulting, Training and Annoying Kernel Pedantry.
Web page: http://crashcourse.ca
Twitter: http://twitter.com/rpjday
========================================================================
^ permalink raw reply
* Re: Life-time of scan-results?
From: Holger Schurig @ 2009-09-18 13:07 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
In-Reply-To: <200909181418.30958.hs4233@mail.mn-solutions.de>
Here's a log of the events with some kernel msgs.
First, a successfull association:
##HS nl80211_trigger_scan:2922
##HS ieee80211_scan_rx:150 mac 00:1b:53:11:dc:40, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:1b:53:11:dc:40, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:13:19:80:da:30, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:1b:d4:44:35:90, probe resp 0
eth1: direct probe to AP 00:13:19:80:da:30 (try 1)
eth1 direct probe responded
eth1: authenticate with AP 00:13:19:80:da:30 (try 1)
eth1: authenticated
eth1: associate with AP 00:13:19:80:da:30 (try 1)
eth1: RX AssocResp from 00:13:19:80:da:30 (capab=0x11 status=0 aid=53)
eth1: associated
And here the user-space view:
1253275071.933750: wpa_driver_nl80211_scan:1570
1253275071.934167: NL80211_CMD_TRIGGER_SCAN
1253275072.454547: NL80211_CMD_NEW_SCAN_RESULTS
1253275072.454652: Received scan results (3 BSSes)
1253275072.454670: ##HS 0: 00:1b:53:11:dc:40 ssid='MNFUNK' freq=2412
1253275072.454689: ##HS 1: 00:1b:d4:44:35:90 ssid='MNWPA' freq=2412
1253275072.454706: ##HS 2: 00:13:19:80:da:30 ssid='MNHS' freq=2412
1253275072.454728: CTRL-EVENT-SCAN-RESULTS
1253275072.454791: Trying to authenticate with 00:13:19:80:da:30 (SSID='MNHS' freq=2412 MHz)
1253275072.704223: NL80211_CMD_AUTHENTICATE
1253275072.704244: MLME event NL80211_CMD_AUTHENTICATE
1253275072.704267: Trying to associate with 00:13:19:80:da:30 (SSID='MNHS' freq=2412 MHz)
1253275072.762116: NL80211_CMD_ASSOCIATE
1253275072.762136: MLME event NL80211_CMD_ASSOCIATE
1253275072.762175: Associated with 00:13:19:80:da:30
1253275072.767178: NL80211_CMD_CONNECT
1253275072.880891: WPA: Key negotiation completed with 00:13:19:80:da:30 [PTK=TKIP GTK=TKIP]
1253275072.880931: CTRL-EVENT-CONNECTED - Connection to 00:13:19:80:da:30 completed (auth) [id=0 id_str=]
Now I take away the AP:
eth1: deauthenticated from 00:13:19:80:da:30 (Reason: 1)
##HS nl80211_trigger_scan:2922
##HS ieee80211_scan_rx:150 mac 00:1b:53:11:dc:40, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:1b:d4:44:35:90, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:1b:d4:44:35:90, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:1b:53:11:dc:40, probe resp 0
##HS ieee80211_scan_rx:150 mac 00:1b:d4:44:35:90, probe resp 0
Note: there was no beacon nor probe-response from
00:13:19:80:da:30.
253275108.483431: NL80211_CMD_DEAUTHENTICATE
1253275108.483451: MLME event NL80211_CMD_DEAUTHENTICATE
1253275108.483464: ##HS wpa_supplicant_event_disassoc:1040
1253275108.483490: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
1253275108.483857: wpa_driver_nl80211_scan:1570
1253275108.484063: NL80211_CMD_DISCONNECT
1253275108.484106: NL80211_CMD_TRIGGER_SCAN
1253275108.958527: NL80211_CMD_NEW_SCAN_RESULTS
1253275108.958624: Received scan results (3 BSSes)
1253275108.958642: ##HS 0: 00:1b:53:11:dc:40 ssid='MNFUNK' freq=2412
1253275108.958661: ##HS 1: 00:1b:d4:44:35:90 ssid='MNWPA' freq=2412
1253275108.958677: ##HS 2: 00:13:19:80:da:30 ssid='MNHS' freq=2412
But here it was in the results. And because of that,
wpa_supplicant tries to use this AP in vain:
1253275108.958746: Trying to authenticate with 00:13:19:80:da:30 (SSID='MNHS' freq=2412 MHz)
1253275109.722468: NL80211_CMD_AUTHENTICATE
...
--
http://www.holgerschurig.de
^ permalink raw reply
* Life-time of scan-results?
From: Holger Schurig @ 2009-09-18 12:18 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
While changing an AP between different SSIDs and encryptions, I
get from time to time this scan result back:
1253272186.504636: ##HS 0: 00:1b:d4:44:35:90 ssid='MNWPA' freq=2412
1253272186.504655: ##HS 1: 00:1b:53:11:dc:40 ssid='MNFUNK' freq=2412
1253272186.504672: ##HS 2: 00:13:19:80:da:30 ssid='XXXXX' freq=2412
1253272186.504688: ##HS 3: 00:13:19:80:da:30 ssid='MNHS' freq=2412
How can I entirely clear the scan results inside cfg80211/mac80211
from user-space?
Again this doesn't fit to any probe-responses.
--
http://www.holgerschurig.de
^ permalink raw reply
* scren result doesn't match probe-response
From: Holger Schurig @ 2009-09-18 12:15 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org
I have three APs and let wpa_supplicant connect to one:
1253271753.960692: Received scan results (3 BSSes)
1253271753.960710: ##HS 0: 00:1b:d4:44:35:90 ssid='MNWPA' freq=2412
1253271753.960728: ##HS 1: 00:1b:53:11:dc:40 ssid='MNFUNK' freq=2412
1253271753.960745: ##HS 2: 00:13:19:80:da:30 ssid='MNHS' freq=2412
...
1253271754.402004: CTRL-EVENT-CONNECTED - Connection to 00:13:19:80:da:30 completed (auth) [id=0 id_str=]
When I change the the access-point with MNHS/WPA to XXXXX/WPA2.
The APs sends a de-auth message, and wpa_supplicant does a scan:
56.445693 00:13:19:80:da:30 -> 00:20:a6:61:15:c0 IEEE 802.11 Deauthentication,SN=555,FN=0
57.117063 00:20:a6:61:15:c0 -> ff:ff:ff:ff:ff:ff IEEE 802.11 Probe Request,SN=8,FN=0, SSID: "MNHS"
57.307272 00:20:a6:61:15:c0 -> ff:ff:ff:ff:ff:ff IEEE 802.11 Probe Request,SN=9,FN=0, SSID: "MNHS"
57.518420 00:20:a6:61:15:c0 -> ff:ff:ff:ff:ff:ff IEEE 802.11 Probe Request,SN=10,FN=0, SSID: "MNHS"
58.104889 00:20:a6:61:15:c0 -> ff:ff:ff:ff:ff:ff IEEE 802.11 Probe Request,SN=11,FN=0, SSID: "MNHS"
58.105612 00:20:a6:61:15:c0 -> ff:ff:ff:ff:ff:ff IEEE 802.11 Probe Request,SN=12,FN=0, SSID: "MNFUNK"
58.105967 00:1b:53:11:dc:40 -> 00:20:a6:61:15:c0 IEEE 802.11 Probe Response,SN=1496,FN=0,BI=100, SSID: "MNFUNK"
58.555765 00:1b:53:11:dc:40 -> 00:20:a6:61:15:c0 IEEE 802.11 Probe Response,SN=1503,FN=0,BI=100, SSID: "MNFUNK"
58.556370 00:1b:53:11:dc:40 -> 00:20:a6:61:15:c0 IEEE 802.11 Probe Response,SN=1504,FN=0,BI=100, SSID: "MNFUNK"
58.607339 00:1b:53:11:dc:40 -> 00:20:a6:61:15:c0 IEEE 802.11 Authentication,SN=1505,FN=0
58.636330 00:1b:53:11:dc:40 -> 00:20:a6:61:15:c0 IEEE 802.11 Authentication,SN=1506,FN=0
So far, so fine. Now let's look what wpa_supplicant get's back
as a scan-result:
1253271769.784819: Received scan results (3 BSSes)
1253271769.784836: ##HS 0: 00:1b:d4:44:35:90 ssid='MNWPA' freq=2412
1253271769.784855: ##HS 1: 00:1b:53:11:dc:40 ssid='MNFUNK' freq=2412
1253271769.784871: ##HS 2: 00:13:19:80:da:30 ssid='' freq=2412
Hey, there was no probe-response from da:30 at all ...
--
http://www.holgerschurig.de
^ permalink raw reply
* [PATCH/REVIEW 0/9] ath9k update
From: Sujith @ 2009-09-18 9:43 UTC (permalink / raw)
To: linville@tuxdriver.com; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <19123.21462.191695.91617@gargle.gargle.HOWL>
Sujith Manoharan wrote:
> Hi John,
>
> A bunch of fixes/cleanups.
>
> These patches apply over the pending ath9k patches:
> - The inital series of bug fixes.
> - Luis' series.
>
> Please apply.
Hm. The first 5 patches got sent out with "PATCH/REVIEW" as
subject-prefix. My elisp-foo tripped me I guess.
Just yell or roar if you want the patches to be resent.
Sujith
^ permalink raw reply
* [PATCH 9/9] ath9k: Fix bugs in handling TX power
From: Sujith @ 2009-09-18 9:38 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
* Get power table offset from the EEPROM instead of using
a hardcoded value of -5 if the EEPROM rev is >= 21.
* Add support in the 4k eeprom code for tx power offset
in case we have a 4k AR9280 implementation.
* Fix tx power accuracy at high powers.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/eeprom.h | 5 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 4 +-
drivers/net/wireless/ath/ath9k/eeprom_def.c | 102 +++++++++++++++++++++++++-
3 files changed, 104 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
index 3349274..2f2993b 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/eeprom.h
@@ -134,6 +134,7 @@
#define AR5416_EEP_MINOR_VER_17 0x11
#define AR5416_EEP_MINOR_VER_19 0x13
#define AR5416_EEP_MINOR_VER_20 0x14
+#define AR5416_EEP_MINOR_VER_21 0x15
#define AR5416_EEP_MINOR_VER_22 0x16
#define AR5416_NUM_5G_CAL_PIERS 8
@@ -154,7 +155,7 @@
#define AR5416_BCHAN_UNUSED 0xFF
#define AR5416_MAX_PWR_RANGE_IN_HALF_DB 64
#define AR5416_MAX_CHAINS 3
-#define AR5416_PWR_TABLE_OFFSET -5
+#define AR5416_PWR_TABLE_OFFSET_DB -5
/* Rx gain type values */
#define AR5416_EEP_RXGAIN_23DB_BACKOFF 0
@@ -302,7 +303,7 @@ struct base_eep_header {
u8 txGainType;
u8 rcChainMask;
u8 desiredScaleCCK;
- u8 power_table_offset;
+ u8 pwr_table_offset;
u8 frac_n_5g;
u8 futureBase_3[21];
} __packed;
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
index 2a27b1d..58167d8 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
@@ -210,6 +210,8 @@ static u32 ath9k_hw_4k_get_eeprom(struct ath_hw *ah,
return pBase->rxMask;
case EEP_FRAC_N_5G:
return 0;
+ case EEP_PWR_TABLE_OFFSET:
+ return AR5416_PWR_TABLE_OFFSET_DB;
default:
return 0;
}
@@ -753,7 +755,7 @@ static void ath9k_hw_4k_set_txpower(struct ath_hw *ah,
if (AR_SREV_9280_10_OR_LATER(ah)) {
for (i = 0; i < Ar5416RateSize; i++)
- ratesArray[i] -= AR5416_PWR_TABLE_OFFSET * 2;
+ ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2;
}
/* OFDM power per rate */
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 8f04b64..404a034 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -291,6 +291,11 @@ static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah,
return pBase->frac_n_5g;
else
return 0;
+ case EEP_PWR_TABLE_OFFSET:
+ if (AR5416_VER_MASK >= AR5416_EEP_MINOR_VER_21)
+ return pBase->pwr_table_offset;
+ else
+ return AR5416_PWR_TABLE_OFFSET_DB;
default:
return 0;
}
@@ -741,6 +746,76 @@ static void ath9k_hw_get_def_gain_boundaries_pdadcs(struct ath_hw *ah,
return;
}
+static int16_t ath9k_change_gain_boundary_setting(struct ath_hw *ah,
+ u16 *gb,
+ u16 numXpdGain,
+ u16 pdGainOverlap_t2,
+ int8_t pwr_table_offset,
+ int16_t *diff)
+
+{
+ u16 k;
+
+ /* Prior to writing the boundaries or the pdadc vs. power table
+ * into the chip registers the default starting point on the pdadc
+ * vs. power table needs to be checked and the curve boundaries
+ * adjusted accordingly
+ */
+ if (AR_SREV_9280_20_OR_LATER(ah)) {
+ u16 gb_limit;
+
+ if (AR5416_PWR_TABLE_OFFSET_DB != pwr_table_offset) {
+ /* get the difference in dB */
+ *diff = (u16)(pwr_table_offset - AR5416_PWR_TABLE_OFFSET_DB);
+ /* get the number of half dB steps */
+ *diff *= 2;
+ /* change the original gain boundary settings
+ * by the number of half dB steps
+ */
+ for (k = 0; k < numXpdGain; k++)
+ gb[k] = (u16)(gb[k] - *diff);
+ }
+ /* Because of a hardware limitation, ensure the gain boundary
+ * is not larger than (63 - overlap)
+ */
+ gb_limit = (u16)(AR5416_MAX_RATE_POWER - pdGainOverlap_t2);
+
+ for (k = 0; k < numXpdGain; k++)
+ gb[k] = (u16)min(gb_limit, gb[k]);
+ }
+
+ return *diff;
+}
+
+static void ath9k_adjust_pdadc_values(struct ath_hw *ah,
+ int8_t pwr_table_offset,
+ int16_t diff,
+ u8 *pdadcValues)
+{
+#define NUM_PDADC(diff) (AR5416_NUM_PDADC_VALUES - diff)
+ u16 k;
+
+ /* If this is a board that has a pwrTableOffset that differs from
+ * the default AR5416_PWR_TABLE_OFFSET_DB then the start of the
+ * pdadc vs pwr table needs to be adjusted prior to writing to the
+ * chip.
+ */
+ if (AR_SREV_9280_20_OR_LATER(ah)) {
+ if (AR5416_PWR_TABLE_OFFSET_DB != pwr_table_offset) {
+ /* shift the table to start at the new offset */
+ for (k = 0; k < (u16)NUM_PDADC(diff); k++ ) {
+ pdadcValues[k] = pdadcValues[k + diff];
+ }
+
+ /* fill the back of the table */
+ for (k = (u16)NUM_PDADC(diff); k < NUM_PDADC(0); k++) {
+ pdadcValues[k] = pdadcValues[NUM_PDADC(diff)];
+ }
+ }
+ }
+#undef NUM_PDADC
+}
+
static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah,
struct ath9k_channel *chan,
int16_t *pTxPowerIndexOffset)
@@ -756,15 +831,18 @@ static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah,
static u8 pdadcValues[AR5416_NUM_PDADC_VALUES];
u16 gainBoundaries[AR5416_PD_GAINS_IN_MASK];
u16 numPiers, i, j;
- int16_t tMinCalPower;
+ int16_t tMinCalPower, diff = 0;
u16 numXpdGain, xpdMask;
u16 xpdGainValues[AR5416_NUM_PD_GAINS] = { 0, 0, 0, 0 };
u32 reg32, regOffset, regChainOffset;
int16_t modalIdx;
+ int8_t pwr_table_offset;
modalIdx = IS_CHAN_2GHZ(chan) ? 1 : 0;
xpdMask = pEepData->modalHeader[modalIdx].xpdGain;
+ pwr_table_offset = ah->eep_ops->get_eeprom(ah, EEP_PWR_TABLE_OFFSET);
+
if ((pEepData->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >=
AR5416_EEP_MINOR_VER_2) {
pdGainOverlap_t2 =
@@ -844,6 +922,13 @@ static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah,
numXpdGain);
}
+ diff = ath9k_change_gain_boundary_setting(ah,
+ gainBoundaries,
+ numXpdGain,
+ pdGainOverlap_t2,
+ pwr_table_offset,
+ &diff);
+
if ((i == 0) || AR_SREV_5416_20_OR_LATER(ah)) {
if (OLC_FOR_AR9280_20_LATER) {
REG_WRITE(ah,
@@ -864,6 +949,10 @@ static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah,
}
}
+
+ ath9k_adjust_pdadc_values(ah, pwr_table_offset,
+ diff, pdadcValues);
+
regOffset = AR_PHY_BASE + (672 << 2) + regChainOffset;
for (j = 0; j < 32; j++) {
reg32 = ((pdadcValues[4 * j + 0] & 0xFF) << 0) |
@@ -1199,8 +1288,13 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
}
if (AR_SREV_9280_10_OR_LATER(ah)) {
- for (i = 0; i < Ar5416RateSize; i++)
- ratesArray[i] -= AR5416_PWR_TABLE_OFFSET * 2;
+ for (i = 0; i < Ar5416RateSize; i++) {
+ int8_t pwr_table_offset;
+
+ pwr_table_offset = ah->eep_ops->get_eeprom(ah,
+ EEP_PWR_TABLE_OFFSET);
+ ratesArray[i] -= pwr_table_offset * 2;
+ }
}
REG_WRITE(ah, AR_PHY_POWER_TX_RATE1,
@@ -1299,7 +1393,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
if (AR_SREV_9280_10_OR_LATER(ah))
regulatory->max_power_level =
- ratesArray[i] + AR5416_PWR_TABLE_OFFSET * 2;
+ ratesArray[i] + AR5416_PWR_TABLE_OFFSET_DB * 2;
else
regulatory->max_power_level = ratesArray[i];
--
1.6.4.4
^ permalink raw reply related
* [PATCH 8/9] ath9k: Advertise midband for AR5416 devices
From: Sujith @ 2009-09-18 9:37 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
This has to be done if the EEPROM supports FCC Midband
capability.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/eeprom.h | 1 +
drivers/net/wireless/ath/ath9k/hw.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
index 8463ba0..3349274 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/eeprom.h
@@ -639,6 +639,7 @@ struct ar9287_eeprom {
} __packed;
enum reg_ext_bitmap {
+ REG_EXT_FCC_MIDBAND = 0,
REG_EXT_JAPAN_MIDBAND = 1,
REG_EXT_FCC_DFS_HT40 = 2,
REG_EXT_JAPAN_NONDFS_HT40 = 3,
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 99c0dac..f74604d 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3660,7 +3660,10 @@ void ath9k_hw_fill_cap_info(struct ath_hw *ah)
AR_EEPROM_EEREGCAP_EN_KK_U1_EVEN;
}
- pCap->reg_cap |= AR_EEPROM_EEREGCAP_EN_FCC_MIDBAND;
+ /* Advertise midband for AR5416 with FCC midband set in eeprom */
+ if (regulatory->current_rd_ext & (1 << REG_EXT_FCC_MIDBAND) &&
+ AR_SREV_5416(ah))
+ pCap->reg_cap |= AR_EEPROM_EEREGCAP_EN_FCC_MIDBAND;
pCap->num_antcfg_5ghz =
ah->eep_ops->get_num_ant_config(ah, ATH9K_HAL_FREQ_BAND_5GHZ);
--
1.6.4.4
^ permalink raw reply related
* [PATCH 7/9] ath9k: Reduce PLL Settle time and eliminate redundant PLL calls.
From: Sujith @ 2009-09-18 9:37 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
Reduce PLL Settle time and eliminate redundant PLL calls. Also reduce
the LoadNF timeout from 10 msec to 250usec as the 10 msec timeout was
hit with AR9285 in some cases.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 4 ++--
drivers/net/wireless/ath/ath9k/hw.c | 15 +++++++++++----
drivers/net/wireless/ath/ath9k/hw.h | 2 +-
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 9c46b54..d347ea7 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -653,11 +653,11 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
- for (j = 0; j < 1000; j++) {
+ for (j = 0; j < 5; j++) {
if ((REG_READ(ah, AR_PHY_AGC_CONTROL) &
AR_PHY_AGC_CONTROL_NF) == 0)
break;
- udelay(10);
+ udelay(50);
}
for (i = 0; i < NUM_NF_READINGS; i++) {
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index a347b40..99c0dac 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1691,8 +1691,6 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
if (!AR_SREV_9100(ah))
REG_WRITE(ah, AR_RC, 0);
- ath9k_hw_init_pll(ah, NULL);
-
if (AR_SREV_9100(ah))
udelay(50);
@@ -2885,6 +2883,7 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip)
ATH9K_RESET_POWER_ON) != true) {
return false;
}
+ ath9k_hw_init_pll(ah, NULL);
}
if (AR_SREV_9100(ah))
REG_SET_BIT(ah, AR_RTC_RESET,
@@ -3968,7 +3967,11 @@ void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
bool ath9k_hw_phy_disable(struct ath_hw *ah)
{
- return ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM);
+ if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
+ return false;
+
+ ath9k_hw_init_pll(ah, NULL);
+ return true;
}
bool ath9k_hw_disable(struct ath_hw *ah)
@@ -3976,7 +3979,11 @@ bool ath9k_hw_disable(struct ath_hw *ah)
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
return false;
- return ath9k_hw_set_reset_reg(ah, ATH9K_RESET_COLD);
+ if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_COLD))
+ return false;
+
+ ath9k_hw_init_pll(ah, NULL);
+ return true;
}
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit)
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 6673a81..773f5c4 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -102,7 +102,7 @@
#define AR_GPIO_BIT(_gpio) (1 << (_gpio))
#define BASE_ACTIVATE_DELAY 100
-#define RTC_PLL_SETTLE_DELAY 1000
+#define RTC_PLL_SETTLE_DELAY 100
#define COEF_SCALE_S 24
#define HT40_CHANNEL_CENTER_SHIFT 10
--
1.6.4.4
^ permalink raw reply related
* [PATCH 6/9] ath9k: Handle ATH9K_BEACON_RESET_TSF properly
From: Sujith @ 2009-09-18 9:36 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
Clearing a local variable is unnecessary.
Get rid of it.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 96ea5cc..a347b40 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3422,7 +3422,6 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
beacon_period &= ~ATH9K_BEACON_ENA;
if (beacon_period & ATH9K_BEACON_RESET_TSF) {
- beacon_period &= ~ATH9K_BEACON_RESET_TSF;
ath9k_hw_reset_tsf(ah);
}
--
1.6.4.4
^ permalink raw reply related
* [PATCH 5/9] ath9k: Allow PSPOLL only when the interface is configured in AP mode
From: Sujith @ 2009-09-18 9:36 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
drivers/net/wireless/ath/ath9k/recv.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 3a2204d..c880a55 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -423,7 +423,10 @@ u32 ath_calcrxfilter(struct ath_softc *sc)
else
rfilt |= ATH9K_RX_FILTER_BEACON;
- if (sc->rx.rxfilter & FIF_PSPOLL)
+ if ((AR_SREV_9280_10_OR_LATER(sc->sc_ah) ||
+ AR_SREV_9285_10_OR_LATER(sc->sc_ah)) &&
+ (sc->sc_ah->opmode == NL80211_IFTYPE_AP) &&
+ (sc->rx.rxfilter & FIF_PSPOLL))
rfilt |= ATH9K_RX_FILTER_PSPOLL;
if (conf_is_ht(&sc->hw->conf))
--
1.6.4.4
^ permalink raw reply related
* [PATCH/REVIEW 4/9] ath9k: Update initvals
From: Sujith @ 2009-09-18 9:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
* Move 0xa274 and 0xa27c to the top of tx_gain table.
* Update initvals to fix random failure of noise floor calibration.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
drivers/net/wireless/ath/ath9k/initvals.h | 49 +++++++++++++++--------------
1 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/initvals.h b/drivers/net/wireless/ath/ath9k/initvals.h
index d8aaeee..3ee6658 100644
--- a/drivers/net/wireless/ath/ath9k/initvals.h
+++ b/drivers/net/wireless/ath/ath9k/initvals.h
@@ -21,6 +21,8 @@ static const u32 ar5416Modes[][6] = {
{ 0x000010f0, 0x0000a000, 0x00014000, 0x00016000, 0x0000b000, 0x00014008 },
{ 0x00008014, 0x03e803e8, 0x07d007d0, 0x10801600, 0x08400b00, 0x06e006e0 },
{ 0x0000801c, 0x128d93a7, 0x128d93cf, 0x12e013d7, 0x12e013ab, 0x098813cf },
+ { 0x00008120, 0x08f04800, 0x08f04800, 0x08f04810, 0x08f04810, 0x08f04810 },
+ { 0x000081d0, 0x00003210, 0x00003210, 0x0000320a, 0x0000320a, 0x0000320a },
{ 0x00009804, 0x00000300, 0x000003c4, 0x000003c4, 0x00000300, 0x00000303 },
{ 0x00009820, 0x02020200, 0x02020200, 0x02020200, 0x02020200, 0x02020200 },
{ 0x00009824, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e },
@@ -31,11 +33,11 @@ static const u32 ar5416Modes[][6] = {
{ 0x00009848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 },
{ 0x0000a848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 },
{ 0x0000b848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 },
- { 0x00009850, 0x6c48b4e0, 0x6c48b4e0, 0x6c48b0de, 0x6c48b0de, 0x6c48b0de },
+ { 0x00009850, 0x6c48b4e0, 0x6d48b4e0, 0x6d48b0de, 0x6c48b0de, 0x6c48b0de },
{ 0x00009858, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e },
- { 0x0000985c, 0x31395d5e, 0x31395d5e, 0x31395d5e, 0x31395d5e, 0x31395d5e },
+ { 0x0000985c, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e, 0x31395d5e },
{ 0x00009860, 0x00049d18, 0x00049d18, 0x00049d18, 0x00049d18, 0x00049d18 },
- { 0x0000c864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00 },
+ { 0x00009864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00 },
{ 0x00009868, 0x409a4190, 0x409a4190, 0x409a4190, 0x409a4190, 0x409a4190 },
{ 0x0000986c, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081 },
{ 0x00009914, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898, 0x000007d0 },
@@ -46,10 +48,10 @@ static const u32 ar5416Modes[][6] = {
{ 0x0000a960, 0x00000900, 0x00000900, 0x00012d80, 0x00012d80, 0x00012d80 },
{ 0x0000b960, 0x00000900, 0x00000900, 0x00012d80, 0x00012d80, 0x00012d80 },
{ 0x00009964, 0x00000000, 0x00000000, 0x00001120, 0x00001120, 0x00001120 },
- { 0x0000c9bc, 0x001a0a00, 0x001a0a00, 0x001a0a00, 0x001a0a00, 0x001a0a00 },
+ { 0x000099bc, 0x001a0a00, 0x001a0a00, 0x001a0a00, 0x001a0a00, 0x001a0a00 },
{ 0x000099c0, 0x038919be, 0x038919be, 0x038919be, 0x038919be, 0x038919be },
{ 0x000099c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77 },
- { 0x000099c8, 0x60f6532c, 0x60f6532c, 0x60f6532c, 0x60f6532c, 0x60f6532c },
+ { 0x000099c8, 0x6af6532c, 0x6af6532c, 0x6af6532c, 0x6af6532c, 0x6af6532c },
{ 0x000099cc, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8, 0x08f186c8 },
{ 0x000099d0, 0x00046384, 0x00046384, 0x00046384, 0x00046384, 0x00046384 },
{ 0x000099d4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
@@ -199,7 +201,6 @@ static const u32 ar5416Common[][2] = {
{ 0x00008110, 0x00000168 },
{ 0x00008118, 0x000100aa },
{ 0x0000811c, 0x00003210 },
- { 0x00008120, 0x08f04800 },
{ 0x00008124, 0x00000000 },
{ 0x00008128, 0x00000000 },
{ 0x0000812c, 0x00000000 },
@@ -215,7 +216,6 @@ static const u32 ar5416Common[][2] = {
{ 0x00008178, 0x00000100 },
{ 0x0000817c, 0x00000000 },
{ 0x000081c4, 0x00000000 },
- { 0x000081d0, 0x00003210 },
{ 0x000081ec, 0x00000000 },
{ 0x000081f0, 0x00000000 },
{ 0x000081f4, 0x00000000 },
@@ -246,6 +246,7 @@ static const u32 ar5416Common[][2] = {
{ 0x00008258, 0x00000000 },
{ 0x0000825c, 0x400000ff },
{ 0x00008260, 0x00080922 },
+ { 0x00008264, 0xa8000010 },
{ 0x00008270, 0x00000000 },
{ 0x00008274, 0x40000000 },
{ 0x00008278, 0x003e4180 },
@@ -406,9 +407,9 @@ static const u32 ar5416Common[][2] = {
{ 0x0000a25c, 0x0f0f0f01 },
{ 0x0000a260, 0xdfa91f01 },
{ 0x0000a268, 0x00000000 },
- { 0x0000a26c, 0x0ebae9c6 },
- { 0x0000b26c, 0x0ebae9c6 },
- { 0x0000c26c, 0x0ebae9c6 },
+ { 0x0000a26c, 0x0e79e5c6 },
+ { 0x0000b26c, 0x0e79e5c6 },
+ { 0x0000c26c, 0x0e79e5c6 },
{ 0x0000d270, 0x00820820 },
{ 0x0000a278, 0x1ce739ce },
{ 0x0000a27c, 0x051701ce },
@@ -2551,26 +2552,27 @@ static const u32 ar9280Modes_9280_2[][6] = {
{ 0x00008318, 0x00003e80, 0x00007d00, 0x00006880, 0x00003440, 0x00006880 },
{ 0x00009804, 0x00000300, 0x000003c4, 0x000003c4, 0x00000300, 0x00000303 },
{ 0x00009820, 0x02020200, 0x02020200, 0x02020200, 0x02020200, 0x02020200 },
- { 0x00009824, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e },
+ { 0x00009824, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e },
{ 0x00009828, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001, 0x0a020001 },
{ 0x00009834, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e },
{ 0x00009838, 0x00000007, 0x00000007, 0x00000007, 0x00000007, 0x00000007 },
{ 0x00009840, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a012e, 0x206a012e },
{ 0x00009844, 0x0372161e, 0x0372161e, 0x037216a0, 0x037216a0, 0x037216a0 },
- { 0x00009850, 0x6c4000e2, 0x6c4000e2, 0x6d4000e2, 0x6c4000e2, 0x6c4000e2 },
+ { 0x00009850, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2, 0x6c4000e2 },
{ 0x00009858, 0x7ec88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec84d2e, 0x7ec84d2e },
- { 0x0000985c, 0x31395d5e, 0x31395d5e, 0x3139605e, 0x31395d5e, 0x31395d5e },
+ { 0x0000985c, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e, 0x31395d5e },
{ 0x00009860, 0x00048d18, 0x00048d18, 0x00048d20, 0x00048d20, 0x00048d18 },
{ 0x00009864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00 },
{ 0x00009868, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0 },
{ 0x0000986c, 0x06903081, 0x06903081, 0x06903881, 0x06903881, 0x06903881 },
{ 0x00009914, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898, 0x000007d0 },
- { 0x00009918, 0x0000000a, 0x00000014, 0x00000016, 0x0000000b, 0x00000016 },
+ { 0x00009918, 0x0000000a, 0x00000014, 0x00000268, 0x0000000b, 0x00000016 },
{ 0x00009924, 0xd00a8a0b, 0xd00a8a0b, 0xd00a8a0d, 0xd00a8a0d, 0xd00a8a0d },
{ 0x00009944, 0xffbc1010, 0xffbc1010, 0xffbc1010, 0xffbc1010, 0xffbc1010 },
{ 0x00009960, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000010 },
{ 0x0000a960, 0x00000010, 0x00000010, 0x00000010, 0x00000010, 0x00000010 },
{ 0x00009964, 0x00000210, 0x00000210, 0x00000210, 0x00000210, 0x00000210 },
+ { 0x0000c968, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce, 0x000003ce },
{ 0x000099b8, 0x0000001c, 0x0000001c, 0x0000001c, 0x0000001c, 0x0000001c },
{ 0x000099bc, 0x00000a00, 0x00000a00, 0x00000c00, 0x00000c00, 0x00000c00 },
{ 0x000099c0, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4 },
@@ -2585,8 +2587,10 @@ static const u32 ar9280Modes_9280_2[][6] = {
{ 0x0000b20c, 0x00000014, 0x00000014, 0x0001f019, 0x0001f019, 0x0001f019 },
{ 0x0000a21c, 0x1883800a, 0x1883800a, 0x1883800a, 0x1883800a, 0x1883800a },
{ 0x0000a230, 0x00000000, 0x00000000, 0x00000210, 0x00000108, 0x00000000 },
+ { 0x0000a23c, 0x13c88000, 0x13c88000, 0x13c88001, 0x13c88000, 0x13c88000 },
{ 0x0000a250, 0x001ff000, 0x001ff000, 0x0004a000, 0x0004a000, 0x0004a000 },
{ 0x0000a358, 0x7999aa02, 0x7999aa02, 0x7999aa0e, 0x7999aa0e, 0x7999aa0e },
+ { 0x0000a388, 0x0c000000, 0x0c000000, 0x08000000, 0x0c000000, 0x0c000000 },
{ 0x0000a3d8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00007894, 0x5a508000, 0x5a508000, 0x5a508000, 0x5a508000, 0x5a508000 },
};
@@ -2813,7 +2817,6 @@ static const u32 ar9280Common_9280_2[][2] = {
{ 0x00009958, 0x2108ecff },
{ 0x00009940, 0x14750604 },
{ 0x0000c95c, 0x004b6a8e },
- { 0x0000c968, 0x000003ce },
{ 0x00009970, 0x190fb515 },
{ 0x00009974, 0x00000000 },
{ 0x00009978, 0x00000001 },
@@ -2849,7 +2852,6 @@ static const u32 ar9280Common_9280_2[][2] = {
{ 0x0000a22c, 0x233f7180 },
{ 0x0000a234, 0x20202020 },
{ 0x0000a238, 0x20202020 },
- { 0x0000a23c, 0x13c88000 },
{ 0x0000a240, 0x38490a20 },
{ 0x0000a244, 0x00007bb6 },
{ 0x0000a248, 0x0fff3ffc },
@@ -2859,8 +2861,8 @@ static const u32 ar9280Common_9280_2[][2] = {
{ 0x0000a25c, 0x0f0f0f01 },
{ 0x0000a260, 0xdfa91f01 },
{ 0x0000a268, 0x00000000 },
- { 0x0000a26c, 0x0ebae9c6 },
- { 0x0000b26c, 0x0ebae9c6 },
+ { 0x0000a26c, 0x0e79e5c6 },
+ { 0x0000b26c, 0x0e79e5c6 },
{ 0x0000d270, 0x00820820 },
{ 0x0000a278, 0x1ce739ce },
{ 0x0000d35c, 0x07ffffef },
@@ -2874,7 +2876,6 @@ static const u32 ar9280Common_9280_2[][2] = {
{ 0x0000d37c, 0x7fffffe2 },
{ 0x0000d380, 0x7f3c7bba },
{ 0x0000d384, 0xf3307ff0 },
- { 0x0000a388, 0x0c000000 },
{ 0x0000a38c, 0x20202020 },
{ 0x0000a390, 0x20202020 },
{ 0x0000a394, 0x1ce739ce },
@@ -2940,7 +2941,7 @@ static const u32 ar9280Modes_fast_clock_9280_2[][3] = {
{ 0x0000801c, 0x148ec02b, 0x148ec057 },
{ 0x00008318, 0x000044c0, 0x00008980 },
{ 0x00009820, 0x02020200, 0x02020200 },
- { 0x00009824, 0x00000f0f, 0x00000f0f },
+ { 0x00009824, 0x01000f0f, 0x01000f0f },
{ 0x00009828, 0x0b020001, 0x0b020001 },
{ 0x00009834, 0x00000f0f, 0x00000f0f },
{ 0x00009844, 0x03721821, 0x03721821 },
@@ -3348,6 +3349,8 @@ static const u32 ar9280Modes_backoff_13db_rxgain_9280_2[][6] = {
};
static const u32 ar9280Modes_high_power_tx_gain_9280_2[][6] = {
+ { 0x0000a274, 0x0a19e652, 0x0a19e652, 0x0a1aa652, 0x0a1aa652, 0x0a1aa652 },
+ { 0x0000a27c, 0x050739ce, 0x050739ce, 0x050739ce, 0x050739ce, 0x050739ce },
{ 0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x0000a304, 0x00003002, 0x00003002, 0x00004002, 0x00004002, 0x00004002 },
{ 0x0000a308, 0x00006004, 0x00006004, 0x00007008, 0x00007008, 0x00007008 },
@@ -3376,11 +3379,11 @@ static const u32 ar9280Modes_high_power_tx_gain_9280_2[][6] = {
{ 0x00007840, 0x00172000, 0x00172000, 0x00172000, 0x00172000, 0x00172000 },
{ 0x00007820, 0xf258a480, 0xf258a480, 0xf258a480, 0xf258a480, 0xf258a480 },
{ 0x00007844, 0xf258a480, 0xf258a480, 0xf258a480, 0xf258a480, 0xf258a480 },
- { 0x0000a274, 0x0a19e652, 0x0a19e652, 0x0a1aa652, 0x0a1aa652, 0x0a1aa652 },
- { 0x0000a27c, 0x050739ce, 0x050739ce, 0x050739ce, 0x050739ce, 0x050739ce },
};
static const u32 ar9280Modes_original_tx_gain_9280_2[][6] = {
+ { 0x0000a274, 0x0a19c652, 0x0a19c652, 0x0a1aa652, 0x0a1aa652, 0x0a1aa652 },
+ { 0x0000a27c, 0x050701ce, 0x050701ce, 0x050701ce, 0x050701ce, 0x050701ce },
{ 0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x0000a304, 0x00003002, 0x00003002, 0x00003002, 0x00003002, 0x00003002 },
{ 0x0000a308, 0x00006004, 0x00006004, 0x00008009, 0x00008009, 0x00008009 },
@@ -3409,8 +3412,6 @@ static const u32 ar9280Modes_original_tx_gain_9280_2[][6] = {
{ 0x00007840, 0x00392000, 0x00392000, 0x00392000, 0x00392000, 0x00392000 },
{ 0x00007820, 0x92592480, 0x92592480, 0x92592480, 0x92592480, 0x92592480 },
{ 0x00007844, 0x92592480, 0x92592480, 0x92592480, 0x92592480, 0x92592480 },
- { 0x0000a274, 0x0a19c652, 0x0a19c652, 0x0a1aa652, 0x0a1aa652, 0x0a1aa652 },
- { 0x0000a27c, 0x050701ce, 0x050701ce, 0x050701ce, 0x050701ce, 0x050701ce },
};
static const u32 ar9280PciePhy_clkreq_off_L1_9280[][2] = {
--
1.6.4.4
^ permalink raw reply related
* [PATCH/REVIEW 3/9] ath9k: Fix RTC reset for AR5416
From: Sujith @ 2009-09-18 9:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
For AR5416 chipsets, clearing RTC_RESET_EN when setting
the chip to SLEEP mode results in high power consumption.
This patch fixes this issue by not clearing it for AR5416.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 6ed0289..96ea5cc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2851,8 +2851,9 @@ static void ath9k_set_power_sleep(struct ath_hw *ah, int setChip)
if (!AR_SREV_9100(ah))
REG_WRITE(ah, AR_RC, AR_RC_AHB | AR_RC_HOSTIF);
- REG_CLR_BIT(ah, (AR_RTC_RESET),
- AR_RTC_RESET_EN);
+ if(!AR_SREV_5416(ah))
+ REG_CLR_BIT(ah, (AR_RTC_RESET),
+ AR_RTC_RESET_EN);
}
}
--
1.6.4.4
^ permalink raw reply related
* [PATCH/REVIEW 2/9] ath9k: Update INI release for AR9287
From: Sujith @ 2009-09-18 9:34 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
If the current channel is between 2412 and 2472 MHz and if the channel is
changing to 2484 MHz, then the registers 0xa1f4, 0xa1f8 and 0xa1fc need to be
programmed to the "japan_2484" values. Conversely, if the current channel
is 2484 MHz and if the channel is changing to one between 2412 and 2472 MHz, then
the three registers need to be programmed to the "normal" values.
This is needed for compliance with Japanese regulatory requirements.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 10 ++++++++++
drivers/net/wireless/ath/ath9k/hw.h | 2 ++
drivers/net/wireless/ath/ath9k/initvals.h | 23 ++++++++++++++++++-----
drivers/net/wireless/ath/ath9k/phy.c | 25 ++++++++++++++++++-------
4 files changed, 48 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 6599426..6ed0289 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -943,6 +943,16 @@ int ath9k_hw_init(struct ath_hw *ah)
else
ath9k_hw_disablepcie(ah);
+ /* Support for Japan ch.14 (2484) spread */
+ if (AR_SREV_9287_11_OR_LATER(ah)) {
+ INIT_INI_ARRAY(&ah->iniCckfirNormal,
+ ar9287Common_normal_cck_fir_coeff_92871_1,
+ ARRAY_SIZE(ar9287Common_normal_cck_fir_coeff_92871_1), 2);
+ INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
+ ar9287Common_japan_2484_cck_fir_coeff_92871_1,
+ ARRAY_SIZE(ar9287Common_japan_2484_cck_fir_coeff_92871_1), 2);
+ }
+
r = ath9k_hw_post_init(ah);
if (r)
return r;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index d854c17..6673a81 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -592,6 +592,8 @@ struct ath_hw {
struct ar5416IniArray iniModesAdditional;
struct ar5416IniArray iniModesRxGain;
struct ar5416IniArray iniModesTxGain;
+ struct ar5416IniArray iniCckfirNormal;
+ struct ar5416IniArray iniCckfirJapan2484;
u32 intr_gen_timer_trigger;
u32 intr_gen_timer_thresh;
diff --git a/drivers/net/wireless/ath/ath9k/initvals.h b/drivers/net/wireless/ath/ath9k/initvals.h
index 8622265..d8aaeee 100644
--- a/drivers/net/wireless/ath/ath9k/initvals.h
+++ b/drivers/net/wireless/ath/ath9k/initvals.h
@@ -5918,9 +5918,6 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
{ 0x000099ec, 0x0cc80caa },
{ 0x000099f0, 0x00000000 },
{ 0x000099fc, 0x00001042 },
- { 0x0000a1f4, 0x00fffeff },
- { 0x0000a1f8, 0x00f5f9ff },
- { 0x0000a1fc, 0xb79f6427 },
{ 0x0000a208, 0x803e4788 },
{ 0x0000a210, 0x4080a333 },
{ 0x0000a214, 0x40206c10 },
@@ -5980,7 +5977,7 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
{ 0x0000b3f4, 0x00000000 },
{ 0x0000a7d8, 0x000003f1 },
{ 0x00007800, 0x00000800 },
- { 0x00007804, 0x6c35ffc2 },
+ { 0x00007804, 0x6c35ffd2 },
{ 0x00007808, 0x6db6c000 },
{ 0x0000780c, 0x6db6cb30 },
{ 0x00007810, 0x6db6cb6c },
@@ -6000,7 +5997,7 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
{ 0x00007848, 0x934934a8 },
{ 0x00007850, 0x00000000 },
{ 0x00007854, 0x00000800 },
- { 0x00007858, 0x6c35ffc2 },
+ { 0x00007858, 0x6c35ffd2 },
{ 0x0000785c, 0x6db6c000 },
{ 0x00007860, 0x6db6cb30 },
{ 0x00007864, 0x6db6cb6c },
@@ -6027,6 +6024,22 @@ static const u_int32_t ar9287Common_9287_1_1[][2] = {
{ 0x000078b8, 0x2a850160 },
};
+/*
+ * For Japanese regulatory requirements, 2484 MHz requires the following three
+ * registers be programmed differently from the channel between 2412 and 2472 MHz.
+ */
+static const u_int32_t ar9287Common_normal_cck_fir_coeff_92871_1[][2] = {
+ { 0x0000a1f4, 0x00fffeff },
+ { 0x0000a1f8, 0x00f5f9ff },
+ { 0x0000a1fc, 0xb79f6427 },
+};
+
+static const u_int32_t ar9287Common_japan_2484_cck_fir_coeff_92871_1[][2] = {
+ { 0x0000a1f4, 0x00000000 },
+ { 0x0000a1f8, 0xefff0301 },
+ { 0x0000a1fc, 0xca9228ee },
+};
+
static const u_int32_t ar9287Modes_tx_gain_9287_1_1[][6] = {
/* Address 5G-HT20 5G-HT40 2G-HT40 2G-HT20 Turbo */
{ 0x0000a300, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
diff --git a/drivers/net/wireless/ath/ath9k/phy.c b/drivers/net/wireless/ath/ath9k/phy.c
index eec4f10..72a17c4 100644
--- a/drivers/net/wireless/ath/ath9k/phy.c
+++ b/drivers/net/wireless/ath/ath9k/phy.c
@@ -113,20 +113,31 @@ void ath9k_hw_ar9280_set_channel(struct ath_hw *ah,
if (freq < 4800) {
u32 txctl;
+ int regWrites = 0;
bMode = 1;
fracMode = 1;
aModeRefSel = 0;
channelSel = (freq * 0x10000) / 15;
- txctl = REG_READ(ah, AR_PHY_CCK_TX_CTRL);
- if (freq == 2484) {
-
- REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
- txctl | AR_PHY_CCK_TX_CTRL_JAPAN);
+ if (AR_SREV_9287_11_OR_LATER(ah)) {
+ if (freq == 2484) {
+ REG_WRITE_ARRAY(&ah->iniCckfirJapan2484,
+ 1, regWrites);
+ } else {
+ REG_WRITE_ARRAY(&ah->iniCckfirNormal,
+ 1, regWrites);
+ }
} else {
- REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
- txctl & ~AR_PHY_CCK_TX_CTRL_JAPAN);
+ txctl = REG_READ(ah, AR_PHY_CCK_TX_CTRL);
+ if (freq == 2484) {
+ /* Enable channel spreading for channel 14 */
+ REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
+ txctl | AR_PHY_CCK_TX_CTRL_JAPAN);
+ } else {
+ REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
+ txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN);
+ }
}
} else {
bMode = 0;
--
1.6.4.4
^ permalink raw reply related
* [PATCH/REVIEW 1/9] ath9k: Add Calibration checks
From: Sujith @ 2009-09-18 9:33 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
From: Vivek Natarajan <vnatarajan@atheros.com>
* Prevent divide-by-zero errors in IQ Calibration.
* Do not run temperature compensation if initPDADC or currPDADC is zero.
* Also, introduce a separate function for handling OLC for AR9287.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
---
drivers/net/wireless/ath/ath9k/calib.c | 78 ++++++++++++++++++++-----------
1 files changed, 50 insertions(+), 28 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 36c5f89..9c46b54 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -403,7 +403,8 @@ static void ath9k_hw_iqcalibrate(struct ath_hw *ah, u8 numChains)
iCoffDenom = (powerMeasI / 2 + powerMeasQ / 2) / 128;
qCoffDenom = powerMeasQ / 64;
- if (powerMeasQ != 0) {
+ if ((powerMeasQ != 0) && (iCoffDenom != 0) &&
+ (qCoffDenom != 0)) {
iCoff = iqCorrMeas / iCoffDenom;
qCoff = powerMeasI / qCoffDenom - 64;
ath_print(common, ATH_DBG_CALIBRATE,
@@ -746,44 +747,65 @@ s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan)
return nf;
}
-static void ath9k_olc_temp_compensation(struct ath_hw *ah)
+static void ath9k_olc_temp_compensation_9287(struct ath_hw *ah)
{
- u32 rddata, i;
- int delta, currPDADC, regval, slope;
+ u32 rddata;
+ int32_t delta, currPDADC, slope;
rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4);
currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);
+ if (ah->initPDADC == 0 || currPDADC == 0) {
+ /*
+ * Zero value indicates that no frames have been transmitted yet,
+ * can't do temperature compensation until frames are transmitted.
+ */
+ return;
+ } else {
+ slope = ah->eep_ops->get_eeprom(ah, EEP_TEMPSENSE_SLOPE);
+
+ if (slope == 0) { /* to avoid divide by zero case */
+ delta = 0;
+ } else {
+ delta = ((currPDADC - ah->initPDADC)*4) / slope;
+ }
+ REG_RMW_FIELD(ah, AR_PHY_CH0_TX_PWRCTRL11,
+ AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta);
+ REG_RMW_FIELD(ah, AR_PHY_CH1_TX_PWRCTRL11,
+ AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta);
+ }
+}
+
+static void ath9k_olc_temp_compensation(struct ath_hw *ah)
+{
+ u32 rddata, i;
+ int delta, currPDADC, regval;
if (OLC_FOR_AR9287_10_LATER) {
+ ath9k_olc_temp_compensation_9287(ah);
+ } else {
+ rddata = REG_READ(ah, AR_PHY_TX_PWRCTRL4);
+ currPDADC = MS(rddata, AR_PHY_TX_PWRCTRL_PD_AVG_OUT);
+
if (ah->initPDADC == 0 || currPDADC == 0) {
return;
} else {
- slope = ah->eep_ops->get_eeprom(ah, EEP_TEMPSENSE_SLOPE);
- if (slope == 0)
- delta = 0;
+ if (ah->eep_ops->get_eeprom(ah, EEP_DAC_HPWR_5G))
+ delta = (currPDADC - ah->initPDADC + 4) / 8;
else
- delta = ((currPDADC - ah->initPDADC)*4) / slope;
- REG_RMW_FIELD(ah, AR_PHY_CH0_TX_PWRCTRL11,
- AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta);
- REG_RMW_FIELD(ah, AR_PHY_CH1_TX_PWRCTRL11,
- AR_PHY_TX_PWRCTRL_OLPC_TEMP_COMP, delta);
- }
- } else {
- if (ah->eep_ops->get_eeprom(ah, EEP_DAC_HPWR_5G))
- delta = (currPDADC - ah->initPDADC + 4) / 8;
- else
- delta = (currPDADC - ah->initPDADC + 5) / 10;
-
- if (delta != ah->PDADCdelta) {
- ah->PDADCdelta = delta;
- for (i = 1; i < AR9280_TX_GAIN_TABLE_SIZE; i++) {
- regval = ah->originalGain[i] - delta;
- if (regval < 0)
- regval = 0;
-
- REG_RMW_FIELD(ah, AR_PHY_TX_GAIN_TBL1 + i * 4,
- AR_PHY_TX_GAIN, regval);
+ delta = (currPDADC - ah->initPDADC + 5) / 10;
+
+ if (delta != ah->PDADCdelta) {
+ ah->PDADCdelta = delta;
+ for (i = 1; i < AR9280_TX_GAIN_TABLE_SIZE; i++) {
+ regval = ah->originalGain[i] - delta;
+ if (regval < 0)
+ regval = 0;
+
+ REG_RMW_FIELD(ah,
+ AR_PHY_TX_GAIN_TBL1 + i * 4,
+ AR_PHY_TX_GAIN, regval);
+ }
}
}
}
--
1.6.4.4
^ permalink raw reply related
* [PATCH/REVIEW 0/9] ath9k update
From: Sujith @ 2009-09-18 9:33 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
Hi John,
A bunch of fixes/cleanups.
These patches apply over the pending ath9k patches:
- The inital series of bug fixes.
- Luis' series.
Please apply.
Thanks,
Sujith
Senthil Balasubramanian (5):
ath9k: Allow PSPOLL only when the interface is configured in AP mode.
ath9k: Handle ATH9K_BEACON_RESET_TSF properly
ath9k: Reduce PLL Settle time and eliminate redundant PLL calls.
ath9k: Advertise midband for AR5416 devices
ath9k: Fix bugs in handling TX power
Sujith (2):
ath9k: Update INI release for AR9287
ath9k: Fix RTC reset for AR5416
Vasanthakumar Thiagarajan (1):
ath9k: Update initvals
Vivek Natarajan (1):
ath9k: Add Calibration checks
drivers/net/wireless/ath/ath9k/calib.c | 82 ++++++++++++++--------
drivers/net/wireless/ath/ath9k/eeprom.h | 6 +-
drivers/net/wireless/ath/ath9k/eeprom_4k.c | 4 +-
drivers/net/wireless/ath/ath9k/eeprom_def.c | 102 +++++++++++++++++++++++++-
drivers/net/wireless/ath/ath9k/hw.c | 36 +++++++--
drivers/net/wireless/ath/ath9k/hw.h | 4 +-
drivers/net/wireless/ath/ath9k/initvals.h | 72 +++++++++++--------
drivers/net/wireless/ath/ath9k/phy.c | 25 +++++--
drivers/net/wireless/ath/ath9k/recv.c | 5 +-
9 files changed, 253 insertions(+), 83 deletions(-)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox