Search Linux Wireless

Re: [PATCH 1/2] ar9170: cleanup of bss_info_changed and beacon config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 05 August 2009 02:13:12 Joerg Albert wrote:
> Enable/Disable the beacon in ar910_set_beacon_timers() independently
> of ar->vif, but controlled by BSS_CHANGED_BEACON_ENABLED and
> bss_conf->enable_beacon from mac80211.

no signed/cc here?

> ---
>  drivers/net/wireless/ath/ar9170/ar9170.h |    1 +
>  drivers/net/wireless/ath/ar9170/mac.c    |    4 +++-
>  drivers/net/wireless/ath/ar9170/main.c   |   15 ++++++++-------
>  3 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ar9170/mac.c b/drivers/net/wireless/ath/ar9170/mac.c
> index d9f1f46..9f2801c 100644
> --- a/drivers/net/wireless/ath/ar9170/mac.c
> +++ b/drivers/net/wireless/ath/ar9170/mac.c
> @@ -388,7 +388,9 @@ int ar9170_set_beacon_timers(struct ar9170 *ar)
>  	u32 v = 0;
>  	u32 pretbtt = 0;
>  
> -	if (ar->vif) {
> +	if (ar->enable_beacon) {
> +		if (WARN_ON(!ar->vif))
> +			return -ENODEV;
>  		v |= ar->vif->bss_conf.beacon_int;
>  
>  		switch (ar->vif->type) {

err, guess that's why. (not fatal, but WARN)
 
the beacon timer isn't exclusively used to notify the driver when its 
time for a new beacon... The STA mode uses the same _timer_
in reverse to wait for the next beacon form the assoc. AP.

that said: It does not look like the firmware implements anything
in this direction... But this is a clearly MAC register and there
could be something in the silicon which does something useful with
this information.

so, to be on the safe side: why not preserve the old behavior for the
STA mode as well and simply tell the hardware about dtim & beacon interval?

The only remaining question is where to disabled the timer for STA.
(which is in some way relevant to: [PATCH 2/2] because previously,
 these timers were always disabled by remove_interface.)

I think the best place is in ar9170_op_bss_info_changed:
       if (changed & BSS_CHANGED_ASSOC) {

just when bss_conf->assoc gets "0".

Regards,
	Chr
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux