Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2287943rdb; Thu, 21 Sep 2023 14:10:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjywbsa02T37c7hX7W4kfk0XPYRhJ7XTq8cG42FONKRkuhzEMx+QBQ2IvELfCA2TsK+mJA X-Received: by 2002:a05:6a20:258b:b0:135:4df7:f165 with SMTP id k11-20020a056a20258b00b001354df7f165mr7307158pzd.21.1695330634653; Thu, 21 Sep 2023 14:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695330634; cv=none; d=google.com; s=arc-20160816; b=tBQliZh+yf/DfVfU1liGq0w4IEjqtRQMjVQzM+1SVn2lwockcBwxnIn/vMKmW7UZZc hrdG+En6TQFsRUgX4vyhJ9V8tfuZy4B3iChecYSmwc2zhGdM0U95h1Q9yiF/lwooSiRE NOpze98OoUF9nmqwIohOqXKxdGfFjjDMb2jCCfhKzgiipCKN6cYcU3DAT1EiVumuSlXr NVd+JkK3WUNLUuzJ8uKJYeH3wpVtEAeeGJfLkMf1NxftxOJlZRiMnJVxddrS+OFhHF2D QBLGV39ZWwyUp3F2CmcaQzsQHwvn53lZi3kE0A4bwuksMnCfC0Hbn2OdIi9IzeKHizel ccNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=LNygmIKmXn3TloZGMOTcy11agEPItZJYdzbjy1HGvWk=; fh=eFpEna1eBLf6rQpWJc4EGzoQ1sTnWiRdq+G4OKYcHhM=; b=X9EBeUZAx6dcEG6ckILCMgBiKjDIBQTBzYcChDtVCdGQycwrF+60RyUU5sUQ/St223 vBjGu1QEBFdRPt+TU6fLmkpV+q5j/mHE9+Yba5WetFYxiM+AH5JrBODUZ9CughMXhLcj tYS2VUzkPm8NRY4rvM6zA4HSF1szVrXbQaMx7NkiYGaIuM+hYhQqRbt4X4ftWhUdq6WG MNv1vzNor5W+vsuRrMBduZxByVM0IWlFb/fQK7wUXkK1x3kah2lha1aqWZwAg+hVOqEM jNR1n5SYAIm7BF6sdCdlpR0eJnveNoWR3alR/pCbj0xGKVPqmcZrIgdYBnaHIz+rjCje LE9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SliNADxf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id h7-20020a170902f54700b001c3e9b0bae1si2422719plf.443.2023.09.21.14.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 14:10:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SliNADxf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 6079581DE698; Thu, 21 Sep 2023 12:28:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbjIUT2X (ORCPT + 56 others); Thu, 21 Sep 2023 15:28:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230325AbjIUT1s (ORCPT ); Thu, 21 Sep 2023 15:27:48 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 363E75B88 for ; Thu, 21 Sep 2023 10:09:30 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38LF7K1m001558; Thu, 21 Sep 2023 17:09:22 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=LNygmIKmXn3TloZGMOTcy11agEPItZJYdzbjy1HGvWk=; b=SliNADxf7u5WBn+rq01ZtCA+qs2wlN0DEJJ28EcgQx8VXnh4Kb2Huo5xbh7NJ/ctQFSX BsKVmeDIllju3Dzh8olDIbrCpZLZGrVyUZtVeHkN/9XLxA5NlO7x/FnQ4Wo9keoOIrx3 pF6cgEBmu/f5bOthkhqLQnj5e7LW2BNesu1WEOjKFY5ANydhXkBq3GlqVHyLCOzlbFqo rKESAlss6RNw8kxpU06XF9w87hsLN57arPDV+WLDXqsYZPa1yLRk1jUS3keJT3RsVwmx 8XkIvE6CkfQZ2qYCroq1YMfQt+UpbBeN1+UghIXzuVRJy/rhyhH+sYzYBM127gTPLHuv Uw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3t8892252b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Sep 2023 17:09:21 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 38LH9KKK010028 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Sep 2023 17:09:20 GMT Received: from [10.48.245.144] (10.49.16.6) 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.36; Thu, 21 Sep 2023 10:09:20 -0700 Message-ID: Date: Thu, 21 Sep 2023 10:09:19 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath11k: mac: fix struct ieee80211_sband_iftype_data handling Content-Language: en-US To: Kalle Valo , CC: References: <20230921075440.1539515-1-kvalo@kernel.org> From: Jeff Johnson In-Reply-To: <20230921075440.1539515-1-kvalo@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) 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: jcGFp4CQEDmuo_hanOfCvgozzez4Wq8H X-Proofpoint-ORIG-GUID: jcGFp4CQEDmuo_hanOfCvgozzez4Wq8H 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-21_14,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 mlxlogscore=947 adultscore=0 bulkscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 phishscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309210148 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 21 Sep 2023 12:28:32 -0700 (PDT) On 9/21/2023 12:54 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(). Now we iterate over each > item in the array and use the correct vif type which this vif is using. > > Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > > Reported-by: Johannes Berg > Signed-off-by: Kalle Valo Reviewed-by: Jeff Johnson