temp revert rk change
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / bcm4329 / dhd_sdio.c
index 78dff1c489b8a8d31b82c122b14ca9c26f141a02..1380dd389cf62e1fd1f8cc22ea8cf0ef7e9232e2 100644 (file)
@@ -428,7 +428,6 @@ static void dhdsdio_sdtest_set(dhd_bus_t *bus, bool start);
 
 #ifdef DHD_DEBUG_TRAP
 static int dhdsdio_checkdied(dhd_bus_t *bus, uint8 *data, uint size);
-static int dhdsdio_mem_dump(dhd_bus_t *bus);
 #endif /* DHD_DEBUG_TRAP */
 static int dhdsdio_download_state(dhd_bus_t *bus, bool enter);
 
@@ -1845,11 +1844,6 @@ dhdsdio_checkdied(dhd_bus_t *bus, uint8 *data, uint size)
                DHD_ERROR(("%s: %s\n", __FUNCTION__, strbuf.origbuf));
        }
 
-       if (sdpcm_shared.flags & SDPCM_SHARED_TRAP) {
-                       /* Mem dump to a file on device */
-                       dhdsdio_mem_dump(bus);
-       }
-
 done:
        if (mbuffer)
                MFREE(bus->dhd->osh, mbuffer, msize);
@@ -1858,60 +1852,6 @@ done:
 
        return bcmerror;
 }
-
-static int
-dhdsdio_mem_dump(dhd_bus_t *bus)
-{
-       int ret = 0;
-       int size; /* Full mem size */
-       int start = 0; /* Start address */
-       int read_size = 0; /* Read size of each iteration */
-       uint8 *buf = NULL, *databuf = NULL;
-
-       /* Get full mem size */
-       size = bus->ramsize;
-       buf = MALLOC(bus->dhd->osh, size);
-       if (!buf) {
-               printf("%s: Out of memory (%d bytes)\n", __FUNCTION__, size);
-               return -1;
-       }
-
-       /* Read mem content */
-       printf("Dump dongle memory");
-       databuf = buf;
-       while (size)
-       {
-               read_size = MIN(MEMBLOCK, size);
-               if ((ret = dhdsdio_membytes(bus, FALSE, start, databuf, read_size)))
-               {
-                       printf("%s: Error membytes %d\n", __FUNCTION__, ret);
-                       if (buf) {
-                               MFREE(bus->dhd->osh, buf, size);
-                       }
-                       return -1;
-               }
-               printf(".");
-
-               /* Decrement size and increment start address */
-               size -= read_size;
-               start += read_size;
-               databuf += read_size;
-       }
-       printf("Done\n");
-
-#ifdef DHD_DEBUG
-       /* free buf before return !!! */
-       if (write_to_file(bus->dhd, buf, bus->ramsize))
-       {
-               printf("%s: Error writing to files\n", __FUNCTION__);
-               return -1;
-       }
-       /* buf free handled in write_to_file, not here */
-#else
-       MFREE(bus->dhd->osh, buf, size);
-#endif
-       return 0;
-}
 #endif /* DHD_DEBUG_TRAP */
 
 #ifdef DHD_DEBUG