1. 20 2月, 2014 9 次提交
  2. 19 2月, 2014 18 次提交
  3. 18 2月, 2014 10 次提交
  4. 17 2月, 2014 2 次提交
  5. 15 2月, 2014 1 次提交
    • P
      Bluetooth: Fix write_room() calculation · 8981be9b
      Peter Hurley 提交于
      The skb truesize of a 12-byte payload with a 10-byte head/tail
      reserve is 768 bytes. Consequently, even with 40 tx_credits, at
      most 6 packets could be queued at any one time:
      
        40 tx_credits * 127-byte mtu < 768-byte truesize * 7
      
      This error could also cause the tx queue to apparently stall if
      credit flow control is disabled (where tx_credits is fixed at 5),
      or if the receiver only granted a limited number of tx credits
      (eg., less than 7).
      
      Instead, track the outstanding number of queued packets not yet sent
      in wmem_alloc and allow for a maximum of 40 queued packets. Report
      the space avail for a single write() as the mtu * number of packets
      left before reaching the maximum.
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Tested-By: NAlexander Holler <holler@ahsoftware.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      8981be9b