|
@@ -1428,6 +1428,7 @@ static void hdd_runtime_suspend_context_init(struct hdd_context *hdd_ctx)
|
|
|
qdf_runtime_lock_init(&ctx->dfs);
|
|
|
qdf_runtime_lock_init(&ctx->connect);
|
|
|
qdf_runtime_lock_init(&ctx->user);
|
|
|
+ qdf_runtime_lock_init(&ctx->monitor_mode);
|
|
|
|
|
|
ctx->is_user_wakelock_acquired = false;
|
|
|
|
|
@@ -1447,6 +1448,7 @@ static void hdd_runtime_suspend_context_deinit(struct hdd_context *hdd_ctx)
|
|
|
if (ctx->is_user_wakelock_acquired)
|
|
|
qdf_runtime_pm_allow_suspend(&ctx->user);
|
|
|
|
|
|
+ qdf_runtime_lock_deinit(&ctx->monitor_mode);
|
|
|
qdf_runtime_lock_deinit(&ctx->user);
|
|
|
qdf_runtime_lock_deinit(&ctx->connect);
|
|
|
qdf_runtime_lock_deinit(&ctx->dfs);
|
|
@@ -2746,7 +2748,8 @@ static int __hdd_mon_open(struct net_device *dev)
|
|
|
|
|
|
hdd_mon_mode_ether_setup(dev);
|
|
|
|
|
|
- if (con_mode == QDF_GLOBAL_MONITOR_MODE) {
|
|
|
+ if (con_mode == QDF_GLOBAL_MONITOR_MODE ||
|
|
|
+ ucfg_mlme_is_sta_mon_conc_supported(hdd_ctx->psoc)) {
|
|
|
ret = hdd_trigger_psoc_idle_restart(hdd_ctx);
|
|
|
if (ret) {
|
|
|
hdd_err("Failed to start WLAN modules return");
|
|
@@ -2754,7 +2757,8 @@ static int __hdd_mon_open(struct net_device *dev)
|
|
|
}
|
|
|
hdd_err("hdd_wlan_start_modules() successful !");
|
|
|
|
|
|
- if (!test_bit(SME_SESSION_OPENED, &adapter->event_flags)) {
|
|
|
+ if ((!test_bit(SME_SESSION_OPENED, &adapter->event_flags)) ||
|
|
|
+ (policy_mgr_is_sta_mon_concurrency(hdd_ctx->psoc))) {
|
|
|
ret = hdd_start_adapter(adapter);
|
|
|
if (ret) {
|
|
|
hdd_err("Failed to start adapter :%d",
|
|
@@ -2767,6 +2771,15 @@ static int __hdd_mon_open(struct net_device *dev)
|
|
|
set_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
|
|
|
}
|
|
|
|
|
|
+ if (con_mode != QDF_GLOBAL_MONITOR_MODE &&
|
|
|
+ ucfg_mlme_is_sta_mon_conc_supported(hdd_ctx->psoc)) {
|
|
|
+ hdd_info("Acquire wakelock for STA + monitor mode");
|
|
|
+ qdf_wake_lock_acquire(&hdd_ctx->monitor_mode_wakelock,
|
|
|
+ WIFI_POWER_EVENT_WAKELOCK_MONITOR_MODE);
|
|
|
+ qdf_runtime_pm_prevent_suspend(
|
|
|
+ &hdd_ctx->runtime_context.monitor_mode);
|
|
|
+ }
|
|
|
+
|
|
|
ret = hdd_set_mon_rx_cb(dev);
|
|
|
|
|
|
if (!ret)
|
|
@@ -4391,12 +4404,15 @@ static int __hdd_stop(struct net_device *dev)
|
|
|
if (adapter->device_mode == QDF_STA_MODE) {
|
|
|
hdd_lpass_notify_stop(hdd_ctx);
|
|
|
|
|
|
- if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc))
|
|
|
+ if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE)
|
|
|
hdd_close_monitor_interface(hdd_ctx);
|
|
|
}
|
|
|
|
|
|
if (wlan_hdd_is_session_type_monitor(adapter->device_mode) &&
|
|
|
- adapter->vdev) {
|
|
|
+ adapter->vdev &&
|
|
|
+ ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE) {
|
|
|
ucfg_pkt_capture_deregister_callbacks(adapter->vdev);
|
|
|
hdd_objmgr_put_vdev(adapter->vdev);
|
|
|
adapter->vdev = NULL;
|
|
@@ -5073,16 +5089,21 @@ static const struct net_device_ops wlan_mon_drv_ops = {
|
|
|
.ndo_get_stats = hdd_get_stats,
|
|
|
};
|
|
|
|
|
|
-#ifdef WLAN_FEATURE_TSF_PTP
|
|
|
/**
|
|
|
- * hdd_set_station_ops() - update net_device ops for monitor mode
|
|
|
+ * hdd_set_mon_ops() - update net_device ops for monitor mode
|
|
|
* @dev: Handle to struct net_device to be updated.
|
|
|
* Return: None
|
|
|
*/
|
|
|
+static void hdd_set_mon_ops(struct net_device *dev)
|
|
|
+{
|
|
|
+ dev->netdev_ops = &wlan_mon_drv_ops;
|
|
|
+}
|
|
|
+
|
|
|
+#ifdef WLAN_FEATURE_TSF_PTP
|
|
|
void hdd_set_station_ops(struct net_device *dev)
|
|
|
{
|
|
|
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE) {
|
|
|
- dev->netdev_ops = &wlan_mon_drv_ops;
|
|
|
+ hdd_set_mon_ops(dev);
|
|
|
} else {
|
|
|
dev->netdev_ops = &wlan_drv_ops;
|
|
|
dev->ethtool_ops = &wlan_ethtool_ops;
|
|
@@ -5092,7 +5113,7 @@ void hdd_set_station_ops(struct net_device *dev)
|
|
|
void hdd_set_station_ops(struct net_device *dev)
|
|
|
{
|
|
|
if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE)
|
|
|
- dev->netdev_ops = &wlan_mon_drv_ops;
|
|
|
+ hdd_set_mon_ops(dev);
|
|
|
else
|
|
|
dev->netdev_ops = &wlan_drv_ops;
|
|
|
}
|
|
@@ -5111,6 +5132,9 @@ void hdd_set_station_ops(struct net_device *dev)
|
|
|
dev->netdev_ops = &wlan_drv_ops;
|
|
|
}
|
|
|
#endif
|
|
|
+static void hdd_set_mon_ops(struct net_device *dev)
|
|
|
+{
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
#ifdef WLAN_FEATURE_PKT_CAPTURE
|
|
@@ -5206,10 +5230,15 @@ hdd_alloc_station_adapter(struct hdd_context *hdd_ctx, tSirMacAddr mac_addr,
|
|
|
qdf_mem_copy(adapter->mac_addr.bytes, mac_addr, sizeof(tSirMacAddr));
|
|
|
dev->watchdog_timeo = HDD_TX_TIMEOUT;
|
|
|
|
|
|
- if (wlan_hdd_is_session_type_monitor(session_type))
|
|
|
- hdd_set_pktcapture_ops(adapter->dev);
|
|
|
- else
|
|
|
+ if (wlan_hdd_is_session_type_monitor(session_type)) {
|
|
|
+ if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE)
|
|
|
+ hdd_set_pktcapture_ops(adapter->dev);
|
|
|
+ if (ucfg_mlme_is_sta_mon_conc_supported(hdd_ctx->psoc))
|
|
|
+ hdd_set_mon_ops(adapter->dev);
|
|
|
+ } else {
|
|
|
hdd_set_station_ops(adapter->dev);
|
|
|
+ }
|
|
|
|
|
|
hdd_dev_setup_destructor(dev);
|
|
|
dev->ieee80211_ptr = &adapter->wdev;
|
|
@@ -6853,7 +6882,8 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
|
|
|
hdd_destroy_adapter_sysfs_files(adapter);
|
|
|
|
|
|
if (adapter->device_mode == QDF_STA_MODE &&
|
|
|
- ucfg_pkt_capture_get_mode(hdd_ctx->psoc))
|
|
|
+ ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE)
|
|
|
hdd_del_monitor_interface(hdd_ctx);
|
|
|
|
|
|
if (adapter->vdev_id != WLAN_UMAC_VDEV_ID_MAX)
|
|
@@ -6984,14 +7014,28 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
|
|
|
|
|
|
case QDF_MONITOR_MODE:
|
|
|
if (wlan_hdd_is_session_type_monitor(QDF_MONITOR_MODE) &&
|
|
|
- adapter->vdev) {
|
|
|
+ adapter->vdev &&
|
|
|
+ ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE) {
|
|
|
ucfg_pkt_capture_deregister_callbacks(adapter->vdev);
|
|
|
hdd_objmgr_put_vdev(adapter->vdev);
|
|
|
adapter->vdev = NULL;
|
|
|
}
|
|
|
+ if (wlan_hdd_is_session_type_monitor(QDF_MONITOR_MODE) &&
|
|
|
+ ucfg_mlme_is_sta_mon_conc_supported(hdd_ctx->psoc)) {
|
|
|
+ hdd_info("Release wakelock for STA + monitor mode!");
|
|
|
+ qdf_runtime_pm_allow_suspend(
|
|
|
+ &hdd_ctx->runtime_context.monitor_mode);
|
|
|
+ qdf_wake_lock_release(&hdd_ctx->monitor_mode_wakelock,
|
|
|
+ WIFI_POWER_EVENT_WAKELOCK_MONITOR_MODE);
|
|
|
+ }
|
|
|
wlan_hdd_scan_abort(adapter);
|
|
|
hdd_deregister_hl_netdev_fc_timer(adapter);
|
|
|
hdd_deregister_tx_flow_control(adapter);
|
|
|
+ status = hdd_disable_monitor_mode();
|
|
|
+ if (QDF_IS_STATUS_ERROR(status))
|
|
|
+ hdd_err_rl("datapath reset failed for montior mode");
|
|
|
+ hdd_set_idle_ps_config(hdd_ctx, true);
|
|
|
status = hdd_monitor_mode_vdev_status(adapter);
|
|
|
if (QDF_IS_STATUS_ERROR(status))
|
|
|
hdd_err_rl("stop failed montior mode");
|
|
@@ -7951,7 +7995,8 @@ int wlan_hdd_set_mon_chan(struct hdd_adapter *adapter, qdf_freq_t freq,
|
|
|
enum phy_ch_width ch_width;
|
|
|
int ret;
|
|
|
|
|
|
- if (hdd_get_conparam() != QDF_GLOBAL_MONITOR_MODE) {
|
|
|
+ if ((hdd_get_conparam() != QDF_GLOBAL_MONITOR_MODE) &&
|
|
|
+ (!policy_mgr_is_sta_mon_concurrency(hdd_ctx->psoc))) {
|
|
|
hdd_err("Not supported, device is not in monitor mode");
|
|
|
return -EINVAL;
|
|
|
}
|
|
@@ -8211,7 +8256,8 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
|
|
|
case QDF_MONITOR_MODE:
|
|
|
if (wlan_hdd_is_session_type_monitor(
|
|
|
QDF_MONITOR_MODE) &&
|
|
|
- ucfg_pkt_capture_get_mode(hdd_ctx->psoc)) {
|
|
|
+ ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE) {
|
|
|
vdev = hdd_objmgr_get_vdev(adapter);
|
|
|
if (vdev) {
|
|
|
ucfg_pkt_capture_register_callbacks(
|
|
@@ -18102,45 +18148,15 @@ void hdd_hidden_ssid_enable_roaming(hdd_handle_t hdd_handle, uint8_t vdev_id)
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_FEATURE_PKT_CAPTURE
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_is_session_type_monitor() - check if session type is MONITOR
|
|
|
- * @session_type: session type
|
|
|
- *
|
|
|
- * Return: True - if session type for adapter is monitor, else False
|
|
|
- *
|
|
|
- */
|
|
|
-bool wlan_hdd_is_session_type_monitor(uint8_t session_type)
|
|
|
-{
|
|
|
- struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
-
|
|
|
- if (!hdd_ctx)
|
|
|
- return false;
|
|
|
-
|
|
|
- if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) &&
|
|
|
- cds_get_conparam() != QDF_GLOBAL_MONITOR_MODE &&
|
|
|
- session_type == QDF_MONITOR_MODE)
|
|
|
- return true;
|
|
|
- else
|
|
|
- return false;
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- * wlan_hdd_check_mon_concurrency() - check if MONITOR and STA concurrency
|
|
|
- * is UP when packet capture mode is enabled.
|
|
|
- * @void
|
|
|
- *
|
|
|
- * Return: True - if STA and monitor concurrency is there, else False
|
|
|
- *
|
|
|
- */
|
|
|
-bool wlan_hdd_check_mon_concurrency(void)
|
|
|
+bool wlan_hdd_is_mon_concurrency(void)
|
|
|
{
|
|
|
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
|
|
|
if (!hdd_ctx)
|
|
|
return -EINVAL;
|
|
|
|
|
|
- if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc)) {
|
|
|
+ if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE) {
|
|
|
if (policy_mgr_get_concurrency_mode(hdd_ctx->psoc) ==
|
|
|
(QDF_STA_MASK | QDF_MONITOR_MASK)) {
|
|
|
hdd_err("STA + MON mode is UP");
|
|
@@ -18150,16 +18166,6 @@ bool wlan_hdd_check_mon_concurrency(void)
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_del_monitor() - delete monitor interface
|
|
|
- * @hdd_ctx: pointer to hdd context
|
|
|
- * @adapter: adapter to be deleted
|
|
|
- * @rtnl_held: rtnl lock held
|
|
|
- *
|
|
|
- * This function is invoked to delete monitor interface.
|
|
|
- *
|
|
|
- * Return: None
|
|
|
- */
|
|
|
void wlan_hdd_del_monitor(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter *adapter, bool rtnl_held)
|
|
|
{
|
|
@@ -18176,17 +18182,46 @@ void wlan_hdd_del_monitor(struct hdd_context *hdd_ctx,
|
|
|
hdd_open_p2p_interface(hdd_ctx);
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * wlan_hdd_add_monitor_check() - check for monitor intf and add if needed
|
|
|
- * @hdd_ctx: pointer to hdd context
|
|
|
- * @adapter: output pointer to hold created monitor adapter
|
|
|
- * @name: name of the interface
|
|
|
- * @rtnl_held: True if RTNL lock is held
|
|
|
- * @name_assign_type: the name of assign type of the netdev
|
|
|
- *
|
|
|
- * Return: 0 - on success
|
|
|
- * err code - on failure
|
|
|
- */
|
|
|
+void
|
|
|
+wlan_hdd_del_p2p_interface(struct hdd_context *hdd_ctx)
|
|
|
+{
|
|
|
+ struct hdd_adapter *adapter = NULL, *next_adapter = NULL;
|
|
|
+ struct osif_vdev_sync *vdev_sync;
|
|
|
+
|
|
|
+ hdd_for_each_adapter_dev_held_safe(hdd_ctx, adapter, next_adapter) {
|
|
|
+ if (adapter->device_mode == QDF_P2P_CLIENT_MODE ||
|
|
|
+ adapter->device_mode == QDF_P2P_DEVICE_MODE ||
|
|
|
+ adapter->device_mode == QDF_P2P_GO_MODE) {
|
|
|
+ vdev_sync = osif_vdev_sync_unregister(adapter->dev);
|
|
|
+ if (vdev_sync)
|
|
|
+ osif_vdev_sync_wait_for_ops(vdev_sync);
|
|
|
+
|
|
|
+ hdd_clean_up_interface(hdd_ctx, adapter);
|
|
|
+
|
|
|
+ if (vdev_sync)
|
|
|
+ osif_vdev_sync_destroy(vdev_sync);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+#endif /* WLAN_FEATURE_PKT_CAPTURE */
|
|
|
+
|
|
|
+bool wlan_hdd_is_session_type_monitor(uint8_t session_type)
|
|
|
+{
|
|
|
+ struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
|
|
+
|
|
|
+ if (!hdd_ctx) {
|
|
|
+ cds_err("HDD context is NULL");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cds_get_conparam() != QDF_GLOBAL_MONITOR_MODE &&
|
|
|
+ session_type == QDF_MONITOR_MODE)
|
|
|
+ return true;
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
int
|
|
|
wlan_hdd_add_monitor_check(struct hdd_context *hdd_ctx,
|
|
|
struct hdd_adapter **adapter,
|
|
@@ -18195,86 +18230,50 @@ wlan_hdd_add_monitor_check(struct hdd_context *hdd_ctx,
|
|
|
{
|
|
|
struct hdd_adapter *sta_adapter;
|
|
|
struct hdd_adapter *mon_adapter;
|
|
|
- uint32_t mode;
|
|
|
+ int errno;
|
|
|
uint8_t num_open_session = 0;
|
|
|
+ QDF_STATUS status;
|
|
|
|
|
|
/* if no interface is up do not add monitor mode */
|
|
|
if (!hdd_is_any_interface_open(hdd_ctx))
|
|
|
return -EINVAL;
|
|
|
|
|
|
- /*
|
|
|
- * If add interface request is for monitor mode, then it can run in
|
|
|
- * parallel with only one station interface.
|
|
|
- * If there is no existing station interface return error
|
|
|
- */
|
|
|
- if (QDF_STATUS_SUCCESS != policy_mgr_mode_specific_num_open_sessions(
|
|
|
- hdd_ctx->psoc,
|
|
|
- QDF_MONITOR_MODE,
|
|
|
- &num_open_session))
|
|
|
- return -EINVAL;
|
|
|
-
|
|
|
- if (num_open_session) {
|
|
|
- hdd_err("monitor mode already exists, only one is possible");
|
|
|
- return -EBUSY;
|
|
|
- }
|
|
|
-
|
|
|
- /* Ensure there is only one station interface */
|
|
|
- if (QDF_STATUS_SUCCESS != policy_mgr_mode_specific_num_open_sessions(
|
|
|
- hdd_ctx->psoc,
|
|
|
- QDF_STA_MODE,
|
|
|
- &num_open_session))
|
|
|
- return -EINVAL;
|
|
|
-
|
|
|
- if (num_open_session != 1) {
|
|
|
- hdd_err("cannot add monitor mode, due to %u sta interfaces",
|
|
|
- num_open_session);
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
sta_adapter = hdd_get_adapter(hdd_ctx, QDF_STA_MODE);
|
|
|
if (!sta_adapter) {
|
|
|
hdd_err("No station adapter");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- if (QDF_STATUS_SUCCESS != policy_mgr_mode_specific_num_open_sessions(
|
|
|
- hdd_ctx->psoc,
|
|
|
- QDF_SAP_MODE,
|
|
|
- &num_open_session))
|
|
|
+ status = policy_mgr_check_mon_concurrency(hdd_ctx->psoc);
|
|
|
+
|
|
|
+ if (QDF_IS_STATUS_ERROR(status))
|
|
|
return -EINVAL;
|
|
|
|
|
|
- if (num_open_session) {
|
|
|
- hdd_err("cannot add monitor mode, due to SAP concurrency");
|
|
|
+ if (hdd_is_connection_in_progress(NULL, NULL)) {
|
|
|
+ hdd_err("cannot add monitor mode, Connection in progress");
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- /* delete p2p interface */
|
|
|
- for (mode = QDF_P2P_CLIENT_MODE; mode <= QDF_P2P_DEVICE_MODE; mode++) {
|
|
|
- struct hdd_adapter *adapter;
|
|
|
-
|
|
|
- if (mode == QDF_FTM_MODE ||
|
|
|
- mode == QDF_MONITOR_MODE)
|
|
|
- continue;
|
|
|
-
|
|
|
- adapter = hdd_get_adapter(hdd_ctx, mode);
|
|
|
- if (adapter) {
|
|
|
- struct osif_vdev_sync *vdev_sync;
|
|
|
-
|
|
|
- vdev_sync = osif_vdev_sync_unregister(adapter->dev);
|
|
|
- if (vdev_sync)
|
|
|
- osif_vdev_sync_wait_for_ops(vdev_sync);
|
|
|
-
|
|
|
- wlan_hdd_release_intf_addr(hdd_ctx,
|
|
|
- adapter->mac_addr.bytes);
|
|
|
- hdd_stop_adapter(hdd_ctx, adapter);
|
|
|
- hdd_deinit_adapter(hdd_ctx, adapter, true);
|
|
|
- hdd_close_adapter(hdd_ctx, adapter, rtnl_held);
|
|
|
-
|
|
|
- if (vdev_sync)
|
|
|
- osif_vdev_sync_destroy(vdev_sync);
|
|
|
+ num_open_session = policy_mgr_mode_specific_connection_count(
|
|
|
+ hdd_ctx->psoc,
|
|
|
+ PM_STA_MODE,
|
|
|
+ NULL);
|
|
|
+
|
|
|
+ if (num_open_session == 1) {
|
|
|
+ hdd_ctx->disconnect_for_sta_mon_conc = true;
|
|
|
+ /* Try disconnecting if already in connected state */
|
|
|
+ errno = wlan_hdd_try_disconnect(sta_adapter,
|
|
|
+ REASON_UNSPEC_FAILURE);
|
|
|
+ if (errno > 0) {
|
|
|
+ hdd_err("Failed to disconnect the existing connection");
|
|
|
+ return -EALREADY;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE)
|
|
|
+ wlan_hdd_del_p2p_interface(hdd_ctx);
|
|
|
+
|
|
|
mon_adapter = hdd_open_adapter(hdd_ctx, QDF_MONITOR_MODE, name,
|
|
|
wlan_hdd_get_intf_addr(
|
|
|
hdd_ctx,
|
|
@@ -18282,15 +18281,18 @@ wlan_hdd_add_monitor_check(struct hdd_context *hdd_ctx,
|
|
|
name_assign_type, rtnl_held);
|
|
|
if (!mon_adapter) {
|
|
|
hdd_err("hdd_open_adapter failed");
|
|
|
- hdd_open_p2p_interface(hdd_ctx);
|
|
|
+ if (ucfg_pkt_capture_get_mode(hdd_ctx->psoc) !=
|
|
|
+ PACKET_CAPTURE_MODE_DISABLE)
|
|
|
+ hdd_open_p2p_interface(hdd_ctx);
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
+ if (mon_adapter)
|
|
|
+ hdd_set_idle_ps_config(hdd_ctx, false);
|
|
|
+
|
|
|
*adapter = mon_adapter;
|
|
|
return 0;
|
|
|
}
|
|
|
-#endif /* WLAN_FEATURE_PKT_CAPTURE */
|
|
|
-
|
|
|
|
|
|
#ifdef FEATURE_MONITOR_MODE_SUPPORT
|
|
|
|