1. 20 8月, 2009 1 次提交
    • J
      mac80211: allow configure_filter callback to sleep · 3ac64bee
      Johannes Berg 提交于
      Over time, a whole bunch of drivers have come up
      with their own scheme to delay the configure_filter
      operation to a workqueue. To be able to simplify
      things, allow configure_filter to sleep, and add
      a new prepare_multicast callback that drivers that
      need the multicast address list implement. This new
      callback must be atomic, but most drivers either
      don't care or just calculate a hash which can be
      done atomically and then uploaded to the hardware
      non-atomically.
      
      A cursory look suggests that at76c50x-usb, ar9170,
      mwl8k (which is actually very broken now), rt2x00,
      wl1251, wl1271 and zd1211 should make use of this
      new capability.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3ac64bee
  2. 14 8月, 2009 1 次提交
  3. 05 8月, 2009 1 次提交
    • L
      mac80211: redefine usage of the mac80211 workqueue · 42935eca
      Luis R. Rodriguez 提交于
      The mac80211 workqueue exists to enable mac80211 and drivers
      to queue their own work on a single threaded workqueue. mac80211
      takes care to flush the workqueue during suspend but we never
      really had requirements on drivers for how they should use
      the workqueue in consideration for suspend.
      
      We extend mac80211 to document how the mac80211 workqueue should
      be used, how it should not be used and finally move raw access to
      the workqueue to mac80211 only. Drivers and mac80211 use helpers
      to queue work onto the mac80211 workqueue:
      
        * ieee80211_queue_work()
        * ieee80211_queue_delayed_work()
      
      These helpers will now warn if mac80211 already completed its
      suspend cycle and someone is trying to queue work. mac80211
      flushes the mac80211 workqueue prior to suspend a few times,
      but we haven't taken the care to ensure drivers won't add more
      work after suspend. To help with this we add a warning when
      someone tries to add work and mac80211 already completed the
      suspend cycle.
      
      Drivers should ensure they cancel any work or delayed work
      in the mac80211 stop() callback.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      42935eca
  4. 04 8月, 2009 1 次提交
  5. 25 7月, 2009 1 次提交
  6. 11 7月, 2009 2 次提交
  7. 09 7月, 2009 2 次提交
  8. 19 6月, 2009 1 次提交
  9. 21 5月, 2009 1 次提交
  10. 07 5月, 2009 1 次提交
  11. 17 3月, 2009 1 次提交
  12. 06 3月, 2009 1 次提交
  13. 28 2月, 2009 1 次提交
  14. 14 2月, 2009 3 次提交
  15. 12 2月, 2009 2 次提交
  16. 10 2月, 2009 1 次提交
  17. 23 1月, 2009 1 次提交
  18. 09 1月, 2009 1 次提交
  19. 30 12月, 2008 1 次提交
    • J
      drivers/net/usb: use USB API functions rather than constants · f201a8a4
      Julia Lawall 提交于
      This set of patches introduces calls to the following set of functions:
      
      usb_endpoint_dir_in(epd)
      usb_endpoint_dir_out(epd)
      usb_endpoint_is_bulk_in(epd)
      usb_endpoint_is_bulk_out(epd)
      usb_endpoint_is_int_in(epd)
      usb_endpoint_is_int_out(epd)
      usb_endpoint_num(epd)
      usb_endpoint_type(epd)
      usb_endpoint_xfer_bulk(epd)
      usb_endpoint_xfer_control(epd)
      usb_endpoint_xfer_int(epd)
      usb_endpoint_xfer_isoc(epd)
      
      In some cases, introducing one of these functions is not possible, and it
      just replaces an explicit integer value by one of the following constants:
      
      USB_ENDPOINT_XFER_BULK
      USB_ENDPOINT_XFER_CONTROL
      USB_ENDPOINT_XFER_INT
      USB_ENDPOINT_XFER_ISOC
      
      In drivers/net/wireless/zd1211rw/zd_usb.c the code:
      
      (endpoint->bEndpointAddress & USB_TYPE_MASK) == USB_DIR_OUT
      
      is suspicious.  If it is intended to use USB_ENDPOINT_DIR_MASK rather than
      USB_TYPE_MASK, then the whole conditional test could be converted to a call
      to usb_endpoint_is_bulk_in.
      
      An extract of the semantic patch that makes these changes is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r1@ struct usb_endpoint_descriptor *epd; @@
      
      - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) ==
      - \(USB_ENDPOINT_XFER_CONTROL\|0\))
      + usb_endpoint_xfer_control(epd)
      
      @r5@ struct usb_endpoint_descriptor *epd; @@
      
      - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) ==
      -  \(USB_DIR_IN\|0x80\))
      + usb_endpoint_dir_in(epd)
      
      @inc@
      @@
      
      #include <linux/usb.h>
      
      @depends on !inc && (r1||r5)@
      @@
      
      + #include <linux/usb.h>
        #include <linux/usb/...>
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f201a8a4
  20. 05 12月, 2008 1 次提交
    • S
      zd1211rw: use unaligned safe memcmp() in-place of compare_ether_addr() · cde6901b
      Shaddy Baddah 提交于
      Under my 2.6.28-rc6 sparc64, when associating to an AP through my
      zd1211rw device, I was seeing kernel log messages like (not exact output):
      
        Kernel unaligned access at TPC[10129b68] zd_mac_rx+0x144/0x32c [zd1211rw]
      
      For the zd1211rw module, on RX, the 80211 packet will be located after
      the PLCP header in the skb data buffer. The PLCP header being 5 bytes
      long, the 80211 header will start unaligned from an aligned skb
      buffer.
      
      As per Documentation/unaligned-memory-access.txt, we must replace the
      not unaligned() safe compare_ether_addr() with memcmp() to protect
      architectures that require alignment.
      Signed-off-by: NShaddy Baddah <shaddy_baddah@hotmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cde6901b
  21. 07 11月, 2008 1 次提交
  22. 01 11月, 2008 3 次提交
  23. 28 10月, 2008 1 次提交
  24. 23 9月, 2008 2 次提交
  25. 16 9月, 2008 2 次提交
  26. 06 9月, 2008 1 次提交
  27. 30 7月, 2008 1 次提交
  28. 15 7月, 2008 1 次提交
    • J
      mac80211: revamp beacon configuration · 9d139c81
      Johannes Berg 提交于
      This patch changes mac80211's beacon configuration handling
      to never pass skbs to the driver directly but rather always
      require the driver to use ieee80211_beacon_get(). Additionally,
      it introduces "change flags" on the config_interface() call
      to enable drivers to figure out what is changing. Finally, it
      removes the beacon_update() driver callback in favour of
      having IBSS beacon delivered by ieee80211_beacon_get() as well.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9d139c81
  29. 10 7月, 2008 1 次提交
  30. 09 7月, 2008 1 次提交
  31. 08 7月, 2008 1 次提交