Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [RFC][PATCH] b43: Comment unused functions lpphy_restore_dig_flt_state and lpphy_disable_rx_gain_override
From: Gábor Stefanik @ 2009-09-20  9:28 UTC (permalink / raw)
  To: Jaswinder Singh Rajput
  Cc: John W. Linville, Michael Buesch, Stefano Brivio, linux-wireless
In-Reply-To: <1253434164.19515.5.camel@ht.satnam>

These will be needed for calibration. (My calibration RFC already
makes use of them.)

On Sun, Sep 20, 2009 at 10:09 AM, Jaswinder Singh Rajput
<jaswinder@kernel.org> wrote:
>
> Commenting unused functions lpphy_restore_dig_flt_state and
> lpphy_disable_rx_gain_override, may be we need these functions in future.
>
> This also fixed following compilation warnings :
>  CC [M]  drivers/net/wireless/b43/phy_lp.o
> drivers/net/wireless/b43/phy_lp.c:383: warning: ‘lpphy_restore_dig_flt_state’ defined but not used
> drivers/net/wireless/b43/phy_lp.c:891: warning: ‘lpphy_disable_rx_gain_override’ defined but not used
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> ---
>  drivers/net/wireless/b43/phy_lp.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
> index 3e02d96..9c31462 100644
> --- a/drivers/net/wireless/b43/phy_lp.c
> +++ b/drivers/net/wireless/b43/phy_lp.c
> @@ -379,6 +379,8 @@ static void lpphy_save_dig_flt_state(struct b43_wldev *dev)
>        }
>  }
>
> +/* lpphy_restore_dig_flt_state is unused but kept as a reference */
> +#if 0
>  static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
>  {
>        static const u16 addr[] = {
> @@ -399,6 +401,7 @@ static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
>        for (i = 0; i < ARRAY_SIZE(addr); i++)
>                b43_phy_write(dev, addr[i], lpphy->dig_flt_state[i]);
>  }
> +#endif
>
>  static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
>  {
> @@ -887,6 +890,8 @@ static void lpphy_rev2plus_set_rx_gain(struct b43_wldev *dev, u32 gain)
>        }
>  }
>
> +/* lpphy_disable_rx_gain_override is unused but kept as a reference */
> +#if 0
>  static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
>  {
>        b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE);
> @@ -902,6 +907,7 @@ static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
>                b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF);
>        }
>  }
> +#endif
>
>  static void lpphy_enable_rx_gain_override(struct b43_wldev *dev)
>  {
> --
> 1.6.4.4
>
>
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* [RFC][PATCH] b43: Comment unused functions lpphy_restore_dig_flt_state and lpphy_disable_rx_gain_override
From: Jaswinder Singh Rajput @ 2009-09-20  8:09 UTC (permalink / raw)
  To: John W. Linville, Gábor Stefanik, Michael Buesch,
	Stefano Brivio, linux-wireless


Commenting unused functions lpphy_restore_dig_flt_state and
lpphy_disable_rx_gain_override, may be we need these functions in future.

This also fixed following compilation warnings :
  CC [M]  drivers/net/wireless/b43/phy_lp.o
drivers/net/wireless/b43/phy_lp.c:383: warning: ‘lpphy_restore_dig_flt_state’ defined but not used
drivers/net/wireless/b43/phy_lp.c:891: warning: ‘lpphy_disable_rx_gain_override’ defined but not used

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 drivers/net/wireless/b43/phy_lp.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 3e02d96..9c31462 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -379,6 +379,8 @@ static void lpphy_save_dig_flt_state(struct b43_wldev *dev)
 	}
 }
 
+/* lpphy_restore_dig_flt_state is unused but kept as a reference */
+#if 0
 static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
 {
 	static const u16 addr[] = {
@@ -399,6 +401,7 @@ static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
 	for (i = 0; i < ARRAY_SIZE(addr); i++)
 		b43_phy_write(dev, addr[i], lpphy->dig_flt_state[i]);
 }
+#endif
 
 static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
 {
@@ -887,6 +890,8 @@ static void lpphy_rev2plus_set_rx_gain(struct b43_wldev *dev, u32 gain)
 	}
 }
 
+/* lpphy_disable_rx_gain_override is unused but kept as a reference */
+#if 0
 static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
 {
 	b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE);
@@ -902,6 +907,7 @@ static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
 		b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF);
 	}
 }
