Search Linux Wireless

Re: [RFC v2 1/2] mac80211: Fix a race on enabling power save.

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

 



Vivek Natarajan wrote:
> On Tue, Feb 15, 2011 at 12:46 PM, Sujith <m.sujith@xxxxxxxxx> wrote:
> > Vivek Natarajan wrote:
> >>  void ieee80211_dynamic_ps_timer(unsigned long data)
> >> diff --git a/net/mac80211/status.c b/net/mac80211/status.c
> >> index 010a559..51caa0d 100644
> >> --- a/net/mac80211/status.c
> >> +++ b/net/mac80211/status.c
> >> @@ -315,7 +315,10 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
> >>           (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
> >>           !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
> >>           local->ps_sdata && !(local->scanning)) {
> >> -             if (info->flags & IEEE80211_TX_STAT_ACK) {
> >> +             if ((info->flags & IEEE80211_TX_STAT_ACK) &&
> >> +                (local->ps_sdata->u.mgd.flags & IEEE80211_STA_PS_PENDING)) {
> >> +                     ieee80211_stop_queues_by_reason(&local->hw,
> >> +                                                     IEEE80211_QUEUE_STOP_REASON_PS);
> >
> > I am not too familiar with the PS code, but why are the queues being stopped
> > after the nullfunc frame has been sent out and acked ? And it is a bit unclear why
> > the new flag IEEE80211_STA_PS_PENDING is required at all... Can't IEEE80211_STA_NULLFUNC_ACKED
> > be used to fix this race ?
> 
> The new flag is required to prevent mac80211 to go into power save if
> a frame is sent during the interval of sending nullfunc frame and
> receiving ack for that. The queues are stopped to avoid sending any
> frame between the interval of receiving ack and setting CONF_PS and it
> mainly addresses the race that Johannes pointed out in the previous
> version.

Well ok, I still don't grok the details, though. :)

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