Thread (44 messages) 44 messages, 2 authors, 2012-08-16

Re: [RFCv0 06/21] Bluetooth: Channel move request handling

From: Mat Martineau <hidden>
Date: 2012-08-06 16:33:50

On Mon, 6 Aug 2012, Andrei Emeltchenko wrote:
Hi Mat,

On Fri, Jul 27, 2012 at 09:54:03AM -0700, Mat Martineau wrote:

...
quoted
quoted
quoted
+	if (chan->chan_policy == BT_CHANNEL_POLICY_BREDR_ONLY) {
+		result = L2CAP_MR_NOT_ALLOWED;
+		goto send_move_response;
+	}
+
+	chan->move_cmd_ident = cmd->ident;
BTW: Why do we handle ident in a special way for channel move?
At the time I wrote the code, I thought that chan->ident was only
used to store idents of sent requests, not received requests.  But
it does look like it is also used for storing received idents for
use in sending responses.  chan->ident could be used as long as move
collisions are handled correctly (where a move request is received
when a move response is expected).
So can we use chan->ident instead of chan->move_cmd_ident? Is the channel
move somehow different from other L2CAP request / response sequence?
Yes, chan->ident can be used.  It doesn't seem necessary to assign 
chan->ident when sending a move request, just when receiving one.

Connect and create requests also assign chan->ident when they are 
sent, but I'm not sure why.

--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help