[Click] wrong calculation of txtries in athdescencap

Robert Sombrutzki sombrutz at informatik.hu-berlin.de
Thu Nov 27 18:14:11 EST 2008


Hi,

i found some mistake in athdescencap. It is not necessary to subtract one from 
the tries. 
For example using SetTXRate(RATE 11, TRIES 2) will lead to the result, that 
the packet will be send 1 time. I think the mistake is in athdescencap.cc.
I tested it using madwifi-driver revision 3869.

Robert

Here the simple patch:

diff --git a/elements/wifi/athdescencap.cc b/elements/wifi/athdescencap.cc
index 73d7cf4..3d3d0f7 100644
--- a/elements/wifi/athdescencap.cc
+++ b/elements/wifi/athdescencap.cc
@@ -63,7 +63,7 @@ AthdescEncap::simple_action(Packet *p)
   desc->xmit_power = ceh->power;
   desc->xmit_rate0 = dot11_to_ratecode(ceh->rate);
   if (ceh->max_tries > 0) {
-    desc->xmit_tries0 = ceh->max_tries - 1;
+    desc->xmit_tries0 = ceh->max_tries;
   }
 
   return p_out;


More information about the click mailing list