Return-path: Received: from mail-gy0-f174.google.com ([209.85.160.174]:35416 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757749Ab2B2NCs convert rfc822-to-8bit (ORCPT ); Wed, 29 Feb 2012 08:02:48 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Julian Calaby Date: Thu, 1 Mar 2012 00:02:27 +1100 Message-ID: (sfid-20120229_140305_071497_86C6E6C9) Subject: Re: [PATCH] mac80211: improve PID rate control mechanism by avoiding rate oscillation problem To: YIN Wei Cc: johannes , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, mattias.nissler@gmx.de, stefano.brivio@polimi.it Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: Hi Yin, One final thing: On Wed, Feb 29, 2012 at 23:59, Julian Calaby wrote: >> @@ -318,22 +578,61 @@ rate_control_pid_rate_init(void *priv, s >> ? ? ? ? ? ? ? ? ? ? ? ?rinfo[i].diff = i * pinfo->norm_offset; >> ? ? ? ?} >> ? ? ? ?for (i = 1; i < sband->n_bitrates; i++) { >> - ? ? ? ? ? ? ? s = false; >> + ? ? ? ? ? ? ? s = 0; > > Why are you using integers with a boolean variable? > >> ? ? ? ? ? ? ? ?for (j = 0; j < sband->n_bitrates - i; j++) >> ? ? ? ? ? ? ? ? ? ? ? ?if (unlikely(sband->bitrates[rinfo[j].index].bitrate > >> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?sband->bitrates[rinfo[j + 1].index].bitrate)) { >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? sband->bitrates[rinfo[j + 1].index].bitrate)) { This whitespace change should be dropped. >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?tmp = rinfo[j].index; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rinfo[j].index = rinfo[j + 1].index; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rinfo[j + 1].index = tmp; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rinfo[rinfo[j].index].rev_index = j; >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?rinfo[rinfo[j + 1].index].rev_index = j + 1; >> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? s = true; >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? s = 1; >> ? ? ? ? ? ? ? ? ? ? ? ?} >> ? ? ? ? ? ? ? ?if (!s) >> ? ? ? ? ? ? ? ? ? ? ? ?break; In fact, this entire hunk should be dropped. Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/