From patchwork Sun Jun 11 12:37:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 13275214 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C502C87FDC for ; Sun, 11 Jun 2023 12:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233383AbjFKMhl (ORCPT ); Sun, 11 Jun 2023 08:37:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232975AbjFKMhi (ORCPT ); Sun, 11 Jun 2023 08:37:38 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFB8610D8; Sun, 11 Jun 2023 05:37:36 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-977cf86aae5so509169366b.0; Sun, 11 Jun 2023 05:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686487055; x=1689079055; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=o6QgzW966aN6BIIkzy3cK1mL47MJ4CEEdefvvAf/lCw=; b=QPs6ouJjMCKQWdtUgc3dgU1lUCNHVR3UNV4yaE3ZyXXxeW1SW0/XVCSDuFmvbueEq+ y7qD6g+gE/84Yzourvtzc+qvWiDGSYV6uREOmHdrKwQ0+yOpQhyR/5zIMkKwDzzg7kra n9GTPEDLgiU1qafi5A2zHPzYbdNuIWsXlAAzFA4ZOwHyPi29XCsFNe37aBxmF3zBRq8y 16166iKIKVtbocYQFzl1N5bZ704luL4tF0AH17A6aGBguhfCt87aU+uxQ2T6Ugc3qIIC ib/t68fZifu+gWf4VtaQWf44SB4w7lAEYbsgeKNiiBfBjPjsqtGzyPJiLsJlEwH3IbqV CG2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686487055; x=1689079055; 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:message-id:reply-to; bh=o6QgzW966aN6BIIkzy3cK1mL47MJ4CEEdefvvAf/lCw=; b=aiM9PMEWNlcQuT5w8R851siZa5A/1sdL8h4NJXVAuPnJfaLw4m0B2xhLaApmfxVtxs KP11tSNVgW0gzF6yRZ4QB/IZZo2O7nCzKkSj6GOI+0MTXyiZtCmnbKeG4kjbFlAgMJcu 2jDqryXtgxMGxnr1LGBbHeYnFCk6CwPjNpQkLV38Oc2CMmTw9pyNuT2mN/hBNnPTT6bk PRrJRARfdb4Iu+I+DuGdWeIcDx/NHeLr/uY31JAxjkGlJq717m6p4+35zQrgVCpDygqC gWJX+OQnVFETf9AhPx/5IKLXsfcfzP0QEDJntzkkk6Dn+ChsaYcUx7QlL1tyoUVmBnDK nvmg== X-Gm-Message-State: AC+VfDxe+Pr1ODWrCr0/6zOtC9S0d3sEZI4wFRyi5KElvuVNoMzap3IB wsig7IDaIiX9s0CzJismIxpfHHGQFJ8= X-Google-Smtp-Source: ACHHUZ5+L9bsKXky3I4zLev4ZT9LXDiJ8TXQja3KgzbdHNiaAdJAR1wnAzg9Ywpu1jzg+q/yLhNobQ== X-Received: by 2002:a17:907:3f20:b0:978:82fd:758b with SMTP id hq32-20020a1709073f2000b0097882fd758bmr6423965ejc.29.1686487055192; Sun, 11 Jun 2023 05:37:35 -0700 (PDT) Received: from shift.daheim (p4fd09ff6.dip0.t-ipconnect.de. [79.208.159.246]) by smtp.gmail.com with ESMTPSA id k14-20020a1709061c0e00b0096f6e2f4d9esm3759194ejg.83.2023.06.11.05.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jun 2023 05:37:33 -0700 (PDT) Received: from chuck by shift.daheim with local (Exim 4.96) (envelope-from ) id 1q8KK4-000LN0-2X; Sun, 11 Jun 2023 14:37:32 +0200 From: Christian Lamparter To: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Cc: kvalo@kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Conor Dooley Subject: [PATCH v2 1/2] dt-bindings: net: wireless: ath11k: add ieee80211-freq-limit property Date: Sun, 11 Jun 2023 14:37:31 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: <288fc9a0db6c292bc132e828611c41785b075078.1686486461.git.chunkeey@gmail.com> References: <288fc9a0db6c292bc132e828611c41785b075078.1686486461.git.chunkeey@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is an existing optional property that ieee80211.yaml/cfg80211 provides. It's useful to further restrict supported frequencies for a specified device through device-tree. Acked-by: Conor Dooley Signed-off-by: Christian Lamparter --- v1->v2: make dtbs_check dt_binding_check (moved to existing allOf: seems to be fine) --- .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml index 7d5f982a3d09..521dc71d5e97 100644 --- a/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +++ b/Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml @@ -58,6 +58,8 @@ properties: minItems: 1 maxItems: 2 + ieee80211-freq-limit: true + wifi-firmware: type: object description: | @@ -87,6 +89,7 @@ required: additionalProperties: false allOf: + - $ref: ieee80211.yaml# - if: properties: compatible: From patchwork Sun Jun 11 12:37:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Lamparter X-Patchwork-Id: 13275212 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B5E5C7EE2F for ; Sun, 11 Jun 2023 12:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233313AbjFKMhj (ORCPT ); Sun, 11 Jun 2023 08:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230453AbjFKMhh (ORCPT ); Sun, 11 Jun 2023 08:37:37 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C30C10CF; Sun, 11 Jun 2023 05:37:36 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5147f4bbfdaso4745188a12.0; Sun, 11 Jun 2023 05:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686487055; x=1689079055; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sV5kS4uFTylsIKBTpLATpLjmqF+bm2uJbZFR1pKIFFU=; b=cF6z1xdITZwBuJSfEmjH/z+MYgQa6wthMLGjBetd3+r+x+rszQ+Rm9mZozEEA9cHR7 2chTWTmNsABqQmt99SjzmNhB5X4R0F/0QIj0/7D558ncNVgwKZwzDuFgzA5U4AdxJsTL 4S8JPhYcuGHxn1NNbL7+t/QHJTKg0gYiAyDhM7tZ1/Tb9nRsv1RM87ySMLs5kbpulmEH Utga4iCqqyo263e32Up7YU2oMkVFX+I1T9KimFgLCDXkJLWm8xYDIAJOFEREkO5/08UO n5/9qrB7yxoeu8COJ29bHPXmKtxM+chHgyjz7KlO2IZgkvrkQfa8cj4TG7E3ZynmZQl8 bfNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686487055; x=1689079055; 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:message-id:reply-to; bh=sV5kS4uFTylsIKBTpLATpLjmqF+bm2uJbZFR1pKIFFU=; b=cSeVaNQQPB4qFSA0JBI2UVQ5QjQASgm30F2kaFstm+k3zddlqvP21vHVtkCALtxggU B9Zt30KbdcZW3Khj3fsB6/m5+MUbLtuLsiSYoy3HtRDjo6ir+UpmE2cVsQsuq0PdO2Pz 6xB69sazoUofvrBKln1eJeAu5O/tusGTylTZ9dggggeCmfcepXt5ZT5MPimNaAoBRFEh M5ULxJyxWFtGnL8uCpPo3oXJUxFrlH5CtTC4IZJalO/OYLmfLxTS4yordVq12qIKROG4 ufvpScxhcwo4OXQ0kdr/K/UmuPsNWmtiI2XopVpL52KpeROwSLTSZFVkddaGWtU5xo3l iLqQ== X-Gm-Message-State: AC+VfDwBCBC1Unw3tVy+yG+BWTqgDd0jYQHUq+bUDDuutYjUq9YQsVnM BGmIoFOgV49Cl//7BCCprxeckhPDyCc= X-Google-Smtp-Source: ACHHUZ5VWP0NHERLXgSX8/htApGTFSp4xIZ43YimlNMEmqPkZyr/BbV5qoFPogbWxjoMRvXLVK0GgA== X-Received: by 2002:a17:907:a0d:b0:978:6fbf:869c with SMTP id bb13-20020a1709070a0d00b009786fbf869cmr7003552ejc.16.1686487054755; Sun, 11 Jun 2023 05:37:34 -0700 (PDT) Received: from shift.daheim (p4fd09ff6.dip0.t-ipconnect.de. [79.208.159.246]) by smtp.gmail.com with ESMTPSA id dx15-20020a170906a84f00b0097bb01516c2sm2738842ejb.0.2023.06.11.05.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Jun 2023 05:37:33 -0700 (PDT) Received: from chuck by shift.daheim with local (Exim 4.96) (envelope-from ) id 1q8KK4-000LN5-2Z; Sun, 11 Jun 2023 14:37:32 +0200 From: Christian Lamparter To: devicetree@vger.kernel.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Cc: kvalo@kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Subject: [PATCH v2 2/2] wifi: ath11k: add support DT ieee80211-freq-limit Date: Sun, 11 Jun 2023 14:37:32 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The common DT property can be used to limit the available channels/frequencies. But ath11k has to manually call wiphy_read_of_freq_limits(). Signed-off-by: Christian Lamparter --- compile-tested only. --- drivers/net/wireless/ath/ath11k/mac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index c947d1c8d8c1..7e43f2770f27 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -9414,6 +9414,7 @@ static int __ath11k_mac_register(struct ath11k *ar) if (ret) goto err; + wiphy_read_of_freq_limits(ar->hw->wiphy); ath11k_mac_setup_ht_vht_cap(ar, cap, &ht_cap); ath11k_mac_setup_he_cap(ar, cap);