Search Linux Wireless

Re: [PATCH v2] mac80211: fix insane values that sometimes appear in inactive_time

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

 



On Thu, 2019-10-31 at 06:12 -0600, Ahmed Zaki wrote:
> In the first 5 minutes after boot (time of INITIAL_JIFFIES),
> ieee80211_sta_last_active() returns zero if last_ack is zero. This
> leads to "inactive time" showing jiffies_to_msecs(jiffies).
> 
>  # iw wlan0 station get fc:ec:da:64:a6:dd
>  Station fc:ec:da:64:a6:dd (on wlan0)
> 	inactive time:	4294894049 ms
> 	.
> 	.
> 	connected time:	70 seconds
> 
> Fix by returning last_rx if last_ack == 0.
> 
> Signed-off-by: Ahmed Zaki <anzaki@xxxxxxxxx>

Thanks for the updates :)
 
> -	if (time_after(stats->last_rx, sta->status_stats.last_ack))
> +	if (!sta->status_stats.last_ack ||
> +		time_after(stats->last_rx, sta->status_stats.last_ack))
>  		return stats->last_rx;

The indentation is still wrong :)

I guess I could fix that too.

johannes




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux