Message ID | 20240123025700.2929-2-quic_bqiang@quicinc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 171203f0c4093dfe7e73ceb6c38033595f329f56 |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath11k: fix connection failure due to unexpected peer delete | expand |
On 1/22/2024 6:56 PM, Baochen Qiang wrote: > In ath11k_mac_op_assign_vif_chanctx(), there is a logic to > create peer using ar->mac_addr for a STA vdev. This is invalid > because a STA vdev should have a peer created using AP's > MAC address. Besides, if we run into that logic, it means a peer > has already been created earlier, we should not create it again. > So remove it. > > This is found during code review. > > Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 > Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 > Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> > --- > drivers/net/wireless/ath/ath11k/mac.c | 16 ---------------- My Qualcomm Innovation Center copyright checker reports: drivers/net/wireless/ath/ath11k/mac.c copyright missing 2024 Kalle can fix this in the pending branch Actual code change LGTM so Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Jeff Johnson <quic_jjohnson@quicinc.com> writes: > On 1/22/2024 6:56 PM, Baochen Qiang wrote: >> In ath11k_mac_op_assign_vif_chanctx(), there is a logic to >> create peer using ar->mac_addr for a STA vdev. This is invalid >> because a STA vdev should have a peer created using AP's >> MAC address. Besides, if we run into that logic, it means a peer >> has already been created earlier, we should not create it again. >> So remove it. >> >> This is found during code review. >> >> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 >> Tested-on: WCN6855 hw2.1 PCI >> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 >> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 >> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 >> >> Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> >> --- >> drivers/net/wireless/ath/ath11k/mac.c | 16 ---------------- > > My Qualcomm Innovation Center copyright checker reports: > drivers/net/wireless/ath/ath11k/mac.c copyright missing 2024 > > Kalle can fix this in the pending branch Thanks, I added 2024.
Baochen Qiang <quic_bqiang@quicinc.com> wrote: > In ath11k_mac_op_assign_vif_chanctx(), there is a logic to > create peer using ar->mac_addr for a STA vdev. This is invalid > because a STA vdev should have a peer created using AP's > MAC address. Besides, if we run into that logic, it means a peer > has already been created earlier, we should not create it again. > So remove it. > > This is found during code review. > > Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 > Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 > Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 > > Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> > Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> 4 patches applied to ath-next branch of ath.git, thanks. 171203f0c409 wifi: ath11k: remove invalid peer create logic 629642fa8b25 wifi: ath11k: rename ath11k_start_vdev_delay() ce59902e56ea wifi: ath11k: avoid forward declaration of ath11k_mac_start_vdev_delay() 9d5f28c1366f wifi: ath11k: fix connection failure due to unexpected peer delete
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 8dda3337ee2d..5c7a33d4ca8b 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -8097,7 +8097,6 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, struct ath11k_base *ab = ar->ab; struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); int ret; - struct peer_create_params param; struct cur_regulatory_info *reg_info; enum ieee80211_ap_reg_power power_type; @@ -8140,21 +8139,6 @@ ath11k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw, goto out; } - if (ab->hw_params.vdev_start_delay && - arvif->vdev_type != WMI_VDEV_TYPE_AP && - arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) { - param.vdev_id = arvif->vdev_id; - param.peer_type = WMI_PEER_TYPE_DEFAULT; - param.peer_addr = ar->mac_addr; - - ret = ath11k_peer_create(ar, arvif, NULL, ¶m); - if (ret) { - ath11k_warn(ab, "failed to create peer after vdev start delay: %d", - ret); - goto out; - } - } - if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { ret = ath11k_mac_monitor_start(ar); if (ret) {
In ath11k_mac_op_assign_vif_chanctx(), there is a logic to create peer using ar->mac_addr for a STA vdev. This is invalid because a STA vdev should have a peer created using AP's MAC address. Besides, if we run into that logic, it means a peer has already been created earlier, we should not create it again. So remove it. This is found during code review. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com> --- drivers/net/wireless/ath/ath11k/mac.c | 16 ---------------- 1 file changed, 16 deletions(-)