[VOL-1788] Fix logical port update

This commit ensures the latest port information is sent to the
controller instead of the older state.

Change-Id: I1214c2b58083175aa16e1a3fdc40e7f750b8f093
diff --git a/rw_core/core/logical_device_agent.go b/rw_core/core/logical_device_agent.go
index 2d6bb13..53faec8 100644
--- a/rw_core/core/logical_device_agent.go
+++ b/rw_core/core/logical_device_agent.go
@@ -1236,10 +1236,8 @@
 	deletedPorts = make([]*voltha.LogicalPort, 0)
 	for _, o := range oldList {
 		found := false
-		changed := false
 		for _, n := range newList {
 			if o.Id == n.Id {
-				changed = !reflect.DeepEqual(o, n)
 				found = true
 				break
 			}
@@ -1247,14 +1245,13 @@
 		if !found {
 			deletedPorts = append(deletedPorts, o)
 		}
-		if changed {
-			changedPorts = append(changedPorts, o)
-		}
 	}
 	for _, n := range newList {
 		found := false
+		changed := false
 		for _, o := range oldList {
 			if o.Id == n.Id {
+				changed = !reflect.DeepEqual(o, n)
 				found = true
 				break
 			}
@@ -1262,6 +1259,9 @@
 		if !found {
 			newPorts = append(newPorts, n)
 		}
+		if changed {
+			changedPorts = append(changedPorts, n)
+		}
 	}
 	return
 }