Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp837412ybi; Fri, 12 Jul 2019 05:29:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyd8cdOuUYTA3QvrimQnApTCxNCOuDKCO3w0NFBxEcUlYlF/BKuQkZiMzaRH6nk9Dif5Vd/ X-Received: by 2002:a17:90a:8985:: with SMTP id v5mr11350840pjn.136.1562934540735; Fri, 12 Jul 2019 05:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934540; cv=none; d=google.com; s=arc-20160816; b=pknUq0jXUrfNTax02bU5SxgMxjz2CKunO7lYrbNe80fLSqPrH6rzdFJEUYlsSQ1OG9 CkEoFdVEyfx9qEt4rjZsXWmhFIm0mhETG/yIbKGoy3V/0onuFh1TETKYXRuwmv/5dH1J P+LDo9UcHvfNuyNkFFoahC7o3fPvUDl5Ia2OMraUaZ+1J6kKICWh3d5ZDlIUHlfiJH8i aqjl3kH06yyMQuJlYfq5GxAlSnpPvlOcWFkrVFrtP0iz9EWS5O8YBTO9EzzuViXiN9Mt +zl1kUNhivpszEgFGjfcklqtaez29JXfOqgMXa3h9GGqZxlDtxKZujwSb3GA6XB/cnTJ JB4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PV5U3frVpfcHhOk4hy9ke21bIjPfr7HRdL9X711vjlo=; b=zrH/vqbuAYTYqrPz9PlLe0EejqRPOmgGjevsTVh+4gS+MMwg+7nAwzugIL4dJ3e9Q/ wxpIljNvTf7tFFEOWSi9wtevYR+hVj/OLjz4gWFaDTE1ogsWgdk2cCaL5MIswBG96P9F dtG9g72OuhJ2b0OY1Dnb01n0Wvvk/HEU/O1/Zv9G9aEtC8v0KqWrEwzJZzPKTbLn0j3l 2VEQgh9u2X8P0vj8mmbwHrQjQ8CKYR3C0jRUjeMjzfi27o19/yBF9OHCNuNlQ6UOYprW ccsPBmFv/BO6WbikxmjxrpXrwfNZDePBNAlAVCztBSlNKci5B8hW2VN+/dXFKGWH77xa Zb/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dSdN3wOQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t184si8373605pgd.211.2019.07.12.05.28.45; Fri, 12 Jul 2019 05:29:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dSdN3wOQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728674AbfGLM1s (ORCPT + 99 others); Fri, 12 Jul 2019 08:27:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:40662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728658AbfGLM1n (ORCPT ); Fri, 12 Jul 2019 08:27:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E4772084B; Fri, 12 Jul 2019 12:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934463; bh=dp4M8rQrAaTgjPwwffn68Wo9uAGJPQymsN7j5QJ7dO4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dSdN3wOQnM/pKqlFzoQUSPRp38Ztc/2athyZ7rPGpiOZFu7q/C9vp0aQ0hVb+UpxH n8XVTn9Sgx7jpQaM3qA7uICo1IR4ufdaZe57sAii3Bv1Gl8OPCS3//38X3IBtgEm8H dR+6Fa/DIgvA0BbEqyneYpJ9jxYl4AZvOreDbLsQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mordechay Goodstein , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 5.1 062/138] cfg80211: util: fix bit count off by one Date: Fri, 12 Jul 2019 14:18:46 +0200 Message-Id: <20190712121631.057125752@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121628.731888964@linuxfoundation.org> References: <20190712121628.731888964@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 1a473d6092d5d182914bea854ce0b21e6d12519d ] The bits of Rx MCS Map in VHT capability were enumerated with index transform - index i -> (i + 1) bit => nss i. BUG! while it should be - index i -> (i + 1) bit => (i + 1) nss. The bug was exposed in commit a53b2a0b1245 ("iwlwifi: mvm: implement VHT extended NSS support in rs.c"), where iwlwifi started using the function. Signed-off-by: Mordechay Goodstein Fixes: b0aa75f0b1b2 ("ieee80211: add new VHT capability fields/parsing") Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/wireless/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/util.c b/net/wireless/util.c index 5a03f38788e7..5ac66a571e33 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1989,7 +1989,7 @@ int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, continue; if (supp >= mcs_encoding) { - max_vht_nss = i; + max_vht_nss = i + 1; break; } } -- 2.20.1