From patchwork Wed Nov 20 00:51:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 3204781 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC8B39F26C for ; Wed, 20 Nov 2013 00:51:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB64920148 for ; Wed, 20 Nov 2013 00:51:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9B6920136 for ; Wed, 20 Nov 2013 00:51:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752342Ab3KTAvu (ORCPT ); Tue, 19 Nov 2013 19:51:50 -0500 Received: from mail-wi0-f170.google.com ([209.85.212.170]:55523 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751561Ab3KTAvu (ORCPT ); Tue, 19 Nov 2013 19:51:50 -0500 Received: by mail-wi0-f170.google.com with SMTP id f4so7413726wiw.3 for ; Tue, 19 Nov 2013 16:51:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=nNRHt8pY18FDeKI6fn7ODBMk3pWrcUEaF4ENLgvN82g=; b=t4x1Bz1P4F5m9o2XVFDKF0rmFgkuC5uvLnZsnRtxYjUanmaBY6V+Go62qTkSrCO3Iz 3reab77CiquLJ1M2lkD2v6vwdgZuUQ6Qjoqhe4cBr4ZszvhyooN0+iTBuwHV0/S16Sy9 ys7H68rQIRGtjFRs88rvDSqtBbMBKHjpJnfE1wBJKW06UQQ0L/uW9d8FlG6Zt+t3wqw8 wHutFML/YwrbEdA7CC8Yhto1S3ZjvgSon6IaPgd6n+BL9sJ694Dwse93omkzui1dOxB/ mbmMhXxTzuGM81l/5BRKo18GsD323UElFnTxl8rSi8RtohOZM57HungGSiTOB2ZII1If vYxQ== X-Received: by 10.194.122.99 with SMTP id lr3mr22770967wjb.21.1384908708886; Tue, 19 Nov 2013 16:51:48 -0800 (PST) Received: from magnum.frso.rivierawaves.com (ppp-seco11pa2-46-193-143.43.wb.wifirst.net. [46.193.143.43]) by mx.google.com with ESMTPSA id c10sm10861056wie.11.2013.11.19.16.51.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2013 16:51:48 -0800 (PST) From: Karl Beldan To: Johannes Berg Cc: linux-wireless , Karl Beldan , Felix Fietkau Subject: [PATCH] mac80211: use capped prob when computing throughputs Date: Wed, 20 Nov 2013 01:51:08 +0100 Message-Id: <1384908668-27869-1-git-send-email-karl.beldan@gmail.com> X-Mailer: git-send-email 1.8.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Karl Beldan Commit 3e8b1eb "mac80211/minstrel_ht: improve rate selection stability" introduced a local capped prob in minstrel_ht_calc_tp but omitted to use it to compute the rate throughput. Signed-off-by: Karl Beldan CC: Felix Fietkau Acked-by: Felix Fietkau --- net/mac80211/rc80211_minstrel_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 9702d88..341e6f7 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -333,7 +333,7 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate) nsecs = 1000 * mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len); nsecs += minstrel_mcs_groups[group].duration[rate]; - tp = 1000000 * ((mr->probability * 1000) / nsecs); + tp = 1000000 * (prob * 1000) / nsecs; mr->cur_tp = MINSTREL_TRUNC(tp); }