@@ -331,6 +331,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8786 = {
331
331
.can_dump_fw = false,
332
332
.can_auto_tdls = false,
333
333
.can_ext_scan = false,
334
+ .fw_ready_extra_delay = false,
334
335
};
335
336
336
337
static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
@@ -346,6 +347,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8787 = {
346
347
.can_dump_fw = false,
347
348
.can_auto_tdls = false,
348
349
.can_ext_scan = true,
350
+ .fw_ready_extra_delay = false,
349
351
};
350
352
351
353
static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
@@ -361,6 +363,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8797 = {
361
363
.can_dump_fw = false,
362
364
.can_auto_tdls = false,
363
365
.can_ext_scan = true,
366
+ .fw_ready_extra_delay = false,
364
367
};
365
368
366
369
static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
@@ -376,6 +379,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8897 = {
376
379
.can_dump_fw = true,
377
380
.can_auto_tdls = false,
378
381
.can_ext_scan = true,
382
+ .fw_ready_extra_delay = false,
379
383
};
380
384
381
385
static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = {
@@ -392,6 +396,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = {
392
396
.fw_dump_enh = true,
393
397
.can_auto_tdls = false,
394
398
.can_ext_scan = true,
399
+ .fw_ready_extra_delay = false,
395
400
};
396
401
397
402
static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = {
@@ -408,6 +413,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = {
408
413
.fw_dump_enh = true,
409
414
.can_auto_tdls = false,
410
415
.can_ext_scan = true,
416
+ .fw_ready_extra_delay = true,
411
417
};
412
418
413
419
static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = {
@@ -425,6 +431,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = {
425
431
.fw_dump_enh = true,
426
432
.can_auto_tdls = false,
427
433
.can_ext_scan = true,
434
+ .fw_ready_extra_delay = false,
428
435
};
429
436
430
437
static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = {
@@ -440,6 +447,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = {
440
447
.can_dump_fw = false,
441
448
.can_auto_tdls = true,
442
449
.can_ext_scan = true,
450
+ .fw_ready_extra_delay = false,
443
451
};
444
452
445
453
static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = {
@@ -456,6 +464,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = {
456
464
.fw_dump_enh = true,
457
465
.can_auto_tdls = true,
458
466
.can_ext_scan = true,
467
+ .fw_ready_extra_delay = false,
459
468
};
460
469
461
470
static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = {
@@ -471,6 +480,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8801 = {
471
480
.can_dump_fw = false,
472
481
.can_auto_tdls = false,
473
482
.can_ext_scan = true,
483
+ .fw_ready_extra_delay = false,
474
484
};
475
485
476
486
static struct memory_type_mapping generic_mem_type_map [] = {
@@ -563,6 +573,7 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
563
573
card -> fw_dump_enh = data -> fw_dump_enh ;
564
574
card -> can_auto_tdls = data -> can_auto_tdls ;
565
575
card -> can_ext_scan = data -> can_ext_scan ;
576
+ card -> fw_ready_extra_delay = data -> fw_ready_extra_delay ;
566
577
INIT_WORK (& card -> work , mwifiex_sdio_work );
567
578
}
568
579
@@ -766,6 +777,7 @@ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat)
766
777
static int mwifiex_check_fw_status (struct mwifiex_adapter * adapter ,
767
778
u32 poll_num )
768
779
{
780
+ struct sdio_mmc_card * card = adapter -> card ;
769
781
int ret = 0 ;
770
782
u16 firmware_stat ;
771
783
u32 tries ;
@@ -783,6 +795,13 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
783
795
ret = -1 ;
784
796
}
785
797
798
+ if (card -> fw_ready_extra_delay &&
799
+ firmware_stat == FIRMWARE_READY_SDIO )
800
+ /* firmware might pretend to be ready, when it's not.
801
+ * Wait a little bit more as a workaround.
802
+ */
803
+ msleep (100 );
804
+
786
805
return ret ;
787
806
}
788
807
0 commit comments