Thread (4 messages) 4 messages, 3 authors, 2012-02-29

Re: [PATCH] mac80211: improve PID rate control mechanism by avoiding rate oscillation problem

From: Julian Calaby <hidden>
Date: 2012-02-29 13:02:50
Also in: lkml

Hi Yin,

One final thing:

On Wed, Feb 29, 2012 at 23:59, Julian Calaby [off-list ref] wrote:
quoted
@@ -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?
quoted
               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.
quoted
                               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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help