drivers: wireless: Fix ASSERT() in _read_data_len() in gs2200m.c

Summary:
- During stress test with spresense:wifi (non-SMP), I noticed
  sometimes ASSERT() happened in _read_data_len()
- Actually, up_udelay(50) has been added to avoid the ASSERT
- However, I finally noticed that it should be moved before
  calling dready()
- Also, I cofirmed that we can reduced the time from 50 to 30
- NOTE: we need at least 15us in my experience

Impact:
- gs2200m.c only

Testing:
- Tested with following configurations
- spresense:wifi, spresense:wifi_smp, stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2021-01-18 10:36:51 +09:00 committed by Brennan Ashton
parent 7df322c6be
commit 11a842333f
1 changed files with 6 additions and 6 deletions

View File

@ -865,6 +865,12 @@ retry:
_write_data(dev, hdr, sizeof(hdr));
/* NOTE: busy wait 30us
* workaround to avoid an invalid frame response
*/
up_udelay(30);
/* Wait for data ready */
while (!dev->lower->dready(NULL))
@ -872,12 +878,6 @@ retry:
/* TODO: timeout */
}
/* NOTE: busy wait 50us
* workaround to avoid an invalid frame response
*/
up_udelay(50);
/* Read frame response */
_read_data(dev, res, sizeof(res));