Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1271234rwb; Wed, 28 Sep 2022 16:05:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6j6Ip8TV4lGIpb5UdpjMzdinLgNGK2j3JXK7LR9h3hyKI5nsDLRW+xkDex7ISnUv/gXy1x X-Received: by 2002:a05:6402:e9b:b0:454:351c:c222 with SMTP id h27-20020a0564020e9b00b00454351cc222mr368425eda.216.1664406319443; Wed, 28 Sep 2022 16:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664406319; cv=none; d=google.com; s=arc-20160816; b=GhY9TZLgMScs8zIa1RPNoPU1fKjQGO0Dodxw1K3c0oBtdeQ4FXBda4l/HQsNeHBElX yohADc7gduAVyExiFLBvShiGs3oIxGQUW56LZevCZ0TvBhbxK1fp4N4sL+3DEYEuXDSy 4yFi8OdBEmjv4Cy34M0w0Lqxwx7qO1V866STAHYUt+DL1B4nBJsFik6ll8cjxf6awr7m 7k0xJAkKi4vEhwYvOxiZ/pPNPPAz1mU6WeP+XVpvg4d5IwrKO/3I2+pFxTDk+1HgzvFL QC1oPkP1lXR476ZdlZHL2t8CD3njD5al0r5nINlySluBcDryOYvh3h29wk+k0HpNLpHr s0HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Yrf9VypQmXniiAt1Rrqqdwkj06oR7gkPD9h3efyfcaY=; b=zY/uyg/aMJzM7ZwyMZIyvnyTWDZoMtXFjeYUJPdaxAFCvBXIxnVm7Oht32Sf+fe1aL qdsUHlcGaopo5buqn7pdx/u569X8h9gRcwAWSEzmadgn9ojyyKX1fbRwQNxxgr3qnm0S u3WvU47K6fXhBDg115TVVpW1G4h3ZhipzfGnX7lShFDeBrIfNJJmXCtCqSd6ezhVwcUe ygXQXw+DYha7JHcfhcvJXlShYfbqaDFYdB2HooaezYoMHQz6gZTekz7TYl0LzJ6gAufr 6gstLiez9FKwrB4Yq/pOClIaDvdJMRAvp/KxNVYB+BTVxDKJnXhHUYsSUNqr/Iy+DKKF lZvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WDGdFfpv; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a05640205cb00b00448b88378f8si7636099edx.359.2022.09.28.16.04.54; Wed, 28 Sep 2022 16:05:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WDGdFfpv; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234141AbiI1WtR (ORCPT + 59 others); Wed, 28 Sep 2022 18:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234109AbiI1WtP (ORCPT ); Wed, 28 Sep 2022 18:49:15 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1058B111DC5 for ; Wed, 28 Sep 2022 15:49:15 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id b23so13734610pfp.9 for ; Wed, 28 Sep 2022 15:49:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=Yrf9VypQmXniiAt1Rrqqdwkj06oR7gkPD9h3efyfcaY=; b=WDGdFfpvzhqU1ZnRxaqxRcJ22foTvQ1gbkCFu6ztXYfIDE+gwTWmn2dRXMgy5jgzjR X909+NKSbCtXbUWLCjL4VocKXEa+Aj896zxXW94FFXGL32h5tOor9oDqI9IuYR3RQFaF c5hCj37MVPF3+xyd42nkXxV42eyPgeWMeG8GCj6pHFA2IqvCJ/skSxUA3j4BdjweEB9Z SVFo++CV+6pIaBHrUIv/2N/OnSwPDDUvheV4ICvicyJf1WDmX//H/tqn2GTU5wDYj8Ed lmrayRBGcXqeltYMlTrAJNUR+ZE12rwnJ4qdSxWvGC00QG4hEpVtassPyx/Ht0sEy+v5 4GEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=Yrf9VypQmXniiAt1Rrqqdwkj06oR7gkPD9h3efyfcaY=; b=qXGFiVO5GvKe0Y1nUr7zxII/oEVPTPokxQlj9ZhNVR9UqjqwerSCioFg97ZKQb1UC3 Y/8X0UDU1Hu/lYzizrhunsV+Q3Bmb4nbO7V3dDTuHsCdesTCgr4OnOHBc5ybb89jsrsc I2KH/Sur/em+e9VfxiKrXIOD0dJW+vGP3yO0U0ZKxBikZ02Y81TxYWvWJQ6apaBtWfBZ qFyWNPpIEn1Qkabpm9Uwf1jzfqx1muq7eJIeF06+zs77mCpA5s12t9HMMXWPlLnFuaVE R48M25mXDnNEfkt+0yo4Ea1StgsyJDAgH9+ZP+F+EkPvawdYa75f3g8SvjtkvH2jjiDX Fkqw== X-Gm-Message-State: ACrzQf0+1VXYhzXiiWQkM6OKH+ik+kotHUhL9nLqa01vuYyf2q854cmF MyZwu9KlVUH/8hNDdA6aLPXJaT3KiJc= X-Received: by 2002:a63:da4b:0:b0:439:14a8:52b with SMTP id l11-20020a63da4b000000b0043914a8052bmr96473pgj.500.1664405354362; Wed, 28 Sep 2022 15:49:14 -0700 (PDT) Received: from jprestwo-xps.none ([50.54.173.139]) by smtp.gmail.com with ESMTPSA id ob6-20020a17090b390600b001f2fa09786asm643738pjb.19.2022.09.28.15.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Sep 2022 15:49:14 -0700 (PDT) From: James Prestwood To: linux-wireless@vger.kernel.org Cc: James Prestwood Subject: [PATCH 1/1] wifi: mac80211: fix probe req HE capabilities access Date: Wed, 28 Sep 2022 15:49:10 -0700 Message-Id: <20220928224910.453232-2-prestwoj@gmail.com> X-Mailer: git-send-email 2.34.3 In-Reply-To: <20220928224910.453232-1-prestwoj@gmail.com> References: <20220928224910.453232-1-prestwoj@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org When building the probe request IEs HE support is checked for the 6GHz band (wiphy->bands[NL80211_BAND_6GHZ]). If supported the HE capability IE should be included according to the spec. The problem is the 16-bit capability is obtained from the band object (sband) that was passed in, not the 6GHz band object (sband6). If the sband object doesn't support HE it will result in a warning. Fixes: 7d29bc50b30e ("mac80211: always include HE 6GHz capability in probe request") Signed-off-by: James Prestwood --- net/mac80211/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 0ea5d50091dc..be69cddaf139 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2046,7 +2046,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_sub_if_data *sdata, if (he_cap) { enum nl80211_iftype iftype = ieee80211_vif_type_p2p(&sdata->vif); - __le16 cap = ieee80211_get_he_6ghz_capa(sband, iftype); + __le16 cap = ieee80211_get_he_6ghz_capa(sband6, iftype); pos = ieee80211_write_he_6ghz_cap(pos, cap, end); } -- 2.34.3