@@ -204,7 +204,7 @@ mt7996_vif_link_add(struct mt7996_phy *phy, struct ieee80211_vif *vif,
204
204
mlink -> mt76 .wmm_idx = vif -> type == NL80211_IFTYPE_AP ? 0 : 3 ;
205
205
mlink -> mt76 .wcid = & mlink -> sta .wcid ;
206
206
207
- ret = mt7996_mcu_add_dev_info (phy , vif , true);
207
+ ret = mt7996_mcu_add_dev_info (phy , vif , link_conf , & mlink -> mt76 , true);
208
208
if (ret )
209
209
return ret ;
210
210
@@ -237,12 +237,13 @@ mt7996_vif_link_add(struct mt7996_phy *phy, struct ieee80211_vif *vif,
237
237
238
238
mt7996_init_bitrate_mask (vif , mlink );
239
239
240
- mt7996_mcu_add_bss_info (phy , vif , true);
240
+ mt7996_mcu_add_bss_info (phy , vif , link_conf , & mlink -> mt76 , true);
241
241
/* defer the first STA_REC of BMC entry to BSS_CHANGED_BSSID for STA
242
242
* interface, since firmware only records BSSID when the entry is new
243
243
*/
244
244
if (vif -> type != NL80211_IFTYPE_STATION )
245
- mt7996_mcu_add_sta (dev , vif , NULL , CONN_STATE_PORT_SECURE , true);
245
+ mt7996_mcu_add_sta (dev , vif , & mlink -> mt76 , NULL ,
246
+ CONN_STATE_PORT_SECURE , true);
246
247
rcu_assign_pointer (dev -> mt76 .wcid [idx ], & mlink -> sta .wcid );
247
248
248
249
return 0 ;
@@ -264,10 +265,11 @@ mt7996_vif_link_remove(struct mt7996_phy *phy, struct ieee80211_vif *vif,
264
265
mlink -> phy = NULL ;
265
266
msta = & mlink -> sta ;
266
267
idx = msta -> wcid .idx ;
267
- mt7996_mcu_add_sta (dev , vif , NULL , CONN_STATE_DISCONNECT , false);
268
- mt7996_mcu_add_bss_info (phy , vif , false);
268
+ mt7996_mcu_add_sta (dev , vif , & mlink -> mt76 , NULL , CONN_STATE_DISCONNECT ,
269
+ false);
270
+ mt7996_mcu_add_bss_info (phy , vif , link_conf , & mlink -> mt76 , false);
269
271
270
- mt7996_mcu_add_dev_info (phy , vif , false);
272
+ mt7996_mcu_add_dev_info (phy , vif , link_conf , & mlink -> mt76 , false);
271
273
272
274
rcu_assign_pointer (dev -> mt76 .wcid [idx ], NULL );
273
275
@@ -397,7 +399,8 @@ static int mt7996_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
397
399
398
400
if (cmd == SET_KEY && !sta && !mlink -> mt76 .cipher ) {
399
401
mlink -> mt76 .cipher = mt76_connac_mcu_get_cipher (key -> cipher );
400
- mt7996_mcu_add_bss_info (phy , vif , true);
402
+ mt7996_mcu_add_bss_info (phy , vif , & vif -> bss_conf , & mlink -> mt76 ,
403
+ true);
401
404
}
402
405
403
406
if (cmd == SET_KEY ) {
@@ -626,8 +629,8 @@ static void mt7996_bss_info_changed(struct ieee80211_hw *hw,
626
629
if ((changed & BSS_CHANGED_BSSID && !is_zero_ether_addr (info -> bssid )) ||
627
630
(changed & BSS_CHANGED_ASSOC && vif -> cfg .assoc ) ||
628
631
(changed & BSS_CHANGED_BEACON_ENABLED && info -> enable_beacon )) {
629
- mt7996_mcu_add_bss_info (phy , vif , true);
630
- mt7996_mcu_add_sta (dev , vif , NULL , CONN_STATE_PORT_SECURE ,
632
+ mt7996_mcu_add_bss_info (phy , vif , info , mvif , true);
633
+ mt7996_mcu_add_sta (dev , vif , mvif , NULL , CONN_STATE_PORT_SECURE ,
631
634
!!(changed & BSS_CHANGED_BSSID ));
632
635
}
633
636
@@ -697,7 +700,8 @@ int mt7996_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
697
700
struct mt7996_dev * dev = container_of (mdev , struct mt7996_dev , mt76 );
698
701
struct mt7996_sta * msta = (struct mt7996_sta * )sta -> drv_priv ;
699
702
struct mt7996_vif * mvif = (struct mt7996_vif * )vif -> drv_priv ;
700
- u8 band_idx = mvif -> deflink .phy -> mt76 -> band_idx ;
703
+ struct mt7996_vif_link * link = & mvif -> deflink ;
704
+ u8 band_idx = link -> phy -> mt76 -> band_idx ;
701
705
int idx ;
702
706
703
707
idx = mt76_wcid_alloc (dev -> mt76 .wcid_mask , MT7996_WTBL_STA );
@@ -715,7 +719,8 @@ int mt7996_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
715
719
716
720
mt7996_mac_wtbl_update (dev , idx ,
717
721
MT_WTBL_UPDATE_ADM_COUNT_CLEAR );
718
- mt7996_mcu_add_sta (dev , vif , sta , CONN_STATE_DISCONNECT , true);
722
+ mt7996_mcu_add_sta (dev , vif , & link -> mt76 , sta , CONN_STATE_DISCONNECT ,
723
+ true);
719
724
720
725
return 0 ;
721
726
}
@@ -725,11 +730,14 @@ int mt7996_mac_sta_event(struct mt76_dev *mdev, struct ieee80211_vif *vif,
725
730
{
726
731
struct mt7996_dev * dev = container_of (mdev , struct mt7996_dev , mt76 );
727
732
struct mt7996_sta * msta = (struct mt7996_sta * )sta -> drv_priv ;
733
+ struct mt7996_vif * mvif = (struct mt7996_vif * )vif -> drv_priv ;
734
+ struct mt7996_vif_link * link = & mvif -> deflink ;
728
735
int i , ret ;
729
736
730
737
switch (ev ) {
731
738
case MT76_STA_EVENT_ASSOC :
732
- ret = mt7996_mcu_add_sta (dev , vif , sta , CONN_STATE_CONNECT , true);
739
+ ret = mt7996_mcu_add_sta (dev , vif , & link -> mt76 , sta ,
740
+ CONN_STATE_CONNECT , true);
733
741
if (ret )
734
742
return ret ;
735
743
@@ -743,13 +751,15 @@ int mt7996_mac_sta_event(struct mt76_dev *mdev, struct ieee80211_vif *vif,
743
751
return 0 ;
744
752
745
753
case MT76_STA_EVENT_AUTHORIZE :
746
- return mt7996_mcu_add_sta (dev , vif , sta , CONN_STATE_PORT_SECURE , false);
754
+ return mt7996_mcu_add_sta (dev , vif , & link -> mt76 , sta ,
755
+ CONN_STATE_PORT_SECURE , false);
747
756
748
757
case MT76_STA_EVENT_DISASSOC :
749
758
for (i = 0 ; i < ARRAY_SIZE (msta -> twt .flow ); i ++ )
750
759
mt7996_mac_twt_teardown_flow (dev , msta , i );
751
760
752
- mt7996_mcu_add_sta (dev , vif , sta , CONN_STATE_DISCONNECT , false);
761
+ mt7996_mcu_add_sta (dev , vif , & link -> mt76 , sta ,
762
+ CONN_STATE_DISCONNECT , false);
753
763
msta -> wcid .sta_disabled = 1 ;
754
764
msta -> wcid .sta = 0 ;
755
765
0 commit comments