@@ -62,7 +62,7 @@ static struct mt76_wcid *mt7996_rx_get_wcid(struct mt7996_dev *dev,
62
62
int i ;
63
63
64
64
wcid = mt76_wcid_ptr (dev , idx );
65
- if (!wcid )
65
+ if (!wcid || ! wcid -> sta )
66
66
return NULL ;
67
67
68
68
if (!mt7996_band_valid (dev , band_idx ))
@@ -903,8 +903,12 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
903
903
IEEE80211_TX_CTRL_MLO_LINK );
904
904
905
905
mvif = vif ? (struct mt7996_vif * )vif -> drv_priv : NULL ;
906
- if (mvif )
907
- mlink = rcu_dereference (mvif -> mt76 .link [link_id ]);
906
+ if (mvif ) {
907
+ if (wcid -> offchannel )
908
+ mlink = rcu_dereference (mvif -> mt76 .offchannel_link );
909
+ if (!mlink )
910
+ mlink = rcu_dereference (mvif -> mt76 .link [link_id ]);
911
+ }
908
912
909
913
if (mlink ) {
910
914
omac_idx = mlink -> omac_idx ;
@@ -1243,8 +1247,10 @@ mt7996_mac_tx_free(struct mt7996_dev *dev, void *data, int len)
1243
1247
idx = FIELD_GET (MT_TXFREE_INFO_WLAN_ID , info );
1244
1248
wcid = mt76_wcid_ptr (dev , idx );
1245
1249
sta = wcid_to_sta (wcid );
1246
- if (!sta )
1250
+ if (!sta ) {
1251
+ link_sta = NULL ;
1247
1252
goto next ;
1253
+ }
1248
1254
1249
1255
link_sta = rcu_dereference (sta -> link [wcid -> link_id ]);
1250
1256
if (!link_sta )
@@ -1694,43 +1700,53 @@ mt7996_wait_reset_state(struct mt7996_dev *dev, u32 state)
1694
1700
static void
1695
1701
mt7996_update_vif_beacon (void * priv , u8 * mac , struct ieee80211_vif * vif )
1696
1702
{
1697
- struct ieee80211_hw * hw = priv ;
1703
+ struct ieee80211_bss_conf * link_conf ;
1704
+ struct mt7996_phy * phy = priv ;
1705
+ struct mt7996_dev * dev = phy -> dev ;
1706
+ unsigned int link_id ;
1707
+
1698
1708
1699
1709
switch (vif -> type ) {
1700
1710
case NL80211_IFTYPE_MESH_POINT :
1701
1711
case NL80211_IFTYPE_ADHOC :
1702
1712
case NL80211_IFTYPE_AP :
1703
- mt7996_mcu_add_beacon (hw , vif , & vif -> bss_conf );
1704
1713
break ;
1705
1714
default :
1706
- break ;
1715
+ return ;
1716
+ }
1717
+
1718
+ for_each_vif_active_link (vif , link_conf , link_id ) {
1719
+ struct mt7996_vif_link * link ;
1720
+
1721
+ link = mt7996_vif_link (dev , vif , link_id );
1722
+ if (!link || link -> phy != phy )
1723
+ continue ;
1724
+
1725
+ mt7996_mcu_add_beacon (dev -> mt76 .hw , vif , link_conf );
1707
1726
}
1708
1727
}
1709
1728
1729
+ void mt7996_mac_update_beacons (struct mt7996_phy * phy )
1730
+ {
1731
+ ieee80211_iterate_active_interfaces (phy -> mt76 -> hw ,
1732
+ IEEE80211_IFACE_ITER_RESUME_ALL ,
1733
+ mt7996_update_vif_beacon , phy );
1734
+ }
1735
+
1710
1736
static void
1711
1737
mt7996_update_beacons (struct mt7996_dev * dev )
1712
1738
{
1713
1739
struct mt76_phy * phy2 , * phy3 ;
1714
1740
1715
- ieee80211_iterate_active_interfaces (dev -> mt76 .hw ,
1716
- IEEE80211_IFACE_ITER_RESUME_ALL ,
1717
- mt7996_update_vif_beacon , dev -> mt76 .hw );
1741
+ mt7996_mac_update_beacons (& dev -> phy );
1718
1742
1719
1743
phy2 = dev -> mt76 .phys [MT_BAND1 ];
1720
- if (!phy2 )
1721
- return ;
1722
-
1723
- ieee80211_iterate_active_interfaces (phy2 -> hw ,
1724
- IEEE80211_IFACE_ITER_RESUME_ALL ,
1725
- mt7996_update_vif_beacon , phy2 -> hw );
1744
+ if (phy2 )
1745
+ mt7996_mac_update_beacons (phy2 -> priv );
1726
1746
1727
1747
phy3 = dev -> mt76 .phys [MT_BAND2 ];
1728
- if (!phy3 )
1729
- return ;
1730
-
1731
- ieee80211_iterate_active_interfaces (phy3 -> hw ,
1732
- IEEE80211_IFACE_ITER_RESUME_ALL ,
1733
- mt7996_update_vif_beacon , phy3 -> hw );
1748
+ if (phy3 )
1749
+ mt7996_mac_update_beacons (phy3 -> priv );
1734
1750
}
1735
1751
1736
1752
void mt7996_tx_token_put (struct mt7996_dev * dev )
0 commit comments