[PATCH 5/8] wifi: ath12k: Add helpers for multi link peer creation and deletion

Jeff Johnson quic_jjohnson at quicinc.com
Wed Oct 23 08:43:44 PDT 2024


On 10/23/2024 6:30 AM, Kalle Valo wrote:
> From: Sriram R <quic_srirrama at quicinc.com>
> 
> Add helper functions for multi link peer addition and deletion. And add address
> validation to ensure we are not creating link peers (belonging to different
> clients) with same MLD address. To aid in this validation for faster lookup,
> add a new list of ML peers to struct ath12k_hw::ml_peers and use the same for
> parsing for the above address validation use cases.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
> 
> Signed-off-by: Sriram R <quic_srirrama at quicinc.com>
> Signed-off-by: Harshitha Prem <quic_hprem at quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo at quicinc.com>
> ---
...
> +int ath12k_peer_mlo_create(struct ath12k_hw *ah, struct ieee80211_sta *sta)
> +{
> +	struct ath12k_sta *ahsta = ath12k_sta_to_ahsta(sta);
> +	struct ath12k_ml_peer *ml_peer;
> +
> +	lockdep_assert_wiphy(ah->hw->wiphy);
> +
> +	if (!sta->mlo)
> +		return -EINVAL;
> +
> +	ml_peer = ath12k_ml_peer_find(ah, sta->addr);
> +	if (ml_peer) {
> +		ath12k_hw_warn(ah, "ML peer (%d) exists already, unable to add new entry for %pM",

The Linux coding style says:
Printing numbers in parentheses (%d) adds no value and should be avoided.

> +			       ml_peer->id, sta->addr);
> +		return -EEXIST;
> +	}




More information about the ath12k mailing list