Bluetooth: RFCOMM: Fix cr bit of address in MSC response

cr bit of address in MSC should be always 1 irrespective of whether it
is command or response. Command/Response would be identified by cr bit
of msg type in UIH

Change-Id: I8e8b8446fa98aa07269953cfb6e54be915d4aba7
Signed-off-by: Jaganath Kanakkassery <jaganathx.kanakkassery@intel.com>
This commit is contained in:
Jaganath Kanakkassery 2016-08-23 23:10:25 +05:30 committed by Johan Hedberg
commit febdf2dc0b

View file

@ -301,7 +301,8 @@ static int rfcomm_send_msc(struct bt_rfcomm_dlc *dlc, uint8_t cr)
}
msc = net_buf_add(buf, sizeof(*msc));
msc->dlci = BT_RFCOMM_SET_ADDR(dlc->dlci, cr);
/* cr bit should be always 1 in MSC */
msc->dlci = BT_RFCOMM_SET_ADDR(dlc->dlci, 1);
msc->v24_signal = BT_RFCOMM_DEFAULT_V24_SIG;
fcs = rfcomm_calc_fcs(BT_RFCOMM_FCS_LEN_UIH, buf->data);