+#endif
 
 static void lpphy_enable_rx_gain_override(struct b43_wldev *dev)
 {
-- 
1.6.4.4



^ permalink raw reply related

* Question about carrier sensing
From: Jinsung Lee @ 2009-09-20  4:42 UTC (permalink / raw)
  To: linux-wireless

Hi, all.


I'm experimenting using MadWifi driver and Wistron CM6/CM9 cards, which all
use the Atheros chipset.
But, I found that there is some strange phenomenon on carrier sensing, which
doesn't follow the standard.
I let the two nearby transmitters just transmit the packets: one transmitter
has zero cw value and the other has positive cw values: 10, 100, 1000 where
cw is the maximum contention window size, thus the device selects the
backoff counter randomly from [0, cw].
If the carrier sensing really works, we would observe that the transmitter
with zero cw value takes all while the other don't at all, right?
Interestingly, the experimental result shows that the transmitter with
positive value has very infrequent but chances to transmit once in a while
during the whole experiment, and further the larger cw value, the much less
chance the transmitter has to transmit. So, it seems to work though.
Do you have any idea or similar experience?
Thanks.


--
Regards,
Jinsung Lee
--




^ permalink raw reply

* Re: [RFC] compat-2.6: mangle symbols for driver-select
From: Tim Gardner @ 2009-09-20  3:46 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless, Greg KH, Johannes Berg
In-Reply-To: <20090919205545.GA18080@bombadil.infradead.org>

[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]

Luis R. Rodriguez wrote:
> Today at the summit we spoke about mangling symbols for driver-slect.
> Here's a quick nasty take on this but without doing this for driver-select
> specifically just for testing. It seems to compile, but someone more motivated
> may want to test and make this apply somehow only for driver-select or perhaps
> when a -D define is used.
> 
> Reason for this is to help distributions / OEMs / ODMs who want to replace
> just *one* driver with compat-wireless.
> 

I think it would be better to generate the list of mangled symbols 
dynamically. In older Ubuntu releases (before depmod behavior was 
corrected), we have to run a 'munge' script to preface all of the 
exported symbols so that a compat-wireless driver references the 
compat-wireless protocol stack symbols. See the attached munge script 
for compat-wireless on 2.6.24. We can either do something like this for 
compat-wireless, or we could use a subset of this logic to generate the 
list of symbols contained within the '#ifdef 
CONFIG_COMPAT_WIRELESS_MANGLE' clause.

rtg
-- 
Tim Gardner tim.gardner@canonical.com

[-- Attachment #2: munge --]
[-- Type: text/plain, Size: 885 bytes --]

#!/bin/bash
#
# Isolate the compat-wireless exported symbols and munge every occurence such that
# there is no possibility of conflict with the main kernel.
#
TL=token_list
FL=file_list
SL=sed_list
TL_EXCEPTIONS=token_list_exceptions

find compat-wireless-2.6 -name "*.[ch]" > ${FL}

rm -f ${TL_EXCEPTIONS}
for i in wireless_send_event iw_handler_set_spy wireless_spy_update iw_handler_get_thrspy iw_handler_get_spy iw_handler_set_thrspy
do
	echo ${i} >> ${TL_EXCEPTIONS}
done

cat ${FL} | \
egrep -v "compat\.[ch]" |\
xargs grep -h EXPORT_SYMBOL | \
grep -v -f ${TL_EXCEPTIONS} |\
sed -e 's/^.*EXPORT_SYMBOL_GPL(//' -e 's/);//' -e 's/^.*EXPORT_SYMBOL(//' -e 's/);//' |\
sort -r | uniq > ${TL}

rm -f ${SL}
cat ${TL} | while read token
do
	echo s/${token}/cw_${token}/g >> ${SL}
done

cat ${FL} | while read f
do
	sed -i -f ${SL} "${f}"
done

rm -f ${TL} ${FL} ${SL} ${TL_EXCEPTIONS}


^ permalink raw reply

* Re: Problem with "cfg80211: fix SME connect" (bisected)
From: Andrew Price @ 2009-09-19 22:31 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: linux-wireless
In-Reply-To: <2d0a357f0909191512o2ad20b1ag3eb344948351cae3@mail.gmail.com>

On Sun, Sep 20, 2009 at 12:12:56AM +0200, Sedat Dilek wrote:
> Can you try "[PATCH] cfg80211: don't overwrite privacy setting" from [1]?
> 
> -Sedat
> 
> [1] http://marc.info/?l=linux-wireless&m=125323296617306&w=2

That fixes it, thanks.

Andrew

^ permalink raw reply

* Re: Problem with "cfg80211: fix SME connect" (bisected)
From: Sedat Dilek @ 2009-09-19 22:12 UTC (permalink / raw)
  To: Andrew Price; +Cc: linux-wireless
In-Reply-To: <20090919220805.GA2728@plato.andrewprice.me.uk>

Can you try "[PATCH] cfg80211: don't overwrite privacy setting" from [1]?

-Sedat

[1] http://marc.info/?l=linux-wireless&m=125323296617306&w=2

On Sun, Sep 20, 2009 at 12:08 AM, Andrew Price <andy@andrewprice.me.uk> wrote:
> Hi,
>
> After building today's mainline kernel (as of 78f28b7c) my wireless
> networking stopped working - the interface seems to come up but nothing
> can connect.  The output of dmesg was clean, no backtraces or anything
> unusual.
>
> I've bisected the problem down to commit bbac31f4 "cfg80211: fix SME
> connect".  Reverting that commit fixes the problem. I'm using
> wpa_supplicant v0.6.9. The bug occurs for my b43 card and my rt2500pci
> card, and reverting the commit fixes the problem for both cards.
>
> Please let me know if there's any more info I can provide or patches I
> can test.
>
> Andrew
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply

* Problem with "cfg80211: fix SME connect" (bisected)
From: Andrew Price @ 2009-09-19 22:08 UTC (permalink / raw)
  To: linux-wireless

Hi,

After building today's mainline kernel (as of 78f28b7c) my wireless
networking stopped working - the interface seems to come up but nothing
can connect.  The output of dmesg was clean, no backtraces or anything
unusual.

I've bisected the problem down to commit bbac31f4 "cfg80211: fix SME
connect".  Reverting that commit fixes the problem. I'm using
wpa_supplicant v0.6.9. The bug occurs for my b43 card and my rt2500pci
card, and reverting the commit fixes the problem for both cards.

Please let me know if there's any more info I can provide or patches I
can test.

Andrew

^ permalink raw reply

* [RFC] compat-2.6: mangle symbols for driver-select
From: Luis R. Rodriguez @ 2009-09-19 20:55 UTC (permalink / raw)
  To: linux-wireless; +Cc: Greg KH, Johannes Berg, Tim Gardner

Today at the summit we spoke about mangling symbols for driver-slect.
Here's a quick nasty take on this but without doing this for driver-select
specifically just for testing. It seems to compile, but someone more motivated
may want to test and make this apply somehow only for driver-select or perhaps
when a -D define is used.

Reason for this is to help distributions / OEMs / ODMs who want to replace
just *one* driver with compat-wireless.

diff --git a/compat/compat.h b/compat/compat.h
index 05612b2..711a511 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -22,4 +22,159 @@
 #include <net/compat-2.6.31.h>
 #include <net/compat-2.6.32.h>
 
+#ifdef CONFIG_COMPAT_WIRELESS_MANGLE
+
+/* cfg80211 */
+
+#define wiphy_new					backport_wiphy_new
+#define wiphy_register					backport_wiphy_register
+#define wiphy_rfkill_start_polling			backport_wiphy_rfkill_start_polling
+#define wiphy_rfkill_stop_polling			backport_wiphy_rfkill_stop_polling
+#define wiphy_unregister				backport_wiphy_unregister
+#define wiphy_free					backport_wiphy_free
+#define wiphy_rfkill_set_hw_state			backport_wiphy_rfkill_set_hw_state
+#define cfg80211_ibss_joined				backport_cfg80211_ibss_joined
+#define print_ssid					backport_print_ssid
+#define lib80211_crypt_info_init			backport_lib80211_crypt_info_init
+#define lib80211_crypt_info_free			backport_lib80211_crypt_info_free
+#define lib80211_crypt_deinit_entries			backport_lib80211_crypt_deinit_entries
+#define lib80211_crypt_quiescing			backport_lib80211_crypt_quiescing
+#define lib80211_crypt_deinit_handler			backport_lib80211_crypt_deinit_handler
+#define lib80211_crypt_delayed_deinit			backport_lib80211_crypt_delayed_deinit
+#define lib80211_register_crypto_ops			backport_lib80211_register_crypto_ops
+#define lib80211_unregister_crypto_ops			backport_lib80211_unregister_crypto_ops
+#define lib80211_get_crypto_ops				backport_lib80211_get_crypto_ops
+#define cfg80211_send_rx_auth				backport_cfg80211_send_rx_auth
+#define cfg80211_send_rx_assoc				backport_cfg80211_send_rx_assoc
+#define cfg80211_send_deauth				backport_cfg80211_send_deauth
+#define cfg80211_send_disassoc				backport_cfg80211_send_disassoc
+#define cfg80211_send_auth_timeout			backport_cfg80211_send_auth_timeout
+#define cfg80211_send_assoc_timeout			backport_cfg80211_send_assoc_timeout
+#define cfg80211_michael_mic_failure			backport_cfg80211_michael_mic_failure
+#define cfg80211_testmode_alloc_reply_skb		backport_cfg80211_testmode_alloc_reply_skb
+#define cfg80211_testmode_reply				backport_cfg80211_testmode_reply
+#define cfg80211_testmode_alloc_event_skb		backport_cfg80211_testmode_alloc_event_skb
+#define cfg80211_testmode_event				backport_cfg80211_testmode_event
+#define ieee80211_radiotap_iterator_init		backport_ieee80211_radiotap_iterator_init
+#define ieee80211_radiotap_iterator_next		backport_ieee80211_radiotap_iterator_next
+#define freq_reg_info					backport_freq_reg_info
+#define wiphy_apply_custom_regulatory			backport_wiphy_apply_custom_regulatory
+#define regulatory_hint					backport_regulatory_hint
+#define cfg80211_scan_done				backport_cfg80211_scan_done
+#define cfg80211_get_bss				backport_cfg80211_get_bss
+#define cfg80211_get_mesh				backport_cfg80211_get_mesh
+#define cfg80211_inform_bss				backport_cfg80211_inform_bss
+#define cfg80211_inform_bss_frame			backport_cfg80211_inform_bss_frame
+#define cfg80211_put_bss				backport_cfg80211_put_bss
+#define cfg80211_unlink_bss				backport_cfg80211_unlink_bss
+#define cfg80211_wext_siwscan				backport_cfg80211_wext_siwscan
+#define cfg80211_wext_giwscan				backport_cfg80211_wext_giwscan
+#define cfg80211_connect_result				backport_cfg80211_connect_result
+#define cfg80211_roamed					backport_cfg80211_roamed
+#define cfg80211_disconnected				backport_cfg80211_disconnected
+#define ieee80211_get_response_rate			backport_ieee80211_get_response_rate
+#define ieee80211_channel_to_frequency			backport_ieee80211_channel_to_frequency
+#define ieee80211_frequency_to_channel			backport_ieee80211_frequency_to_channel
+#define __ieee80211_get_channel				backport___ieee80211_get_channel
+#define rfc1042_header					backport_rfc1042_header
+#define bridge_tunnel_header				backport_bridge_tunnel_header
+#define ieee80211_hdrlen				backport_ieee80211_hdrlen
+#define ieee80211_get_hdrlen_from_skb			backport_ieee80211_get_hdrlen_from_skb
+#define ieee80211_data_to_8023				backport_ieee80211_data_to_8023
+#define ieee80211_data_from_8023			backport_ieee80211_data_from_8023
+#define cfg80211_classify8021d				backport_cfg80211_classify8021d
+#define ieee80211_bss_get_ie				backport_ieee80211_bss_get_ie
+#define wireless_send_event				backport_wireless_send_event
+#define iw_handler_set_spy				backport_iw_handler_set_spy
+#define iw_handler_get_spy				backport_iw_handler_get_spy
+#define iw_handler_set_thrspy				backport_iw_handler_set_thrspy
+#define iw_handler_get_thrspy				backport_iw_handler_get_thrspy
+#define wireless_spy_update				backport_wireless_spy_update
+#define cfg80211_wext_giwname				backport_cfg80211_wext_giwname
+#define cfg80211_wext_siwmode				backport_cfg80211_wext_siwmode
+#define cfg80211_wext_giwmode				backport_cfg80211_wext_giwmode
+#define cfg80211_wext_giwrange				backport_cfg80211_wext_giwrange
+#define cfg80211_wext_siwrts				backport_cfg80211_wext_siwrts
+#define cfg80211_wext_giwrts				backport_cfg80211_wext_giwrts
+#define cfg80211_wext_siwfrag				backport_cfg80211_wext_siwfrag
+#define cfg80211_wext_giwfrag				backport_cfg80211_wext_giwfrag
+#define cfg80211_wext_siwretry				backport_cfg80211_wext_siwretry
+#define cfg80211_wext_giwretry				backport_cfg80211_wext_giwretry
+#define cfg80211_wext_siwencode				backport_cfg80211_wext_siwencode
+#define cfg80211_wext_siwencodeext			backport_cfg80211_wext_siwencodeext
+#define cfg80211_wext_giwencode				backport_cfg80211_wext_giwencode
+#define cfg80211_wext_siwfreq				backport_cfg80211_wext_siwfreq
+#define cfg80211_wext_giwfreq				backport_cfg80211_wext_giwfreq
+#define cfg80211_wext_siwtxpower			backport_cfg80211_wext_siwtxpower
+#define cfg80211_wext_giwtxpower			backport_cfg80211_wext_giwtxpower
+#define cfg80211_wext_siwauth				backport_cfg80211_wext_siwauth
+#define cfg80211_wext_giwauth				backport_cfg80211_wext_giwauth
+#define cfg80211_wext_siwpower				backport_cfg80211_wext_siwpower
+#define cfg80211_wext_giwpower				backport_cfg80211_wext_giwpower
+#define cfg80211_wext_siwrate				backport_cfg80211_wext_siwrate
+#define cfg80211_wext_giwrate				backport_cfg80211_wext_giwrate
+#define cfg80211_wireless_stats				backport_cfg80211_wireless_stats
+#define cfg80211_wext_siwap				backport_cfg80211_wext_siwap
+#define cfg80211_wext_giwap				backport_cfg80211_wext_giwap
+#define cfg80211_wext_siwessid				backport_cfg80211_wext_siwessid
+#define cfg80211_wext_giwessid				backport_cfg80211_wext_giwessid
+#define cfg80211_wext_siwgenie				backport_cfg80211_wext_siwgenie
+#define cfg80211_wext_siwmlme				backport_cfg80211_wext_siwmlme
+
+/* mac80211 */
+
+#define ieee80211_start_tx_ba_session			backport_ieee80211_start_tx_ba_session
+#define ieee80211_start_tx_ba_cb			backport_ieee80211_start_tx_ba_cb
+#define ieee80211_start_tx_ba_cb_irqsafe		backport_ieee80211_start_tx_ba_cb_irqsafe
+#define ieee80211_stop_tx_ba_session			backport_ieee80211_stop_tx_ba_session
+#define ieee80211_stop_tx_ba_cb				backport_ieee80211_stop_tx_ba_cb
+#define ieee80211_stop_tx_ba_cb_irqsafe			backport_ieee80211_stop_tx_ba_cb_irqsafe
+#define __ieee80211_get_radio_led_name			backport___ieee80211_get_radio_led_name
+#define __ieee80211_get_assoc_led_name			backport___ieee80211_get_assoc_led_name
+#define __ieee80211_get_tx_led_name			backport___ieee80211_get_tx_led_name
+#define __ieee80211_get_rx_led_name			backport___ieee80211_get_rx_led_name
+#define ieee80211_tx_status_irqsafe			backport_ieee80211_tx_status_irqsafe
+#define ieee80211_tx_status				backport_ieee80211_tx_status
+#define ieee80211_restart_hw				backport_ieee80211_restart_hw
+#define ieee80211_alloc_hw				backport_ieee80211_alloc_hw
+#define ieee80211_register_hw				backport_ieee80211_register_hw
+#define ieee80211_unregister_hw				backport_ieee80211_unregister_hw
+#define ieee80211_free_hw				backport_ieee80211_free_hw
+#define ieee80211_beacon_loss				backport_ieee80211_beacon_loss
+#define ieee80211_rate_control_register			backport_ieee80211_rate_control_register
+#define ieee80211_rate_control_unregister		backport_ieee80211_rate_control_unregister
+#define rate_control_send_low				backport_rate_control_send_low
+#define ieee80211_rx					backport_ieee80211_rx
+#define ieee80211_rx_irqsafe				backport_ieee80211_rx_irqsafe
+#define ieee80211_scan_completed			backport_ieee80211_scan_completed
+#define ieee80211_find_sta				backport_ieee80211_find_sta
+#define ieee80211_get_tkip_key				backport_ieee80211_get_tkip_key
+#define ieee80211_beacon_get				backport_ieee80211_beacon_get
+#define ieee80211_rts_get				backport_ieee80211_rts_get
+#define ieee80211_ctstoself_get				backport_ieee80211_ctstoself_get
+#define ieee80211_get_buffered_bc			backport_ieee80211_get_buffered_bc
+#define wiphy_to_ieee80211_hw				backport_wiphy_to_ieee80211_hw
+#define ieee80211_generic_frame_duration		backport_ieee80211_generic_frame_duration
+#define ieee80211_rts_duration				backport_ieee80211_rts_duration
+#define ieee80211_ctstoself_duration			backport_ieee80211_ctstoself_duration
+#define ieee80211_wake_queue				backport_ieee80211_wake_queue
+#define ieee80211_stop_queue				backport_ieee80211_stop_queue
+#define ieee80211_stop_queues				backport_ieee80211_stop_queues
+#define ieee80211_queue_stopped				backport_ieee80211_queue_stopped
+#define ieee80211_wake_queues				backport_ieee80211_wake_queues
+#define ieee80211_iterate_active_interfaces		backport_ieee80211_iterate_active_interfaces
+#define ieee80211_iterate_active_interfaces_atomic	backport_ieee80211_iterate_active_interfaces_atomic
+#define ieee80211_queue_work				backport_ieee80211_queue_work
+#define ieee80211_queue_delayed_work			backport_ieee80211_queue_delayed_work
+
+#endif /* CONFIG_COMPAT_WIRELESS_MANGLE */
+
+/* Atheros */
+
+#define ath_regd_init					backport_ath_regd_init
+#define ath_is_world_regd				backport_ath_is_world_regd
+#define ath_reg_notifier_apply				backport_ath_reg_notifier_apply
+#define ath_regd_get_band_ctl				backport_ath_regd_get_band_ctl
+#define ath_hw_setbssidmask				backport_ath_hw_setbssidmask
+
 #endif /* LINUX_26_COMPAT_H */
diff --git a/config.mk b/config.mk
index b482b68..2de37a1 100644
--- a/config.mk
+++ b/config.mk
@@ -4,6 +4,8 @@ export
 ## Make sure to have each variable declaration start
 ## in the first column, no whitespace allowed.
 
+CONFIG_COMPAT_WIRELESS_MANGLE=y
+
 ifeq ($(wildcard $(KLIB_BUILD)/.config),)
 # These will be ignored by compat autoconf
  CONFIG_PCI=y

^ permalink raw reply related

* About calculation of RSSI in iwlwifi 5300agn
From: kai zeng @ 2009-09-19 18:51 UTC (permalink / raw)
  To: linux-wireless

Hi,

Does any one know how the RSSI is calculated in iwlwifi 5300agn?
Specifically, what's the function used to map the actual signal
strength to RSSI?

Thanks,

Kai

^ permalink raw reply

* Re: [PATCH] ar9170: implement frequency calibration for one-stage/openfw
From: Joerg Albert @ 2009-09-19 12:21 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christian Lamparter, linux-wireless, linville, David S. Miller
In-Reply-To: <20090918170211.8acce2cc.akpm@linux-foundation.org>

On 09/19/2009 02:02 AM, Andrew Morton wrote:
> On Thu, 3 Sep 2009 20:25:31 +0200
> Christian Lamparter <chunkeey@googlemail.com> wrote:
> 
>> This patch ports some code from the vendor driver, which is
>> supposed to upload the right calibration values for the
>> chosen frequency.
>>
>> In theory, this should give a better range and throughput
>> for all users with the open, or one-stage firmware.
>>
>> ...
>>
>> +		for (i = 0; i < 76; i++) {
>> +			u32 phy_data;
>> +			u8 tmp;
>> +
>> +			if (i < 25) {
>> +				tmp = ar9170_interpolate_val(i, &pwrs[0][0],
>> +							     &vpds[0][0]);
>> +			} else {
>> +				tmp = ar9170_interpolate_val(i - 12,
>> +							     &pwrs[1][0],
>> +							     &vpds[1][0]);
>> +			}
>> +
>> +			phy_data |= tmp << ((i & 3) << 3);
> 
> Clearly buggy and the compiler warns.  The value of phy_data is unknown
> here.
> 
> How did this get all the way into mainline?

Strangely it compiles without any warning for me with the latest linux-wireless:

 joerg@nc10:~/src/wireless.gits/wireless-testing$ gcc --version
gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3
joerg@nc10:~/src/wireless.gits/wireless-testing$ git describe
v2.6.31-38258-g389ce02
joerg@nc10:~/src/wireless.gits/wireless-testing/drivers/net/wireless/ath/ar9170$ grep phy_data phy.c
                        u32 phy_data;
                        phy_data |= tmp << ((i & 3) << 3);
                                                (i & ~3), phy_data);
                                phy_data = 0;

joerg@nc10:~/src/wireless.gits/wireless-testing$ make modules
...
  CC [M]  drivers/net/wireless/ath/ar9170/mac.o
  CC [M]  drivers/net/wireless/ath/ar9170/phy.o
  CC [M]  drivers/net/wireless/ath/ar9170/led.o

make V=1 says:

  gcc -Wp,-MD,drivers/net/wireless/ath/ar9170/.phy.o.d  -nostdinc -isystem 
/usr/lib/gcc/i486-linux-gnu/4.3.3/include -Iinclude  
-I/home/joerg/src/wireless.gits/wireless-testing/arch/x86/include -include 
include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes 
-Wno-trigraphs -fno-strict-aliasing -fno-common 
-Werror-implicit-function-declaration -Wno-format-security 
-fno-delete-null-pointer-checks -O2 -m32 -msoft-float -mregparm=3 
-freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=pentium3 
-mtune=generic -Wa,-mtune=generic32 -ffreestanding -pipe -Wno-sign-compare 
-fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow 
-fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g 
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow  -DMODULE 
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(phy)"  
-D"KBUILD_MODNAME=KBUILD_STR(ar9170usb)"  -c -o 
drivers/net/wireless/ath/ar9170/.tmp_phy.o drivers/net/wireless/ath/ar9170/phy.c


Adding "-Wuninitialized" didn't help, acc. to the doc it is switched on
with -Wall for -O2.
Is this a regression of gcc?

Regards,
Jörg.

^ permalink raw reply

* Re: alloc skb based on a given data buffer
From: Johannes Berg @ 2009-09-19  5:56 UTC (permalink / raw)
  To: David Miller
  Cc: yi.zhu, mel, reinette.chatre, elendil, Larry.Finger, linville,
	penberg, linux-kernel, linux-wireless, ipw3945-devel, akpm, cl,
	assaf.krauss, mohamed.abbas, netdev
In-Reply-To: <20090915.141606.134994761.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

On Tue, 2009-09-15 at 14:16 -0700, David Miller wrote:
> From: Johannes Berg <johannes@sipsolutions.net>
> Date: Tue, 15 Sep 2009 08:30:31 -0700
> 
> > Hold, mac80211 can't cope with that at this point for sw crypto and
> > possibly other things.
> 
> Then it should skb_linearize() at input, or similar.

Not all that much won then since that again means an order-2 allocation.
Fewer, certainly, as most packets are actually much smaller than that.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* AR9285 not working after resume
From: Christopher @ 2009-09-19  1:29 UTC (permalink / raw)
  To: linux-wireless

hi, I'm using the ath9k-build 2009-09-15 with my Atheros AR9285.
After resuming from suspend-to-RAM, my connections are all disconnected
(as expected), but on reconnect wicd hangs on authenticating.
dmesg shows "ADDRCONF(NETDEV_UP): wlan0: link is not ready" and:


        ------------[ cut here ]------------
        WARNING:
        at /home/build/compat-wireless/compat-wireless-2009-09-15/net/wireless/mlme.c:96 cfg80211_send_rx_assoc+0x199/0x250 [cfg80211]()
        Hardware name: K50IJ               
        Modules linked in: aes_i586 aes_generic i915 drm i2c_algo_bit
        ath9k mac80211 ath cfg80211 rfkill ipv6 fuse fan
        cpufreq_powersave cpufreq_ondemand acpi_cpufreq uvcvideo
        freq_table arc4 ecb videodev usb_storage v4l1_compat
        snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq
        snd_seq_device snd_pcm_oss snd_mixer_oss i2c_core
        snd_hda_codec_via snd_hda_intel snd_hda_codec snd_hwdep snd_pcm
        snd_timer uhci_hcd snd iTCO_wdt iTCO_vendor_support soundcore
        ehci_hcd snd_page_alloc intel_agp agpgart video psmouse atl1e
        usbcore asus_laptop output sr_mod serio_raw evdev cdrom pcspkr
        battery button processor thermal ac led_class sg rtc_cmos
        rtc_core rtc_lib ext4 mbcache jbd2 crc16 sd_mod ahci libata
        scsi_mod [last unloaded: rfkill]
        Pid: 1525, comm: phy0 Not tainted 2.6.31-ARCH #1
        Call Trace:
         [<c10466fa>] ? warn_slowpath_common+0x7a/0xc0
         [<f8cd5899>] ? cfg80211_send_rx_assoc+0x199/0x250 [cfg80211]
         [<c1046760>] ? warn_slowpath_null+0x20/0x40
         [<f8cd5899>] ? cfg80211_send_rx_assoc+0x199/0x250 [cfg80211]
         [<f8d3459e>] ? ieee80211_sta_work+0x8ee/0x15e0 [mac80211]
         [<c100239d>] ? __switch_to+0xbd/0x1a0
         [<c103bc94>] ? finish_task_switch+0xf4/0x130
         [<c1305309>] ? schedule+0x2d9/0x990
         [<f8d33cb0>] ? ieee80211_sta_work+0x0/0x15e0 [mac80211]
         [<c105d1ef>] ? worker_thread+0x11f/0x280
         [<c1062f90>] ? autoremove_wake_function+0x0/0x60
         [<c105d0d0>] ? worker_thread+0x0/0x280
         [<c1062b3c>] ? kthread+0x8c/0xa0
         [<c1062ab0>] ? kthread+0x0/0xa0
         [<c10048e7>] ? kernel_thread_helper+0x7/0x10
        ---[ end trace dca41fa40e008850 ]---
        ------------[ cut here ]------------

Arch Linux 2.6.31, Asus X5DIJ Laptop, Wifi running great at 150 Mbit/s.
Is this related to the connecting-error? I'd be glad to test anything
you throw at me.

DIDI2002


^ permalink raw reply

* Re: [PATCH] ar9170: implement frequency calibration for one-stage/openfw
From: Andrew Morton @ 2009-09-19  0:02 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, linville, David S. Miller
In-Reply-To: <200909032025.31260.chunkeey@googlemail.com>

On Thu, 3 Sep 2009 20:25:31 +0200
Christian Lamparter <chunkeey@googlemail.com> wrote:

> This patch ports some code from the vendor driver, which is
> supposed to upload the right calibration values for the
> chosen frequency.
> 
> In theory, this should give a better range and throughput
> for all users with the open, or one-stage firmware.
> 
> ...
>
> +		for (i = 0; i < 76; i++) {
> +			u32 phy_data;
> +			u8 tmp;
> +
> +			if (i < 25) {
> +				tmp = ar9170_interpolate_val(i, &pwrs[0][0],
> +							     &vpds[0][0]);
> +			} else {
> +				tmp = ar9170_interpolate_val(i - 12,
> +							     &pwrs[1][0],
> +							     &vpds[1][0]);
> +			}
> +
> +			phy_data |= tmp << ((i & 3) << 3);

Clearly buggy and the compiler warns.  The value of phy_data is unknown
here.

How did this get all the way into mainline?


^ permalink raw reply

* Re: [PATCH] cfg80211: don't overwrite privacy setting
From: Sedat Dilek @ 2009-09-18 21:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless, ASIC Felix
In-Reply-To: <1253232931.23567.6.camel@johannes.local>

Quick Feedback:

Fixes also compat-wireless (2009-09-18) built against 2.6.31 with iwl3945.
ath5k driver on another machine is also OK.
With yesterday's c-w I had no connection to my AP (WPA2-PSK/CCMP).

$ sudo wpa_cli -iwlan0 status
bssid=$myBSSID
ssid=$mySSID
id=0
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=$myIPADDR


-Sedat

On Fri, Sep 18, 2009 at 2:15 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> When cfg80211 is instructed to connect, it always
> uses the default WEP key for the privacy setting,
> which clearly is wrong when using wpa_supplicant.
> Don't overwrite the setting, and rely on it being
> false when wpa_supplicant is not running, instead
> set it to true when we have keys.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>
> --- wireless-testing.orig/net/wireless/wext-sme.c       2009-09-17 17:12:03.000000000 -0700
> +++ wireless-testing/net/wireless/wext-sme.c    2009-09-17 17:12:53.000000000 -0700
> @@ -26,11 +26,11 @@ int cfg80211_mgd_wext_connect(struct cfg
>
>        wdev->wext.connect.ie = wdev->wext.ie;
>        wdev->wext.connect.ie_len = wdev->wext.ie_len;
> -       wdev->wext.connect.privacy = wdev->wext.default_key != -1;
>
>        if (wdev->wext.keys) {
>                wdev->wext.keys->def = wdev->wext.default_key;
>                wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
> +               wdev->wext.connect.privacy = true;
>        }
>
>        if (!wdev->wext.connect.ssid_len)
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply

* Re: [PATCH] cfg80211: don't overwrite privacy setting
From: ASIC Felix @ 2009-09-18 20:52 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John Linville, linux-wireless
In-Reply-To: <1253232931.23567.6.camel@johannes.local>

On Thu, 2009-09-17 at 17:15 -0700, Johannes Berg wrote:
> When cfg80211 is instructed to connect, it always
> uses the default WEP key for the privacy setting,
> which clearly is wrong when using wpa_supplicant.
> Don't overwrite the setting, and rely on it being
> false when wpa_supplicant is not running, instead
> set it to true when we have keys.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> 
> --- wireless-testing.orig/net/wireless/wext-sme.c	2009-09-17 17:12:03.000000000 -0700
> +++ wireless-testing/net/wireless/wext-sme.c	2009-09-17 17:12:53.000000000 -0700
> @@ -26,11 +26,11 @@ int cfg80211_mgd_wext_connect(struct cfg
>  
>  	wdev->wext.connect.ie = wdev->wext.ie;
>  	wdev->wext.connect.ie_len = wdev->wext.ie_len;
> -	wdev->wext.connect.privacy = wdev->wext.default_key != -1;
>  
>  	if (wdev->wext.keys) {
>  		wdev->wext.keys->def = wdev->wext.default_key;
>  		wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
> +		wdev->wext.connect.privacy = true;
>  	}
>  
>  	if (!wdev->wext.connect.ssid_len)

This patch fixes my issue "Re: regression?  No connection with
master-2009-09-16 was fine until master-2009-09-14"

Best regards,
Felix


^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: ASIC Felix @ 2009-09-18 20:51 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1253232836.23567.4.camel@johannes.local>

On Thu, 2009-09-17 at 17:13 -0700, Johannes Berg wrote:
> On Thu, 2009-09-17 at 17:09 -0700, Johannes Berg wrote:
> > On Thu, 2009-09-17 at 17:05 -0700, ASIC Felix wrote:
> > 
> > > > and then describe your setup ... the patch works fine here and Holger
> > > > said it fixed his problem. hidden ssid by any chance?
> > > 
> > > Office network, can see about 50 APs, more 2G than 5G.
> > > 
> > > Main office ssid is available on most 2G channels 11g (no 11n), also on
> > > several 5G channels 11a (no 11n). Lots of other ssids are visible.
> > > WPA2/PSK.
> > 
> > I think wpa is the problem, seeing something like that here too, very
> > odd that it could connect otherwise tho.
> 
> yeah I've got it.
> 
> johannes

yes, fixed with your patch "Re: [PATCH] cfg80211: don't overwrite
privacy setting"

Thanks!
Best regards,
Felix


^ permalink raw reply

* Re: [Ilw] Re: WARNING: at net/mac80211/scan.c:267 ieee80211_scan_completed+0x299/0x2b0 [mac80211]()
From: Maciej Rutecki @ 2009-09-18 20:19 UTC (permalink / raw)
  To: reinette chatre
  Cc: ilw@linux.intel.com, Linux Wireless List,
	Linux Kernel Mailing List
In-Reply-To: <1253299494.26521.664.camel@rc-desk>

2009/9/18 reinette chatre <reinette.chatre@intel.com>:
> Hi Maciej,
>
> On Wed, 2009-09-16 at 23:32 -0700, Maciej Rutecki wrote:
>
>> [  249.340094] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
>> [  249.345339] wlan0 direct probe responded
>> [  249.345347] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
>> [  249.347122] wlan0: authenticated
>> [  249.347152] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
>> [  249.349703] wlan0: RX AssocResp from 00:1b:11:f6:0f:28 (capab=0x431
>> status=0 aid=1)
>> [  249.349711] wlan0: associated
>> [  253.411858] wlan0: deauthenticated from 00:1b:11:f6:0f:28 (Reason:
>> 6)
>
> This still appears to be the main issue here, that AP deauthenticates.
> Could you run wpa_supplicant with debugging (-dddt) ? When you have
> these logs, could you please open a bug report at
> http://bugzilla.intellinuxwireless.org/ to enable us to track it?

Sure, bug report:
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2089

Debug information also available:
http://unixy.pl/maciek/download/kernel/2.6.31-git4/wpa_debug.txt

Regards
-- 
Maciej Rutecki
http://www.maciek.unixy.pl

^ permalink raw reply

* Re: [Ilw] Re: WARNING: at net/mac80211/scan.c:267 ieee80211_scan_completed+0x299/0x2b0 [mac80211]()
From: reinette chatre @ 2009-09-18 18:44 UTC (permalink / raw)
  To: Maciej Rutecki
  Cc: ilw@linux.intel.com, Linux Wireless List,
	Linux Kernel Mailing List
In-Reply-To: <8db1092f0909162332r4ffeef09jdb87f7fc69ff8e9e@mail.gmail.com>

Hi Maciej,

On Wed, 2009-09-16 at 23:32 -0700, Maciej Rutecki wrote:

> [  249.340094] wlan0: direct probe to AP 00:1b:11:f6:0f:28 (try 1)
> [  249.345339] wlan0 direct probe responded
> [  249.345347] wlan0: authenticate with AP 00:1b:11:f6:0f:28 (try 1)
> [  249.347122] wlan0: authenticated
> [  249.347152] wlan0: associate with AP 00:1b:11:f6:0f:28 (try 1)
> [  249.349703] wlan0: RX AssocResp from 00:1b:11:f6:0f:28 (capab=0x431
> status=0 aid=1)
> [  249.349711] wlan0: associated
> [  253.411858] wlan0: deauthenticated from 00:1b:11:f6:0f:28 (Reason:
> 6)

This still appears to be the main issue here, that AP deauthenticates.
Could you run wpa_supplicant with debugging (-dddt) ? When you have
these logs, could you please open a bug report at
http://bugzilla.intellinuxwireless.org/ to enable us to track it?

Thank you

Reinette



^ permalink raw reply

* 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


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox