1. 22 10月, 2013 1 次提交
  2. 16 10月, 2013 5 次提交
  3. 14 10月, 2013 3 次提交
  4. 13 10月, 2013 3 次提交
  5. 12 10月, 2013 2 次提交
  6. 02 10月, 2013 1 次提交
  7. 23 6月, 2013 1 次提交
  8. 17 4月, 2013 2 次提交
    • D
      Bluetooth: l2cap: add l2cap_user sub-modules · 2c8e1411
      David Herrmann 提交于
      Several sub-modules like HIDP, rfcomm, ... need to track l2cap
      connections. The l2cap_conn->hcon->dev object is used as parent for sysfs
      devices so the sub-modules need to be notified when the hci_conn object is
      removed from sysfs.
      
      As submodules normally use the l2cap layer, the l2cap_user objects are
      registered there instead of on the underlying hci_conn object. This avoids
      any direct dependency on the HCI layer and lets the l2cap core handle any
      specifics.
      
      This patch introduces l2cap_user objects which contain a "probe" and
      "remove" callback. You can register them on any l2cap_conn object and if
      it is active, the "probe" callback will get called. Otherwise, an error is
      returned.
      
      The l2cap_conn object will call your "remove" callback directly before it
      is removed from user-space. This allows you to remove your submodules
      _before_ the parent l2cap_conn and hci_conn object is removed.
      
      At any time you can asynchronously unregister your l2cap_user object if
      your submodule vanishes before the l2cap_conn object does.
      
      There is no way around l2cap_user. If we want wire-protocols in the
      kernel, we always want the hci_conn object as parent in the sysfs tree. We
      cannot use a channel here since we might need multiple channels for a
      single protocol.
      But the problem is, we _must_ get notified when an l2cap_conn object is
      removed. We cannot use reference-counting for object-removal! This is not
      how it works. If a hardware is removed, we should immediately remove the
      object from sysfs. Any other behavior would be inconsistent with the rest
      of the system. Also note that device_del() might sleep, but it doesn't
      wait for user-space or block very long. It only _unlinks_ the object from
      sysfs and the whole device-tree. Everything else is handled by ref-counts!
      This is exactly what the other sub-modules must do: unlink their devices
      when the "remove" l2cap_user callback is called. They should not do any
      cleanup or synchronous shutdowns.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      2c8e1411
    • D
      Bluetooth: l2cap: introduce l2cap_conn ref-counting · 9c903e37
      David Herrmann 提交于
      If we want to use l2cap_conn outside of l2cap_core.c, we need refcounting
      for these objects. Otherwise, we cannot synchronize l2cap locks with
      outside locks and end up with deadlocks.
      
      Hence, introduce ref-counting for l2cap_conn objects. This doesn't affect
      l2cap internals at all, as they use a direct synchronization.
      We also keep a reference to the parent hci_conn for locking purposes as
      l2cap_conn depends on this. This doesn't affect the connection itself but
      only the lifetime of the (dead) object.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      9c903e37
  9. 06 4月, 2013 1 次提交
  10. 10 1月, 2013 1 次提交
  11. 04 12月, 2012 1 次提交
  12. 20 11月, 2012 1 次提交
  13. 02 11月, 2012 3 次提交
  14. 24 10月, 2012 3 次提交
  15. 15 10月, 2012 1 次提交
  16. 08 10月, 2012 2 次提交
  17. 28 9月, 2012 3 次提交
  18. 22 8月, 2012 1 次提交
  19. 07 8月, 2012 2 次提交
  20. 15 7月, 2012 1 次提交
    • M
      Bluetooth: Use tx window from config response for ack timing · c20f8e35
      Mat Martineau 提交于
      This change addresses an L2CAP ERTM throughput problem when a remote
      device does not fully utilize the available transmit window.
      
      The L2CAP ERTM transmit window size determines the maximum number of
      unacked frames that may be outstanding at any time. It is configured
      separately for each direction of an ERTM connection. Each side sends a
      configuration request with a tx_win field indicating how many unacked
      frames it is capable of receiving before sending an ack. The
      configuration response's tx_win field shows how many frames the
      transmitter will actually send before waiting for an ack.
      
      It's important to trace both the actual transmit window (to check for
      validity of incoming frames) and the number of frames that the
      transmitter will send before waiting (to send acks at the appropriate
      time). Now there are separate tx_win and ack_win values. ack_win is
      updated based on configuration responses, and is used to determine
      when acks are sent.
      Signed-off-by: NMat Martineau <mathewm@codeaurora.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      c20f8e35
  21. 11 7月, 2012 1 次提交
  22. 05 6月, 2012 1 次提交