Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp96257pxa; Tue, 18 Aug 2020 17:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygGazIa+oQ3hhFIV20QActqW5NeQEqyxvwKbnAe/BJotQU6rB9tEAl+bWd9sjfuNV2QrO0 X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr21632499edt.91.1597795976094; Tue, 18 Aug 2020 17:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597795976; cv=none; d=google.com; s=arc-20160816; b=tQ1tsYFGcL2Ifa+qWCzLqQdZZKDkCB4ufv/euo4n4J//iMLvJ5yLuEJ4rPIbqCjzS3 HpOuBxObkK6POdUluhH5SwZrvTGUqIehiixoBXgEDbHoIUabffvQDYwmjNvcHLbQZgys dLtdr4qlidZfX4jx+y/ub7nRFvsegxU9aJlV55hrnsuvLHamGy5dN/MqalFmG/wbRdjv Whk79dkqZwpxvTwGaSQlJfojddCvcqE/+3Aj4QBfTqBQORADm37xC67TVhivoon1vUh6 e7V5yyLdTWPAlDFEwihuAqUo43aWHZJLrf7LDWiP712Gnd2s/GkqF+yM1HElh6ABnPsa WErg== 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=XHUv3FRBN80hsAun3UWyOrIBRTs3yhxSRL5yxQg39V0=; b=fNJTeekdGff37PSkSb2rDY+ScwnbXEDerNGEiaDGrHMGbulrrNyo0kkbMnmHUW1c2E FTgg1o5dixbF1KDtjihEVIA7pIxjCFMv9Thll2IKfaJCNiBm2zmgbtoTAP8cJpdJ8OGk K8TUe/CAm5C/f3gvHiWNyM4VhgGU+dh3Ewc6F8MlD1pNjzcfpgd3PGa7ZpR0fzVig1e4 BWRM1UN339i4EG/4aRu4AxOmhqJ9F+xqzaTS8Qi5/EYXXgCR7xDYXtUexeOE1PEIA8cj ERVO+ewP81HeG9LQQdn84bamN6Ubu+yMfOu8F7gl8e0mcs9gzYdLSujHkgyLDMXIDcqR 9H+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PR0i5tUm; 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 y15si14706961edl.354.2020.08.18.17.12.16; Tue, 18 Aug 2020 17:12:56 -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=PR0i5tUm; 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 S1726763AbgHRX2c (ORCPT + 99 others); Tue, 18 Aug 2020 19:28:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbgHRX2a (ORCPT ); Tue, 18 Aug 2020 19:28:30 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62BE7C061342 for ; Tue, 18 Aug 2020 16:28:30 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id k13so9917436plk.13 for ; Tue, 18 Aug 2020 16:28:30 -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=XHUv3FRBN80hsAun3UWyOrIBRTs3yhxSRL5yxQg39V0=; b=PR0i5tUm4m6vaF7bl7oP3JlGmW3KVCZhOcp3TW49LecBgfPzPRpD/L+rMPmN4aHIyy GjIWsvfiT4pO1yKlLrD3uxtth3ZHIsKjrMOeyD3f9zy30iLWl3+89WYZ/3yly2pXVK3M hQFXaOcJQBOXNrctjtOCaKv+mPLdW1Kwq2wBo= 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=XHUv3FRBN80hsAun3UWyOrIBRTs3yhxSRL5yxQg39V0=; b=Qw0V4pcC8r2+UOAXBsHCYRejhjfzpOPTDgrratZo+lw4AP1Vjy9TNuYUlL3NOyqT++ IzeUG3kyVKAQUHCPzbj6IFcU/hEGwOBsZYIXUs7nfu+riheAG7+2pmCd820ekx8yo03I V6m4ZZYV/L+R/Ka4eLye+muY3DiAEBZVU0GGjXvyelqnxzHQcin+cetFt6rrT4VCbtyh naeFMJbYO/MeEBxRCUKlgA4nKDjJrr2hW6suV9xQhjpIQzai09tZmNr2q1rbzxHdVd44 ROG+Hj2ZQTHDCKJeHnTUOvPWpFztHhwaccYQeuvDFcIqo+WIMdj3IDqJMt0oYx9/cEl5 v7RA== X-Gm-Message-State: AOAM531b+or0hSKN/ayV6N5ioYMcYeD81h7o0EWM+//2VZL5e4kSL5re cnq4+HpKxtwA072xUIOlOhCs0A== X-Received: by 2002:a17:90b:1b43:: with SMTP id nv3mr1814429pjb.22.1597793309551; Tue, 18 Aug 2020 16:28:29 -0700 (PDT) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:7220:84ff:fe09:2b94]) by smtp.gmail.com with ESMTPSA id 30sm904747pjz.24.2020.08.18.16.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Aug 2020 16:28:28 -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 v2 1/3] mgmt: Add controller suspend and resume events Date: Tue, 18 Aug 2020 16:28:20 -0700 Message-Id: <20200818162807.Bluez.v2.1.I14a96397d181666c124e1c413b834428faf3db7a@changeid> X-Mailer: git-send-email 2.28.0.297.g1956fa8f8d-goog In-Reply-To: <20200818232822.1645054-1-abhishekpandit@chromium.org> References: <20200818232822.1645054-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 Signed-off-by: Abhishek Pandit-Subedi --- 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.297.g1956fa8f8d-goog