소스 검색

qcacld-3.0: Refactor HDD LPASS "interface mode change" logic

Previously "qcacld-3.0: Refactor WLAN_FEATURE_LPSS" refactored some of
the HDD LPASS logic.  Continue that process by refactoring the
"interface mode change" logic such that the actual implementation is
in the lpass feature file.

Change-Id: I7be1719f6b0f4ed69d60dbb1c50dab63ca3d768a
CRs-Fixed: 1070700
Jeff Johnson 8 년 전
부모
커밋
2ae6f714b0
3개의 변경된 파일33개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 19 1
      core/hdd/src/wlan_hdd_lpass.c
  3. 13 3
      core/hdd/src/wlan_hdd_lpass.h

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -9268,7 +9268,7 @@ done:
 	/* Set bitmask based on updated value */
 	cds_set_concurrency_mode(pAdapter->device_mode);
 
-	wlan_hdd_send_all_scan_intf_info(pHddCtx);
+	hdd_lpass_notify_mode_change(pAdapter);
 
 	EXIT();
 	return 0;

+ 19 - 1
core/hdd/src/wlan_hdd_lpass.c

@@ -229,7 +229,7 @@ static void wlan_hdd_send_version_pkg(uint32_t fw_version,
  *
  * Return: none
  */
-void wlan_hdd_send_all_scan_intf_info(hdd_context_t *hdd_ctx)
+static void wlan_hdd_send_all_scan_intf_info(struct hdd_context_s *hdd_ctx)
 {
 	hdd_adapter_t *adapter = NULL;
 	hdd_adapter_list_node_t *node = NULL, *next = NULL;
@@ -261,6 +261,24 @@ void wlan_hdd_send_all_scan_intf_info(hdd_context_t *hdd_ctx)
 		wlan_hdd_send_status_pkg(adapter, NULL, 1, 0);
 }
 
+/**
+ * hdd_lpass_notify_mode_change() - Notify LPASS of interface mode change
+ * @adapter: The adapter whose mode was changed
+ *
+ * This function is used to notify the LPASS feature that an adapter
+ * had its mode changed.
+ *
+ * Return: none
+ */
+/* implementation note: when one changes we notify them all */
+void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter)
+{
+	struct hdd_context_s *hdd_ctx;
+
+	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+	wlan_hdd_send_all_scan_intf_info(hdd_ctx);
+}
+
 /**
  * hdd_lpass_notify_start() - Notify LPASS of driver start
  * @hdd_ctx: The global HDD context

+ 13 - 3
core/hdd/src/wlan_hdd_lpass.h

@@ -29,12 +29,23 @@
 #define WLAN_HDD_LPASS_H
 
 struct hdd_context_s;
+struct hdd_adapter_s;
 
 #ifdef WLAN_FEATURE_LPSS
 void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
 			      hdd_station_ctx_t *sta_ctx,
 			      uint8_t is_on, uint8_t is_connected);
-void wlan_hdd_send_all_scan_intf_info(hdd_context_t *hdd_ctx);
+
+/**
+ * hdd_lpass_notify_mode_change() - Notify LPASS of interface mode change
+ * @adapter: The adapter whose mode was changed
+ *
+ * This function is used to notify the LPASS feature that an adapter
+ * had its mode changed.
+ *
+ * Return: none
+ */
+void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter);
 
 /**
  * hdd_lpass_notify_start() - Notify LPASS of driver start
@@ -65,9 +76,8 @@ static inline void wlan_hdd_send_status_pkg(hdd_adapter_t *adapter,
 	return;
 }
 
-static inline void wlan_hdd_send_all_scan_intf_info(hdd_context_t *hdd_ctx)
+static inline void hdd_lpass_notify_mode_change(struct hdd_adapter_s *adapter)
 {
-	return;
 }
 static inline void hdd_lpass_notify_start(struct hdd_context_s *hdd_ctx) { }
 static inline void hdd_lpass_notify_stop(struct hdd_context_s *hdd_ctx) { }