[Madwifi-cvs] madwifi/tools athstats.c,1.4,1.5
Status: Beta
Brought to you by:
otaku
From: Sam L. <sam...@us...> - 2004-09-11 01:29:55
|
Update of /cvsroot/madwifi/madwifi/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22891 Modified Files: athstats.c Log Message: Fetch the current tx rate for each iteration; don't try to optimize this as other rate control algorithms aren't necessarily going to provide an indication in the same way the current algorithm doesn. Index: athstats.c =================================================================== RCS file: /cvsroot/madwifi/madwifi/tools/athstats.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** athstats.c 5 Aug 2004 17:34:51 -0000 1.4 --- athstats.c 11 Sep 2004 01:29:46 -0000 1.5 *************** *** 236,241 **** u_long off; int line, omask; ! u_int rate = getifrate(s, ifr.ifr_name); ! u_int32_t rate_raise, rate_drop, mgmt; struct ath_stats cur, total; u_long icur, ocur; --- 236,240 ---- u_long off; int line, omask; ! u_int rate; struct ath_stats cur, total; u_long icur, ocur; *************** *** 265,280 **** line = 0; loop: if (line != 0) { ifr.ifr_data = (caddr_t) &cur; if (ioctl(s, SIOCGATHSTATS, &ifr) < 0) err(1, ifr.ifr_name); - if (total.ast_rate_raise != rate_raise || - total.ast_rate_drop != rate_drop || - total.ast_tx_mgmt != mgmt) { - rate = getifrate(s, ifr.ifr_name); - rate_raise = total.ast_rate_raise; - rate_drop = total.ast_rate_drop; - mgmt = total.ast_tx_mgmt; - } if (!getifstats(ifr.ifr_name, &icur, &ocur)) err(1, ifr.ifr_name); --- 264,272 ---- line = 0; loop: + rate = getifrate(s, ifr.ifr_name); if (line != 0) { ifr.ifr_data = (caddr_t) &cur; if (ioctl(s, SIOCGATHSTATS, &ifr) < 0) err(1, ifr.ifr_name); if (!getifstats(ifr.ifr_name, &icur, &ocur)) err(1, ifr.ifr_name); *************** *** 300,311 **** if (ioctl(s, SIOCGATHSTATS, &ifr) < 0) err(1, ifr.ifr_name); - if (total.ast_rate_raise != rate_raise || - total.ast_rate_drop != rate_drop || - total.ast_tx_mgmt != mgmt) { - rate = getifrate(s, ifr.ifr_name); - rate_raise = total.ast_rate_raise; - rate_drop = total.ast_rate_drop; - mgmt = total.ast_tx_mgmt; - } if (!getifstats(ifr.ifr_name, &itot, &otot)) err(1, ifr.ifr_name); --- 292,295 ---- |