adding EthType to secure handling ether types

this will also pretty print ethertypes in flow output

Change-Id: I9363070ad308f3c756735e29b3992c500e503636
diff --git a/drivers/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java b/drivers/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java
index ddcb4d9..5993d96 100644
--- a/drivers/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java
+++ b/drivers/src/main/java/org/onosproject/driver/pipeline/OVSCorsaPipeline.java
@@ -257,17 +257,17 @@
             fail(fwd, ObjectiveError.UNKNOWN);
             return Collections.emptySet();
         }
-        if (ethType.ethType() == Ethernet.TYPE_ARP) {
+        if (ethType.ethType().toShort() == Ethernet.TYPE_ARP) {
             log.warn("Driver automatically handles ARP packets by punting to controller "
                     + " from ETHER table");
             pass(fwd);
             return Collections.emptySet();
-        } else if (ethType.ethType() == Ethernet.TYPE_LLDP ||
-                ethType.ethType() == Ethernet.TYPE_BSN) {
+        } else if (ethType.ethType().toShort() == Ethernet.TYPE_LLDP ||
+                ethType.ethType().toShort() == Ethernet.TYPE_BSN) {
             log.warn("Driver currently does not currently handle LLDP packets");
             fail(fwd, ObjectiveError.UNSUPPORTED);
             return Collections.emptySet();
-        } else if (ethType.ethType() == Ethernet.TYPE_IPV4) {
+        } else if (ethType.ethType().toShort() == Ethernet.TYPE_IPV4) {
             IPCriterion ipSrc = (IPCriterion) selector
                     .getCriterion(Criterion.Type.IPV4_SRC);
             IPCriterion ipDst = (IPCriterion) selector
@@ -303,7 +303,7 @@
         TrafficSelector selector = fwd.selector();
         EthTypeCriterion ethType =
                 (EthTypeCriterion) selector.getCriterion(Criterion.Type.ETH_TYPE);
-        if (ethType == null || ethType.ethType() != Ethernet.TYPE_IPV4) {
+        if (ethType == null || ethType.ethType().toShort() != Ethernet.TYPE_IPV4) {
             fail(fwd, ObjectiveError.UNSUPPORTED);
             return Collections.emptySet();
         }