bug fix in getFlowEntries() for CienaWaverServer driver

Change-Id: I7d230a824b0eae91b0c2595afa8aa5864a7865fe
diff --git a/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaRestDevice.java b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaRestDevice.java
index 361d538..96f557f 100644
--- a/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaRestDevice.java
+++ b/drivers/ciena/src/main/java/org/onosproject/drivers/ciena/CienaRestDevice.java
@@ -22,6 +22,7 @@
 import com.google.common.collect.Lists;
 import org.apache.commons.lang3.tuple.Pair;
 import org.onlab.util.Frequency;
+import org.onlab.util.Spectrum;
 import org.onosproject.driver.optical.flowrule.CrossConnectCache;
 import org.onosproject.incubator.net.faultmanagement.alarm.Alarm;
 import org.onosproject.incubator.net.faultmanagement.alarm.AlarmEntityId;
@@ -286,7 +287,7 @@
     }
 
     private int getChannelFromFrequency(Frequency frequency) {
-        return (int) CENTER_FREQUENCY.subtract(frequency)
+        return (int) frequency.subtract(Spectrum.CENTER_FREQUENCY)
                 .floorDivision(CHANNEL_SPACING.frequency().asHz()).asHz();
 
     }
@@ -297,7 +298,7 @@
             JsonNode response = get(uri);
             return Frequency.ofGHz(response.get(FREQUENCY_KEY).get(VALUE).asDouble());
         } catch (IOException e) {
-            // this is expected for client side ports as they don't contain channel data
+            // this is expected for client side ports as they don't contain frequency data
             log.error("unable to get frequency for port {} on device {}:\n{}", port, deviceId, e);
             return null;
         }