Re: [PATCH] mac80211: improve PID rate control mechanism by avoidingrate oscillation problem
From: Julian Calaby
Date: Wed Feb 29 2012 - 08:02:46 EST
Hi Yin,
One final thing:
On Wed, Feb 29, 2012 at 23:59, Julian Calaby <julian.calaby@xxxxxxxxx> 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@xxxxxxxxx
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/