|
@@ -526,6 +526,54 @@ void hdd_start_complete(int ret)
|
|
|
complete_all(&wlan_start_comp);
|
|
|
}
|
|
|
|
|
|
+#ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
|
|
|
+
|
|
|
+ * wlan_hdd_lpc_del_monitor_interface() - Delete monitor interface
|
|
|
+ * @hdd_ctx: hdd_ctx
|
|
|
+ *
|
|
|
+ * This function takes care of deleting monitor interface
|
|
|
+ *
|
|
|
+ * Return: none
|
|
|
+ */
|
|
|
+static void
|
|
|
+wlan_hdd_lpc_del_monitor_interface(struct hdd_context *hdd_ctx)
|
|
|
+{
|
|
|
+ struct hdd_adapter *adapter;
|
|
|
+ void *soc;
|
|
|
+ bool running;
|
|
|
+
|
|
|
+ if (!hdd_ctx)
|
|
|
+ return;
|
|
|
+
|
|
|
+ if (!ucfg_dp_is_local_pkt_capture_enabled(hdd_ctx->psoc))
|
|
|
+ return;
|
|
|
+
|
|
|
+ soc = cds_get_context(QDF_MODULE_ID_SOC);
|
|
|
+ if (!soc)
|
|
|
+ return;
|
|
|
+
|
|
|
+ running = cdp_local_pkt_capture_running(soc, OL_TXRX_PDEV_ID);
|
|
|
+ if (!running)
|
|
|
+ return;
|
|
|
+
|
|
|
+ adapter = hdd_get_adapter(hdd_ctx, QDF_MONITOR_MODE);
|
|
|
+ if (!adapter) {
|
|
|
+ hdd_debug("There is no monitor adapter");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ hdd_debug("lpc: Delete monitor interface");
|
|
|
+ wlan_hdd_release_intf_addr(hdd_ctx, adapter->mac_addr.bytes);
|
|
|
+ hdd_stop_adapter(hdd_ctx, adapter);
|
|
|
+ hdd_close_adapter(hdd_ctx, adapter, true);
|
|
|
+}
|
|
|
+#else
|
|
|
+static inline
|
|
|
+void wlan_hdd_lpc_del_monitor_interface(struct hdd_context *hdd_ctx)
|
|
|
+{
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
#ifdef QCA_HL_NETDEV_FLOW_CONTROL
|
|
|
void wlan_hdd_mod_fc_timer(struct hdd_adapter *adapter,
|
|
|
enum netif_action_type action)
|
|
@@ -13489,6 +13537,10 @@ int hdd_start_station_adapter(struct hdd_adapter *adapter)
|
|
|
return qdf_status_to_os_return(QDF_STATUS_SUCCESS);
|
|
|
}
|
|
|
|
|
|
+ if ((adapter->device_mode == QDF_P2P_DEVICE_MODE) ||
|
|
|
+ (adapter->device_mode == QDF_NAN_DISC_MODE))
|
|
|
+ wlan_hdd_lpc_del_monitor_interface(adapter->hdd_ctx);
|
|
|
+
|
|
|
ret = hdd_vdev_create(adapter);
|
|
|
if (ret) {
|
|
|
hdd_err("failed to create vdev: %d", ret);
|
|
@@ -13542,6 +13594,8 @@ int hdd_start_ap_adapter(struct hdd_adapter *adapter)
|
|
|
adapter->deflink->vdev_id);
|
|
|
return qdf_status_to_os_return(QDF_STATUS_SUCCESS);
|
|
|
}
|
|
|
+
|
|
|
+ wlan_hdd_lpc_del_monitor_interface(hdd_ctx);
|
|
|
|
|
|
* In SSR case no need to create new sap context.
|
|
|
* Otherwise create sap context first and then create
|