From patchwork Fri Jun 9 11:07:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 9778085 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.web.codeaurora.org (Postfix) with ESMTP id A95546034B for ; Fri, 9 Jun 2017 11:08:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B2C6285FB for ; Fri, 9 Jun 2017 11:08:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E17728609; Fri, 9 Jun 2017 11:08:30 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00569285FB for ; Fri, 9 Jun 2017 11:08:29 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=ok1AIAT5QUbCSBrhbWDYvBbRyd81faG4QXcShVMzz+Q=; b=Na7 ccHcF4qBGKW7Gyw8iCbldgpl86NwLZCMHgM+lRFKtLS9OOTzC/tPtAPVa2lkTDU0VM32N2inYooya HPTXxljcBoHH+WASdJv4zJBDQLXpdt2w2K8o6BMsiHX/VDg5DjvzIyPePg2SqyzgzSj67d9fcAHHG EkAytVxLgLVHynXKGkKiKfsjkl5hIS8+cpVI/0yVGslpkE+JPRLPK11yowmHsBIqbu/ZX9T/9COGc Am0dkxLSqkA0QmeSn/Zdc94AAt+svFR8BzNtdolKFuBvcCse/1CUVKmbk3UwjqId04boIh+hQ8IWV AEvBtbulAIH0GI2anxzC+11YRg3Pqkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dJHmC-0002LI-Ad; Fri, 09 Jun 2017 11:08:24 +0000 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dJHm8-0002Iy-Rr for ath10k@lists.infradead.org; Fri, 09 Jun 2017 11:08:22 +0000 Received: by mail-wr0-x230.google.com with SMTP id g76so29064983wrd.1 for ; Fri, 09 Jun 2017 04:08:00 -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=esf31fNCe4wbGidYc1qvg9Z2RPCcFg6ooHfJQK2k2ek=; b=OI5GGv8RQUE7g+iVjxoi4LeW9/LQhpVadcY7HXaKHDoO+11sN3crXuXoaD7gFa5NO/ uslKawzc3g9DTT9PrxqCDsRBny5/wBGS2HxGtcTrkiG9ubbFmpCnpU1hvduxCF0Aqkc1 RNyhbCOTtU6VZFW0s8+6agVua9S2lXKZZAeW3HMFe+fSNQ22RvZv9KDaWwk8KTmnkJKe +vNofN2n5zwBRstNOxE17yrv+/qqFzcibtlo/QyrHgvSl9JVjcgOGvGj3bprptpcbU5u u2M0EAqZXsCLVuP9rBBbXrlppsmMRD6VIwhJ47xZPll54V5b4Ip/I5+EKGSVpndeO26g cgHw== 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=esf31fNCe4wbGidYc1qvg9Z2RPCcFg6ooHfJQK2k2ek=; b=dPJAOvwdTfnFm9C0O1YE6nZR247XOAM3gIY//ZU/1oXNYRLNmMRkCqFoYAKUrTASZP MI1z86WB+3HdaU+sl53TYc0zQ2aktwnrDjkqJPRY0NpK0dBRW+qLOvQK/RgsGdPF8Sbd m9Mi5XVsOoRPprYhSk1YPtMKHyyljzSVbsYh6t55/nJoORYZdH7ZjFVunhHxb3hrsiel EzqGbtLfnpqAjMCfYdRCyu0TtrBV7Sn8UhFRjqbpDEOODoPR/Nsz76crhUYE2aT9jIMo eXZbVp7/aSj/yg6FxERni2xZvJa0kguJq0n6tDsXAhF3epp+/eBWKj1ddonRnbgysdH2 J91g== X-Gm-Message-State: AKS2vOwIepilq51zdrYOx3ZKXFHIiYVof7ITAVLmXlASjIBZlP2KHGuN QZGdbt52AMtbXW7A8G4= X-Received: by 10.28.58.143 with SMTP id h137mr7185845wma.72.1497006478589; Fri, 09 Jun 2017 04:07:58 -0700 (PDT) Received: from sven-desktop.home.narfation.org (p2003007C6F55E5FE527B9DFFFECE2683.dip0.t-ipconnect.de. [2003:7c:6f55:e5fe:527b:9dff:fece:2683]) by smtp.gmail.com with ESMTPSA id f70sm1970565wmd.25.2017.06.09.04.07.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Jun 2017 04:07:57 -0700 (PDT) From: Sven Eckelmann To: ath10k@lists.infradead.org Subject: [PATCH v2 1/3] ath10k: Use complete VHT chan width for 160MHz workaround Date: Fri, 9 Jun 2017 13:07:48 +0200 Message-Id: <20170609110750.14950-1-sven.eckelmann@openmesh.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170609_040821_065127_E727169C X-CRM114-Status: UNSURE ( 9.23 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Greear , linux-wireless@vger.kernel.org, Sven Eckelmann MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear The ath10k firmware doesn't announce its VHT channel width capabilities in the vht_cap information from the "service ready event" arguments. The driver must therefore check whether the 160MHz short GI bit is set and whether the driver still doesn't set the bits for the 160/80+80 MHz capabilities. The two bits for the channel width are a two bit integer and not two separate bits which cannot be parsed without the knowledge of the other bit. Using IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ (b10..) as a mask for this task doesn't make any sense. The correct mask for the VHT channel width should be used instead to make this check more readable. Signed-off-by: Ben Greear [sven.eckelmann@openmesh.com: separate 160Mhz workaround cleanup, add commit message] Signed-off-by: Sven Eckelmann --- v2: - extracted this cleanup portion and converted it to a separate patch drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 4674ff33d320..8087b6be5484 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4391,7 +4391,7 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) * mode until that's resolved. */ if ((ar->vht_cap_info & IEEE80211_VHT_CAP_SHORT_GI_160) && - !(ar->vht_cap_info & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ)) + (ar->vht_cap_info & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) == 0) vht_cap.cap |= IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; mcs_map = 0;