wl1271: Add wl1271_load_firmware() and export some functions
authorRoger Quadros <roger.quadros@nokia.com>
Mon, 29 Nov 2010 14:24:57 +0000 (16:24 +0200)
committerLuciano Coelho <luciano.coelho@nokia.com>
Thu, 2 Dec 2010 14:17:20 +0000 (16:17 +0200)
For the SDIO testing module we need to load the firmware but not
boot it. wl1271_load_firmware() is meant to do just the firmware loading part.

We also export some functions so they are usable in the testing module.

Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
drivers/net/wireless/wl12xx/boot.c
drivers/net/wireless/wl12xx/boot.h
drivers/net/wireless/wl12xx/io.c

index 1eafb81758321beec711c57ab1a9f35d42bd28f5..4a9f929725fd4a227d2f4fa04f7a86a395975ca2 100644 (file)
@@ -467,7 +467,8 @@ static void wl1271_boot_hw_version(struct wl1271 *wl)
        wl->hw_pg_ver = (s8)fuse;
 }
 
-int wl1271_boot(struct wl1271 *wl)
+/* uploads NVS and firmware */
+int wl1271_load_firmware(struct wl1271 *wl)
 {
        int ret = 0;
        u32 tmp, clk, pause;
@@ -572,6 +573,20 @@ int wl1271_boot(struct wl1271 *wl)
        if (ret < 0)
                goto out;
 
+out:
+       return ret;
+}
+EXPORT_SYMBOL_GPL(wl1271_load_firmware);
+
+int wl1271_boot(struct wl1271 *wl)
+{
+       int ret;
+
+       /* upload NVS and firmware */
+       ret = wl1271_load_firmware(wl);
+       if (ret)
+               return ret;
+
        /* 10.5 start firmware */
        ret = wl1271_boot_run_firmware(wl);
        if (ret < 0)
index c7d771959f3ad7c5dff5cd21ad518b92cb7f5583..d67dcffa31eb057fad7475cbb210f0cd4799f926 100644 (file)
@@ -27,6 +27,7 @@
 #include "wl12xx.h"
 
 int wl1271_boot(struct wl1271 *wl);
+int wl1271_load_firmware(struct wl1271 *wl);
 
 #define WL1271_NO_SUBBANDS 8
 #define WL1271_NO_POWER_LEVELS 4
index 35c2f1aca6ba4bfb3a3bb3134bff52f9fdcaef6c..d557f73e7c191ef48ea612e0e1a858bb7f0f8f28 100644 (file)
@@ -113,6 +113,7 @@ int wl1271_set_partition(struct wl1271 *wl,
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(wl1271_set_partition);
 
 void wl1271_io_reset(struct wl1271 *wl)
 {