Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp833004ybi; Fri, 12 Jul 2019 05:24:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzizmny5n5xUJUg5Dx8JQ+Vtzc9o6z4hm6Cm1ngWldn39daTirJTRZn5AcQt2ID5/tUb904 X-Received: by 2002:a17:902:848b:: with SMTP id c11mr11073537plo.217.1562934273396; Fri, 12 Jul 2019 05:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562934273; cv=none; d=google.com; s=arc-20160816; b=CJVCnAN4GEhW6aPTxwKQyX91l6HcdQdo61whH+jty466dlx4Vzgcu4cspH/2AdZXtq iTPC4mFl1dLlsJklno25Qy7KpqnQD9V5tZ4Fj4TApYfLcurE6rNko+ylpGP3PEWPCS9e Ey7nkuTjEeNYOxXWk/F4NjWW6Rrx7dRXk3eiP/ORjpnSa84Hl4fz27+sZko80Qa9ZLzm OKQiHoZJm5mg280NiRfEBZVWl9nm06GwMikkQ9q3hSw/tXBWBU/nda019sjFt6lRtUf/ MvxxNLP1D/NZl0iuPpQ7jt8wnMQaFzopymbG4kql/c0Ll/F6l59BcRvvKk2/XpR/Aw3a 0W9Q== 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=zm37TDvrVn0b1YH6foThU0sp+Y+Y840kNb6q4q+IFY4=; b=WNpir/Gc6olIygx/KHoXbfM16vhKQ46PTsI+By7Aoa0W3ZPEotaTY/MErfpKMHhm2k SvILefm2AwmP/SHBLLB1/a2ocXZpv0LgVCEpKqk/4y9evQtazV4vlI/Q9dAmuQPp4ikp 4Dfb5h2a4gwlRqpr+avqICW+vgO2NieEL0peOfFX4Qzne+9+S4ZfoD6dKkH7oNLpaE7C HWcMnSsAOUj07X7dyDEJxaW4Ah2afEnq2K12OAELBf9oPAv77eMyeptuWd6inl3OJaEG +t/BUHsS1AQMCNcBbBj1PXr5/eFZlYIoJuMk6z321exjjoOA5+T89KMKnvZtA0mNHd3U PgCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=06UH63RH; 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 n6si8654454pgl.419.2019.07.12.05.24.18; Fri, 12 Jul 2019 05:24:33 -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=06UH63RH; 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 S1727256AbfGLMVy (ORCPT + 99 others); Fri, 12 Jul 2019 08:21:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:56282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727663AbfGLMVu (ORCPT ); Fri, 12 Jul 2019 08:21:50 -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 1AA6A21670; Fri, 12 Jul 2019 12:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934109; bh=pUKI/A5Oz7rfvis28dXWUiv9SGLePMjDtVFHxg5NV/M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=06UH63RHVWcBxDTfP6QapZLhLs7cFPfIrb+u/qimnrn/3ZkQoNORtPnzB0A0LCAkM to8BvrKkVo5faJ4FEiWZdo0jKUjyoBq2todFxFoXzRHSTiDxMH+eNy0ogDmo8dfalA lbNKAC83TAyLT8iCx2MsQ+qQ3gcowVEDP/5JsY7M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shashidhar Lakkavalli , John Crispin , Johannes Berg , Sasha Levin Subject: [PATCH 4.19 08/91] mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() Date: Fri, 12 Jul 2019 14:18:11 +0200 Message-Id: <20190712121621.865066947@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190712121621.422224300@linuxfoundation.org> References: <20190712121621.422224300@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 25d16d124a5e249e947c0487678b61dcff25cf8b ] The reported rate is not scaled down correctly. After applying this patch, the function will behave just like the v/ht equivalents. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin 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 aad1c8e858e5..d57e2f679a3e 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1219,7 +1219,7 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate) if (rate->he_dcm) result /= 2; - return result; + return result / 10000; } u32 cfg80211_calculate_bitrate(struct rate_info *rate) -- 2.20.1