From patchwork Thu Sep 6 14:20:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Psyborg X-Patchwork-Id: 967027 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Lv86XMQx"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Hl5p/MYc"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 425jRT4nBBz9s55 for ; Fri, 7 Sep 2018 00:21:09 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=EhEXiPY+nYVOcrRDiSW0kUDEOu8yzWGQbSa/P1Q6BWY=; b=Lv86XMQxn3b8bI OKrOpFlJlgqlpkN4dVrsZKNTV0PVAAsL7iqegZ7Gm0UGLTaFZkk+LhMFDaQja4UwjNgB0rXZ29UoW /3Rv5BjjZM+zitEKDUHv0Thd6eFHM+dyV79XA1/AZAnGArHs1nxcS+978Z38EwSHo+pfnL+11Q315 Bk5v6DogNaCs83s4GLipju++3lmbZNZGGwgkg6q3ZbSHKluej8K7Pcs7sUs4hDPxayS7bOxvx57g8 Uu3ZC36AjdjMSSarSNLQbOQXMWZRMWB5rVGpIawx2r2bXEr6mYTtyj/YX21Czqs19wnjxIRLvjyWq qNJz1+dwSR73pmRk1p4A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxv9d-0006NN-Hh; Thu, 06 Sep 2018 14:21:05 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxv93-00045k-KD for openwrt-devel@lists.openwrt.org; Thu, 06 Sep 2018 14:20:31 +0000 Received: by mail-wm0-x241.google.com with SMTP id s12-v6so11635828wmc.0 for ; Thu, 06 Sep 2018 07:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=5Cczrm3nvhtqcdtqFlfB71XvRVaa9NiORqQ82AFtM5k=; b=Hl5p/MYcGybQ+tDIQUHIAI51dYGyYljOmm+0MjyKcdprNyW3TRWHxC2iFOEGRD0R4f RZcZQgvjeNhJ7STs3eO0cWBQOTuiqSy5Lxj89oiW9L6rLEZGNjTs0T+YZ4o3pwTdVPaI u2KaRYkWXGMnWSX5CE8bMsqkymbOr3p4IOOtjcq5DCxoDHk4Ily787w7HEV6Evfgt1sm M3V+7yQrlAuR/NcFBojTgck4wP4SKfkz10SZDCrh/lee2+ACEA3Sxbpkrq4qxAaY8Aoy HYXrw2GhvcX4jC1A9fag/ke9IhhYOY6JqXSWG9+NnyQJ67bfKVeyt7EAHLymPJTwiPTg 0Akg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=5Cczrm3nvhtqcdtqFlfB71XvRVaa9NiORqQ82AFtM5k=; b=V3Bdv8A0Kv3T2N3o87S4IYPrdjlJ1qw9lahuTz777SZSws1WYpZ/6FzCXirib/+Yjp TFsZnwVLRP+rTgkKMdLDdqPlgXAfjpcKkFdMPacFDtoQyUwkYU6LfOqD7Evu/J4F8+Fr l0ZT/4a4NCGrvOVk6M/1WOsOjnDuP9o+COe+6LSMaUu/S+p1le04IA+6qCbFM15yLFDH ipMA2xn8V3ZAKiQ5079SMbZwtLMsbFkvL1S7A7gr+x5kYPGdw4wBC+QQRUsZ1Q4S/UW1 jtq+sSL2uBm57Ob58QkTvsAuhlfnjk/194YzlNm6X5ma65GZFdbMip+R9FQT0Z/BArft 03JA== X-Gm-Message-State: APzg51C6FFqZKIRPyQqJ97ML8un7nfbrVR9KN7HeZ+k+x3EIfFpZczno tDcHFGxQOb/yWOftfKj0sfyLShAm X-Google-Smtp-Source: ANB0VdbOq3Vw2bmUz6k6XnrCB4LIzgHiSFT2rAM4i5HvZqM205lJm+EupLoTKJtZMQzSiJ99QG+lZg== X-Received: by 2002:a1c:1745:: with SMTP id 66-v6mr2193173wmx.38.1536243617338; Thu, 06 Sep 2018 07:20:17 -0700 (PDT) Received: from localhost.localdomain ([31.147.208.18]) by smtp.googlemail.com with ESMTPSA id i4-v6sm5723653wrs.85.2018.09.06.07.20.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 06 Sep 2018 07:20:16 -0700 (PDT) From: =?utf-8?q?Tomislav_Po=C5=BEega?= To: openwrt-devel@lists.openwrt.org Date: Thu, 6 Sep 2018 16:20:12 +0200 Message-Id: <1536243613-23135-1-git-send-email-pozega.tomislav@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180906_072029_736780_1A64887D X-CRM114-Status: GOOD ( 10.70 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pozega.tomislav[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 1/2] mac80211: 5/10 MHz channel width support for ath9k_htc X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Add 5/10 MHz channel width support for ath9k_htc driver. Connection tested between several devices and working. Signed-off-by: Tomislav Požega --- .../patches/512-ath9k_channelbw_debugfs.patch | 62 ++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch index 2ebb73d..9349c07 100644 --- a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch @@ -123,3 +123,65 @@ return channel; } +--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c ++++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c +@@ -398,6 +398,50 @@ static const struct file_operations fops + .llseek = default_llseek, + }; + ++static ssize_t read_file_chan_bw(struct file *file, char __user *user_buf, ++ size_t count, loff_t *ppos) ++{ ++ struct ath9k_htc_priv *priv = file->private_data; ++ struct ath_common *common = ath9k_hw_common(priv->ah); ++ char buf[32]; ++ unsigned int len; ++ ++ len = sprintf(buf, "0x%08x\n", common->chan_bw); ++ return simple_read_from_buffer(user_buf, count, ppos, buf, len); ++} ++ ++static ssize_t write_file_chan_bw(struct file *file, const char __user *user_buf, ++ size_t count, loff_t *ppos) ++{ ++ struct ath9k_htc_priv *priv = file->private_data; ++ struct ath_common *common = ath9k_hw_common(priv->ah); ++ unsigned long chan_bw; ++ char buf[32]; ++ ssize_t len; ++ ++ len = min(count, sizeof(buf) - 1); ++ if (copy_from_user(buf, user_buf, len)) ++ return -EFAULT; ++ ++ buf[len] = '\0'; ++ if (kstrtoul(buf, 0, &chan_bw)) ++ return -EINVAL; ++ ++ common->chan_bw = chan_bw; ++ if (!test_bit(ATH_OP_INVALID, &common->op_flags)) ++ ath9k_htc_ops.config(priv->hw, IEEE80211_CONF_CHANGE_CHANNEL); ++ ++ return count; ++} ++ ++static const struct file_operations fops_chanbw = { ++ .read = read_file_chan_bw, ++ .write = write_file_chan_bw, ++ .open = simple_open, ++ .owner = THIS_MODULE, ++ .llseek = default_llseek, ++}; ++ + /* Ethtool support for get-stats */ + #define AMKSTR(nm) #nm "_BE", #nm "_BK", #nm "_VI", #nm "_VO" + static const char ath9k_htc_gstrings_stats[][ETH_GSTRING_LEN] = { +@@ -520,5 +564,8 @@ int ath9k_htc_init_debug(struct ath_hw * + ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah); + ath9k_cmn_debug_modal_eeprom(priv->debug.debugfs_phy, priv->ah); + ++ debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, priv->debug.debugfs_phy, ++ priv, &fops_chanbw); ++ + return 0; + } From patchwork Thu Sep 6 14:20:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Psyborg X-Patchwork-Id: 967026 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=198.137.202.133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="R/dJaUbr"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cuBIeEZe"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 425jQv1Jqtz9rxp for ; Fri, 7 Sep 2018 00:20:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=cWIKwGBfMkWZzRVn0uMeHVDy9alZnwzz/s/92KwVB9o=; b=R/dJaUbrAqbYIRvQAi9OYmT/Dh 0GVVyPz1hdEeo99p2/nJWbbXk80+OZ+wK5BlcpswMUK596mb01O6XAYjBVbl9YHtrGLaK4dSL12hk GOCbZT0AQEcHQxmJ//hJdk6mw3rG7R/ODwU5ZE9ueaD8VddT3/7XaRzsaZ3Ziy8K0IYA7lbfb0dEk JWtufZH+0cxMB8JscQeEbR0yRquRbWpYJu/ZS3PK0iXldT+YAQmLbH2EKURsHRDuNoE6YJMwUeoYr Tb/FxFaBLWyUNYa4no5W/NExYoucI02CBlVKhTv0fWITT75w1ummKXnQBxnZOtLkhsTgFpamhOrxm 23zxVFkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxv97-0005SU-7K; Thu, 06 Sep 2018 14:20:33 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fxv93-0004CE-K2 for openwrt-devel@lists.openwrt.org; Thu, 06 Sep 2018 14:20:31 +0000 Received: by mail-wm0-x241.google.com with SMTP id f21-v6so11587456wmc.5 for ; Thu, 06 Sep 2018 07:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=KKez3bhzpRutu/ZDiT4acQ0OvmIWh0eQF1kAI2quWHs=; b=cuBIeEZeluI16HIBNDOFf5DmUYxXrO+NaQwZp6BWlHRwNmeum3Y6pCylVWihnTuUZV qg02XMA2Q6MIUrzG4S954yMoYgDO9vaKQ4ZF/VTG//4nrnZZOG2JB7RUoa3sMCsf63Nc tvDJKlAnccOgqlExLJDE3ZACxUayvK71MN3dQG9LoridYJzKw01ajC45DXr4AYHsXLSN L/c2WFha4eiOnFvyITvHzuLjQpmib0hCu4jH+xbDbdJHyrE6iagWV4eTDTtKWatQ4nVw FuEhMYOJOOXdKmkvnyrKcXpgDRKOvPJxQqD7SLmnPYo7LTc/jc0H35gutwI7sxQUsC9c /L8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KKez3bhzpRutu/ZDiT4acQ0OvmIWh0eQF1kAI2quWHs=; b=RPnTVUI3wNF+aS1QtxHwy7VfA1sBiEQuWldZAlp4zXFVnd21V1BRm303GeAJolVqXd WnqYnBwD97ALyGYTKqCGJkcEyHgb83cZjQ6/Q8jrjnF2Ps/DMVrVUdG3eyTmK05QmGIO cTTtXBEcs+cou7XJotZ+Io9dFcZUZ01VvQd/VRI3IXfzmVBGXOg9O/wpCfrfxNXKKBa9 7LspHm6enoGp+T4Y8T/BPV6oe1iO8Tri5l20kMQnpi6WQwaK74s9WfFbe/hbbn7L6c8N ETRZlMm3fjz1gyJPHGD2TGl2Y3pZ1n4LVgXCJMmeNWaejYtq/BK8TuN+3ddUSR6OUdby aT2A== X-Gm-Message-State: APzg51CHGQlD9FBoij0P5/cwQ8ERRp9YfILHwL59ribULGTfj10Db7Zt yK2ptYtzUJZ+7Sj/C9ePDRc8d42p X-Google-Smtp-Source: ANB0VdYaN168FQ0FTjb2wY+5Ff9w1ptdxghkiFRUVUYzFQfSSnZCqMaZrY8qSY0nvstwA7vWFkn6hw== X-Received: by 2002:a1c:b9cf:: with SMTP id j198-v6mr2386116wmf.93.1536243618265; Thu, 06 Sep 2018 07:20:18 -0700 (PDT) Received: from localhost.localdomain ([31.147.208.18]) by smtp.googlemail.com with ESMTPSA id i4-v6sm5723653wrs.85.2018.09.06.07.20.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 06 Sep 2018 07:20:17 -0700 (PDT) From: =?utf-8?q?Tomislav_Po=C5=BEega?= To: openwrt-devel@lists.openwrt.org Date: Thu, 6 Sep 2018 16:20:13 +0200 Message-Id: <1536243613-23135-2-git-send-email-pozega.tomislav@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1536243613-23135-1-git-send-email-pozega.tomislav@gmail.com> References: <1536243613-23135-1-git-send-email-pozega.tomislav@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180906_072029_711596_8C4F36AB X-CRM114-Status: GOOD ( 12.51 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c09:0:0:0:241 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pozega.tomislav[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 2/2] mac80211: expose chanbw support to debugfs for ath9k_htc X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This will ensure the htc suffixed driver also gets created chanbw debugfs entry. Signed-off-by: Tomislav Požega --- .../mac80211/files/lib/netifd/wireless/mac80211.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 244260a..ea827bd 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -772,7 +772,7 @@ drv_mac80211_setup() { staidx=0 [ -n "$chanbw" ] && { - for file in /sys/kernel/debug/ieee80211/$phy/ath9k/chanbw /sys/kernel/debug/ieee80211/$phy/ath5k/bwmode; do + for file in /sys/kernel/debug/ieee80211/$phy/ath9k*/chanbw /sys/kernel/debug/ieee80211/$phy/ath5k/bwmode; do [ -f "$file" ] && echo "$chanbw" > "$file" done }