Author: adrian
Date: Tue Feb 26 10:24:49 2013
New Revision: 247317
URL: http://svnweb.freebsd.org/changeset/base/247317

Log:
  Update the EWMA statistics for each intermediary rate as well as the final
  rate.
  
  This fixes two things:
  
  * The intermediary rates now also have their EWMA values changed;
  * The existing code was using the wrong value for longtries - so the
    EWMA stats were only adjusted for the first rate and not subsequent
    rates in a MRR setup.
  
  TODO:
  
  * Merge the EWMA updates into update_stats() now..

Modified:
  head/sys/dev/ath/ath_rate/sample/sample.c

Modified: head/sys/dev/ath/ath_rate/sample/sample.c
==============================================================================
--- head/sys/dev/ath/ath_rate/sample/sample.c   Tue Feb 26 08:53:33 2013        
(r247316)
+++ head/sys/dev/ath/ath_rate/sample/sample.c   Tue Feb 26 10:24:49 2013        
(r247317)
@@ -1008,6 +1008,15 @@ ath_rate_tx_complete(struct ath_softc *s
                                     short_tries, long_tries,
                                     long_tries > rc[0].tries,
                                     nframes, nbad);
+                       update_ewma_stats(sc, an, frame_size,
+                                    rc[0].rix, rc[0].tries,
+                                    rc[1].rix, rc[1].tries,
+                                    rc[2].rix, rc[2].tries,
+                                    rc[3].rix, rc[3].tries,
+                                    short_tries, long_tries,
+                                    long_tries > rc[0].tries,
+                                    nframes, nbad);
+
                        long_tries -= rc[0].tries;
                }
                
@@ -1020,6 +1029,14 @@ ath_rate_tx_complete(struct ath_softc *s
                                     short_tries, long_tries,
                                     status,
                                     nframes, nbad);
+                       update_ewma_stats(sc, an, frame_size,
+                                    rc[1].rix, rc[1].tries,
+                                    rc[2].rix, rc[2].tries,
+                                    rc[3].rix, rc[3].tries,
+                                    0, 0,
+                                    short_tries, long_tries,
+                                    status,
+                                    nframes, nbad);
                        long_tries -= rc[1].tries;
                }
 
@@ -1032,6 +1049,14 @@ ath_rate_tx_complete(struct ath_softc *s
                                     short_tries, long_tries,
                                     status,
                                     nframes, nbad);
+                       update_ewma_stats(sc, an, frame_size,
+                                    rc[2].rix, rc[2].tries,
+                                    rc[3].rix, rc[3].tries,
+                                    0, 0,
+                                    0, 0,
+                                    short_tries, long_tries,
+                                    status,
+                                    nframes, nbad);
                        long_tries -= rc[2].tries;
                }
 
@@ -1044,17 +1069,15 @@ ath_rate_tx_complete(struct ath_softc *s
                                     short_tries, long_tries,
                                     status,
                                     nframes, nbad);
+                       update_ewma_stats(sc, an, frame_size,
+                                    rc[3].rix, rc[3].tries,
+                                    0, 0,
+                                    0, 0,
+                                    0, 0,
+                                    short_tries, long_tries,
+                                    status,
+                                    nframes, nbad);
                }
-
-               update_ewma_stats(sc, an, frame_size,
-                            rc[0].rix, rc[0].tries,
-                            rc[1].rix, rc[1].tries,
-                            rc[2].rix, rc[2].tries,
-                            rc[3].rix, rc[3].tries,
-                            short_tries, long_tries,
-                            long_tries > rc[0].tries,
-                            nframes, nbad);
-
        }
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to