summaryrefslogtreecommitdiff
path: root/recipes-kernel/rsi-91x/files/fix-rsi-handle-card-ready.patch
blob: aed069a8f62775a7695693e998f67ab6d63e4927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/rsi/rsi_91x_hal.c b/rsi/rsi_91x_hal.c
index b9166f6..a94b871 100644
--- a/rsi/rsi_91x_hal.c
+++ b/rsi/rsi_91x_hal.c
@@ -1794,6 +1794,9 @@ int rsi_hal_device_init(struct rsi_hw *adapter)
 
   rsi_dbg(ERR_ZONE, "%s: oper_mode = %d, coex_mode = %d\n", __func__, common->oper_mode, common->coex_mode);
 
+  adapter->common_hal_fsm = COMMAN_HAL_WAIT_FOR_CARD_READY;
+  common->fsm_state       = FSM_CARD_NOT_READY;
+
   switch (adapter->device_model) {
     case RSI_DEV_9113:
     case RSI_DEV_9116:
@@ -1805,8 +1808,6 @@ int rsi_hal_device_init(struct rsi_hw *adapter)
     default:
       return -EINVAL;
   }
-  adapter->common_hal_fsm = COMMAN_HAL_WAIT_FOR_CARD_READY;
-  common->fsm_state       = FSM_CARD_NOT_READY;
 
 #if defined(CONFIG_RSI_BT_ALONE) || defined(CONFIG_RSI_COEX_MODE)
   adapter->priv->bt_fsm_state = BT_DEVICE_NOT_READY;