Search Linux Wireless

Re: mac80211: AP mode - question about Tx buffered unicast frames drop timeout

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

 



On Wed, Nov 23, 2011 at 07:36:40PM +0100, Janusz Dziedzic wrote:
> in sta_info.c I see function we call to remove expired unicast buffered frames.
> 
> sta_info_buffer_expired()
> {
> ...
> 	timeout = (sta->listen_interval *
> 		   sta->sdata->vif.bss_conf.beacon_int *
> 		   32 / 15625) * HZ;
> 	if (timeout < STA_TX_BUFFER_EXPIRE)
> 		timeout = STA_TX_BUFFER_EXPIRE;
> ...
> }
> 
> STA_TX_BUFFER_EXPIRE is define as 10 seconds.
> Do you remember why we set this as 10 seconds in case we calculate lower value?

Too old code to remember.. That's from almost 10 years ago, I think.

> This "listen_interval" calculation seems to be correct.

I would not agree with that. It seems to result in timeout being 0 in
most cases. (unsigned int) sta->listen_interval *
sta->sdata->vif.bss_conf.beacon_int * 32 / 125 * HZ / 125 could be a
more useful order for the calculation. Or maybe use something like
min(sta->listen_interval *
sta->sdata->vif.bss_conf.beacon_int, 100000) to avoid integer overflow
in more or less theoretical cases without having to split the operation
that much..

Anyway, yes, it should be fine to make STA_TX_BUFFER_EXPIRE smaller.

-- 
Jouni Malinen                                            PGP id EFC895FA
--
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