aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/sdio_test.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-05 17:09:28 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-05 17:09:28 -0400
commit90864fbc7639d7a2300c67a18c9fb9fbcf7d51d2 (patch)
tree6951c8d0e529dbfc7c4cec75d4cec63350e39b7c /drivers/net/wireless/wl12xx/sdio_test.c
parent228e548e602061b08ee8e8966f567c12aa079682 (diff)
parenta70171dce9cd44cb06c7d299eba9fa87a8933045 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/wl12xx/sdio_test.c')
-rw-r--r--drivers/net/wireless/wl12xx/sdio_test.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/sdio_test.c b/drivers/net/wireless/wl12xx/sdio_test.c
index 9fcbd3dd8490..f28915392877 100644
--- a/drivers/net/wireless/wl12xx/sdio_test.c
+++ b/drivers/net/wireless/wl12xx/sdio_test.c
@@ -189,7 +189,12 @@ static int wl1271_fetch_firmware(struct wl1271 *wl)
189 const struct firmware *fw; 189 const struct firmware *fw;
190 int ret; 190 int ret;
191 191
192 ret = request_firmware(&fw, WL1271_FW_NAME, wl1271_wl_to_dev(wl)); 192 if (wl->chip.id == CHIP_ID_1283_PG20)
193 ret = request_firmware(&fw, WL128X_FW_NAME,
194 wl1271_wl_to_dev(wl));
195 else
196 ret = request_firmware(&fw, WL1271_FW_NAME,
197 wl1271_wl_to_dev(wl));
193 198
194 if (ret < 0) { 199 if (ret < 0) {
195 wl1271_error("could not get firmware: %d", ret); 200 wl1271_error("could not get firmware: %d", ret);
@@ -227,14 +232,14 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
227 const struct firmware *fw; 232 const struct firmware *fw;
228 int ret; 233 int ret;
229 234
230 ret = request_firmware(&fw, WL1271_NVS_NAME, wl1271_wl_to_dev(wl)); 235 ret = request_firmware(&fw, WL12XX_NVS_NAME, wl1271_wl_to_dev(wl));
231 236
232 if (ret < 0) { 237 if (ret < 0) {
233 wl1271_error("could not get nvs file: %d", ret); 238 wl1271_error("could not get nvs file: %d", ret);
234 return ret; 239 return ret;
235 } 240 }
236 241
237 wl->nvs = kmemdup(fw->data, sizeof(struct wl1271_nvs_file), GFP_KERNEL); 242 wl->nvs = kmemdup(fw->data, fw->size, GFP_KERNEL);
238 243
239 if (!wl->nvs) { 244 if (!wl->nvs) {
240 wl1271_error("could not allocate memory for the nvs file"); 245 wl1271_error("could not allocate memory for the nvs file");
@@ -288,6 +293,11 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
288 wl1271_notice("chip id 0x%x (1271 PG20)", 293 wl1271_notice("chip id 0x%x (1271 PG20)",
289 wl->chip.id); 294 wl->chip.id);
290 break; 295 break;
296 case CHIP_ID_1283_PG20:
297 wl1271_notice("chip id 0x%x (1283 PG20)",
298 wl->chip.id);
299 break;
300 case CHIP_ID_1283_PG10:
291 default: 301 default:
292 wl1271_warning("unsupported chip id: 0x%x", wl->chip.id); 302 wl1271_warning("unsupported chip id: 0x%x", wl->chip.id);
293 return -ENODEV; 303 return -ENODEV;
@@ -407,6 +417,9 @@ static int __devinit wl1271_probe(struct sdio_func *func,
407 /* Grab access to FN0 for ELP reg. */ 417 /* Grab access to FN0 for ELP reg. */
408 func->card->quirks |= MMC_QUIRK_LENIENT_FN0; 418 func->card->quirks |= MMC_QUIRK_LENIENT_FN0;
409 419
420 /* Use block mode for transferring over one block size of data */
421 func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
422
410 wlan_data = wl12xx_get_platform_data(); 423 wlan_data = wl12xx_get_platform_data();
411 if (IS_ERR(wlan_data)) { 424 if (IS_ERR(wlan_data)) {
412 ret = PTR_ERR(wlan_data); 425 ret = PTR_ERR(wlan_data);
@@ -416,6 +429,7 @@ static int __devinit wl1271_probe(struct sdio_func *func,
416 429
417 wl->irq = wlan_data->irq; 430 wl->irq = wlan_data->irq;
418 wl->ref_clock = wlan_data->board_ref_clock; 431 wl->ref_clock = wlan_data->board_ref_clock;
432 wl->tcxo_clock = wlan_data->board_tcxo_clock;
419 433
420 sdio_set_drvdata(func, wl_test); 434 sdio_set_drvdata(func, wl_test);
421 435