Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp851822ybi; Fri, 12 Jul 2019 05:43:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpimEFG8cW1k4fZycJisO5l3NdZXxHW2be4q+TRmxD/Z3r8MtfR0TY9NGVemfncc96lX8J X-Received: by 2002:a63:490a:: with SMTP id w10mr10505052pga.6.1562935379828; Fri, 12 Jul 2019 05:42:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562935379; cv=none; d=google.com; s=arc-20160816; b=qYYgYE1Dtmyh707R6pIVyOGUgrAfc1/0B2NCp74t1Wqbzny/dyKBQCTWT9RrQ7oCfT GRuNMw6X0000sKW+vO4Fm8z+CL1RRKtAfViHIWOuAd+HeE1lZWY9HMvFu/IB7//vBgBU 0IeXO3SZ4W3ohh5Gw2k4FMcdiSt5tQQ7ZLgHPShb9RWsxcrWiyobNwjUxrIoqpN6N5q9 vmpR4IcaZcDpOqY38dTyoK/O6zGGrQARrXC8uXJy6vXlBjBHzlfWPXJeEFJYUojsS96j 0FliO8ZRVtey/HD3EEg6+StkgHBD0ksHt8uy7/XTVqUwjbg6CmMljhpY9KR2nBmpMZXr C7kA== 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=LHWkpHqKpfawpXFNIHAXCTmPFOutCVzx0SYvI0Nh0OM=; b=bb8TFUV+i7uylL0GagbLNpPwTR+nNqnAWIPQyKEw7c0LnDTUOCDuVjm7vSupunvPVx UKubcoj+eKwAbWKmT4YDgM3UI8hPW2DMIK/S38PltmOt7ZufyuJcDvEHj5kD9tDys9T7 WjI7gTK8yTnvbTdsBmMPY7b0RsPVrc/M4eRNGUod04cYvm3B+wXBjJq7CDi4nAgvh3XR ZvIklpqEhZrIkflchGNy7oznUf9n/8+mxFz8y6oA5tAXXFLgk95bx7fn37KVy5i7sKM1 nifNOR8c4nwH1uQVArP34K2fAYv0HoyJcVQMIeoNUcCUQku46d3KHhyh/EZD0KE6cDC+ yV5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=noCDBPPW; 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 cp10si1242407plb.301.2019.07.12.05.42.44; Fri, 12 Jul 2019 05:42:59 -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=noCDBPPW; 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 S1728257AbfGLMZU (ORCPT + 99 others); Fri, 12 Jul 2019 08:25:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35000 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728244AbfGLMZO (ORCPT ); Fri, 12 Jul 2019 08:25:14 -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 992AD2171F; Fri, 12 Jul 2019 12:25:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562934314; bh=foU8/SdRjmkg8g68VdEPgAvGDd0f6MXFPOujEykaolc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=noCDBPPWXBkBB/ajvbAdlks9eXXuoeWRupleZHK2yMYqtpqo0snyM1wfnxdeqKFsH +GGuBhC18GgYKUTkyGBVZUVcdXo/18DNvnlv4hsLGVdQMmGSVwcKpThjMA0TLX+MWZ sWeV3jsjjM9SUB0AI7vhBFbQbL9XjdKMHz2+crXs= 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 5.1 015/138] mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() Date: Fri, 12 Jul 2019 14:17:59 +0200 Message-Id: <20190712121629.308138963@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 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 75899b62bdc9..5a03f38788e7 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1237,7 +1237,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