Sfoglia il codice sorgente

qcacld-3.0: Send default scan ies to fw after PDR

Default scan ies are sent to fw after interface
is up via set wifi configuration vendor subcommand.
In case of PDR, default ies are not sent again to
fw.

Fix is to send default scan ies to fw after PDR.

Change-Id: Ia42f5b49711ec77b84ae3031aa7998283c1d4ec8
CRs-Fixed: 2100739
yeshwanth sriram guntuka 7 anni fa
parent
commit
ea63f63861
3 ha cambiato i file con 43 aggiunte e 11 eliminazioni
  1. 10 1
      core/hdd/inc/wlan_hdd_main.h
  2. 1 10
      core/hdd/src/wlan_hdd_main.c
  3. 32 0
      core/hdd/src/wlan_hdd_power.c

+ 10 - 1
core/hdd/inc/wlan_hdd_main.h

@@ -2453,7 +2453,16 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, struct hdd_adapter *adap
 int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode);
 int hdd_start_adapter(struct hdd_adapter *adapter);
 void hdd_populate_random_mac_addr(struct hdd_context *hdd_ctx, uint32_t num);
-
+/**
+ * hdd_is_interface_up()- Checkfor interface up before ssr
+ * @hdd_ctx: HDD context
+ *
+ * check  if there are any wlan interfaces before SSR accordingly start
+ * the interface.
+ *
+ * Return: 0 if interface was opened else false
+ */
+bool hdd_is_interface_up(struct hdd_adapter *adapter);
 /**
  * hdd_get_bss_entry() - Get the bss entry matching the chan, bssid and ssid
  * @wiphy: wiphy

+ 1 - 10
core/hdd/src/wlan_hdd_main.c

@@ -4599,16 +4599,7 @@ bool hdd_check_for_opened_interfaces(struct hdd_context *hdd_ctx)
 	return close_modules;
 }
 
-/**
- * hdd_is_interface_up()- Checkfor interface up before ssr
- * @hdd_ctx: HDD context
- *
- * check  if there are any wlan interfaces before SSR accordingly start
- * the interface.
- *
- * Return: 0 if interface was opened else false
- */
-static bool hdd_is_interface_up(struct hdd_adapter *adapter)
+bool hdd_is_interface_up(struct hdd_adapter *adapter)
 {
 	if (test_bit(DEVICE_IFACE_OPENED, &adapter->event_flags))
 		return true;

+ 32 - 0
core/hdd/src/wlan_hdd_power.c

@@ -1329,6 +1329,37 @@ static inline void hdd_wlan_ssr_reinit_event(void)
 }
 #endif
 
+/**
+ * hdd_send_default_scan_ies - send default scan ies to fw
+ *
+ * This function is used to send default scan ies to fw
+ * in case of wlan re-init
+ *
+ * Return: void
+ */
+static void hdd_send_default_scan_ies(struct hdd_context *hdd_ctx)
+{
+	hdd_adapter_list_node_t *adapter_node, *next;
+	struct hdd_adapter *adapter;
+	QDF_STATUS status;
+
+	status = hdd_get_front_adapter(hdd_ctx, &adapter_node);
+	while (NULL != adapter_node && QDF_STATUS_SUCCESS == status) {
+		adapter = adapter_node->pAdapter;
+		if (hdd_is_interface_up(adapter) &&
+		    (adapter->device_mode == QDF_STA_MODE ||
+		    adapter->device_mode == QDF_P2P_DEVICE_MODE)) {
+			sme_set_default_scan_ie(hdd_ctx->hHal,
+				      adapter->sessionId,
+				      adapter->scan_info.default_scan_ies,
+				      adapter->scan_info.default_scan_ies_len);
+		}
+		status = hdd_get_next_adapter(hdd_ctx, adapter_node,
+					      &next);
+		adapter_node = next;
+	}
+}
+
 /**
  * hdd_wlan_re_init() - HDD SSR re-init function
  *
@@ -1420,6 +1451,7 @@ QDF_STATUS hdd_wlan_re_init(void)
 
 	hdd_lpass_notify_start(hdd_ctx);
 
+	hdd_send_default_scan_ies(hdd_ctx);
 	hdd_info("WLAN host driver reinitiation completed!");
 	goto success;