[PATCH 5/9] wifi: mt76: mt7996: add MAC support

Kalle Valo kvalo at kernel.org
Thu Dec 1 02:39:07 PST 2022


Shayne Chen <shayne.chen at mediatek.com> writes:

> (Split the big patch into smaller intermediate patches by functionality
> for easier review. Refer to the cover letter for more info.)
>
> Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>

[...]

> +static void mt7996_mac_sta_poll(struct mt7996_dev *dev)
> +{
> +	static const u8 ac_to_tid[] = {
> +		[IEEE80211_AC_BE] = 0,
> +		[IEEE80211_AC_BK] = 1,
> +		[IEEE80211_AC_VI] = 4,
> +		[IEEE80211_AC_VO] = 6
> +	};
> +	struct ieee80211_sta *sta;
> +	struct mt7996_sta *msta;
> +	struct rate_info *rate;
> +	u32 tx_time[IEEE80211_NUM_ACS], rx_time[IEEE80211_NUM_ACS];
> +	LIST_HEAD(sta_poll_list);
> +	int i;
> +
> +	spin_lock_bh(&dev->sta_poll_lock);
> +	list_splice_init(&dev->sta_poll_list, &sta_poll_list);
> +	spin_unlock_bh(&dev->sta_poll_lock);
> +
> +	rcu_read_lock();
> +
> +	while (true) {

In upstream we have a preference that there's some kind of limit for
loops, to avoid neverending loops.

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

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



More information about the Linux-mediatek mailing list