summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/hdd/inc/wlan_hdd_main.h2
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c22
-rw-r--r--core/hdd/src/wlan_hdd_main.c12
3 files changed, 18 insertions, 18 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index af241b60a305..7730006e6441 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1420,7 +1420,7 @@ struct hdd_context_s {
* radar found indication and application triggered channel
* switch.
*/
- struct mutex dfs_lock;
+ qdf_spinlock_t dfs_lock;
/*
* place to store FTM capab of target. This allows changing of FTM capab
* at runtime and intersecting it with target capab before updating.
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index ae192aa2200e..bca4d0000e59 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -116,7 +116,7 @@ int hdd_sap_context_init(hdd_context_t *hdd_ctx)
qdf_wake_lock_create(&hdd_ctx->sap_wake_lock, "qcom_sap_wakelock");
qdf_spinlock_create(&hdd_ctx->sap_update_info_lock);
- mutex_init(&hdd_ctx->dfs_lock);
+ qdf_spinlock_create(&hdd_ctx->dfs_lock);
return 0;
}
@@ -217,7 +217,7 @@ void hdd_sap_context_destroy(hdd_context_t *hdd_ctx)
mutex_destroy(&hdd_ctx->sap_lock);
qdf_wake_lock_destroy(&hdd_ctx->sap_wake_lock);
- mutex_destroy(&hdd_ctx->dfs_lock);
+ qdf_spinlock_destroy(&hdd_ctx->dfs_lock);
qdf_spinlock_destroy(&hdd_ctx->sap_update_info_lock);
@@ -991,9 +991,9 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
}
}
- mutex_lock(&pHddCtx->dfs_lock);
+ qdf_spin_lock_bh(&pHddCtx->dfs_lock);
pHddCtx->dfs_radar_found = false;
- mutex_unlock(&pHddCtx->dfs_lock);
+ qdf_spin_unlock_bh(&pHddCtx->dfs_lock);
wlansap_get_dfs_ignore_cac(pHddCtx->hHal, &ignoreCAC);
@@ -1111,9 +1111,9 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
hdd_info("Sent CAC start to user space");
}
- mutex_lock(&pHddCtx->dfs_lock);
+ qdf_spin_lock_bh(&pHddCtx->dfs_lock);
pHddCtx->dfs_radar_found = false;
- mutex_unlock(&pHddCtx->dfs_lock);
+ qdf_spin_unlock_bh(&pHddCtx->dfs_lock);
break;
case eSAP_DFS_CAC_INTERRUPTED:
/*
@@ -1999,9 +1999,9 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
}
}
- mutex_lock(&pHddCtx->dfs_lock);
+ qdf_spin_lock_bh(&pHddCtx->dfs_lock);
if (pHddCtx->dfs_radar_found == true) {
- mutex_unlock(&pHddCtx->dfs_lock);
+ qdf_spin_unlock_bh(&pHddCtx->dfs_lock);
hddLog(LOGE, FL("Channel switch in progress!!"));
return -EBUSY;
}
@@ -2015,7 +2015,7 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
* post eSAP_START_BSS_EVENT success event to HDD.
*/
pHddCtx->dfs_radar_found = true;
- mutex_unlock(&pHddCtx->dfs_lock);
+ qdf_spin_unlock_bh(&pHddCtx->dfs_lock);
/*
* Post the Channel Change request to SAP.
*/
@@ -2039,9 +2039,9 @@ int hdd_softap_set_channel_change(struct net_device *dev, int target_channel,
* radar found flag and also restart the netif
* queues.
*/
- mutex_lock(&pHddCtx->dfs_lock);
+ qdf_spin_lock_bh(&pHddCtx->dfs_lock);
pHddCtx->dfs_radar_found = false;
- mutex_unlock(&pHddCtx->dfs_lock);
+ qdf_spin_unlock_bh(&pHddCtx->dfs_lock);
ret = -EINVAL;
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 6ced63e18900..e0690f26b4ab 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1402,9 +1402,9 @@ void hdd_update_tgt_cfg(void *context, void *param)
* @context: HDD context pointer
* @param: HDD radar indication pointer
*
- * This function is invoked when a radar in found on the
- * SAP current operating channel and Data Tx from netif
- * has to be stopped to honor the DFS regulations.
+ * This function is invoked in atomic context when a radar
+ * is found on the SAP current operating channel and Data Tx
+ * from netif has to be stopped to honor the DFS regulations.
* Actions: Stop the netif Tx queues,Indicate Radar present
* in HDD context for future usage.
*
@@ -1424,18 +1424,18 @@ bool hdd_dfs_indicate_radar(void *context, void *param)
return true;
if (true == hdd_radar_event->dfs_radar_status) {
- mutex_lock(&hdd_ctx->dfs_lock);
+ qdf_spin_lock_bh(&hdd_ctx->dfs_lock);
if (hdd_ctx->dfs_radar_found) {
/*
* Application already triggered channel switch
* on current channel, so return here.
*/
- mutex_unlock(&hdd_ctx->dfs_lock);
+ qdf_spin_unlock_bh(&hdd_ctx->dfs_lock);
return false;
}
hdd_ctx->dfs_radar_found = true;
- mutex_unlock(&hdd_ctx->dfs_lock);
+ qdf_spin_unlock_bh(&hdd_ctx->dfs_lock);
status = hdd_get_front_adapter(hdd_ctx, &adapterNode);
while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) {