wl12xx: 1281/1283 support - Use different FW file for AP mode wl127x/wl128x chips
authorArik Nemtsov <arik@wizery.com>
Sun, 6 Mar 2011 14:32:18 +0000 (16:32 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 19 Apr 2011 13:49:02 +0000 (16:49 +0300)
Choose a different FW for AP-mode wl127x and wl128x chips, base on chip
ID at boot time.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/sdio.c
drivers/net/wireless/wl12xx/spi.c
drivers/net/wireless/wl12xx/wl12xx.h

index 54ac6757c39ba105843bf6782ad399ad26f17a4f..9a7ca6524d20f77509899abb14b10a4744287ba7 100644 (file)
@@ -832,7 +832,10 @@ static int wl1271_fetch_firmware(struct wl1271 *wl)
 
        switch (wl->bss_type) {
        case BSS_TYPE_AP_BSS:
-               fw_name = WL1271_AP_FW_NAME;
+               if (wl->chip.id == CHIP_ID_1283_PG20)
+                       fw_name = WL128X_AP_FW_NAME;
+               else
+                       fw_name = WL127X_AP_FW_NAME;
                break;
        case BSS_TYPE_IBSS:
        case BSS_TYPE_STA_BSS:
index f6dd3dea4f30f0dc908322a19c5f070cf75d08fd..5a2951ed6eda8ba42394ef7e4f4ce57caea42dec 100644 (file)
@@ -361,4 +361,5 @@ MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
 MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
 MODULE_FIRMWARE(WL1271_FW_NAME);
 MODULE_FIRMWARE(WL128X_FW_NAME);
-MODULE_FIRMWARE(WL1271_AP_FW_NAME);
+MODULE_FIRMWARE(WL127X_AP_FW_NAME);
+MODULE_FIRMWARE(WL128X_AP_FW_NAME);
index f5525361f2f58217f9c32fdfedc21e625330fc01..7b82b5f0e4901ab008b9c5869b67a94bafbc9340 100644 (file)
@@ -493,5 +493,6 @@ MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
 MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
 MODULE_FIRMWARE(WL1271_FW_NAME);
 MODULE_FIRMWARE(WL128X_FW_NAME);
-MODULE_FIRMWARE(WL1271_AP_FW_NAME);
+MODULE_FIRMWARE(WL127X_AP_FW_NAME);
+MODULE_FIRMWARE(WL128X_AP_FW_NAME);
 MODULE_ALIAS("spi:wl1271");
index ad04b8337a259b9c47ec0aa00b6ec4d380daa215..890c1a54382dd94de236a95439b6039bef572ecb 100644 (file)
@@ -132,7 +132,8 @@ extern u32 wl12xx_debug_level;
 
 #define WL1271_FW_NAME "ti-connectivity/wl1271-fw-2.bin"
 #define WL128X_FW_NAME "ti-connectivity/wl128x-fw.bin"
-#define WL1271_AP_FW_NAME "ti-connectivity/wl1271-fw-ap.bin"
+#define WL127X_AP_FW_NAME "ti-connectivity/wl1271-fw-ap.bin"
+#define WL128X_AP_FW_NAME "ti-connectivity/wl128x-fw-ap.bin"
 
 /*
  * wl127x and wl128x are using the same NVS file name. However, the