diff mbox series

wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx()

Message ID 20230608104444.3134-1-quic_wgong@quicinc.com (mailing list archive)
State Accepted
Commit 3a5d50f8eb4fcf3c69ae858020c49877e4eeaf05
Delegated to: Kalle Valo
Headers show
Series wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx() | expand

Commit Message

Wen Gong June 8, 2023, 10:44 a.m. UTC
"mutex_unlock(&ar->conf_mutex);" is always called at end of function
ath12k_mac_op_unassign_vif_chanctx(), so delete this unlock to make
sure lock/unlock is paired.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 1 -
 1 file changed, 1 deletion(-)


base-commit: 0a00db612b6df1fad80485e3642529d1f28ea084

Comments

Vasanthakumar Thiagarajan June 8, 2023, 11:06 a.m. UTC | #1
On 6/8/2023 4:14 PM, Wen Gong wrote:
> "mutex_unlock(&ar->conf_mutex);" is always called at end of function
> ath12k_mac_op_unassign_vif_chanctx(), so delete this unlock to make
> sure lock/unlock is paired.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
> ---
>   drivers/net/wireless/ath/ath12k/mac.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index ee792822b411..e65f5337d8f5 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -5910,7 +5910,6 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
>   		}
>   
>   		arvif->is_started = false;
> -		mutex_unlock(&ar->conf_mutex);
>   	}
>   
>   	ret = ath12k_mac_vdev_stop(arvif);
> 
> base-commit: 0a00db612b6df1fad80485e3642529d1f28ea084

LGTM
Kalle Valo June 15, 2023, 11:35 a.m. UTC | #2
Wen Gong <quic_wgong@quicinc.com> wrote:

> "mutex_unlock(&ar->conf_mutex);" is always called at end of function
> ath12k_mac_op_unassign_vif_chanctx(), so delete this unlock to make
> sure lock/unlock is paired.
> 
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
> 
> Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

3a5d50f8eb4f wifi: ath12k: fix conf_mutex in ath12k_mac_op_unassign_vif_chanctx()
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index ee792822b411..e65f5337d8f5 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5910,7 +5910,6 @@  ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
 		}
 
 		arvif->is_started = false;
-		mutex_unlock(&ar->conf_mutex);
 	}
 
 	ret = ath12k_mac_vdev_stop(arvif);