提交 f2592d3e 编写于 作者: A Andrei Emeltchenko 提交者: Gustavo Padovan

Bluetooth: trivial: Change NO_FCS_RECV to RECV_NO_FCS

Make code more readable by changing CONF_NO_FCS_RECV which is read
as "No L2CAP FCS option received" to CONF_RECV_NO_FCS which means
"Received L2CAP option NO_FCS". This flag really means that we have
received L2CAP FRAME CHECK SEQUENCE (FCS) OPTION with value "No FCS".
Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
上级 cbabee78
...@@ -611,7 +611,7 @@ enum { ...@@ -611,7 +611,7 @@ enum {
CONF_MTU_DONE, CONF_MTU_DONE,
CONF_MODE_DONE, CONF_MODE_DONE,
CONF_CONNECT_PEND, CONF_CONNECT_PEND,
CONF_NO_FCS_RECV, CONF_RECV_NO_FCS,
CONF_STATE2_DEVICE, CONF_STATE2_DEVICE,
CONF_EWS_RECV, CONF_EWS_RECV,
CONF_LOC_CONF_PEND, CONF_LOC_CONF_PEND,
......
...@@ -3112,7 +3112,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) ...@@ -3112,7 +3112,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data)
if (chan->conn->feat_mask & L2CAP_FEAT_FCS) if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
if (chan->fcs == L2CAP_FCS_NONE || if (chan->fcs == L2CAP_FCS_NONE ||
test_bit(CONF_NO_FCS_RECV, &chan->conf_state)) { test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
chan->fcs = L2CAP_FCS_NONE; chan->fcs = L2CAP_FCS_NONE;
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1, l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1,
chan->fcs); chan->fcs);
...@@ -3140,7 +3140,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data) ...@@ -3140,7 +3140,7 @@ static int l2cap_build_conf_req(struct l2cap_chan *chan, void *data)
if (chan->conn->feat_mask & L2CAP_FEAT_FCS) if (chan->conn->feat_mask & L2CAP_FEAT_FCS)
if (chan->fcs == L2CAP_FCS_NONE || if (chan->fcs == L2CAP_FCS_NONE ||
test_bit(CONF_NO_FCS_RECV, &chan->conf_state)) { test_bit(CONF_RECV_NO_FCS, &chan->conf_state)) {
chan->fcs = L2CAP_FCS_NONE; chan->fcs = L2CAP_FCS_NONE;
l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1, l2cap_add_conf_opt(&ptr, L2CAP_CONF_FCS, 1,
chan->fcs); chan->fcs);
...@@ -3196,7 +3196,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data) ...@@ -3196,7 +3196,7 @@ static int l2cap_parse_conf_req(struct l2cap_chan *chan, void *data)
case L2CAP_CONF_FCS: case L2CAP_CONF_FCS:
if (val == L2CAP_FCS_NONE) if (val == L2CAP_FCS_NONE)
set_bit(CONF_NO_FCS_RECV, &chan->conf_state); set_bit(CONF_RECV_NO_FCS, &chan->conf_state);
break; break;
case L2CAP_CONF_EFS: case L2CAP_CONF_EFS:
...@@ -3435,7 +3435,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, ...@@ -3435,7 +3435,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len,
case L2CAP_CONF_FCS: case L2CAP_CONF_FCS:
if (*result == L2CAP_CONF_PENDING) if (*result == L2CAP_CONF_PENDING)
if (val == L2CAP_FCS_NONE) if (val == L2CAP_FCS_NONE)
set_bit(CONF_NO_FCS_RECV, set_bit(CONF_RECV_NO_FCS,
&chan->conf_state); &chan->conf_state);
break; break;
} }
...@@ -3807,7 +3807,7 @@ static inline void set_default_fcs(struct l2cap_chan *chan) ...@@ -3807,7 +3807,7 @@ static inline void set_default_fcs(struct l2cap_chan *chan)
*/ */
if (chan->mode != L2CAP_MODE_ERTM && chan->mode != L2CAP_MODE_STREAMING) if (chan->mode != L2CAP_MODE_ERTM && chan->mode != L2CAP_MODE_STREAMING)
chan->fcs = L2CAP_FCS_NONE; chan->fcs = L2CAP_FCS_NONE;
else if (!test_bit(CONF_NO_FCS_RECV, &chan->conf_state)) else if (!test_bit(CONF_RECV_NO_FCS, &chan->conf_state))
chan->fcs = L2CAP_FCS_CRC16; chan->fcs = L2CAP_FCS_CRC16;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册