Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1579354lqt; Wed, 20 Mar 2024 08:07:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQB7bpXbFuOCsdgVjL71Ad0mpJ4DJnGExWcLkKYjverV4+DZFxR2kyr3Ot/+mRQSb0+h/tRFxwRXZdeFty+Td+4FEcY5Wv+D23uxxn8w== X-Google-Smtp-Source: AGHT+IGcqKYtvKyB+KjFdiMkESG4/WOiZUedVQASJtGQ1BvIc6+wAS1A6jNZzdrVTsnlPKZ0gDLU X-Received: by 2002:a05:620a:2954:b0:78a:23bb:9746 with SMTP id n20-20020a05620a295400b0078a23bb9746mr2099070qkp.35.1710947225314; Wed, 20 Mar 2024 08:07:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710947225; cv=pass; d=google.com; s=arc-20160816; b=KcuREOINji43oJTptnL8avfJdKAl1N3eS3Cu9cTGzCQwZ/DbxiNuOQ/pHZOcJJz0w9 ZqYD6J6HFLHfUnoKw+aX/SCrdZVsXx5aNcyR835eo8QUKq9OuShywYZ127IqLCT+MXx8 CRA6Dw7gBOTZ0V+IZ0MlY2Ru77wUUt0fG68UUGuG+J8FBXFk1o+WCHPo5rEJmCVd6gVs nWZ4uinb7DLRua5gxoABHSx8Pknnv9Ut3VSyBQDbh0m1RFoXBdFuBpQeRK7s28k8os0U x2ytDHjGcNwKCQD/XcZKxWHF/IGIMUO2HX1NsdsKHBO8lwzH1vbDQryOAd2li9W56p8d 56RQ== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ftYAxfkICjzayR6na3uXUiysjfTJYLrKXjK/TKVeJNE=; fh=WdlFQ4vHXmHQpKNHsmKttK3JeUc9oDW88AbhDlKolm4=; b=EvoUPwCORwhVb0SRjuzhd3UGFv73lzVm4z4fdMgjDn4/1gSqO5ZFdK6/xqvsyzCvGE dt04kh4YGyUGR1H7AjqaKP4QnrTaVUs91Gk6hKV3fitVDIKgI2VnjTumaLsrSfMiTlYV 9NkJcwJMavwCsDA2iBxy18YwWWt/YS8RVi4Z5rX0IMDcM2cFRqP2UKZbQgFdMLFu7qSP kbvat44kwvLabsy9Sz89bSsoA8zkJeNGwCova9HdcBHKlqn2ptz56oaOq0ir/YFzWR2l Jw8qX96sA/zXHZZ5+QNgBbFJN0l/w36mH6TNqjlaaI4nD3nXNBaGKOo2u/aqxOZblVa2 0Jhg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=L1p0M6VQ; 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-kernel+bounces-109060-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109060-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 b21-20020a05620a089500b00789f75c3f0asi7794780qka.698.2024.03.20.08.07.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 08:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-109060-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=L1p0M6VQ; 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-kernel+bounces-109060-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-109060-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 B66691C21CA3 for ; Wed, 20 Mar 2024 15:07:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25D7950A72; Wed, 20 Mar 2024 15:06:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="L1p0M6VQ" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 AB78D4EB45; Wed, 20 Mar 2024 15:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710947214; cv=none; b=oA/Tlz8kMQSGGt/iVHQqPEefzmywdsJwsQCXUeam0Pw3/vgUUf8FKa6w2WSNMI8wfb4YxuwklLSQ1DhmI0zfWsJMdn5L1ySRrVuMNLLri00oTjkbHTSs9RJWCXcvX9Yd8VbP9BF4wOBJX3ZUKDCg0TXca7nH91NT/EKETV3KWj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710947214; c=relaxed/simple; bh=FjEc5K6JHS8LKKyVemeyIYqMJ/r1Vz8wxcxipv9vHes=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=ESyPa7KfSqY8AKGuT/bIiQWECkqA+HGxzTu4GxXXVWqocU0BWx9xmC+x8AZBtyxI0T1BiUhC94qDWFt1rjgiB8YFu4RPlA/Wrj5AOzLAVJbnJgonNhjie/yUcpOp8G7XAScKVXqE8ts1/FIK2ubQq/SctY8ULtKupm7SfdIDJVQ= 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=L1p0M6VQ; arc=none smtp.client-ip=205.220.180.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 (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42KEkBGt005328; Wed, 20 Mar 2024 15:06:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=ftYAxfkICjzayR6na3uXUiysjfTJYLrKXjK/TKVeJNE=; b=L1 p0M6VQ5XRXBs2KBPs51l7VHXL21Kc9/UhAOV6am/LeGt5TNjvNMw0K2Mml/6ZvUo mSfbifa4aJBUp7NJSJOJS0McCWVtBKMNQaReJemK5ytYVR1UhZtkycM4iBQGBLZ/ g8ylZ17tkav0qYVzrzc2SGUC87oYrlCkSS9/ZfrgnG0Wngd8MY4hJVEuaPui6X/S OK026MFHM7OKePUfB8Wt2j+WfSkDCmzEthYyiBYMGbE+navwbmwWhlCHMsIE1sl3 lr/wjPLwhG1RuaaMH7M0/Bi/jjM20rQiz9aff4r8mdnUgdm3mj8E4anPXLVmaE8u /V5aksc+MJdjBC9enOSA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wypxq1gy1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2024 15:06:32 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42KF6V5D031726 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2024 15:06:31 GMT Received: from [10.110.120.226] (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.1118.40; Wed, 20 Mar 2024 08:06:30 -0700 Message-ID: Date: Wed, 20 Mar 2024 08:06:29 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath11k: allocate dummy net_device dynamically Content-Language: en-US To: Kalle Valo , Breno Leitao CC: Jeff Johnson , , , "open list:NETWORKING DRIVERS (WIRELESS)" , "open list:QUALCOMM ATHEROS ATH11K WIRELESS DRIVER" , open list References: <20240319185735.1268980-1-leitao@debian.org> <871q85as8e.fsf@kernel.org> From: Jeff Johnson In-Reply-To: <871q85as8e.fsf@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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-ORIG-GUID: AxPF9uDyi_6B6ePxD4VeAmyI9iZYg6Y_ X-Proofpoint-GUID: AxPF9uDyi_6B6ePxD4VeAmyI9iZYg6Y_ 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-03-20_10,2024-03-18_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 suspectscore=0 mlxscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403140001 definitions=main-2403200120 On 3/20/2024 7:32 AM, Kalle Valo wrote: > Breno Leitao writes: > >> Embedding net_device into structures prohibits the usage of flexible >> arrays in the net_device structure. For more details, see the discussion >> at [1]. >> >> Un-embed the net_device from struct ath11k_ext_irq_grp by converting it >> into a pointer. Then use the leverage alloc_netdev() to allocate the >> net_device object at ath11k_ahb_config_ext_irq() for ahb, and >> ath11k_pcic_ext_irq_config() for pcic. >> >> The free of the device occurs at ath11k_ahb_free_ext_irq() for the ahb >> case, and ath11k_pcic_free_ext_irq() for the pcic case. >> >> [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ >> >> Signed-off-by: Breno Leitao > > This crashes on my nuc x86 test box with WCN6855 hw2.0 when running > rmmod, stacktrace below. I used tag ath-202403201010 from my ath.git > tree as the baseline. Sorry that I'm not able to debug this further > right now. It seems to maintain the logic of the original that we should not use alloc_netdev() and free_netdev() but instead should just use kmalloc()/kfree().