On Thu, Sep 22, 2011 at 8:47 AM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > void sta_info_recalc_tim(struct sta_info *sta) > { > struct ieee80211_local *local = sta->local; > struct ieee80211_if_ap *bss = sta->sdata->bss; > unsigned long flags; > - bool have_data; > + bool indicate_tim = false; > + u8 ignore_for_tim = sta->sta.uapsd_queues; > + int ac; > > /* No need to do anything if the driver does all */ > if (local->hw.flags & IEEE80211_HW_AP_LINK_PS) > return; > > - have_data = test_sta_flags(sta, WLAN_STA_PS_DRIVER_BUF) || > - !skb_queue_empty(&sta->tx_filtered) || > - !skb_queue_empty(&sta->ps_tx_buf); > + /* > + * If all ACs are delivery-enabled then we should build > + * the TIM bit for all ACs anyway; if only some are then > + * we ignore those and build the TIM bit using only the > + * non-enabled ones. > + */ As per the documentation uapsd_queues is the "bitmap of queues configured for uapsd". As I read this we are ignoring setting the TIM for the STA if an AC queue was marked as uapsd-enabled but had buffered frames for it, so we'd only set the TIM if we had at least one AC queue that did not have uapsd enabled and had buffered frames pending. Is that accurate? Luis -- 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