X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tos%2Fchips%2Ftda5250%2Fmac%2FRedMacP.nc;h=d734b492e17f9b7be6b634c810aa7005dcd91193;hb=9092b3c0aa9215dff07b3465a88eb706e3e2193f;hp=c34bcdae217faabb68141578f86cea69dda4b981;hpb=022d74b6f732058bcf08f9af5f7a28f246331401;p=tinyos-2.x.git diff --git a/tos/chips/tda5250/mac/RedMacP.nc b/tos/chips/tda5250/mac/RedMacP.nc index c34bcdae..d734b492 100644 --- a/tos/chips/tda5250/mac/RedMacP.nc +++ b/tos/chips/tda5250/mac/RedMacP.nc @@ -163,8 +163,8 @@ implementation ACK_DURATION = SUB_HEADER_TIME + SUB_FOOTER_TIME, NAV_FACTOR = 4, #ifndef MAC_EVAL - MAX_SHORT_RETRY=3, - MAX_LONG_RETRY=7, + MAX_SHORT_RETRY=9, + MAX_LONG_RETRY=3, ADD_NAV = 2, INCREASE_BACKOFF = TRUE, #endif @@ -875,6 +875,7 @@ implementation #ifdef DELTATIMEDEBUG dTrace.sender = getHeader(msg)->src; #endif + getMetadata(msg)->sfdtime = rxTime; getMetadata(msg)->time = calcGeneratedTime((red_mac_header_t*) payload); getMetadata(msg)->ack = WAS_NOT_ACKED; m = signal MacReceive.receiveDone(msg); @@ -1066,9 +1067,12 @@ implementation dTrace.delta = call TimeDiff32.computeDelta(dTrace.now, dTrace.msgTime); txMacHdr->time = dTrace.delta; call DeltaTrace.traceTx(&dTrace); + getMetadata(p_msg)->sfdtime = dTrace.now; #else + getMetadata(p_msg)->sfdtime = call LocalTime32kHz.get(); txMacHdr->time = - call TimeDiff32.computeDelta(call LocalTime32kHz.get(), getMetadata(p_msg)->time); + call TimeDiff32.computeDelta(getMetadata(p_msg)->sfdtime, + getMetadata(p_msg)->time); #endif } }