linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v3 2/6] Bluetooth: l2cap: Set more channel defaults
Date: Wed, 28 May 2014 14:43:04 +0300	[thread overview]
Message-ID: <1401277388-4611-3-git-send-email-jukka.rissanen@linux.intel.com> (raw)
In-Reply-To: <1401277388-4611-1-git-send-email-jukka.rissanen@linux.intel.com>

Default values for various channel settings were missing. This
way channel users do not need to set default values themselves.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
 net/bluetooth/l2cap_core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index bb41d9b..d080581 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -471,8 +471,14 @@ void l2cap_chan_set_defaults(struct l2cap_chan *chan)
 	chan->max_tx = L2CAP_DEFAULT_MAX_TX;
 	chan->tx_win = L2CAP_DEFAULT_TX_WINDOW;
 	chan->tx_win_max = L2CAP_DEFAULT_TX_WINDOW;
+	chan->remote_max_tx = chan->max_tx;
+	chan->remote_tx_win = chan->tx_win;
 	chan->ack_win = L2CAP_DEFAULT_TX_WINDOW;
 	chan->sec_level = BT_SECURITY_LOW;
+	chan->flush_to = L2CAP_DEFAULT_FLUSH_TO;
+	chan->retrans_timeout = L2CAP_DEFAULT_RETRANS_TO;
+	chan->monitor_timeout = L2CAP_DEFAULT_MONITOR_TO;
+	chan->conf_state = 0;
 
 	set_bit(FLAG_FORCE_ACTIVE, &chan->flags);
 }
-- 
1.8.3.1


  parent reply	other threads:[~2014-05-28 11:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 11:43 [PATCH v3 0/6] Bluetooth LE 6LoWPAN using CoC Jukka Rissanen
2014-05-28 11:43 ` [PATCH v3 1/6] Bluetooth: Refactor l2cap_sock_sendmsg() to copy user buffer Jukka Rissanen
2014-05-31  4:37   ` Marcel Holtmann
2014-05-28 11:43 ` Jukka Rissanen [this message]
2014-05-31  4:39   ` [PATCH v3 2/6] Bluetooth: l2cap: Set more channel defaults Marcel Holtmann
2014-05-28 11:43 ` [PATCH v3 3/6] Bluetooth: 6LoWPAN: Use connected oriented channel instead of fixed one Jukka Rissanen
2014-05-28 11:43 ` [PATCH v3 4/6] Bluetooth: 6LoWPAN: Create a kernel module Jukka Rissanen
2014-05-28 11:43 ` [PATCH v3 5/6] Bluetooth: 6LoWPAN: Count module usage Jukka Rissanen
2014-05-30  8:11   ` Jukka Rissanen
2014-05-28 11:43 ` [PATCH v3 6/6] Bluetooth: 6LoWPAN: Remove network devices when unloading Jukka Rissanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401277388-4611-3-git-send-email-jukka.rissanen@linux.intel.com \
    --to=jukka.rissanen@linux.intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).