1. 08 2月, 2011 1 次提交
    • A
      Bluetooth: Use non-flushable by default L2CAP data packets · e702112f
      Andrei Emeltchenko 提交于
      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: NAndrei Emeltchenko <andrei.emeltchenko@nokia.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      e702112f
  2. 02 2月, 2011 1 次提交
    • B
      Bluetooth: Set conn state to BT_DISCONN to avoid multiple responses · e733fb62
      Bao Liang 提交于
      This patch fixes a minor issue that two connection responses will be sent
      for one L2CAP connection request. If the L2CAP connection request is first
      blocked due to security reason and responded with reason "security block",
      the state of the connection remains BT_CONNECT2. If a pairing procedure
      completes successfully before the ACL connection is down, local host will
      send another connection complete response. See the following packets
      captured by hcidump.
      
      2010-12-07 22:21:24.928096 < ACL data: handle 12 flags 0x00 dlen 16
          0000: 0c 00 01 00 03 19 08 00  41 00 53 00 03 00 00 00  ........A.S.....
      ... ...
      
      2010-12-07 22:21:35.791747 > HCI Event: Auth Complete (0x06) plen 3
          status 0x00 handle 12
      ... ...
      
      2010-12-07 22:21:35.872372 > ACL data: handle 12 flags 0x02 dlen 16
          L2CAP(s): Connect rsp: dcid 0x0054 scid 0x0040 result 0 status 0
            Connection successful
      Signed-off-by: NLiang Bao <tim.bao@gmail.com>
      Acked-by: NVille Tervo <ville.tervo@nokia.com>
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      e733fb62
  3. 20 1月, 2011 3 次提交
  4. 07 12月, 2010 1 次提交
  5. 02 12月, 2010 5 次提交
  6. 09 11月, 2010 2 次提交
  7. 18 10月, 2010 1 次提交
  8. 12 10月, 2010 6 次提交
  9. 05 10月, 2010 1 次提交
  10. 30 9月, 2010 4 次提交
  11. 10 8月, 2010 2 次提交
    • M
      Bluetooth: Fix incorrect setting of remote_tx_win for L2CAP ERTM · cff70fae
      Mat Martineau 提交于
      remote_tx_win is intended to be set on receipt of an L2CAP
      configuration request.  The value is used to determine the size of the
      transmit window on the remote side of an ERTM connection, so L2CAP
      can stop sending frames when that remote window is full.
      
      An incorrect remote_tx_win value will cause the stack to not fully
      utilize the tx window (performance impact), or to overfill the remote
      tx window (causing dropped frames or a disconnect).
      
      This patch removes an extra setting of remote_tx_win when a
      configuration response is received.  The transmit window has a
      different meaning in a response - it is an informational value
      less than or equal to the local tx_win.
      Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      cff70fae
    • M
      Bluetooth: Fix endianness issue with L2CAP MPS configuration · 86b1b263
      Mat Martineau 提交于
      Incoming configuration values must be converted to native CPU order
      before use.  This fixes a bug where a little-endian MPS value is
      compared to a native CPU value.  On big-endian processors, this
      can cause ERTM and streaming mode segmentation to produce PDUs
      that are larger than the remote stack is expecting, or that would
      produce fragmented skbs that the current FCS code cannot handle.
      Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      86b1b263
  12. 04 8月, 2010 2 次提交
  13. 22 7月, 2010 11 次提交