Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp837872lqj; Mon, 3 Jun 2024 02:15:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUrHUNIY0sQYFVfjX6GZzRsSPH5y54jAFBKx11D9PthI0CWiCbkOm/mGZh193891/KQ976HnvHran1N+An+abizdsLhKYaWQtSNAdIP6g== X-Google-Smtp-Source: AGHT+IFdfQSAyZ3gu21Sv8xKRI9bVnVyzfl6f9LfsZKqTF8kJwbd+RDQ0QdbgWWlFtL4dVSq/+Ty X-Received: by 2002:a05:620a:8416:b0:793:116:55f0 with SMTP id af79cd13be357-794f5c86a3fmr770687085a.26.1717406151213; Mon, 03 Jun 2024 02:15:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717406151; cv=pass; d=google.com; s=arc-20160816; b=1HLg0QfJdkRbCD5Pyja+y98mcJ4dMP2nwznmxb6HJkJXZPFsolAiwE7f7/oYkkfTFA v+XQMRLTyyp2a0U0WckQoiEqWKGTL3e7zIBBRxNWVufeEZCx0Y/0bz/5GAxFk29Nrrs2 6kPKYMn5OEFSy9BJlSyNt/7ATH/dI0TdWQjd0ip3AaTxBlH6EvFtcHR0M2HrABu6co6c YvbTM5PRA6qlDmi2z2CVVwT1Fz5Cd+4hK9x78sAc2BrGFn1UJS1II8D58EO/kdB27Qqr yT8m98YlTdrvoqYmloWoqnnPZOk/HdBzBkh4WXzf/pCirV17S+sn3PqJoKbVTQt6K5Ue KkuA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=EBvxU/bjOC7unkykGDB8OaKu9iYu2HMPYZvv9CaH4zY=; fh=ZLqNiuCRo4GB+yrQ/He0YUhTBDsDtvmepvmHWnA6upY=; b=eceXHGvcAJFGxHIhrjxSCbTkL8BITEMJcz4cx02dqJ6uk0AXM7UNgXu2eoxhz1RqeE LOTgAE0PSyvU7mhT0uDEPEEnTOrwqglO7kxhgDdVtrJlJOSoeSHNxbHhJfNtJWv6+RQp b5PqqYMRCvmI7WbbkFxAmQLJCFR0qEL/aIAR6En6rRjZjTi23JiBeya9XOpUMwUCfWX+ LKWRxxiPXmk7g1+1OGdR8Ed+OeCuKkuiPAYioXszyaxtxOk8Il0Ru/wKjUXEkuj1Gk1Q fkj6DZLG5xHDtEOytwU+BHmIeBz9Y9X3h4GNyOPFqyFMq2WkmSRZeIHcDk+K/gBdp6+6 La1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="ArW4MA/7"; 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-8409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f2f05560si883280885a.95.2024.06.03.02.15.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 02:15:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="ArW4MA/7"; 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-8409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8409-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D289D1C20B69 for ; Mon, 3 Jun 2024 09:15:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0A3777F32; Mon, 3 Jun 2024 09:15:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ArW4MA/7" 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 4AD313D549 for ; Mon, 3 Jun 2024 09:15:47 +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=1717406148; cv=none; b=DW0M7EpLuN87KdAuYGD85CTZbj19uqBYfHdmBQbHXvQdtysC0d5WK06V6X0krZl43aohFqJXxg01sXPZn7Ww1kPoSWAyDdmrDyWRbJY1TKm7iot5Q1YE/qRODoHPYAuLsQJT4k+b5pyLL5/Zaa3zqCmWJIHFDhw3ZnRNPauqeRg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406148; c=relaxed/simple; bh=p3IbUa9fYW1WqOQbHPR6GF9NleqcT6vvPMgG54j/Cak=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=Z4R7Gv986Lzx2HywhAIjKLZC3hc3NBcbpSfUtZGtJ7xSChkYjv9DtNOJWlnO6vcxWEpGAj84fTSTENzqVxdgqaLKQeP1KJ6USK6gEPPEodmyPdvw6GQWherSBmBgrtLUiUexHWweanWkkt2T3lZKxMxofKZbJg9rvrrlnzAuGyg= 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=ArW4MA/7; 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 (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 452Np6Qj026166; Mon, 3 Jun 2024 09:15:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= EBvxU/bjOC7unkykGDB8OaKu9iYu2HMPYZvv9CaH4zY=; b=ArW4MA/7KsclkynV LPf8mAXm5LSuLgLlSKwELxSvrjsU8z9QDATW5CqgZTFWahV/WhQqqz5/XRew9jLZ mNvkrSf3DNzUe31u/LMi6gCvpeJJLyWyLhxXj4pK8FBgQDWi3/xxoXTkOi9W7/xL 6lX5DllXIMZJ2KK0rpIwhQ2ZySyri75u9NJDV/1MWWtDCM+XLL3g7m/IW2h0dC1O q+IW/QS1nZE605hCQ9S6oEkEGwytxwSABZUkd3OCRb2WftCFMCqaOhz9ZfhNy4td CSV+HVemGnvFiuVQC6/Rr/m0RQGZX28Nc3gsjG7lOQkYMOq9W817dMVzB7trFN1d hY2rcQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yfw6qkeje-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 09:15:39 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4539FcDM014517 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Jun 2024 09:15:38 GMT Received: from [10.231.195.67] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 3 Jun 2024 02:15:37 -0700 Message-ID: <695e06f2-5212-45c4-9c1d-84ed36e0b192@quicinc.com> Date: Mon, 3 Jun 2024 17:15:35 +0800 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 6/8] wifi: ath12k: support ARP and NS offload To: Johannes Berg , Jeff Johnson , CC: References: <20240530072714.25671-1-quic_bqiang@quicinc.com> <20240530072714.25671-7-quic_bqiang@quicinc.com> <17721436-19fb-4337-9058-b20f4df2792c@quicinc.com> <43680bd3c444da4c1b4e55b4ee4c7043c1186ccd.camel@sipsolutions.net> Content-Language: en-US From: Baochen Qiang In-Reply-To: <43680bd3c444da4c1b4e55b4ee4c7043c1186ccd.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: rRhFY1BVYu5hA9wdTHoYpnIuoQyxJL8J X-Proofpoint-ORIG-GUID: rRhFY1BVYu5hA9wdTHoYpnIuoQyxJL8J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-03_05,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 mlxlogscore=872 clxscore=1011 impostorscore=0 malwarescore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406030077 On 6/3/2024 3:36 PM, Johannes Berg wrote: > On Fri, 2024-05-31 at 13:11 +0800, Baochen Qiang wrote: >> >> On 5/31/2024 11:42 AM, Baochen Qiang wrote: >>>>> +static void ath12k_wow_prepare_ns_offload(struct ath12k_vif *arvif, >>>>> + struct wmi_arp_ns_offload_arg *offload) >>>>> +{ >>>>> + struct inet6_dev *idev = arvif->idev; >>>> as noted above does it make more sense to get the netdev associated with the >>>> arvif and then use in6_dev_get(net_device) to get the inet6_dev rather than >>>> caching the pointer from the ipv6_addr_changed() callback? >>> Ah.. I didn't note that we can get inet6_dev in such a way, just thought the only way is to cache it in ipv6_changed() callback. >>> >>> will get it using the following in next version: >>> struct ieee80211_vif *vif = container_of(arvif) >>> struct ieee80211_sub_if_data *sub_if_data = container_of(vif) >>> struct net_dev *ndev = sub_if_data->dev >>> struct inet6_dev *idev = in6_dev_get(ndev) >> Just found that ieee80211_sub_if_data is internal to mac80211, so not possible to get netdev in this way. >> >> any other ideas on how to get netdev? > > You can go via the wdev. > Ah, great! I can get it with ieee80211_vif_to_wdev(arvif->vif)->netdev. Thank you for pointing that. > johannes