qcacld-3.0: Reject system suspend in monitor mode
In the monitor mode when the system is suspended FW trying to send packet to host which is not allowed leading to this system crash. Acquire wakelock once the device enters monitor mode and block the system from entering suspend. Change-Id: I27ba2d43fd7b84bc1ae7e6046ab635065872b2d2 CRs-Fixed: 2130546
此提交包含在:
@@ -1708,6 +1708,7 @@ struct hdd_context {
|
|||||||
qdf_atomic_t disable_lro_in_concurrency;
|
qdf_atomic_t disable_lro_in_concurrency;
|
||||||
qdf_atomic_t disable_lro_in_low_tput;
|
qdf_atomic_t disable_lro_in_low_tput;
|
||||||
bool en_tcp_delack_no_lro;
|
bool en_tcp_delack_no_lro;
|
||||||
|
qdf_wake_lock_t monitor_mode_wakelock;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -6053,6 +6053,8 @@ static void hdd_rx_wake_lock_create(struct hdd_context *hdd_ctx)
|
|||||||
*/
|
*/
|
||||||
static int hdd_context_deinit(struct hdd_context *hdd_ctx)
|
static int hdd_context_deinit(struct hdd_context *hdd_ctx)
|
||||||
{
|
{
|
||||||
|
qdf_wake_lock_destroy(&hdd_ctx->monitor_mode_wakelock);
|
||||||
|
|
||||||
wlan_hdd_cfg80211_deinit(hdd_ctx->wiphy);
|
wlan_hdd_cfg80211_deinit(hdd_ctx->wiphy);
|
||||||
|
|
||||||
hdd_sap_context_destroy(hdd_ctx);
|
hdd_sap_context_destroy(hdd_ctx);
|
||||||
@@ -6192,6 +6194,12 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx)
|
|||||||
|
|
||||||
qdf_nbuf_deinit_replenish_timer();
|
qdf_nbuf_deinit_replenish_timer();
|
||||||
|
|
||||||
|
if (QDF_GLOBAL_MONITOR_MODE == hdd_get_conparam()) {
|
||||||
|
hdd_info("Release wakelock for monitor mode!");
|
||||||
|
qdf_wake_lock_release(&hdd_ctx->monitor_mode_wakelock,
|
||||||
|
WIFI_POWER_EVENT_WAKELOCK_MONITOR_MODE);
|
||||||
|
}
|
||||||
|
|
||||||
qdf_spinlock_destroy(&hdd_ctx->hdd_adapter_lock);
|
qdf_spinlock_destroy(&hdd_ctx->hdd_adapter_lock);
|
||||||
qdf_spinlock_destroy(&hdd_ctx->sta_update_info_lock);
|
qdf_spinlock_destroy(&hdd_ctx->sta_update_info_lock);
|
||||||
qdf_spinlock_destroy(&hdd_ctx->connection_status_lock);
|
qdf_spinlock_destroy(&hdd_ctx->connection_status_lock);
|
||||||
@@ -8020,6 +8028,9 @@ static int hdd_context_init(struct hdd_context *hdd_ctx)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto sap_destroy;
|
goto sap_destroy;
|
||||||
|
|
||||||
|
qdf_wake_lock_create(&hdd_ctx->monitor_mode_wakelock,
|
||||||
|
"monitor_mode_wakelock");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
sap_destroy:
|
sap_destroy:
|
||||||
@@ -11901,8 +11912,11 @@ static void hdd_stop_present_mode(struct hdd_context *hdd_ctx,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
switch (curr_mode) {
|
switch (curr_mode) {
|
||||||
case QDF_GLOBAL_MISSION_MODE:
|
|
||||||
case QDF_GLOBAL_MONITOR_MODE:
|
case QDF_GLOBAL_MONITOR_MODE:
|
||||||
|
hdd_info("Release wakelock for monitor mode!");
|
||||||
|
qdf_wake_lock_release(&hdd_ctx->monitor_mode_wakelock,
|
||||||
|
WIFI_POWER_EVENT_WAKELOCK_MONITOR_MODE);
|
||||||
|
case QDF_GLOBAL_MISSION_MODE:
|
||||||
case QDF_GLOBAL_FTM_MODE:
|
case QDF_GLOBAL_FTM_MODE:
|
||||||
hdd_abort_mac_scan_all_adapters(hdd_ctx);
|
hdd_abort_mac_scan_all_adapters(hdd_ctx);
|
||||||
wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev);
|
wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev);
|
||||||
@@ -12091,6 +12105,12 @@ static int __con_mode_handler(const char *kmessage, struct kernel_param *kp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (con_mode == QDF_GLOBAL_MONITOR_MODE) {
|
||||||
|
hdd_info("Acquire wakelock for monitor mode!");
|
||||||
|
qdf_wake_lock_acquire(&hdd_ctx->monitor_mode_wakelock,
|
||||||
|
WIFI_POWER_EVENT_WAKELOCK_MONITOR_MODE);
|
||||||
|
}
|
||||||
|
|
||||||
hdd_info("Mode successfully changed to %s", kmessage);
|
hdd_info("Mode successfully changed to %s", kmessage);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
新增問題並參考
封鎖使用者