Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2016319rdh; Tue, 26 Sep 2023 09:46:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjfieWs6xye03isz8CXwj8qrALlLT4RlajpK3Nm3YuLxKWWENAEeom7aBgDwn+W/cSaRgW X-Received: by 2002:a05:6a00:2e07:b0:68a:6018:a66f with SMTP id fc7-20020a056a002e0700b0068a6018a66fmr4963679pfb.2.1695746808612; Tue, 26 Sep 2023 09:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695746808; cv=none; d=google.com; s=arc-20160816; b=SX4eIy+T1a+yhiJK0xnHYvtYo8ScEnvghMxMaYw15RXpHgqGuKnaD/P7AxVNz2I9IE JgXY1HSZcvObNWwGQf0PT9jO+Kl1iNQUqV0rEO15fpDYAUFg08j2116fDmqeAoJJPSiv Z+psNwgsGIEp8W9ZmREejk/oTDKRNBB/Kq0NctK3kcHZFTOhjuxIUzVkgFwyQOzKgnlo OnfBkN8Et/6dP/ydq4uxlK1e2VZvTbL7WCZR4QcM+2rvS5GebTL5uUA7ZBbyJR//iOTj qtm/CEPvcXxY5csWJriuixn6Xc5N8OItSHpUoWcqeAjpTcl//Az3t1ct2ul3AtOjkTG5 DDyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=OnUbuisslHezc0omK8oiSubqvCprKl4W11zuNtbptYg=; fh=hQUEiiksHvYN/EFmEKRXMJqwCC0zT2cV3viCNHAv7Ok=; b=R7djAK+rf2CvDfnqw0FjCG93vsLLyhOpdREJN+riiYh/BjCA1XcRpjEhqSE5QuxfLC o0b3j5AsXplQOg7zAGoaHC/fZ+zuS71TPojRfMTM7v/GLtNcc3UgaWRPECY/2JTEI6QU LxT2uez9YSxaTzQ32aRPgRoYeiDNih3jSsl83Kj0D2/btPtCee2YpFPChwzB78DoguwU RRpv8pw4CRuHtu6kgV0X44Jd+U10lp/2/j/apGGkku4Fs0zQNRlpZCu4D1S0c1R5khMl 8hxmP4uP0+DEOH69iHif0Ouwdw2JeKrceYor1SGx8rxI4mfYvU54LmmU+xiSEeXF7TGm HM6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CKbs5rJ0; 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=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id q27-20020a63751b000000b0057458518e20si13154926pgc.164.2023.09.26.09.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 09:46:48 -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=@kernel.org header.s=k20201202 header.b=CKbs5rJ0; 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=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A2B3C8068893; Tue, 26 Sep 2023 09:36:58 -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 S235289AbjIZQgw (ORCPT + 56 others); Tue, 26 Sep 2023 12:36:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235275AbjIZQgt (ORCPT ); Tue, 26 Sep 2023 12:36:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37B9BB3 for ; Tue, 26 Sep 2023 09:36:43 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B478C433C7; Tue, 26 Sep 2023 16:36:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695746202; bh=lP81uXoqChNq6ZrPgB/+WsvOkHx6EnfAUwM1LkqDnvU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=CKbs5rJ0/RY2YSaDoBpcEwpN4FKzVMUIxuRpWOM+IJXQ2cARULamePKKGm69YBj3a EXewJ2LBEsDebRZ/p+APfg3H/NPIH4iJEc+NXT6O7V+oHn2srYUvSKWZU4x/ImzxFP 0sjfxyn0KglrgfqEVzsS68gEsIucNYWuAnlxZJ0MiOdFfkdd6/Qxtlj1JiiThr/W9L 8XNCHKK5ImfQZfhNu0VjiBd49YM+mf1mRFKlc9Z5rQQw7xKCcgigYc7cVOTYpoKvAT 6mgw7agEBRGD1D7qtsHMGAxrrp699ETLX7Fv4DgqnK1ope7UamRWOWzKt8/FtpmsEs T9HA6pryhJYAA== From: Kalle Valo To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org Subject: Re: [PATCH v2] wifi: ath11k: mac: fix struct ieee80211_sband_iftype_data handling References: <20230926163350.2641064-1-kvalo@kernel.org> Date: Tue, 26 Sep 2023 19:36:40 +0300 In-Reply-To: <20230926163350.2641064-1-kvalo@kernel.org> (Kalle Valo's message of "Tue, 26 Sep 2023 19:33:50 +0300") Message-ID: <87jzsc99if.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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]); Tue, 26 Sep 2023 09:36:58 -0700 (PDT) Kalle Valo writes: > 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 > to get HE capabilities. > > 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 Changelog for v2: * use ieee80211_get_he_iftype_cap_vif() instead of open coding it -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches