openwrt/package/kernel/mt76/patches/100-api_compat.patch
Felix Fietkau 457d0ca359
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
mt76: update to Git HEAD (2025-09-15)
904abc93b7d7 wifi: mt76: mt7996: fix setting beacon protection keys
75cd7c365b26 wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error
587012a43306 wifi: mt76: mt7996: delete vif keys when requested
e995f6198d8b wifi: mt76: mt7996: fix key add/remove imbalance
5b0cbb058089 wifi: mt76: mt7996: fix updating beacon protection with beacons enabled
bba7ae0b1a68 wifi: mt76: mt7996: drop connac mcu wtbl clear
1383b5548fd7 wifi: mt76: use altx queue for offchannel tx on connac+
fd4c0858e58d wifi: mt76: mt7996: disable promiscuous mode by default
a9d21b7ece99 wifi: mt76: mt7996: remove the mem_total field of STA_REC_BF command
e88deeb14596 wifi: mt76: mt7996: set VTA in txwi
a06461861f4a wifi: mt76: mt7996: fill User Priority in skb->priority for rx packets
d17519baab77 wifi: mt76: improve phy reset on hw restart
ddbe1f6eb25f wifi: mt76: abort scan/roc on hw restart
6745cece7a07 wifi: mt76: mt7996: reset station links on hardware restart
d4a79d50ffc6 wifi: mt76: mt7996: reset interface links on hardware restart
9b770cb3dacd wifi: mt76: mt76_eeprom_override to int
6467af3bcf11 wifi: mt76: mt7921u: Add VID/PID for Netgear A7500

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit b4d6b6c986)
2025-09-15 13:41:35 +02:00

108 lines
3.7 KiB
Diff

--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -1224,10 +1224,9 @@ static void mt7915_sta_rc_work(void *dat
static void mt7915_sta_rc_update(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
- struct ieee80211_link_sta *link_sta,
+ struct ieee80211_sta *sta,
u32 changed)
{
- struct ieee80211_sta *sta = link_sta->sta;
struct mt7915_phy *phy = mt7915_hw_phy(hw);
struct mt7915_dev *dev = phy->dev;
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
@@ -1771,7 +1770,7 @@ const struct ieee80211_ops mt7915_ops =
.stop_ap = mt7915_stop_ap,
.sta_state = mt76_sta_state,
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
- .link_sta_rc_update = mt7915_sta_rc_update,
+ .sta_rc_update = mt7915_sta_rc_update,
.set_key = mt7915_set_key,
.ampdu_action = mt7915_ampdu_action,
.set_rts_threshold = mt7915_set_rts_threshold,
--- a/mt7996/main.c
+++ b/mt7996/main.c
@@ -732,8 +732,7 @@ static void mt7996_configure_filter(stru
}
static int
-mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- unsigned int link_id, int *dbm)
+mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int *dbm)
{
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
struct mt7996_phy *phy = mt7996_vif_link_phy(&mvif->deflink);
@@ -1716,26 +1715,31 @@ static void mt7996_link_rate_ctrl_update
spin_unlock_bh(&dev->mt76.sta_poll_lock);
}
-static void mt7996_link_sta_rc_update(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct ieee80211_link_sta *link_sta,
- u32 changed)
+static void mt7996_sta_rc_update(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta,
+ u32 changed)
{
- struct ieee80211_sta *sta = link_sta->sta;
struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
- struct mt7996_sta_link *msta_link;
+ struct mt7996_dev *dev = mt7996_hw_dev(hw);
+ struct ieee80211_link_sta *link_sta;
+ unsigned int link_id;
rcu_read_lock();
- msta_link = rcu_dereference(msta->link[link_sta->link_id]);
- if (msta_link) {
- struct mt7996_dev *dev = mt7996_hw_dev(hw);
+ for_each_sta_active_link(vif, sta, link_sta, link_id) {
+ struct mt7996_sta_link *msta_link;
+
+ msta_link = rcu_dereference(msta->link[link_sta->link_id]);
+ if (!msta_link)
+ continue;
mt7996_link_rate_ctrl_update(&changed, msta_link);
- ieee80211_queue_work(hw, &dev->rc_work);
}
rcu_read_unlock();
+
+ ieee80211_queue_work(hw, &dev->rc_work);
}
static void mt7996_sta_rate_ctrl_update(void *data, struct ieee80211_sta *sta)
@@ -2248,7 +2252,7 @@ const struct ieee80211_ops mt7996_ops =
.link_info_changed = mt7996_link_info_changed,
.sta_state = mt7996_sta_state,
.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
- .link_sta_rc_update = mt7996_link_sta_rc_update,
+ .sta_rc_update = mt7996_sta_rc_update,
.set_key = mt7996_set_key,
.ampdu_action = mt7996_ampdu_action,
.set_rts_threshold = mt7996_set_rts_threshold,
--- a/mac80211.c
+++ b/mac80211.c
@@ -1752,7 +1752,7 @@ s8 mt76_get_power_bound(struct mt76_phy
EXPORT_SYMBOL_GPL(mt76_get_power_bound);
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- unsigned int link_id, int *dbm)
+ int *dbm)
{
struct mt76_phy *phy = mt76_vif_phy(hw, vif);
int n_chains, delta;
--- a/mt76.h
+++ b/mt76.h
@@ -1547,7 +1547,7 @@ int mt76_get_min_avg_rssi(struct mt76_de
s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower);
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- unsigned int link_id, int *dbm);
+ int *dbm);
int mt76_init_sar_power(struct ieee80211_hw *hw,
const struct cfg80211_sar_specs *sar);
int mt76_get_sar_power(struct mt76_phy *phy,