transceiver: make the transmit drive loop bus dependent

With the introduction of the B100, there is USB support
using UHD devices. The characteristics of the trasmit
side burst submissions are more reflective of the bus
type than the device or driver.

Use a fixed latency interval for network devices and the
adaptive underrun approach for USB devices - regardless
of driver or device type.

The GPMC based transport on the E100 appears unaffected
by either latency scheme, which defaults to network.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2677 19bc5d8c-e614-43d4-8b26-e1612bc8e597
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 20c6aad..d152b2d 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -714,27 +714,27 @@
     while (radioClock->get() + mTransmitLatency > mTransmitDeadlineClock) {
       // if underrun, then we're not providing bursts to radio/USRP fast
       //   enough.  Need to increase latency by one GSM frame.
-#ifndef USE_UHD
-      if (mRadioInterface->isUnderrun()) {
-        // only do latency update every 10 frames, so we don't over update
-	if (radioClock->get() > mLatencyUpdateTime + GSM::Time(10,0)) {
-	  mTransmitLatency = mTransmitLatency + GSM::Time(1,0);
-	  LOG(INFO) << "new latency: " << mTransmitLatency;
-	  mLatencyUpdateTime = radioClock->get();
-	}
+      if (mRadioInterface->getBus() == RadioDevice::USB) {
+        if (mRadioInterface->isUnderrun()) {
+          // only do latency update every 10 frames, so we don't over update
+          if (radioClock->get() > mLatencyUpdateTime + GSM::Time(10,0)) {
+            mTransmitLatency = mTransmitLatency + GSM::Time(1,0);
+            LOG(INFO) << "new latency: " << mTransmitLatency;
+            mLatencyUpdateTime = radioClock->get();
+          }
+        }
+        else {
+          // if underrun hasn't occurred in the last sec (216 frames) drop
+          //    transmit latency by a timeslot
+          if (mTransmitLatency > GSM::Time(1,1)) {
+              if (radioClock->get() > mLatencyUpdateTime + GSM::Time(216,0)) {
+              mTransmitLatency.decTN();
+              LOG(INFO) << "reduced latency: " << mTransmitLatency;
+              mLatencyUpdateTime = radioClock->get();
+            }
+          }
+        }
       }
-      else {
-        // if underrun hasn't occurred in the last sec (216 frames) drop
-        //    transmit latency by a timeslot
-	if (mTransmitLatency > GSM::Time(1,1)) {
-            if (radioClock->get() > mLatencyUpdateTime + GSM::Time(216,0)) {
-	    mTransmitLatency.decTN();
-	    LOG(INFO) << "reduced latency: " << mTransmitLatency;
-	    mLatencyUpdateTime = radioClock->get();
-	  }
-	}
-      }
-#endif
       // time to push burst to transmit FIFO
       pushRadioVector(mTransmitDeadlineClock);
       mTransmitDeadlineClock.incTN();