Search Linux Wireless

Re: [RFC PATCH] mac80211: Prevent running sta_cleanup timer unnecessarily

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

 



On Mon, 2010-04-19 at 07:56 +0300, Juuso Oikarinen wrote:

> > > --- a/net/mac80211/tx.c
> > > +++ b/net/mac80211/tx.c
> > > @@ -429,6 +429,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
> > >  	struct sta_info *sta = tx->sta;
> > >  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
> > >  	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
> > > +	struct ieee80211_local *local = tx->local;
> > >  	u32 staflags;
> > >  
> > >  	if (unlikely(!sta ||
> > > @@ -476,6 +477,12 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
> > >  		info->control.vif = &tx->sdata->vif;
> > >  		info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
> > >  		skb_queue_tail(&sta->ps_tx_buf, tx->skb);
> > > +
> > > +		if (!timer_pending(&local->sta_cleanup))
> > > +			mod_timer(&local->sta_cleanup,
> > > +				  round_jiffies(jiffies +
> > > +						STA_INFO_CLEANUP_INTERVAL));
> > > +
> > 
> > Why bother to check !timer_pending?
> > 
> 
> Otherwise, if we have some periodic TX going on with an interval less
> than STA_INFO_CLEANUP_INTERVAL, the sta_cleanup could be delayed
> considerably.

Ok, makes sense, I didn't check the context there.

johannes

--
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