Hi,

>  nl80211.h |  4 ++++

Please don't include nl80211.h changes, I'll update that as needed.

> +     if (bss[NL80211_BSS_BEACON_TSF]) {
> +             unsigned long long tsf;
> +             tsf = (unsigned long
> long)nla_get_u64(bss[NL80211_BSS_BEACON_TSF]);
> +             printf("\tBeacon TSF: %llu usec (%llud,
> %.2lld:%.2llu:%.2llu)\n",
> +                     tsf, tsf/1000/1000/60/60/24,
> (tsf/1000/1000/60/60) % 24,
> +                     (tsf/1000/1000/60) % 60, (tsf/1000/1000) %
> 60);
> +     }

This seems fine, but we already print the BSS_TSF - is it really
needed? Anyway, I think it's OK, just not sure there's much point.

> +     if (bss[NL80211_BSS_LAST_SEEN_BOOTTIME]) {
> +             unsigned long long last_seen_since_boot;
> +             last_seen_since_boot =
> +                     (unsigned long
> long)nla_get_u64(bss[NL80211_BSS_LAST_SEEN_BOOTTIME]);
> +             printf("\tlast seen since boot time: %llu usec
> (%llud, %.2lld:%.2llu:%.2llu)\n",
> +                     last_seen_since_boot, last_seen_since_boot
> /1000/1000/1000/60/60/24,
> +                     (last_seen_since_boot /1000/1000/1000/60/60)
> % 24,
> +                     (last_seen_since_boot/1000/1000/1000/60) %
> 60,
> +                     (last_seen_since_boot/1000/1000/1000) % 60);
> +     }

This is wrong - the value isn't "last seen since boot", it's "last seen
*at* boottime X" - but "boottime" maybe some kind of strange concept,
so I don't think printing this to a user makes a lot of sense at all?

johannes

Reply via email to