Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1124893rbb; Sun, 25 Feb 2024 22:02:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVA5v+FH+XvnP6sT7xFPwDtWqLM/nIVZZRnuAfBUnJU6e7IQqP6oH0bOf6TFoKknOBdEeDb0RcO7d7Xl2yBDLPk27eurpOP5tV/u44MMw== X-Google-Smtp-Source: AGHT+IEklP3L5zSb9BYcAwFY2XKeSlF5drv6TXhX8dQYTnJOXVsY7Jj9odDxX8oxRLwP+uN09yy/ X-Received: by 2002:a05:6a00:18a5:b0:6e4:eee0:5798 with SMTP id x37-20020a056a0018a500b006e4eee05798mr7765982pfh.14.1708927368079; Sun, 25 Feb 2024 22:02:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708927368; cv=pass; d=google.com; s=arc-20160816; b=iIJn1dTjxanNYpOojg3Z7vbRvEuLwuPmR/s+6FbfjYxtwvjehdWU57NKvU4UvgbuQV KOSLotLg5Yu7o2osl2ZNZPL4bFWLG2xxLdDO7/MXQFcioJ49sWS735o8l2eMn8nxtqWH ngNcNmou22XHAIxAZrjgiYHo88vCeyB5fAitnSDDPAPm0SAfGWRynatHMaQFNJhX6AYi zrgjyOx96I4o1v4k4ftKFQGqIsbDcy2cFnNZyzW1p+0dfc5nYTbOW/62Cos6oGHsrL8K WYQ5w2bqtjDhdIgvMEVqrqxjSl7JRUK82zdbrwUfdv5Kmuv+FIsERY0VI91iiVj3vJIg fGRg== 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:dkim-signature; bh=fgVOtntWh4SWI1w8eTOBwVp20v5pUOsEfNO9D+YWACk=; fh=VjEXHNW5NZrs1Y/dkG9Zsf/aOTyMoB2CPB4Ny1yH9GY=; b=mVL9b6AGNFmuUtanXfNTsKZ98AiBoZcl01K7uPRt1sMBUYfPxEBSnHVnX2rZEkp38U unvxhzMQOMGrPp2U4eFPr5pr449we86fqH6J0Prl+2bBUccYuxBJejQdUTbx3NlAmaRr NSAHEPc4YaLEqmSu/UCsE9f5I4/fBpTU4dcyodfOjl11f9hRAtzpp6ZJJi0MJwQnPStq lVZ5xNc1nca4LEea5ZLH8pDFqEJ++aktfLXJE9XT6/aVVB+OtrxZ+QfcqCNDAnMUxUWu gG/jGQqXx5lbnAj6M9kujIZa7yf8Ru0DWekDn5KTse/3li1BlACLfz+iGxW+ih0iEggK xftQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EpTtv0OB; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-3987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o10-20020a656a4a000000b005dcbb745090si3221080pgu.358.2024.02.25.22.02.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 22:02:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3987-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; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EpTtv0OB; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-3987-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3987-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com 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 AAB70B2135C for ; Mon, 26 Feb 2024 06:02:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CA871A5AC; Mon, 26 Feb 2024 06:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EpTtv0OB" X-Original-To: linux-wireless@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D039418EA8 for ; Mon, 26 Feb 2024 06:02:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708927359; cv=none; b=knY5dn0z75UyOW+p9XoaqtytAi7Xhycw2YsNkfld2zmKoaBfcjY1pUSDp64HFlC2U9HSvm01sRnbpGUnREMjKLtUNXQr8GnvE/4OgUyKgwktjRMYFjzU3kzPp0K+/zyfNtgRJnYNMMzOpP2SpcxwCdXb/v5vUgbH1K+yfmocN3w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708927359; c=relaxed/simple; bh=klKDt/cAy8OTuwjQWsV6dcixGCl8Zle/0WsY2Qd1A3A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KhRuMYWGpMkyU8YaoLSAYNcV8YdhRotgO46F2Jkf73Mb52w812iDUFd08ddjRUA4xZysWETtMoQxR1f+C6E+eEz3dSS1nr8ezEgY/P/UJ9Mi+CszBUvQ9KP1WiWHYiR84FYSwcmezHS70e2rasCZIA4UWyzlKVYH5QkIfIfI8b8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=EpTtv0OB; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41Q5fAem010955; Mon, 26 Feb 2024 06:02:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=fgVOtntWh4SWI1w8eTOBwVp20v5pUOsEfNO9D+YWACk=; b=Ep Ttv0OBi1ZXAR+RSDGB70+wHBvcvNrrlNUlrwq5KMXIdt5Ej5afbgnGIaLeSpHq8h cV3kGyTTMS/C6N9dyerSeLkOSbtxRzN4i6bhehtqfI6phP+3+F7b7xFQH28ihKBi vaCRITMyKntfcpDRbjtL676+dwzja43bwSFo5MOGJIvu/a/vTSUg/0pV+PkurGx5 vpOf3rXM81F8Wv5/jwmn4Et4x3WnpOkmFhWg+InD7orxpJpWgkDwP43B4Nxe1VuA G5HRuXHiPSIRQwz64qur3jYO4d/17ouPoxWte3OqFrDp5PpjK0tnXdzMlcmK2h8J Fjo1gQPcWnOrtBrAPV5w== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wgkxmg3dw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 06:02:33 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41Q62LYU012956 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 26 Feb 2024 06:02:21 GMT Received: from Mayan.qca.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sun, 25 Feb 2024 22:02:20 -0800 From: Kang Yang To: CC: , Subject: [PATCH 1/6] wifi: ath11k: change interface combination for P2P mode Date: Mon, 26 Feb 2024 14:01:58 +0800 Message-ID: <20240226060203.2040444-2-quic_kangyang@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240226060203.2040444-1-quic_kangyang@quicinc.com> References: <20240226060203.2040444-1-quic_kangyang@quicinc.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: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MwutEkY7W1yDWzTPVoguUYNLyweSkAmK X-Proofpoint-ORIG-GUID: MwutEkY7W1yDWzTPVoguUYNLyweSkAmK X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-26_03,2024-02-23_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 clxscore=1011 priorityscore=1501 mlxscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402260044 Current interafce combination doesn't support P2P mode. So change it for P2P mode. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37 Tested-on: QCA2066 hw2.1 PCI WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.2 Signed-off-by: Kang Yang --- drivers/net/wireless/ath/ath11k/mac.c | 47 ++++++++++++++------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index a6a37d67a50a..9240dedf3217 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -9857,12 +9857,18 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) struct ieee80211_iface_combination *combinations; struct ieee80211_iface_limit *limits; int n_limits; + bool p2p; + + p2p = ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_P2P_DEVICE); combinations = kzalloc(sizeof(*combinations), GFP_KERNEL); if (!combinations) return -ENOMEM; - n_limits = 2; + if (p2p) + n_limits = 3; + else + n_limits = 2; limits = kcalloc(n_limits, sizeof(*limits), GFP_KERNEL); if (!limits) { @@ -9870,39 +9876,29 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) return -ENOMEM; } + limits[0].types |= BIT(NL80211_IFTYPE_STATION); + limits[1].types |= BIT(NL80211_IFTYPE_AP); + if (IS_ENABLED(CONFIG_MAC80211_MESH) && + ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) + limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT); + + combinations[0].limits = limits; + combinations[0].n_limits = n_limits; + combinations[0].beacon_int_infra_match = true; + combinations[0].beacon_int_min_gcd = 100; + if (ab->hw_params.support_dual_stations) { limits[0].max = 2; - limits[0].types |= BIT(NL80211_IFTYPE_STATION); - limits[1].max = 1; - limits[1].types |= BIT(NL80211_IFTYPE_AP); - if (IS_ENABLED(CONFIG_MAC80211_MESH) && - ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) - limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT); - combinations[0].limits = limits; - combinations[0].n_limits = 2; combinations[0].max_interfaces = ab->hw_params.num_vdevs; combinations[0].num_different_channels = 2; - combinations[0].beacon_int_infra_match = true; - combinations[0].beacon_int_min_gcd = 100; } else { limits[0].max = 1; - limits[0].types |= BIT(NL80211_IFTYPE_STATION); - limits[1].max = 16; - limits[1].types |= BIT(NL80211_IFTYPE_AP); - - if (IS_ENABLED(CONFIG_MAC80211_MESH) && - ab->hw_params.interface_modes & BIT(NL80211_IFTYPE_MESH_POINT)) - limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT); - combinations[0].limits = limits; - combinations[0].n_limits = 2; combinations[0].max_interfaces = 16; combinations[0].num_different_channels = 1; - combinations[0].beacon_int_infra_match = true; - combinations[0].beacon_int_min_gcd = 100; combinations[0].radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) | BIT(NL80211_CHAN_WIDTH_20) | BIT(NL80211_CHAN_WIDTH_40) | @@ -9911,6 +9907,13 @@ static int ath11k_mac_setup_iface_combinations(struct ath11k *ar) BIT(NL80211_CHAN_WIDTH_160); } + if (p2p) { + limits[1].types |= BIT(NL80211_IFTYPE_P2P_CLIENT) | + BIT(NL80211_IFTYPE_P2P_GO); + limits[2].max = 1; + limits[2].types |= BIT(NL80211_IFTYPE_P2P_DEVICE); + } + ar->hw->wiphy->iface_combinations = combinations; ar->hw->wiphy->n_iface_combinations = 1; -- 2.34.1