Lines Matching refs:sta

58 mt7915_mcu_set_sta_he_mcs(struct ieee80211_sta *sta, __le16 *he_mcs,  in mt7915_mcu_set_sta_he_mcs()  argument
61 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_set_sta_he_mcs()
65 int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss; in mt7915_mcu_set_sta_he_mcs()
105 sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) in mt7915_mcu_set_sta_he_mcs()
113 mt7915_mcu_set_sta_vht_mcs(struct ieee80211_sta *sta, __le16 *vht_mcs, in mt7915_mcu_set_sta_vht_mcs() argument
116 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_set_sta_vht_mcs()
118 u16 mcs_map = le16_to_cpu(sta->deflink.vht_cap.vht_mcs.rx_mcs_map); in mt7915_mcu_set_sta_vht_mcs()
119 int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss; in mt7915_mcu_set_sta_vht_mcs()
141 sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) in mt7915_mcu_set_sta_vht_mcs()
147 mt7915_mcu_set_sta_ht_mcs(struct ieee80211_sta *sta, u8 *ht_mcs, in mt7915_mcu_set_sta_ht_mcs() argument
150 int nss, max_nss = sta->deflink.rx_nss > 3 ? 4 : sta->deflink.rx_nss; in mt7915_mcu_set_sta_ht_mcs()
153 ht_mcs[nss] = sta->deflink.ht_cap.mcs.rx_mask[nss] & mask[nss]; in mt7915_mcu_set_sta_ht_mcs()
661 mvif->sta.wcid.idx, enable); in mt7915_mcu_add_bss_info()
689 struct mt7915_sta *msta = (struct mt7915_sta *)params->sta->drv_priv; in mt7915_mcu_add_tx_ba()
704 struct mt7915_sta *msta = (struct mt7915_sta *)params->sta->drv_priv; in mt7915_mcu_add_rx_ba()
713 mt7915_mcu_sta_he_tlv(struct sk_buff *skb, struct ieee80211_sta *sta, in mt7915_mcu_sta_he_tlv() argument
717 struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem; in mt7915_mcu_sta_he_tlv()
723 if (!sta->deflink.he_cap.has_he) in mt7915_mcu_sta_he_tlv()
809 mcs_map = sta->deflink.he_cap.he_mcs_nss_supp; in mt7915_mcu_sta_he_tlv()
810 switch (sta->deflink.bandwidth) { in mt7915_mcu_sta_he_tlv()
814 mt7915_mcu_set_sta_he_mcs(sta, in mt7915_mcu_sta_he_tlv()
818 mt7915_mcu_set_sta_he_mcs(sta, in mt7915_mcu_sta_he_tlv()
823 mt7915_mcu_set_sta_he_mcs(sta, in mt7915_mcu_sta_he_tlv()
857 struct ieee80211_sta *sta, struct ieee80211_vif *vif) in mt7915_mcu_sta_muru_tlv() argument
860 struct ieee80211_he_cap_elem *elem = &sta->deflink.he_cap.he_cap_elem; in mt7915_mcu_sta_muru_tlv()
879 if (sta->deflink.vht_cap.vht_supported) in mt7915_mcu_sta_muru_tlv()
881 !!(sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE); in mt7915_mcu_sta_muru_tlv()
883 if (!sta->deflink.he_cap.has_he) in mt7915_mcu_sta_muru_tlv()
912 mt7915_mcu_sta_ht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) in mt7915_mcu_sta_ht_tlv() argument
917 if (!sta->deflink.ht_cap.ht_supported) in mt7915_mcu_sta_ht_tlv()
923 ht->ht_cap = cpu_to_le16(sta->deflink.ht_cap.cap); in mt7915_mcu_sta_ht_tlv()
927 mt7915_mcu_sta_vht_tlv(struct sk_buff *skb, struct ieee80211_sta *sta) in mt7915_mcu_sta_vht_tlv() argument
932 if (!sta->deflink.vht_cap.vht_supported) in mt7915_mcu_sta_vht_tlv()
938 vht->vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap); in mt7915_mcu_sta_vht_tlv()
939 vht->vht_rx_mcs_map = sta->deflink.vht_cap.vht_mcs.rx_mcs_map; in mt7915_mcu_sta_vht_tlv()
940 vht->vht_tx_mcs_map = sta->deflink.vht_cap.vht_mcs.tx_mcs_map; in mt7915_mcu_sta_vht_tlv()
945 struct ieee80211_vif *vif, struct ieee80211_sta *sta) in mt7915_mcu_sta_amsdu_tlv() argument
947 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_sta_amsdu_tlv()
955 if (!sta->deflink.agg.max_amsdu_len) in mt7915_mcu_sta_amsdu_tlv()
964 switch (sta->deflink.agg.max_amsdu_len) { in mt7915_mcu_sta_amsdu_tlv()
984 struct ieee80211_vif *vif, struct ieee80211_sta *sta) in mt7915_mcu_sta_wtbl_tlv() argument
992 msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta; in mt7915_mcu_sta_wtbl_tlv()
993 wcid = sta ? &msta->wcid : NULL; in mt7915_mcu_sta_wtbl_tlv()
1002 mt76_connac_mcu_wtbl_generic_tlv(&dev->mt76, skb, vif, sta, tlv, in mt7915_mcu_sta_wtbl_tlv()
1005 if (sta) in mt7915_mcu_sta_wtbl_tlv()
1006 mt76_connac_mcu_wtbl_ht_tlv(&dev->mt76, skb, sta, tlv, in mt7915_mcu_sta_wtbl_tlv()
1015 struct ieee80211_sta *sta, bool bfee) in mt7915_is_ebf_supported() argument
1027 if (sta->deflink.he_cap.has_he) { in mt7915_is_ebf_supported()
1028 struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem; in mt7915_is_ebf_supported()
1038 if (sta->deflink.vht_cap.vht_supported) { in mt7915_is_ebf_supported()
1039 u32 cap = sta->deflink.vht_cap.cap; in mt7915_is_ebf_supported()
1062 mt7915_mcu_sta_bfer_ht(struct ieee80211_sta *sta, struct mt7915_phy *phy, in mt7915_mcu_sta_bfer_ht() argument
1065 struct ieee80211_mcs_info *mcs = &sta->deflink.ht_cap.mcs; in mt7915_mcu_sta_bfer_ht()
1087 mt7915_mcu_sta_bfer_vht(struct ieee80211_sta *sta, struct mt7915_phy *phy, in mt7915_mcu_sta_bfer_vht() argument
1090 struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap; in mt7915_mcu_sta_bfer_vht()
1111 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) in mt7915_mcu_sta_bfer_vht()
1118 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) in mt7915_mcu_sta_bfer_vht()
1124 mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif, in mt7915_mcu_sta_bfer_he() argument
1127 struct ieee80211_sta_he_cap *pc = &sta->deflink.he_cap; in mt7915_mcu_sta_bfer_he()
1152 if (sta->deflink.bandwidth != IEEE80211_STA_RX_BW_160) in mt7915_mcu_sta_bfer_he()
1185 struct ieee80211_vif *vif, struct ieee80211_sta *sta) in mt7915_mcu_sta_bfer_tlv() argument
1200 if (!(sta->deflink.ht_cap.ht_supported || sta->deflink.he_cap.has_he)) in mt7915_mcu_sta_bfer_tlv()
1203 ebf = mt7915_is_ebf_supported(phy, vif, sta, false); in mt7915_mcu_sta_bfer_tlv()
1214 if (sta->deflink.he_cap.has_he && ebf) in mt7915_mcu_sta_bfer_tlv()
1215 mt7915_mcu_sta_bfer_he(sta, vif, phy, bf); in mt7915_mcu_sta_bfer_tlv()
1216 else if (sta->deflink.vht_cap.vht_supported) in mt7915_mcu_sta_bfer_tlv()
1217 mt7915_mcu_sta_bfer_vht(sta, phy, bf, ebf); in mt7915_mcu_sta_bfer_tlv()
1218 else if (sta->deflink.ht_cap.ht_supported) in mt7915_mcu_sta_bfer_tlv()
1219 mt7915_mcu_sta_bfer_ht(sta, phy, bf); in mt7915_mcu_sta_bfer_tlv()
1224 bf->bw = sta->deflink.bandwidth; in mt7915_mcu_sta_bfer_tlv()
1225 bf->ibf_dbw = sta->deflink.bandwidth; in mt7915_mcu_sta_bfer_tlv()
1228 if (!ebf && sta->deflink.bandwidth <= IEEE80211_STA_RX_BW_40 && !bf->ncol) in mt7915_mcu_sta_bfer_tlv()
1238 switch (sta->deflink.bandwidth) { in mt7915_mcu_sta_bfer_tlv()
1254 struct ieee80211_vif *vif, struct ieee80211_sta *sta) in mt7915_mcu_sta_bfee_tlv() argument
1263 if (!(sta->deflink.vht_cap.vht_supported || sta->deflink.he_cap.has_he)) in mt7915_mcu_sta_bfee_tlv()
1266 if (!mt7915_is_ebf_supported(phy, vif, sta, true)) in mt7915_mcu_sta_bfee_tlv()
1272 if (sta->deflink.he_cap.has_he) { in mt7915_mcu_sta_bfee_tlv()
1273 struct ieee80211_he_cap_elem *pe = &sta->deflink.he_cap.he_cap_elem; in mt7915_mcu_sta_bfee_tlv()
1277 } else if (sta->deflink.vht_cap.vht_supported) { in mt7915_mcu_sta_bfee_tlv()
1278 struct ieee80211_sta_vht_cap *pc = &sta->deflink.vht_cap; in mt7915_mcu_sta_bfee_tlv()
1305 struct ieee80211_sta *sta, in mt7915_mcu_set_fixed_rate_ctrl() argument
1309 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_set_fixed_rate_ctrl()
1334 ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode); in mt7915_mcu_set_fixed_rate_ctrl()
1349 struct ieee80211_sta *sta) in mt7915_mcu_add_smps() argument
1352 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_add_smps()
1370 mt76_connac_mcu_wtbl_smps_tlv(skb, sta, sta_wtbl, wtbl_hdr); in mt7915_mcu_add_smps()
1377 return mt7915_mcu_set_fixed_rate_ctrl(dev, vif, sta, NULL, in mt7915_mcu_add_smps()
1383 struct ieee80211_sta *sta) in mt7915_mcu_set_spe_idx() argument
1389 return mt7915_mcu_set_fixed_rate_ctrl(dev, vif, sta, &spe_idx, in mt7915_mcu_set_spe_idx()
1396 struct ieee80211_sta *sta) in mt7915_mcu_add_rate_ctrl_fixed() argument
1409 for (i = 0; i <= sta->deflink.bandwidth; i++) { \ in mt7915_mcu_add_rate_ctrl_fixed()
1423 if (sta->deflink.he_cap.has_he) { in mt7915_mcu_add_rate_ctrl_fixed()
1425 } else if (sta->deflink.vht_cap.vht_supported) { in mt7915_mcu_add_rate_ctrl_fixed()
1427 } else if (sta->deflink.ht_cap.ht_supported) { in mt7915_mcu_add_rate_ctrl_fixed()
1444 ret = mt7915_mcu_set_fixed_rate_ctrl(dev, vif, sta, &phy, in mt7915_mcu_add_rate_ctrl_fixed()
1453 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_add_rate_ctrl_fixed()
1461 if (sta->deflink.he_cap.has_he) in mt7915_mcu_add_rate_ctrl_fixed()
1466 ret = mt7915_mcu_set_fixed_rate_ctrl(dev, vif, sta, &phy, in mt7915_mcu_add_rate_ctrl_fixed()
1474 ret = mt7915_mcu_set_fixed_rate_ctrl(dev, vif, sta, &phy, in mt7915_mcu_add_rate_ctrl_fixed()
1480 return mt7915_mcu_set_spe_idx(dev, vif, sta); in mt7915_mcu_add_rate_ctrl_fixed()
1485 struct ieee80211_vif *vif, struct ieee80211_sta *sta) in mt7915_mcu_sta_rate_ctrl_tlv() argument
1494 u32 supp_rate = sta->deflink.supp_rates[band]; in mt7915_mcu_sta_rate_ctrl_tlv()
1495 u32 cap = sta->wme ? STA_CAP_WMM : 0; in mt7915_mcu_sta_rate_ctrl_tlv()
1502 ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta); in mt7915_mcu_sta_rate_ctrl_tlv()
1504 ra->bw = sta->deflink.bandwidth; in mt7915_mcu_sta_rate_ctrl_tlv()
1505 ra->phy.bw = sta->deflink.bandwidth; in mt7915_mcu_sta_rate_ctrl_tlv()
1506 ra->mmps_mode = mt7915_mcu_get_mmps_mode(sta->deflink.smps_mode); in mt7915_mcu_sta_rate_ctrl_tlv()
1526 if (sta->deflink.ht_cap.ht_supported) { in mt7915_mcu_sta_rate_ctrl_tlv()
1528 ra->af = sta->deflink.ht_cap.ampdu_factor; in mt7915_mcu_sta_rate_ctrl_tlv()
1529 ra->ht_gf = !!(sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD); in mt7915_mcu_sta_rate_ctrl_tlv()
1532 if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_20) in mt7915_mcu_sta_rate_ctrl_tlv()
1534 if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_SGI_40) in mt7915_mcu_sta_rate_ctrl_tlv()
1536 if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_TX_STBC) in mt7915_mcu_sta_rate_ctrl_tlv()
1538 if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_RX_STBC) in mt7915_mcu_sta_rate_ctrl_tlv()
1541 (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)) in mt7915_mcu_sta_rate_ctrl_tlv()
1544 mt7915_mcu_set_sta_ht_mcs(sta, ra->ht_mcs, in mt7915_mcu_sta_rate_ctrl_tlv()
1549 if (sta->deflink.vht_cap.vht_supported) { in mt7915_mcu_sta_rate_ctrl_tlv()
1554 sta->deflink.vht_cap.cap); in mt7915_mcu_sta_rate_ctrl_tlv()
1558 if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_80) in mt7915_mcu_sta_rate_ctrl_tlv()
1560 if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SHORT_GI_160) in mt7915_mcu_sta_rate_ctrl_tlv()
1562 if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_TXSTBC) in mt7915_mcu_sta_rate_ctrl_tlv()
1564 if (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXSTBC_1) in mt7915_mcu_sta_rate_ctrl_tlv()
1567 (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_RXLDPC)) in mt7915_mcu_sta_rate_ctrl_tlv()
1570 mt7915_mcu_set_sta_vht_mcs(sta, ra->supp_vht_mcs, in mt7915_mcu_sta_rate_ctrl_tlv()
1574 if (sta->deflink.he_cap.has_he) { in mt7915_mcu_sta_rate_ctrl_tlv()
1578 if (sta->deflink.he_6ghz_capa.capa) in mt7915_mcu_sta_rate_ctrl_tlv()
1579 ra->af = le16_get_bits(sta->deflink.he_6ghz_capa.capa, in mt7915_mcu_sta_rate_ctrl_tlv()
1587 struct ieee80211_sta *sta, bool changed) in mt7915_mcu_add_rate_ctrl() argument
1590 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_add_rate_ctrl()
1604 mt7915_mcu_sta_he_tlv(skb, sta, vif); in mt7915_mcu_add_rate_ctrl()
1609 mt7915_mcu_sta_rate_ctrl_tlv(skb, dev, vif, sta); in mt7915_mcu_add_rate_ctrl()
1620 return mt7915_mcu_add_rate_ctrl_fixed(dev, vif, sta); in mt7915_mcu_add_rate_ctrl()
1625 struct ieee80211_sta *sta) in mt7915_mcu_add_group() argument
1643 msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta; in mt7915_mcu_add_group()
1652 struct ieee80211_sta *sta, bool enable) in mt7915_mcu_add_sta() argument
1659 msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta; in mt7915_mcu_add_sta()
1667 mt76_connac_mcu_sta_basic_tlv(&dev->mt76, skb, vif, sta, enable, in mt7915_mcu_add_sta()
1673 if (sta) { in mt7915_mcu_add_sta()
1675 mt7915_mcu_sta_bfer_tlv(dev, skb, vif, sta); in mt7915_mcu_add_sta()
1677 mt7915_mcu_sta_ht_tlv(skb, sta); in mt7915_mcu_add_sta()
1679 mt7915_mcu_sta_vht_tlv(skb, sta); in mt7915_mcu_add_sta()
1681 mt76_connac_mcu_sta_uapsd(skb, vif, sta); in mt7915_mcu_add_sta()
1684 ret = mt7915_mcu_sta_wtbl_tlv(dev, skb, vif, sta); in mt7915_mcu_add_sta()
1690 if (sta) { in mt7915_mcu_add_sta()
1692 mt7915_mcu_sta_amsdu_tlv(dev, skb, vif, sta); in mt7915_mcu_add_sta()
1694 mt7915_mcu_sta_he_tlv(skb, sta, vif); in mt7915_mcu_add_sta()
1696 mt7915_mcu_sta_muru_tlv(dev, skb, sta, vif); in mt7915_mcu_add_sta()
1698 mt7915_mcu_sta_bfee_tlv(dev, skb, vif, sta); in mt7915_mcu_add_sta()
1701 ret = mt7915_mcu_add_group(dev, vif, sta); in mt7915_mcu_add_sta()
3185 struct ieee80211_sta *sta, s8 txpower) in mt7915_mcu_set_txpower_frame() argument
3187 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_set_txpower_frame()
3217 if (sta->deflink.ht_cap.ht_supported) { in mt7915_mcu_set_txpower_frame()
3223 if (sta->deflink.vht_cap.vht_supported) { in mt7915_mcu_set_txpower_frame()
3227 if (sta->deflink.he_cap.has_he) { in mt7915_mcu_set_txpower_frame()
3618 struct ieee80211_sta *sta, struct rate_info *rate) in mt7915_mcu_get_rx_rate() argument
3621 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_get_rx_rate()