1. 09 9月, 2014 3 次提交
    • J
      Bluetooth: Fix hci_conn reference counting for fixed channels · c16900cf
      Johan Hedberg 提交于
      Now that SMP has been converted to use fixed channels we've got a bit of
      a problem with the hci_conn reference counting. So far the L2CAP code
      has kept a reference for each L2CAP channel that was notified of the
      connection. With SMP however this would mean that the connection is
      never dropped even though there are no other users of it. Furthermore,
      SMP already does its own hci_conn reference counting internally,
      starting from a security or pairing request and ending with the key
      distribution.
      
      This patch makes L2CAP fixed channels default to the L2CAP core not
      keeping a hci_conn reference for them. A new FLAG_HOLD_HCI_CONN flag is
      added so that L2CAP users can declare an exception to this rule and hold
      a reference even for their fixed channels. One such exception is the
      L2CAP socket layer which does want a reference for each socket (e.g. an
      ATT socket which uses a fixed channel).
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      c16900cf
    • J
      Bluetooth: Remove unnecessary l2cap_chan_unlock before l2cap_chan_add · b3ed6c63
      Johan Hedberg 提交于
      The l2cap_chan_add() function doesn't require the channel to be
      unlocked. It only requires the l2cap_conn to be unlocked. Therefore,
      it's unnecessary to unlock a channel before calling l2cap_chan_add().
      This patch removes such unnecessary unlocking from the
      l2cap_chan_connect() function.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b3ed6c63
    • J
      Bluetooth: Fix incorrect LE CoC PDU length restriction based on HCI MTU · 72c6fb91
      Johan Hedberg 提交于
      The l2cap_create_le_flowctl_pdu() function that l2cap_segment_le_sdu()
      calls is perfectly capable of doing packet fragmentation if given bigger
      PDUs than the HCI buffers allow. Forcing the PDU length based on the HCI
      MTU (conn->mtu) would therefore needlessly strict operation on hardware
      with limited LE buffers (e.g. both Intel and Broadcom seem to have this
      set to just 27 bytes).
      
      This patch removes the restriction and makes it possible to send PDUs of
      the full length that the remote MPS value allows.
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org
      72c6fb91
  2. 08 9月, 2014 1 次提交
  3. 05 9月, 2014 6 次提交
  4. 04 9月, 2014 30 次提交