diff --git a/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java b/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
index 3d52d45..971eb10 100644
--- a/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
+++ b/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java
@@ -118,7 +118,7 @@
     private TestNetworkInterface mDownstreamIface;
     private HandlerThread mHandlerThread;
     private Handler mHandler;
-    private TapPacketReader mTapPacketReader;
+    private TapPacketReader mDownstreamReader;
 
     private TetheredInterfaceRequester mTetheredInterfaceRequester;
     private MyTetheringEventCallback mTetheringEventCallback;
@@ -161,10 +161,10 @@
             mTetheringEventCallback.unregister();
             mTetheringEventCallback = null;
         }
-        if (mTapPacketReader != null) {
-            TapPacketReader reader = mTapPacketReader;
+        if (mDownstreamReader != null) {
+            TapPacketReader reader = mDownstreamReader;
             mHandler.post(() -> reader.stop());
-            mTapPacketReader = null;
+            mDownstreamReader = null;
         }
         mHandlerThread.quitSafely();
         mTetheredInterfaceRequester.release();
@@ -253,7 +253,7 @@
         byte[] client2 = MacAddress.fromString("a:b:c:d:e:f").toByteArray();
 
         FileDescriptor fd = mDownstreamIface.getFileDescriptor().getFileDescriptor();
-        mTapPacketReader = makePacketReader(fd, getMTU(mDownstreamIface));
+        mDownstreamReader = makePacketReader(fd, getMTU(mDownstreamIface));
         DhcpResults dhcpResults = runDhcp(fd, client1);
         assertEquals(new LinkAddress(clientAddr), dhcpResults.ipAddress);
 
@@ -333,9 +333,9 @@
         // does not have an IP address, and unprivileged apps cannot see interfaces without IP
         // addresses. This shouldn't be flaky because the TAP interface will buffer all packets even
         // before the reader is started.
-        mTapPacketReader = makePacketReader(mDownstreamIface);
+        mDownstreamReader = makePacketReader(mDownstreamIface);
 
-        expectRouterAdvertisement(mTapPacketReader, iface, 2000 /* timeoutMs */);
+        expectRouterAdvertisement(mDownstreamReader, iface, 2000 /* timeoutMs */);
         expectLocalOnlyAddresses(iface);
     }
 
@@ -556,7 +556,7 @@
 
     private void checkVirtualEthernet(TestNetworkInterface iface, int mtu) throws Exception {
         FileDescriptor fd = iface.getFileDescriptor().getFileDescriptor();
-        mTapPacketReader = makePacketReader(fd, mtu);
+        mDownstreamReader = makePacketReader(fd, mtu);
         mTetheringEventCallback = enableEthernetTethering(iface.getInterfaceName());
         checkTetheredClientCallbacks(fd);
     }
@@ -617,7 +617,7 @@
 
     private DhcpPacket getNextDhcpPacket() throws ParseException {
         byte[] packet;
-        while ((packet = mTapPacketReader.popPacket(PACKET_READ_TIMEOUT_MS)) != null) {
+        while ((packet = mDownstreamReader.popPacket(PACKET_READ_TIMEOUT_MS)) != null) {
             try {
                 return DhcpPacket.decodeFullPacket(packet, packet.length, DhcpPacket.ENCAP_L2);
             } catch (DhcpPacket.ParseException e) {
@@ -774,7 +774,7 @@
         assertEquals("onUpstreamChanged for unexpected network", mUpstreamTracker.getNetwork(),
                 mTetheringEventCallback.awaitFirstUpstreamConnected());
 
-        mTapPacketReader = makePacketReader(mDownstreamIface);
+        mDownstreamReader = makePacketReader(mDownstreamIface);
         // TODO: do basic forwarding test here.
     }
 
