diag_cntl: Only set REQ_RSP feature if we have cmd channel

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Bjorn Andersson 2018-07-12 21:35:16 -07:00
parent 6762698d92
commit 28694ca39b

View File

@ -257,7 +257,8 @@ static int diag_cntl_feature_mask(struct peripheral *peripheral,
local_mask |= DIAG_FEATURE_FEATURE_MASK_SUPPORT;
local_mask |= DIAG_FEATURE_DIAG_MASTER_SETS_COMMON_MASK;
local_mask |= DIAG_FEATURE_REQ_RSP_SUPPORT;
if (peripheral->cmd_fd >= 0)
local_mask |= DIAG_FEATURE_REQ_RSP_SUPPORT;
local_mask |= DIAG_FEATURE_APPS_HDLC_ENCODE;
if (peripheral->sockets)
local_mask |= DIAG_FEATURE_SOCKETS_ENABLED;