From patchwork Mon Jul 30 15:39:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 10549245 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4E2BA801 for ; Mon, 30 Jul 2018 15:40:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 921CF2A2BC for ; Mon, 30 Jul 2018 15:40:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CEE02A2EE; Mon, 30 Jul 2018 15:40:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE0842A2EE for ; Mon, 30 Jul 2018 15:40:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726758AbeG3RPp (ORCPT ); Mon, 30 Jul 2018 13:15:45 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35086 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbeG3RPp (ORCPT ); Mon, 30 Jul 2018 13:15:45 -0400 Received: by mail-wr1-f67.google.com with SMTP id a3-v6so13383067wrt.2 for ; Mon, 30 Jul 2018 08:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openmesh-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=4w7H5Tcp4O1djO1BKLqaI5mxd0L07d7ZISSbzMXkgco=; b=lEislD5pyoLpJkmtFjaWh7FGiO16jLRZ7nURwJDr87EfZKIqQSGdCDF4B+9YCiGSTj 0Q+egv1Od1NGyUD228IhZsob71CDrl4QreGh8p7MT8iY3RzLLQu2G5cLncwQSf/otQm7 SaO19t/j/vYdAiSRg6nh1isOxwEyI7G+VMshEEPblSzEFo7Netrh4gcOsybsz2AFNaqn Rdo+7kNm8ROOYbaG3EKI3Q/+4n/YEbwgdPI4YuL1Krt5bU2IpZHFhJzhrU0ceJq1DfNo 3rvD/22y38o+f9RPkG0g5phNtwOJgK8YQZiMzgxNBhy/Q7MzNuY5k92sUkPoAPWHURox HrPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=4w7H5Tcp4O1djO1BKLqaI5mxd0L07d7ZISSbzMXkgco=; b=aiBjJXmR4LP85sOseNXNJwmPDw2735eyqa6V8qyBFkIRSMOj8EnosNBKE5HUSE0XT1 xlBtSzeuAYFXNW8lEYNsPiDJWWo3DjPsmnV4kPHoLFDbBtwSXyJ64vVCIhy2H/cdPLxk sFW+KiT3K/BACq1mxyWaOKQGIkOR2nf5CNPWyTrksspsvNpjp2yV6FSfV+ZvhXPk1l/Q P/YHNpQj111p5G4ik+tSipBWVRUr+kdAB2HQxAYzr5/ALoaxsd1Rbzfy4lE/HwIGAmIj RHrUD/LpNN4WdWLzz7XFt3F8VFldIw61NYny1hVJKqhClLm37tRp43Tzwzen2wCU8dTd xCfA== X-Gm-Message-State: AOUpUlGD8HzgG1H147nbCDhLnWHotc7Hj/lcpt7Jfdz3vPDiBH+Rk6xs eJ5Q8YR5qm4qREYguz8n23RUM1FBCNg= X-Google-Smtp-Source: AAOMgpfleCzXpnJLhSmoBgfp9S1JSoesLxbWvkhXCXcbqwYWToZuSHsSV63+YPzeYLCbNhWFtmKnhA== X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr18773092wrd.53.1532965211788; Mon, 30 Jul 2018 08:40:11 -0700 (PDT) Received: from sven-desktop.home.narfation.org (p4FCB201B.dip0.t-ipconnect.de. [79.203.32.27]) by smtp.gmail.com with ESMTPSA id z5-v6sm19229289wrv.2.2018.07.30.08.40.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 08:40:11 -0700 (PDT) From: Sven Eckelmann To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Sven Eckelmann Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit Date: Mon, 30 Jul 2018 17:39:33 +0200 Message-Id: <20180730153933.3771-1-sven.eckelmann@openmesh.com> X-Mailer: git-send-email 2.11.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in the RX and TX path. These filtered channel can in theory still be used by the hardware but the signal strength is reduced so much that it makes no sense. There is already a DT property to limit the available channels but ath10k has to manually call this functionality to limit the currrently set wiphy channels further. Signed-off-by: Sven Eckelmann --- drivers/net/wireless/ath/ath10k/mac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 95243b48a179..8ed37ffd320f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -18,6 +18,7 @@ #include "mac.h" +#include #include #include #include @@ -8306,6 +8307,7 @@ int ath10k_mac_register(struct ath10k *ar) ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; } + wiphy_read_of_freq_limits(ar->hw->wiphy); ath10k_mac_setup_ht_vht_cap(ar); ar->hw->wiphy->interface_modes =