Re: [PATCH 4.19 044/321] mac80211: fix station inactive_time shortly after boot

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

 



On Wed, 2019-12-04 at 11:56 +0000, Pavel Machek wrote:
 
> > -	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;
> >  	return sta->status_stats.last_ack;
> >  }
> 
> I mean, jiffies do wrapraound periodically, so eventually we'll have
> sta->status_stats.last_ack == 0 even through it is not short after
> boot, no?

Yeah. I contemplated that when I applied the original patch - it's a bit
complicated otherwise, you have to track "is this valid" etc.

Since this is updated on pretty much every frame, it's highly unlikely
you'll go without the value for long, so I figured this was good enough.

johannes




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux