From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF673E7F129 for ; Tue, 26 Sep 2023 20:55:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233344AbjIZUze (ORCPT ); Tue, 26 Sep 2023 16:55:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231945AbjIZUzd (ORCPT ); Tue, 26 Sep 2023 16:55:33 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21207120 for ; Tue, 26 Sep 2023 13:55:26 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38QKqotK024854; Tue, 26 Sep 2023 20:55:18 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=NnIaeCTQlLYMDfNRAjt6gC50u/rje7hYhGKQNRxrJbo=; b=XgwZxj3u67WADaYY/1TBnq6Q7rOyvbE+EUaHJG9JC2sSYbPJ7D/c0hVAD2Z5LffuLsre 3kI2yc9j+PUKfUUxz93B4EkBxdlsM61Rka/BjdpH8x0u8qwtiYgpNaqRYTFWX9HMXNym cvE5NfGmX7aXCEZANOAj8ICuM2gwDBI3gXcTTYmbXbG9jfG/a5WeT408++7DCIXEddTa 6I9SeePVZt//rpBGnWPx27A44lfTCdh57E0S5ZioX2vfYp6lm9sJyGermrQ0MPNp0BaY lKdFowkb8KUL0GjTZzXFfXNx23MgLTwocvVAfLCwpK2zG93+n+ZUTGpYQvVJKquEIgxR 6w== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tbv661stb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 20:55:18 +0000 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 38QKtH2l009275 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Sep 2023 20:55:17 GMT Received: from [10.227.110.203] (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.36; Tue, 26 Sep 2023 13:55:17 -0700 Message-ID: <70a75205-8f27-4e73-9d32-d92b6f7bec68@quicinc.com> Date: Tue, 26 Sep 2023 13:55:16 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] wifi: ath11k: mac: fix struct ieee80211_sband_iftype_data handling Content-Language: en-US To: Kalle Valo , CC: References: <20230926163350.2641064-1-kvalo@kernel.org> From: Jeff Johnson In-Reply-To: <20230926163350.2641064-1-kvalo@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] 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: GIGySks6rvU9zN3uuTIl6PTo12ebh1gr X-Proofpoint-GUID: GIGySks6rvU9zN3uuTIl6PTo12ebh1gr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-26_15,2023-09-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 mlxlogscore=930 bulkscore=0 phishscore=0 suspectscore=0 clxscore=1015 impostorscore=0 mlxscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309260180 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 9/26/2023 9:33 AM, Kalle Valo wrote: > From: Kalle Valo > > Commit e8c1841278a7 ("wifi: cfg80211: annotate iftype_data pointer with > sparse") added sparse checks for struct ieee80211_sband_iftype_data handling > which immediately found an issue in ath11k: > > drivers/net/wireless/ath/ath11k/mac.c:7952:22: warning: incorrect type in argument 1 (different address spaces) > drivers/net/wireless/ath/ath11k/mac.c:7952:22: expected struct ieee80211_sta_he_cap const *he_cap > drivers/net/wireless/ath/ath11k/mac.c:7952:22: got struct ieee80211_sta_he_cap const [noderef] __iftype_data * > > The problem here is that we are accessing sband->iftype_data directly even > though we should use for_each_sband_iftype_data() or similar. Fortunately > there's ieee80211_get_he_iftype_cap_vif() which is just we need here so use it nit: just *what* we need > to get HE capabilities.