This is an automated email from the ASF dual-hosted git repository.
jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0c68ddb drivers: wireless: Change retry condition in
gs2200m_hal_write()
0c68ddb is described below
commit 0c68ddb760f46df9d3e3223a6a9e0fda91543fe7
Author: Masayuki Ishikawa <[email protected]>
AuthorDate: Tue Feb 2 08:03:58 2021 +0900
drivers: wireless: Change retry condition in gs2200m_hal_write()
Summary:
- During Wi-Fi stress test, I noticed that ASSERT() happened
in gs2200m_hal_write(). Actually, this happens in 20-40 hours.
- In this case, resp[1] was always 0x0 which is not defined
in the spec.
- In the previous implementation, retry was only done in case of
WR_RESP_NOK. (0x13)
- This commit changes this condition and it reties in case of
0x0 as well
Impact:
- gs2200m driver
Testing:
- Tested with spresense:wifi_smp and stm32f4discovery:wifi
Signed-off-by: Masayuki Ishikawa <[email protected]>
---
drivers/wireless/gs2200m.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c
index 7e6c590..ac5f84e 100644
--- a/drivers/wireless/gs2200m.c
+++ b/drivers/wireless/gs2200m.c
@@ -969,11 +969,12 @@ retry:
_read_data(dev, res, sizeof(res));
- /* In case of NOK, retry */
+ /* In case of NOK or 0x0, retry */
- if (WR_RESP_NOK == res[1])
+ if (WR_RESP_NOK == res[1] || 0x0 == res[1])
{
- wlwarn("*** warning: WR_RESP_NOK received.. retrying. (n=%d) \n", n);
+ wlwarn("*** warning: 0x%x received.. retrying. (n=%d) \n",
+ res[1], n);
nxsig_usleep(10 * 1000);
if (WR_MAX_RETRY < n)