1. 08 Feb, 2011 3 commits
    • Andrei Emeltchenko's avatar
      Bluetooth: Use non-flushable by default L2CAP data packets · e702112f
      Andrei Emeltchenko authored
      Modification of Nick Pelly <npelly@google.com> patch.
      
      With Bluetooth 2.1 ACL packets can be flushable or non-flushable. This commit
      makes ACL data packets non-flushable by default on compatible chipsets, and
      adds the BT_FLUSHABLE socket option to explicitly request flushable ACL
      data packets for a given L2CAP socket. This is useful for A2DP data which can
      be safely discarded if it can not be delivered within a short time (while
      other ACL data should not be discarded).
      
      Note that making ACL data flushable has no effect unless the automatic flush
      timeout for that ACL link is changed from its default of 0 (infinite).
      
      Default packet types (for compatible chipsets):
      Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits)
      Bluetooth HCI H4
      Bluetooth HCI ACL Packet
          .... 0000 0000 0010 = Connection Handle: 0x0002
          ..00 .... .... .... = PB Flag: First Non-automatically Flushable Packet (0)
          00.. .... .... .... = BC Flag: Point-To-Point (0)
          Data Total Length: 8
      Bluetooth L2CAP Packet
      
      After setting BT_FLUSHABLE
      (sock.setsockopt(274 /*SOL_BLUETOOTH*/, 8 /* BT_FLUSHABLE */, 1 /* flush */))
      Frame 34: 13 bytes on wire (104 bits), 13 bytes captured (104 bits)
      Bluetooth HCI H4
      Bluetooth HCI ACL Packet
          .... 0000 0000 0010 = Connection Handle: 0x0002
          ..10 .... .... .... = PB Flag: First Automatically Flushable Packet (2)
          00.. .... .... .... = BC Flag: Point-To-Point (0)
          Data Total Length: 8
      Bluetooth L2CAP Packet
      Signed-off-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@nokia.com>
      Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
      e702112f
    • Jesper Juhl's avatar
      Bluetooth: Fix failure to release lock in read_index_list() · b2c60d42
      Jesper Juhl authored
      If alloc_skb() fails in read_index_list() we'll return -ENOMEM without
      releasing 'hci_dev_list_lock'.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
      b2c60d42
    • Gustavo F. Padovan's avatar
      Merge branch 'master' of... · 80f5585a
      Gustavo F. Padovan authored
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6 into wireless
      80f5585a
  2. 07 Feb, 2011 6 commits
  3. 06 Feb, 2011 2 commits
  4. 04 Feb, 2011 27 commits
  5. 03 Feb, 2011 2 commits
    • Jouni Malinen's avatar
      mac80211: Add testing functionality for TKIP · 681d1190
      Jouni Malinen authored
      TKIP countermeasures depend on devices being able to detect Michael
      MIC failures on received frames and for stations to report errors to
      the AP. In order to test that behavior, it is useful to be able to
      send out TKIP frames with incorrect Michael MIC. This testing behavior
      has minimal effect on the TX path, so it can be added to mac80211 for
      convenient use.
      
      The interface for using this functionality is a file in mac80211
      netdev debugfs (tkip_mic_test). Writing a MAC address to the file
      makes mac80211 generate a dummy data frame that will be sent out using
      invalid Michael MIC value. In AP mode, the address needs to be for one
      of the associated stations or ff:ff:ff:ff:ff:ff to use a broadcast
      frame. In station mode, the address can be anything, e.g., the current
      BSSID. It should be noted that this functionality works correctly only
      when associated and using TKIP.
      Signed-off-by: default avatarJouni Malinen <jouni.malinen@atheros.com>
      Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      681d1190
    • Jouni Malinen's avatar
      mac80211: Remove obsolete TKIP flexibility · 747d753d
      Jouni Malinen authored
      The TKIP implementation was originally prepared to be a bit more
      flexible in the way Michael MIC TX/RX keys are configured. However, we
      are now taking care of the TX/RX MIC key swapping in user space, so
      this code will not be needed. Similarly, there were some remaining WPA
      testing code that won't be used in their current form. Remove the
      unneeded extra complexity.
      Signed-off-by: default avatarJouni Malinen <jouni.malinen@atheros.com>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      747d753d