Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2099531rdh; Tue, 26 Sep 2023 12:21:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGjUjaAiuTkmMeOpzlHzfp8yh3iTx9LfsOg/RjgqHXL557GHKz+kGcvP7oueu75BBsxZay X-Received: by 2002:a05:6a20:8413:b0:151:b96f:88b4 with SMTP id c19-20020a056a20841300b00151b96f88b4mr13476650pzd.23.1695756101065; Tue, 26 Sep 2023 12:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695756101; cv=none; d=google.com; s=arc-20160816; b=0/d6OjNUaT1cPpde6PvM2nxIdUmz7Fuxk18HwNgBH0k7Bj6Ipe+GZYek3QIbgbszIC WKTuRMdyHJmGmpvIpu6gij4wD/sEsjzJHx3ek890UrBi/Q80msq2aVD90YLwAMS1qdbi +tGr9ZYqBpagCyHsd8K0tuAwjonveyMwWR18w6AEi/Mh4qnK6sYSZM276AMmH44DAw68 loaQwWb0Bti878CYSniJicvq9wlMgGsmai3AONWvfF3vW0XStGgm2Biw1BFiRN58KRYF WkYbCt5lf0SilfXK7NUKguNBLVXHquQBYZtT6wy7nMLf6VDF7BtAH1EXxpt5P0reiUKS LHSg== 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=6xKpOzQ3kR8sfBH8sf7FQ3BcHKl6xo70diHVYo6AEB0=; fh=mMxdRsZkrSk7g5NeleSk6URQO1JKDtqUZfWKfoHGiuU=; b=bi6a4P0XLLURTSoyal/B4cJZ4hsp/nGECm1KSQTY7g8eCudxaSXsETgXjhEH38RAfr xDRn+h1eQmAPpOdENmi64ckyDUWP0hVO1BdHvlNV31mslGx2tIwxYDYUBGLdMjVLLKYk s2svWPxcDcI9dAq8g0ld0UZWcZHGvL5a+U6khWTSM3rcEYCqthXgQCCn0um4A7xxmi29 u9o02t599m6AZam2IA31RnrpR3b9Cw5iFg8QX7+yxRfSldKbCBQ9mSQKPOH9WYKMuYnA SKmhDU4j0dJZjbYHwF8LEgXmiVGlfTgOuOYAqpHLefbhHLotEEpj+T4QJhxkYeKGw3o6 LUfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V4Q1hwIb; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id bd8-20020a056a00278800b0068a140568b4si13539092pfb.348.2023.09.26.12.21.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 12:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=V4Q1hwIb; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 8420781603BC; Tue, 26 Sep 2023 12:05:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235740AbjIZTGC (ORCPT + 56 others); Tue, 26 Sep 2023 15:06:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235715AbjIZTGB (ORCPT ); Tue, 26 Sep 2023 15:06:01 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46A77DE for ; Tue, 26 Sep 2023 12:05:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 303D3C433C7; Tue, 26 Sep 2023 19:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695755154; bh=7wY1yolZBWdNMw1lFtLTpWHClKu+sx6vQPHOLa38gm4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=V4Q1hwIbrhlonESOxBBuVzhtJhEWhEVya23Pkw282wJdvw9c0V0tIO8wG8/xOVLXw LmDMeAxtt9IezHDssvwaBnc3sEFkkT1JOYY0EydOKddUTamp9PE3CQKV77NNy+r5jB P+eWS0vmTX3OqaTqizdawvmvb3CMdm81LIcHAsIrg4ruEiXRR0z+m5jiCOMgxw/7zA dAX0d0UtDFdr4VSQtQqhc/cZYe6ZG3xI4pME+RElTleWvlmRHtjOc4f5wbNFSw0myW md5d1V/NjHl8K9jO2PxJuvlUa6Dlqb2TON2ZT1bvlt8HjM4sXWDyuvIpZuOY+Zj/qI cVI5RdCQ6mQug== From: Kalle Valo To: Johannes Berg Cc: ath11k@lists.infradead.org, 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> <49b5de54ca00f5521ceaa8210f587f2af48d6835.camel@sipsolutions.net> Date: Tue, 26 Sep 2023 22:05:51 +0300 In-Reply-To: <49b5de54ca00f5521ceaa8210f587f2af48d6835.camel@sipsolutions.net> (Johannes Berg's message of "Tue, 26 Sep 2023 18:43:56 +0200") Message-ID: <87fs3092ls.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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 26 Sep 2023 12:05:57 -0700 (PDT) Johannes Berg writes: > On Tue, 2023-09-26 at 19:33 +0300, Kalle Valo wrote: >> >> - he_mcs_map = >> le16_to_cpu(ath11k_mac_get_tx_mcs_map(&sband->iftype_data->he_cap)); >> + he_cap = ieee80211_get_he_iftype_cap_vif(sband, arvif->vif); >> + he_mcs_map = le16_to_cpu(ath11k_mac_get_tx_mcs_map(he_cap)); > > Technically, ieee80211_get_he_iftype_cap_vif() could return NULL if you > didn't actually configure/enable HE for this iftype, the static checkers > might complain here. And this is even mentioned in the documentation which I failed to see: * Return: pointer to the struct ieee80211_sta_he_cap, or %NULL is none found Thanks! I'll fix this in v3. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches