1. 14 2月, 2009 3 次提交
    • K
      mac80211: use ps-poll when dynamic power save mode is disabled · 572e0012
      Kalle Valo 提交于
      When a directed tim bit is set, mac80211 currently disables power save
      ands sends a null frame to the AP. But if dynamic power save is
      disabled, mac80211 will not enable power save ever gain. Fix this by
      adding ps-poll functionality to mac80211. When a directed tim bit is
      set, mac80211 sends a ps-poll frame to the AP and checks for the more
      data bit in the returned data frames.
      
      Using ps-poll is slower than waking up with null frame, but it's saves more
      power in cases where the traffic is low. Userspace can control if either
      ps-poll or null wakeup method is used by enabling and disabling dynamic
      power save.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      572e0012
    • K
      mac80211: remove multicast check from check_tim() · 1fb3606b
      Kalle Valo 提交于
      Currently mac80211 checks for the multicast tim bit from beacons,
      disables power save and sends a null frame if the bit is set. This was
      added to support ath9k. But this is a bit controversial because the AP will
      send multicast frames immediately after the beacon and the time constraints
      are really high. Relying mac80211 to be fast enough here might not be
      reliable in all situations. And there's no need to send a null frame, AP
      will send the frames immediately after the dtim beacon no matter what.
      
      Also if dynamic power save is disabled (iwconfig wlan0 power timeout 0)
      currently mac80211 disables power save whenever the multicast bit is set
      but it's never enabled again after receiving the first multicast/broadcast
      frame.
      
      The current implementation is not usable on p54/stlc45xx and the
      easiest way to fix this is to remove the multicast tim bit check
      altogether. Handling multicast tim bit in host is rare, most of the
      designs do this in firmware/hardware, so it's better not to have it in
      mac80211. It's a lot better to do this in firmware/hardware, or if
      that's not possible it could be done in the driver.
      
      Also renamed the function to ieee80211_check_tim() to follow the style
      of the file.
      Signed-off-by: NKalle Valo <kalle.valo@nokia.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1fb3606b
    • V
      mac80211: Fix the wrong WARN_ON message appearing on enabling power save. · 97d97b80
      Vivek Natarajan 提交于
      This issue happens only when we are associated with a 11n AP and power save
      is enabled. In the function 'ieee80211_master_start_xmit', ps_disable_work
      is queued where wake_queues is called. But before this work is executed,
      we check if the queues are stopped in _ieee80211_tx and return TX_AGAIN to
      ieee8011_tx which leads to the warning message.
      This patch fixes this erroneous case.
      Signed-off-by: NVivek Natarajan <vnatarajan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      97d97b80
  2. 12 2月, 2009 1 次提交
  3. 10 2月, 2009 19 次提交
  4. 09 2月, 2009 4 次提交
  5. 07 2月, 2009 8 次提交
  6. 06 2月, 2009 5 次提交
    • J
      udp: Fix potential wrong ip_hdr(skb) pointers · 2783ef23
      Jesper Dangaard Brouer 提交于
      Like the UDP header fix, pskb_may_pull() can potentially
      alter the SKB buffer.  Thus the saddr and daddr, pointers
      may point to the old skb->data buffer.
      
      I haven't seen corruptions, as its only seen if the old
      skb->data buffer were reallocated by another user and
      written into very quickly (or poison'd by SLAB debugging).
      Signed-off-by: NJesper Dangaard Brouer <hawk@comx.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2783ef23
    • G
      neigh: some entries can be skipped during dumping · efc683fc
      Gautam Kachroo 提交于
      neightbl_dump_info and neigh_dump_table  can skip entries if the
      *fill*info functions return an error. This results in an incomplete
      dump ((invoked by netlink requests for RTM_GETNEIGHTBL or
      RTM_GETNEIGH)
      
      nidx and idx should not be incremented if the current entry was not
      placed in the output buffer
      Signed-off-by: NGautam Kachroo <gk@aristanetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efc683fc
    • D
      ipv6: Disallow rediculious flowlabel option sizes. · 684de409
      David S. Miller 提交于
      Just like PKTINFO, limit the options area to 64K.
      
      Based upon report by Eric Sesterhenn and analysis by
      Roland Dreier.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      684de409
    • P
      netlink: change return-value logic of netlink_broadcast() · ff491a73
      Pablo Neira Ayuso 提交于
      Currently, netlink_broadcast() reports errors to the caller if no
      messages at all were delivered:
      
      1) If, at least, one message has been delivered correctly, returns 0.
      2) Otherwise, if no messages at all were delivered due to skb_clone()
         failure, return -ENOBUFS.
      3) Otherwise, if there are no listeners, return -ESRCH.
      
      With this patch, the caller knows if the delivery of any of the
      messages to the listeners have failed:
      
      1) If it fails to deliver any message (for whatever reason), return
         -ENOBUFS.
      2) Otherwise, if all messages were delivered OK, returns 0.
      3) Otherwise, if no listeners, return -ESRCH.
      
      In the current ctnetlink code and in Netfilter in general, we can add
      reliable logging and connection tracking event delivery by dropping the
      packets whose events were not successfully delivered over Netlink. Of
      course, this option would be settable via /proc as this approach reduces
      performance (in terms of filtered connections per seconds by a stateful
      firewall) but providing reliable logging and event delivery (for
      conntrackd) in return.
      
      This patch also changes some clients of netlink_broadcast() that
      may report ENOBUFS errors via printk. This error handling is not
      of any help. Instead, the userspace daemons that are listening to
      those netlink messages should resync themselves with the kernel-side
      if they hit ENOBUFS.
      
      BTW, netlink_broadcast() clients include those that call
      cn_netlink_send(), nlmsg_multicast() and genlmsg_multicast() since they
      internally call netlink_broadcast() and return its error value.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff491a73
    • H
      gro: Fix frag_list merging on imprecisely split packets · 56035022
      Herbert Xu 提交于
      The previous fix ad0f9904 (gro:
      Fix handling of imprecisely split packets) only fixed the case
      of frags merging, frag_list merging in the same circumstances
      were still broken.
      
      In particular, the packet headers end up in the data stream.
      
      This patch fixes this plus another issue where an imprecisely
      split packet header may be read incorrectly (this is mostly
      harmless since it'll simply cause the packet to not match and
      be rejected for GRO).
      
      Thanks to Emil Tantilov and Jeff Kirsher for helping to track
      this down.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      56035022