Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2940680lqt; Tue, 23 Apr 2024 06:26:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPE31Z/OAPon0Y1Srv8EixEKduF6OF9tufPzWovHUskXjppuwVSM3YqV9IC0VV7n8+O5JvT7m/jd2v0zlqTmEMTy6FfxvhFIuJpOkiug== X-Google-Smtp-Source: AGHT+IGN7ZW812jiKWj4QOgOFgjfsVZoL/5WlazQBqbOP+I+G92QRdbWPcqe966z1Up4gR+FUnNL X-Received: by 2002:a05:6a00:7106:b0:6f3:34c0:13c9 with SMTP id lh6-20020a056a00710600b006f334c013c9mr2597583pfb.29.1713878769514; Tue, 23 Apr 2024 06:26:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713878769; cv=pass; d=google.com; s=arc-20160816; b=utDDu3GoWRRCGZisaMwhUCEJBo4Kdid25I9HPZAKMSG8UZvugASBuZuiQBZvH8l/Ve qXxmfxos+E4uiURaPfrH6Kj3R7Gg+wtnL4VSURqk6SM4Md4z1HtO2BhsvXkdpDVNKXQO 2GUVaBq9NjPt3BhP7nEEQmSitlUieUGhFOlMWLORUadbtBJlOGn7aLqSU/kyHaRJJC0Y p2McaoAQ2LN53P+rV4jFrHDhNP+620H7sbyK+t5uQwAJMLy1oNat2xhNyzPdk+maRFTc ioU4/b9YICEAkQF3BZSyb93seEYfoPCzQo7SVrvC7902AXmOU073Erx9ivPidWHVqgP/ RHYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=mAD7vl6UjcWBm7tn5YepEe2rzxlzc4LFEFnMb5zBVqA=; fh=MNKRx4WJmBaVWzQe39dfqMazHXuwPQWBzq8iA6LUjvg=; b=QYAKwBzpccOeFGb2ynzGR3qpezn0O5oUaK77bi/G+5txzn77TkzStbJa6NdnO5eXRq zwprARZidIqlGzE1T8ofnXVr/wcKNdkGjYC//ZwAt+6+0FLZDonY/tVKm+jHgF92chJk AJPp7anWdrQ6mxTKL9V1vCF2N+wPFdSjBOatWUV9twu75WLnqJc8IAXZGRkMqjW2HcrJ qD8mKBTqTazX5SmcnMS17mptZweaKY7dguNcTZ5fstWunhYAD7v/mgAntADazNVtKmsR 6ko0THTjt5Lj6+by/51E38Yn9gIELRg+7WeWi3Rqf2Pvb5+ctiDx3LuDzOb4q1MOG2jm /8Ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-6725-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6725-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p15-20020a637f4f000000b005f7fe37f9a3si7469194pgn.642.2024.04.23.06.26.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 06:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6725-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-6725-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6725-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3A863B26CDB for ; Tue, 23 Apr 2024 13:05:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F7D312FF71; Tue, 23 Apr 2024 13:05:38 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9F3C78C6E for ; Tue, 23 Apr 2024 13:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877538; cv=none; b=I47rSpAVsgqGWChDyCn8rHQO3Vsz36SQY7IVbJSSWy/wCskc2qKxq1lJucHEtHWiPYqOUl+IhjI22tzmA9yzDb/EBeay4uf8odQHPM4Jx0U6tj8B9919zR74nGrivvMrW9Lpxj5Ehb4FfYuDKvPBm3ALgpR1+zMpEOBpzBMIIp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713877538; c=relaxed/simple; bh=t809SEv2KPZ29AzfYRAULOT9GkYMPi0Um2x4SsEn4tM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pK7hIAtsSJrCNC8IdBu+X2NkoRODektGm04MdTgqWYt8Tszg8vyOx5ddK8NkmBuTLEDYBv+/5J6rclkSyGg/sKtf+AhmpBuKZHFKOQv32eFMfphsHxj1zyLzznJpKpeldKD+gVtqihtYrApGul93BEXP7+DQSZzmKi4pbuW3rDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 43ND5XgH41251177, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 43ND5XgH41251177 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 23 Apr 2024 21:05:33 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 23 Apr 2024 21:05:34 +0800 Received: from [127.0.1.1] (172.16.20.182) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 23 Apr 2024 21:05:33 +0800 From: Ping-Ke Shih To: CC: Subject: [PATCH 2/8] wifi: rtw89: coex: Add Bluetooth scan parameter report version 7 Date: Tue, 23 Apr 2024 21:04:56 +0800 Message-ID: <20240423130502.32682-3-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240423130502.32682-1-pkshih@realtek.com> References: <20240423130502.32682-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) From: Ching-Te Ku This report is reported from Bluetooth, it described Bluetooth scan parameters. Version 7 adjust the structure variables order. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/coex.c | 15 +++++++++++++++ drivers/net/wireless/realtek/rtw89/core.h | 9 +++++++++ 2 files changed, 24 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw89/coex.c b/drivers/net/wireless/realtek/rtw89/coex.c index e61af63090f7..b0921a264f3d 100644 --- a/drivers/net/wireless/realtek/rtw89/coex.c +++ b/drivers/net/wireless/realtek/rtw89/coex.c @@ -1135,6 +1135,7 @@ static void _update_bt_report(struct rtw89_dev *rtwdev, u8 rpt_type, u8 *pfinfo) struct rtw89_btc_fbtc_btver *pver = NULL; struct rtw89_btc_fbtc_btscan_v1 *pscan_v1; struct rtw89_btc_fbtc_btscan_v2 *pscan_v2; + struct rtw89_btc_fbtc_btscan_v7 *pscan_v7; struct rtw89_btc_fbtc_btafh *pafh_v1 = NULL; struct rtw89_btc_fbtc_btafh_v2 *pafh_v2 = NULL; struct rtw89_btc_fbtc_btdevinfo *pdev = NULL; @@ -1172,6 +1173,15 @@ static void _update_bt_report(struct rtw89_dev *rtwdev, u8 rpt_type, u8 *pfinfo) pscan_v2->para[i].intvl == 0) scan_update = false; } + } else if (ver->fcxbtscan == 7) { + pscan_v7 = (struct rtw89_btc_fbtc_btscan_v7 *)pfinfo; + for (i = 0; i < CXSCAN_MAX; i++) { + bt->scan_info_v2[i] = pscan_v7->para[i]; + if ((pscan_v7->type & BIT(i)) && + pscan_v7->para[i].win == 0 && + pscan_v7->para[i].intvl == 0) + scan_update = false; + } } if (scan_update) bt->scan_info_update = 1; @@ -1428,6 +1438,11 @@ static u32 _chk_btc_report(struct rtw89_dev *rtwdev, } else if (ver->fcxbtscan == 2) { pfinfo = &pfwinfo->rpt_fbtc_btscan.finfo.v2; pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_btscan.finfo.v2); + } else if (ver->fcxbtscan == 7) { + pfinfo = &pfwinfo->rpt_fbtc_btscan.finfo.v7; + pcinfo->req_len = sizeof(pfwinfo->rpt_fbtc_btscan.finfo.v7); + } else { + goto err; } pcinfo->req_fver = ver->fcxbtscan; break; diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index d8f7eea7ae6e..0b1d63b2fa1f 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -1954,9 +1954,18 @@ struct rtw89_btc_fbtc_btscan_v2 { struct rtw89_btc_bt_scan_info_v2 para[CXSCAN_MAX]; } __packed; +struct rtw89_btc_fbtc_btscan_v7 { + u8 fver; /* btc_ver::fcxbtscan */ + u8 type; + u8 rsvd0; + u8 rsvd1; + struct rtw89_btc_bt_scan_info_v2 para[CXSCAN_MAX]; +} __packed; + union rtw89_btc_fbtc_btscan { struct rtw89_btc_fbtc_btscan_v1 v1; struct rtw89_btc_fbtc_btscan_v2 v2; + struct rtw89_btc_fbtc_btscan_v7 v7; }; struct rtw89_btc_bt_info { -- 2.25.1