Hi all,
 
Is any bug in following code of ieee80211_input.c? I think the red line should be while (_IF_QLEN(&ni->ni_savedq) != 0) , right?
 
 /*
  * Check for ps-poll state change for the station.
  * XXX is there a response when pspoll is not supported?
  */
 if (ic->ic_opmode == IEEE80211_M_HOSTAP &&
     ic->ic_set_tim != NULL &&
     ((wh->i_fc[1] & IEEE80211_FC1_PWR_MGT) ^
     (ni->ni_flags & IEEE80211_NODE_PWR_MGT))) {
  /* XXX statistics? */
  IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER,
   ("[%s] power save mode %s\n",
   ether_sprintf(wh->i_addr2),
   (wh->i_fc[1] & IEEE80211_FC1_PWR_MGT ? "on" : "off")));
  if ((wh->i_fc[1] & IEEE80211_FC1_PWR_MGT) == 0) {
   /* turn off power save mode, dequeue stored packets */
   ni->ni_flags &= ~IEEE80211_NODE_PWR_MGT;
   (*ic->ic_set_tim)(ic, ni->ni_associd, 0);
   while (!_IF_QLEN(&ni->ni_savedq) != 0) {
    struct sk_buff *skb0;
    IF_DEQUEUE(&ni->ni_savedq, skb0);
    /* XXX need different driver interface */
    (*dev->hard_start_xmit)(skb0, dev);/* XXX??? */
   }
  } else {
   /* turn on power save mode */
   ni->ni_flags |= IEEE80211_NODE_PWR_MGT;
  }
 }

--
Regards,
Wang.