Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp11143620rwd; Thu, 22 Jun 2023 09:13:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5CHcxQubrYh8F/J65wRTsfBjoPr0x4X5GUOdFywfXf8/7KTpHWtBVMYFebvgYbllcFIWA6 X-Received: by 2002:a05:6a00:14c1:b0:668:8493:2552 with SMTP id w1-20020a056a0014c100b0066884932552mr13534099pfu.18.1687450429755; Thu, 22 Jun 2023 09:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687450429; cv=none; d=google.com; s=arc-20160816; b=cGYebjSUMyAAihbCB3RUUmo6HiFSnkXyEkfx70xhddAgYu2lV3wgcgYXc11LoL0948 +uKercfUGm+mpcd+NHJ/Bv4XutwLybYuQ919U6kaxfMHpFJyModhnl9Ry+mvcCWlMCGa ufkTLBhe3sA3GD/AqTm54DpH3YYIA0AeZN6+htDaGnARWGxQCYF3UZkA8Z7UVakC0v6u 5KKuxfcOIp8am6XqLa76JcPI3XiDJ9tu3vosaIsWjaRRCQO92yDgktK88TqLIzlcwwDh FfCHPmzlshxKj7tHcu7qRmE1t8sWMqP1oB97JWB9srkCtdI9v1dkgD5nGoFc84BfBQFc hb2w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cpi4+mvQwcZFjQLQ1URHT2Jl4bZNWpSvgmilQnSu+80=; b=ZhBjgjnksbPTyLdk1x9Tj7vQIt4wLx7Aw7BhADUknqVqVCIA6oDSH/0ixwBhxnS+zr fuRwfEJEMPsuSy5fUfCjO/QVAvaPNNP91jFJOFXbBmpvDfkzTFwwlw3DWfq4nWQ7CdgG BTJrl27Tw+6aM64GGAhlsSiI7Bs0S6qw3l4KscdNTK62K7do31L8Xy7+OFMQcL5pzPsq ndAZlQOecyGnCcICP19s9rPh5DC18xZqDr/04NrKsWAV+fWJK+R05D8BNCYQb3hY8AXH 2GdBfKBYTgYwJ0aVYJhDKemDWEu5mmqBXIcIg9++8p9iMffXRSdBT4PtL55KcTgGVuZA 4qqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=QO+wFtMs; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t28-20020aa7947c000000b0065296ab4747si6748255pfq.193.2023.06.22.09.13.42; Thu, 22 Jun 2023 09:13:49 -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=fail header.i=@nbd.name header.s=20160729 header.b=QO+wFtMs; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbjFVQFO (ORCPT + 59 others); Thu, 22 Jun 2023 12:05:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229542AbjFVQFN (ORCPT ); Thu, 22 Jun 2023 12:05:13 -0400 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2521B199B for ; Thu, 22 Jun 2023 09:05:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=cpi4+mvQwcZFjQLQ1URHT2Jl4bZNWpSvgmilQnSu+80=; b=QO+wFtMskfimOIRHkm6fWQKJWT Mxmym8KxAliiXUmdAchixqniLy1c7W1h+N4VccCjA8bzdG0rwuvfj9a+nFQMFVEiEvJjI7KP32Rfw bAxOXQtgS7lJQfpee3kk9CZGakOhedByPNXWjLl2n40jVroU7B8PJAEpy046yr/xkBoA=; Received: from p4ff133b9.dip0.t-ipconnect.de ([79.241.51.185] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1qCMo3-008uJO-8w; Thu, 22 Jun 2023 18:05:11 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH] cfg80211: fix sband iftype data lookup for AP_VLAN Date: Thu, 22 Jun 2023 18:05:01 +0200 Message-ID: <20230622160501.40666-1-nbd@nbd.name> X-Mailer: git-send-email 2.41.0 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,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Since AP_VLAN interfaces are not pushed to the driver, the driver should not be expected to register iftype data for them. Map them to the regular AP iftype on lookup. Fixes: c4cbaf7973a7 ("cfg80211: Add support for HE") Signed-off-by: Felix Fietkau --- include/net/cfg80211.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 7c7d03aa9d06..d6fa7c8767ad 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -562,6 +562,9 @@ ieee80211_get_sband_iftype_data(const struct ieee80211_supported_band *sband, if (WARN_ON(iftype >= NL80211_IFTYPE_MAX)) return NULL; + if (iftype == NL80211_IFTYPE_AP_VLAN) + iftype = NL80211_IFTYPE_AP; + for (i = 0; i < sband->n_iftype_data; i++) { const struct ieee80211_sband_iftype_data *data = &sband->iftype_data[i]; -- 2.41.0