1. 23 12月, 2010 3 次提交
  2. 08 12月, 2010 3 次提交
  3. 02 12月, 2010 5 次提交
  4. 12 10月, 2010 3 次提交
  5. 30 9月, 2010 1 次提交
    • G
      Bluetooth: Fix deadlock in the ERTM logic · e454c844
      Gustavo F. Padovan 提交于
      The Enhanced Retransmission Mode(ERTM) is a realiable mode of operation
      of the Bluetooth L2CAP layer. Think on it like a simplified version of
      TCP.
      The problem we were facing here was a deadlock. ERTM uses a backlog
      queue to queue incomimg packets while the user is helding the lock. At
      some moment the sk_sndbuf can be exceeded and we can't alloc new skbs
      then the code sleep with the lock to wait for memory, that stalls the
      ERTM connection once we can't read the acknowledgements packets in the
      backlog queue to free memory and make the allocation of outcoming skb
      successful.
      
      This patch actually affect all users of bt_skb_send_alloc(), i.e., all
      L2CAP modes and SCO.
      
      We are safe against socket states changes or channels deletion while the
      we are sleeping wait memory. Checking for the sk->sk_err and
      sk->sk_shutdown make the code safe, since any action that can leave the
      socket or the channel in a not usable state set one of the struct
      members at least. Then we can check both of them when getting the lock
      again and return with the proper error if something unexpected happens.
      Signed-off-by: NGustavo F. Padovan <padovan@profusion.mobi>
      Signed-off-by: NUlisses Furquim <ulisses@profusion.mobi>
      e454c844
  6. 24 9月, 2010 1 次提交
  7. 10 8月, 2010 2 次提交
    • M
      Bluetooth: Use 3-DH5 payload size for default ERTM max PDU size · db12d647
      Mat Martineau 提交于
      The previous value of 672 for L2CAP_DEFAULT_MAX_PDU_SIZE is based on
      the default L2CAP MTU.  That default MTU is calculated from the size
      of two DH5 packets, minus ACL and L2CAP b-frame header overhead.
      
      ERTM is used with newer basebands that typically support larger 3-DH5
      packets, and i-frames and s-frames have more header overhead.  With
      clean RF conditions, basebands will typically attempt to use 1021-byte
      3-DH5 packets for maximum throughput.  Adjusting for 2 bytes of ACL
      headers plus 10 bytes of worst-case L2CAP headers yields 1009 bytes
      of payload.
      
      This PDU size imposes less overhead for header bytes and gives the
      baseband the option to choose 3-DH5 packets, but is small enough for
      ERTM traffic to interleave well with other L2CAP or SCO data.
      672-byte payloads do not allow the most efficient over-the-air
      packet choice, and cannot achieve maximum throughput over BR/EDR.
      Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      db12d647
    • M
      Bluetooth: Change default L2CAP ERTM retransmit timeout · fa235562
      Mat Martineau 提交于
      The L2CAP specification requires that the ERTM retransmit timeout be at
      least 2 seconds for BR/EDR connections.
      Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      fa235562
  8. 01 8月, 2010 1 次提交
  9. 28 7月, 2010 1 次提交
    • M
      Bluetooth: Defer SCO setup if mode change is pending · e73439d8
      Marcel Holtmann 提交于
      Certain headsets such as the Motorola H350 will reject SCO and eSCO
      connection requests while the ACL is transitioning from sniff mode
      to active mode. Add synchronization so that SCO and eSCO connection
      requests will wait until the ACL has fully transitioned to active mode.
      
      < HCI Command: Exit Sniff Mode (0x02|0x0004) plen 2
          handle 12
      > HCI Event: Command Status (0x0f) plen 4
          Exit Sniff Mode (0x02|0x0004) status 0x00 ncmd 1
      < HCI Command:  Setup Synchronous Connection (0x01|0x0028) plen 17
          handle 12 voice setting 0x0040
      > HCI Event: Command Status (0x0f) plen 4
          Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
      > HCI Event: Number of Completed Packets (0x13) plen 5
          handle 12 packets 1
      > HCI Event: Mode Change (0x14) plen 6
          status 0x00 handle 12 mode 0x00 interval 0
          Mode: Active
      > HCI Event: Synchronous Connect Complete (0x2c) plen 17
          status 0x10 handle 14 bdaddr 00:1A:0E:50:28:A4 type SCO
          Error: Connection Accept Timeout Exceeded
      Signed-off-by: NRon Shaffer <rshaffer@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e73439d8
  10. 22 7月, 2010 11 次提交
  11. 10 5月, 2010 9 次提交