Commit 2d29058e authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

wifi: mt76: mt7603: rely on shared poll_list field

Rely on poll_list field in mt76_wcid structure and get rid of
private copy.
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent b73e1d92
...@@ -419,8 +419,8 @@ void mt7603_mac_sta_poll(struct mt7603_dev *dev) ...@@ -419,8 +419,8 @@ void mt7603_mac_sta_poll(struct mt7603_dev *dev)
} }
msta = list_first_entry(&dev->mt76.sta_poll_list, msta = list_first_entry(&dev->mt76.sta_poll_list,
struct mt7603_sta, poll_list); struct mt7603_sta, wcid.poll_list);
list_del_init(&msta->poll_list); list_del_init(&msta->wcid.poll_list);
spin_unlock_bh(&dev->mt76.sta_poll_lock); spin_unlock_bh(&dev->mt76.sta_poll_lock);
addr = mt7603_wtbl4_addr(msta->wcid.idx); addr = mt7603_wtbl4_addr(msta->wcid.idx);
...@@ -1267,9 +1267,9 @@ void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data) ...@@ -1267,9 +1267,9 @@ void mt7603_mac_add_txs(struct mt7603_dev *dev, void *data)
msta = container_of(wcid, struct mt7603_sta, wcid); msta = container_of(wcid, struct mt7603_sta, wcid);
sta = wcid_to_sta(wcid); sta = wcid_to_sta(wcid);
if (list_empty(&msta->poll_list)) { if (list_empty(&msta->wcid.poll_list)) {
spin_lock_bh(&dev->mt76.sta_poll_lock); spin_lock_bh(&dev->mt76.sta_poll_lock);
list_add_tail(&msta->poll_list, &dev->mt76.sta_poll_list); list_add_tail(&msta->wcid.poll_list, &dev->mt76.sta_poll_list);
spin_unlock_bh(&dev->mt76.sta_poll_lock); spin_unlock_bh(&dev->mt76.sta_poll_lock);
} }
......
...@@ -66,7 +66,7 @@ mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -66,7 +66,7 @@ mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
idx = MT7603_WTBL_RESERVED - 1 - mvif->idx; idx = MT7603_WTBL_RESERVED - 1 - mvif->idx;
dev->mt76.vif_mask |= BIT_ULL(mvif->idx); dev->mt76.vif_mask |= BIT_ULL(mvif->idx);
INIT_LIST_HEAD(&mvif->sta.poll_list); INIT_LIST_HEAD(&mvif->sta.wcid.poll_list);
mvif->sta.wcid.idx = idx; mvif->sta.wcid.idx = idx;
mvif->sta.wcid.hw_key_idx = -1; mvif->sta.wcid.hw_key_idx = -1;
mt76_packet_id_init(&mvif->sta.wcid); mt76_packet_id_init(&mvif->sta.wcid);
...@@ -101,8 +101,8 @@ mt7603_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) ...@@ -101,8 +101,8 @@ mt7603_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
rcu_assign_pointer(dev->mt76.wcid[idx], NULL); rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
spin_lock_bh(&dev->mt76.sta_poll_lock); spin_lock_bh(&dev->mt76.sta_poll_lock);
if (!list_empty(&msta->poll_list)) if (!list_empty(&msta->wcid.poll_list))
list_del_init(&msta->poll_list); list_del_init(&msta->wcid.poll_list);
spin_unlock_bh(&dev->mt76.sta_poll_lock); spin_unlock_bh(&dev->mt76.sta_poll_lock);
mutex_lock(&dev->mt76.mutex); mutex_lock(&dev->mt76.mutex);
...@@ -351,7 +351,7 @@ mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, ...@@ -351,7 +351,7 @@ mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
if (idx < 0) if (idx < 0)
return -ENOSPC; return -ENOSPC;
INIT_LIST_HEAD(&msta->poll_list); INIT_LIST_HEAD(&msta->wcid.poll_list);
__skb_queue_head_init(&msta->psq); __skb_queue_head_init(&msta->psq);
msta->ps = ~0; msta->ps = ~0;
msta->smps = ~0; msta->smps = ~0;
...@@ -389,8 +389,8 @@ mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, ...@@ -389,8 +389,8 @@ mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
spin_unlock_bh(&dev->ps_lock); spin_unlock_bh(&dev->ps_lock);
spin_lock_bh(&mdev->sta_poll_lock); spin_lock_bh(&mdev->sta_poll_lock);
if (!list_empty(&msta->poll_list)) if (!list_empty(&msta->wcid.poll_list))
list_del_init(&msta->poll_list); list_del_init(&msta->wcid.poll_list);
spin_unlock_bh(&mdev->sta_poll_lock); spin_unlock_bh(&mdev->sta_poll_lock);
mt7603_wtbl_clear(dev, wcid->idx); mt7603_wtbl_clear(dev, wcid->idx);
......
...@@ -64,7 +64,6 @@ struct mt7603_sta { ...@@ -64,7 +64,6 @@ struct mt7603_sta {
struct mt7603_vif *vif; struct mt7603_vif *vif;
struct list_head poll_list;
u32 tx_airtime_ac[4]; u32 tx_airtime_ac[4];
struct sk_buff_head psq; struct sk_buff_head psq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment