From patchwork Tue Jul 16 14:41:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sriram R X-Patchwork-Id: 11046187 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 136EB6C5 for ; Tue, 16 Jul 2019 14:41:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01E592860C for ; Tue, 16 Jul 2019 14:41:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EABE628622; Tue, 16 Jul 2019 14:41:45 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 991662860C for ; Tue, 16 Jul 2019 14:41:45 +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=9on/27fJ8No8POfhZ9Y4DAORx7WTnmuk7kM4BcnnXqY=; b=V0r WfHFn44mAww4lpAOoQ5MtBLy/e46gH7XMD2exuQJvahNVxKMYp+bUjBWEw0hhu2MnRyINdN4EVUc1 5OBZyWOihaT6kd/azqMQA5PY884xDmg08uDl7Jd13fN1EOTfMWirggId0V9c12p9/vyZuO1GL7guU Xh3Y/zQ9GagKEAV5jrLk0G00w8Qm3BKYvgLe+k+LGHYTzOftb/1ItNczZIYvlO7ibmyIz2nnaz0zI 0nmEsRGSUyDyDGYjeTOo6/JZh2SLMZjTv5DuvNmf4S4s/lfF4f9igNSyA3BH2tQ3L/Jm0HtyV8k+j 6L5qJMCIJx1pBP5bitgrF3FrAV9RLgg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hnOeG-0003Yv-ON; Tue, 16 Jul 2019 14:41:44 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hnOeE-0003YD-Al for ath11k@lists.infradead.org; Tue, 16 Jul 2019 14:41:43 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 13F4C616F5; Tue, 16 Jul 2019 14:41:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1563288102; bh=qvlLvzZZtqgW3/JKET1sK0uOH743U12QCmJgKThoCAA=; h=From:To:Cc:Subject:Date:From; b=alYdxHwy2mHVyWCUPNRS39iOARuo2Uj+188yzb5NMvGGaNwaNfha+UhXvmH00qNwU er6rv9L5EacC7wS7g/UVnNmlsHc+81MPHyesCuM+o9TiIdEMNpsvcK5Ib+USCBKz6y HO6L3GcOsVFcVi7c4m0j/AqTabbretzX+vy1j5Nw= Received: from checstp253621-lin.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: srirrama@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id ECDEC60F3E; Tue, 16 Jul 2019 14:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1563288100; bh=qvlLvzZZtqgW3/JKET1sK0uOH743U12QCmJgKThoCAA=; h=From:To:Cc:Subject:Date:From; b=ld4YOyNu6lqEloyrWOD4DRnhxeS8mAmtzDMKt/d6Zb1h3yQmLlBYpsYp2s+eMn4e2 iJvqQndYDRoCSZU5XmnKBqdflPU5elWfxW6+NO6nvr3qauIsBSYqrw6CaEHJt6KdPS tJun7FOhzA1x86L3bjIZUAzOzWkYrQ5UK43LF34s= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ECDEC60F3E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=srirrama@codeaurora.org From: Sriram R To: ath11k@lists.infradead.org Subject: [PATCH] ath11k: Fix warnings that trigger during peer assoc when fixed rate is set Date: Tue, 16 Jul 2019 20:11:28 +0530 Message-Id: <1563288088-2821-1-git-send-email-srirrama@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190716_074142_394480_6F232035 X-CRM114-Status: UNSURE ( 9.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sriram R MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When VHT fixed rate is set to MCS < 7, warnings are seen when a new sta gets associated while peer_assoc command is sent to firmware. This is seen since we expect tx_mcs_set sent to firmware as values corresponding to range 0-7, 0-8 or 0-9. Since the intersection of STA's VHT MCS support and current bitrate mask after fixed rate is set has MCS < 7 warning is thrown currently. Remove these warning for these cases as it's a valid scenario. For these cases, 0-7 MCS can be sent during peer assoc to firmware as this is followed by peer fixed rate setting. Signed-off-by: Sriram R --- drivers/net/wireless/ath/ath11k/mac.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 3dc0615..b8217e9 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -1007,12 +1007,6 @@ ath11k_peer_assoc_h_vht_limit(u16 tx_mcs_set, case 4: /* fall through */ case 5: /* fall through */ case 6: /* fall through */ - default: - WARN_ON(1); - /* fall through */ - case -1: - mcs = IEEE80211_VHT_MCS_NOT_SUPPORTED; - break; case 7: mcs = IEEE80211_VHT_MCS_SUPPORT_0_7; break; @@ -1022,6 +1016,12 @@ ath11k_peer_assoc_h_vht_limit(u16 tx_mcs_set, case 9: mcs = IEEE80211_VHT_MCS_SUPPORT_0_9; break; + default: + WARN_ON(1); + /* fall through */ + case -1: + mcs = IEEE80211_VHT_MCS_NOT_SUPPORTED; + break; } tx_mcs_set &= ~(0x3 << (nss * 2));