autotest (wifi): fix file copy in LinuxRouter

When using a footer file for send_management_frame, we write
the footer data locally, and copy the file over to the DUT.

At present, we pass send_file() as file handle. This fails,
because send_file() actually wants a path. Fix this, by
passing a path instead.

While there: fix whitespace.

Test note: even without this patch, the test PASSES (that problem
is http://crbug.com/511320 and http://crbug.com/511322). So, for
now, we have to check logs to verify that the bug is fixed.
Specifically: ensure that the following error message does not
appear:

    rsync: link_stat "/tmp/autotest-probe_response_footer" failed: No such file or directory

BUG=chromium:511353
TEST=network_WiFi_MalformedProbeResp

Change-Id: Iaa02d4e1a7d0f3f7fe4d4f11cc85a19a446228c0
Reviewed-on: https://chromium-review.googlesource.com/286570
Reviewed-by: Rebecca Silberstein <silberst@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
diff --git a/server/site_linux_router.py b/server/site_linux_router.py
index fafa2c2..e6e79ab 100644
--- a/server/site_linux_router.py
+++ b/server/site_linux_router.py
@@ -853,14 +853,15 @@
         @raises AutoservRunError: If footer file copy fails.
 
         """
-        with tempfile.TemporaryFile() as fp:
+        with tempfile.NamedTemporaryFile() as fp:
             fp.write(footer)
             try:
-                self.host.send_file(fp, self.PROBE_RESPONSE_FOOTER_FILE)
+                self.host.send_file(fp.name, self.PROBE_RESPONSE_FOOTER_FILE)
             except error.AutoservRunError:
                 logging.error('failed to copy footer file to AP')
                 raise
 
+
     def send_management_frame_on_ap(self, frame_type, channel, instance=0):
         """Injects a management frame into an active hostapd session.