Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1590950pxa; Fri, 28 Aug 2020 18:03:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQUF3bT5JZSIsX5tqoiv5/B6lyuK4VMfkN7SCUmvnKVr35fhBK5vtBLKwTftpk2jmJqfz3 X-Received: by 2002:a50:b2a5:: with SMTP id p34mr1428773edd.385.1598662993247; Fri, 28 Aug 2020 18:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598662993; cv=none; d=google.com; s=arc-20160816; b=BnpnfKpx63+v3d5TJaPzmwnLReUXZjxnb5UN3OkVEWs93rGejOJP9y8onCYtFjXRuX i+w+qGl6FQ4LHj0+XIY2928xvlakxAOiqOzOz9il4LinJdAizmeWZktcUgXwgSvWw6Ri A9MSBOerebpbYrcbgN4BO+E37VlVO9GHZyXaH1J+ayoJm3Fi0yTJXxEhe2zm8P2MWPtz rHs5uG+HtKNKiMiLYAZYUCJuy3OZSI9oMby/Dqrh0JWTdcIJ1eNZgYY+DFSOIu2rDnZZ Vton3XDHazu0foHC+gXcmYUCKZzwhM7+419p6KgwLZndHfROaf7JWmcAvXJglDtYT5u6 qI7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3xXRDB2sGPzoGqKOB+6TwO7ShGY5615JtErKHfxz8fk=; b=rwUOiG4wDbm1YemKjIvQADKg7TYp+yDH4zdmNFFLhbTtxYeSEMU+qhJJyov69mjPcV yHIDxT8Ll+P/H6t+OxP1Ryr4ciYSGsk0SI6wXZdU7FWAi7e5OscGT/4yy8ejvTXNUu4C Duea2X0Js9xf8ENd2j2B33EsbcOet8jlQn1DSISF6J8sUD1Sghe5utNgm2i3ZFoYzptF 5SlcWjX+KBsxvaHn2Ny59vsjepFRHxhQFDEyhLwsri04gd0Im+CCrUqPGJwnROjZCWlB YqkRmHwqnkmuRHXEBjz1H8gQGWFYNOPn5Obh0SoJ9PGNCGoB7ProzXE9rcQBxN3yuA2q W6MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="J//h6N7G"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c2si523575edr.301.2020.08.28.18.02.29; Fri, 28 Aug 2020 18:03:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="J//h6N7G"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbgH2BCY (ORCPT + 99 others); Fri, 28 Aug 2020 21:02:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbgH2BCT (ORCPT ); Fri, 28 Aug 2020 21:02:19 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91DF0C061264 for ; Fri, 28 Aug 2020 18:02:19 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id ls14so326398pjb.3 for ; Fri, 28 Aug 2020 18:02:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3xXRDB2sGPzoGqKOB+6TwO7ShGY5615JtErKHfxz8fk=; b=J//h6N7GjrFtY2260Hs1jViiPMfa9CkX6rEyGHVXoAzr2/ByhHU4ruyy1eUbKUQVnZ pvV5LRMRoC4f9xx4Yw+M4g7zgVgtBPpqpbp80xgkHsUt37xeGn5xaiFcUzSOfqBoGn4F yiEZk6JnQJ5R2rn4J9yOUMV8M78plctwY+Er4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3xXRDB2sGPzoGqKOB+6TwO7ShGY5615JtErKHfxz8fk=; b=StYjNdr4/2g84FdX4crv7bnzHgkYLs2u89SCnIh7rPkqmjxXvnGAF3RntMDr9TL85t rSegutqpJFDJ6F0DIF18ZuxMWsAF886PQqpxLVqAKCiwk/SLTfItPtdAc2cPor/n9otP eBIpYHfJwKwj/+bXYFmN1fVQxM8YSZQBsUrNTqQ5uyruXruem+3KIe9NKvbMg8EM+YIH 8jlloGG/pjNd2OfaDFNByJXP0Cmej324b6jE66lGTy81GstcntiUHhBcVG4ZGnKvpPYM JHea4k6lVqsFKc0MCWhClnbRG3C0djLCiSkO9akbP2A9o93GvisGccAANMYFDu293Mzv XRWg== X-Gm-Message-State: AOAM530nv+7rMkJah9A87ZbCfAC0dAaWrndzc2IKLC9Ih3cFNbgeT1Ti bjmH22/8m4r2aBbkKsqdzmx9z8aelXL3sA== X-Received: by 2002:a17:902:d88c:: with SMTP id b12mr594759plz.96.1598662938763; Fri, 28 Aug 2020 18:02:18 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:7220:84ff:fe09:2b94]) by smtp.gmail.com with ESMTPSA id 78sm630360pfv.200.2020.08.28.18.02.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 18:02:18 -0700 (PDT) From: Abhishek Pandit-Subedi To: luiz.dentz@gmail.com, marcel@holtmann.org Cc: chromeos-bluetooth-upstreaming@chromium.org, linux-bluetooth@vger.kernel.org, Abhishek Pandit-Subedi , Sonny Sasaka Subject: [Bluez PATCH v3 1/3] mgmt: Add controller suspend and resume events Date: Fri, 28 Aug 2020 18:02:08 -0700 Message-Id: <20200828180157.Bluez.v3.1.I14a96397d181666c124e1c413b834428faf3db7a@changeid> X-Mailer: git-send-email 2.28.0.402.g5ffc5be6b7-goog In-Reply-To: <20200829010210.871471-1-abhishekpandit@chromium.org> References: <20200829010210.871471-1-abhishekpandit@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Add the controller suspend and resume events. Reviewed-by: Sonny Sasaka --- Changes in v3: None Changes in v2: None lib/mgmt.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/mgmt.h b/lib/mgmt.h index a800bcab4..46d894ae9 100644 --- a/lib/mgmt.h +++ b/lib/mgmt.h @@ -772,6 +772,7 @@ struct mgmt_ev_device_connected { #define MGMT_DEV_DISCONN_TIMEOUT 0x01 #define MGMT_DEV_DISCONN_LOCAL_HOST 0x02 #define MGMT_DEV_DISCONN_REMOTE 0x03 +#define MGMT_DEV_DISCONN_LOCAL_HOST_SUSPEND 0x05 #define MGMT_EV_DEVICE_DISCONNECTED 0x000C struct mgmt_ev_device_disconnected { @@ -959,6 +960,17 @@ struct mgmt_ev_adv_monitor_removed { uint16_t monitor_handle; } __packed; +#define MGMT_EV_CONTROLLER_SUSPEND 0x002d +struct mgmt_ev_controller_suspend { + uint8_t suspend_state; +} __packed; + +#define MGMT_EV_CONTROLLER_RESUME 0x002e +struct mgmt_ev_controller_resume { + struct mgmt_addr_info addr; + uint8_t wake_reason; +} __packed; + static const char *mgmt_op[] = { "<0x0000>", "Read Version", @@ -1088,6 +1100,8 @@ static const char *mgmt_ev[] = { "Device Flags Changed", "Advertisement Monitor Added", /* 0x002b */ "Advertisement Monitor Removed", + "Controller Suspend", + "Controller Resume", }; static const char *mgmt_status[] = { -- 2.28.0.402.g5ffc5be6b7-goog