[PATCH 1/8] wifi: ath12k: Add MLO station state change handling

Kalle Valo kvalo at kernel.org
Thu Nov 21 06:51:29 PST 2024


Baochen Qiang <quic_bqiang at quicinc.com> writes:

>> Ok, I think I now get what you mean. Does this look better:
>> 
>> static void ath12k_mac_free_unassign_link_sta(struct ath12k_hw *ah,
>> 					      struct ath12k_sta *ahsta,
>> 					      u8 link_id)
>> {
>> 	struct ath12k_link_sta *arsta;
>> 
>> 	lockdep_assert_wiphy(ah->hw->wiphy);
>> 
>> 	if (WARN_ON(link_id >= IEEE80211_MLD_MAX_NUM_LINKS))
>> 		return;
>> 
>> 	arsta = wiphy_dereference(ah->hw->wiphy, ahsta->link[link_id]);
>> 	if (WARN_ON(!arsta))
>> 		return;
>> 
>> 	ahsta->links_map &= ~BIT(link_id);
>> 	rcu_assign_pointer(ahsta->link[link_id], NULL);
>
> below synchronize_rcu() should be moved to here, such that any change
> to arsta can happen only AFTER all existing RCU readers finish
> accessing it.

Good point, I'll move it.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

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



More information about the ath12k mailing list