All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] wifi: ath11k: suppress add interface error
@ 2022-10-06  0:58 ` Karthikeyan Periyasamy
  0 siblings, 0 replies; 4+ messages in thread
From: Karthikeyan Periyasamy @ 2022-10-06  0:58 UTC (permalink / raw
  To: ath11k; +Cc: linux-wireless, Karthikeyan Periyasamy

In the VIF (other than monitor type) creation request, we should not
throw the error code when the monitor VIF creation fails, since the
actual VIF creation succeeds. If we throw the error code from driver
then the actual VIF creation get fail. So suppress the monitor VIF
creation error by throwing warning message instead of error code.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
 v2:
  - Modified the commit message

 drivers/net/wireless/ath/ath11k/mac.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 84d956ad4093..a8a212d416b2 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -6372,18 +6372,16 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
 
 	ath11k_dp_vdev_tx_attach(ar, arvif);
 
+	ath11k_debugfs_add_interface(arvif);
+
 	if (vif->type != NL80211_IFTYPE_MONITOR &&
 	    test_bit(ATH11K_FLAG_MONITOR_CONF_ENABLED, &ar->monitor_flags)) {
 		ret = ath11k_mac_monitor_vdev_create(ar);
-		if (ret) {
+		if (ret)
 			ath11k_warn(ar->ab, "failed to create monitor vdev during add interface: %d",
 				    ret);
-			goto err_peer_del;
-		}
 	}
 
-	ath11k_debugfs_add_interface(arvif);
-
 	mutex_unlock(&ar->conf_mutex);
 
 	return 0;
@@ -6408,7 +6406,6 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
 	spin_unlock_bh(&ar->data_lock);
 
 err:
-	ath11k_debugfs_remove_interface(arvif);
 	mutex_unlock(&ar->conf_mutex);
 
 	return ret;

base-commit: 15bc43a23ac0504a2a99fceae4a31b8bf37ec8fe
-- 
2.37.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] wifi: ath11k: suppress add interface error
@ 2022-10-06  0:58 ` Karthikeyan Periyasamy
  0 siblings, 0 replies; 4+ messages in thread
From: Karthikeyan Periyasamy @ 2022-10-06  0:58 UTC (permalink / raw
  To: ath11k; +Cc: linux-wireless, Karthikeyan Periyasamy

In the VIF (other than monitor type) creation request, we should not
throw the error code when the monitor VIF creation fails, since the
actual VIF creation succeeds. If we throw the error code from driver
then the actual VIF creation get fail. So suppress the monitor VIF
creation error by throwing warning message instead of error code.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1

Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
 v2:
  - Modified the commit message

 drivers/net/wireless/ath/ath11k/mac.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 84d956ad4093..a8a212d416b2 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -6372,18 +6372,16 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
 
 	ath11k_dp_vdev_tx_attach(ar, arvif);
 
+	ath11k_debugfs_add_interface(arvif);
+
 	if (vif->type != NL80211_IFTYPE_MONITOR &&
 	    test_bit(ATH11K_FLAG_MONITOR_CONF_ENABLED, &ar->monitor_flags)) {
 		ret = ath11k_mac_monitor_vdev_create(ar);
-		if (ret) {
+		if (ret)
 			ath11k_warn(ar->ab, "failed to create monitor vdev during add interface: %d",
 				    ret);
-			goto err_peer_del;
-		}
 	}
 
-	ath11k_debugfs_add_interface(arvif);
-
 	mutex_unlock(&ar->conf_mutex);
 
 	return 0;
@@ -6408,7 +6406,6 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
 	spin_unlock_bh(&ar->data_lock);
 
 err:
-	ath11k_debugfs_remove_interface(arvif);
 	mutex_unlock(&ar->conf_mutex);
 
 	return ret;

base-commit: 15bc43a23ac0504a2a99fceae4a31b8bf37ec8fe
-- 
2.37.0


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] wifi: ath11k: suppress add interface error
  2022-10-06  0:58 ` Karthikeyan Periyasamy
@ 2022-10-12  6:40   ` Kalle Valo
  -1 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-10-12  6:40 UTC (permalink / raw
  To: Karthikeyan Periyasamy; +Cc: ath11k, linux-wireless, Karthikeyan Periyasamy

Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote:

> In the VIF (other than monitor type) creation request, we should not
> throw the error code when the monitor VIF creation fails, since the
> actual VIF creation succeeds. If we throw the error code from driver
> then the actual VIF creation get fail. So suppress the monitor VIF
> creation error by throwing warning message instead of error code.
> 
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

638b26652b04 wifi: ath11k: suppress add interface error

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20221006005842.8599-1-quic_periyasa@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] wifi: ath11k: suppress add interface error
@ 2022-10-12  6:40   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2022-10-12  6:40 UTC (permalink / raw
  To: Karthikeyan Periyasamy; +Cc: ath11k, linux-wireless, Karthikeyan Periyasamy

Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote:

> In the VIF (other than monitor type) creation request, we should not
> throw the error code when the monitor VIF creation fails, since the
> actual VIF creation succeeds. If we throw the error code from driver
> then the actual VIF creation get fail. So suppress the monitor VIF
> creation error by throwing warning message instead of error code.
> 
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.6.0.1-00760-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

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

638b26652b04 wifi: ath11k: suppress add interface error

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20221006005842.8599-1-quic_periyasa@quicinc.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-12  6:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-06  0:58 [PATCH v2] wifi: ath11k: suppress add interface error Karthikeyan Periyasamy
2022-10-06  0:58 ` Karthikeyan Periyasamy
2022-10-12  6:40 ` Kalle Valo
2022-10-12  6:40   ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.