Search Linux Wireless

Re: [RFC] mac80211: add time synchronisation with BSS for assoc

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

 



Hi,

On Wed, May 9, 2012 at 11:08 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
>
> Some drivers (iwlegacy, iwlwifi and rt2x00) today use the
> bss_conf.last_tsf value. By itself though that value is
> completely worthless since it may be ancient. What really
> is needed is synchronisation between some device time and
> the TSF.
>
> To clarify this, rename bss_conf.last_tsf to sync_tsf and
> add sync_device_ts which is obtained from rx_status which
> gets a new field device_timestamp for this purpose. This
> is intentionally not using the mactime field since that
> is used for other things and in IBSS is expected to sync
> with the IBSS's TSF which isn't necessarily true for the
> device timestamp.
>
> Also, since we have the information and it's useful even
> before the connection has been established, give all the
> timing details to the driver before authenticating.
>
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
> I note that rt2x00 is completely broken since it mixes last_tsf (now
> sync_tsf) with jiffies ... what??

Thanks for coming up with this Johannes,  that looks indeed strange.

Ivo, that was introduced with your "rt2x00: Add autowake support for
USB hardware" patch as far as I can tell.

Since the last_beacon value is updated within rt2x00 already we should
be able to just remove the assignment in rt2x00lib_config_erp. Ivo, could
you please recheck?

This would also remove rt2x00's dependency on the last_tsf
field as provided by mac80211.

Thanks,
Helmut

diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c
b/drivers/net/wireless/rt2x00/rt2x00config.c
index 96db933..b2d2ad3 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -102,7 +102,6 @@ void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,

        /* Update the AID, this is needed for dynamic PS support */
        rt2x00dev->aid = bss_conf->assoc ? bss_conf->aid : 0;
-       rt2x00dev->last_beacon = bss_conf->last_tsf;

        /* Update global beacon interval time, this is needed for PS support */
        rt2x00dev->beacon_int = bss_conf->beacon_int;
--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux