瀏覽代碼

qcacmn: Skip chanlist event during recovering

Add new qdf API: qdf_is_recovering and
qdf_register_recovering_state_query_callback.
Client driver will register the state query callback
to common driver to report the recovering state.

Regulatory skip the chanlist update event during SSR
to keep the current regulatory setting.

Change-Id: I58e503cce162a0351d566148c1897a5012889c62
CRs-Fixed: 2321820
Liangwei Dong 6 年之前
父節點
當前提交
89fdd82b93
共有 3 個文件被更改,包括 42 次插入1 次删除
  1. 25 0
      qdf/inc/qdf_platform.h
  2. 16 0
      qdf/src/qdf_platform.c
  3. 1 1
      target_if/regulatory/src/target_if_reg.c

+ 25 - 0
qdf/inc/qdf_platform.h

@@ -130,4 +130,29 @@ void qdf_register_module_state_query_callback(
  * Return: true if in transition else false
  */
 bool qdf_is_module_state_transitioning(void);
+
+/**
+ * qdf_is_recovering_callback() - callback to get driver recovering in progress
+ * or not
+ *
+ * Return: true if driver is doing recovering else false
+ */
+typedef bool (*qdf_is_recovering_callback)(void);
+
+/**
+ * qdf_register_recovering_state_query_callback() - register recover status
+ * query callback
+ *
+ * Return: none
+ */
+void qdf_register_recovering_state_query_callback(
+	qdf_is_recovering_callback is_recovering);
+
+/**
+ * qdf_is_recovering() - get driver recovering in progress status
+ * or not
+ *
+ * Return: true if driver is doing recovering else false
+ */
+bool qdf_is_recovering(void);
 #endif /*_QDF_PLATFORM_H*/

+ 16 - 0
qdf/src/qdf_platform.c

@@ -29,6 +29,7 @@ static qdf_ssr_callback                     ssr_protect_cb;
 static qdf_ssr_callback                     ssr_unprotect_cb;
 static qdf_is_module_state_transitioning_cb module_state_transitioning_cb;
 static qdf_is_fw_down_callback		    is_fw_down_cb;
+static qdf_is_recovering_callback           is_recovering_cb;
 
 void qdf_register_fw_down_callback(qdf_is_fw_down_callback is_fw_down)
 {
@@ -108,3 +109,18 @@ bool qdf_is_module_state_transitioning(void)
 }
 
 qdf_export_symbol(qdf_is_module_state_transitioning);
+
+void qdf_register_recovering_state_query_callback(
+			qdf_is_recovering_callback is_recovering)
+{
+	is_recovering_cb = is_recovering;
+}
+
+bool qdf_is_recovering(void)
+{
+	if (is_recovering_cb)
+		return is_recovering_cb();
+	return false;
+}
+
+qdf_export_symbol(qdf_is_recovering);

+ 1 - 1
target_if/regulatory/src/target_if_reg.c

@@ -112,7 +112,7 @@ static int tgt_reg_chan_list_update_handler(ol_scn_t handle,
 
 	TARGET_IF_ENTER();
 
-	if (qdf_is_fw_down()) {
+	if (qdf_is_recovering()) {
 		target_if_debug("ignore chan list update evt in ssr");
 		return 0;
 	}