Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
12186f9
wifi: mt76: mt792x: add struct mt792x_bss_conf
deren Jun 13, 2024
c240ce2
wifi: mt76: mt792x: add struct mt792x_link_sta
deren Jun 13, 2024
7176be0
wifi: mt76: mt792x: add struct mt792x_chanctx
deren Jun 13, 2024
558f75a
wifi: mt76: mt7925: support for split bss_info_changed method
deren Jun 13, 2024
d65add1
wifi: mt76: mt792x: extend mt76_connac_mcu_uni_add_dev for per-link BSS
moore-bros Jun 13, 2024
e7a4dbf
wifi: mt76: mt7925: extend mt7925_mcu_set_tx with for per-link BSS
deren Jun 13, 2024
4ba677a
wifi: mt76: mt7925: extend mt7925_mcu_add_bss_info for per-link BSS
moore-bros Jun 13, 2024
d8c555c
wifi: mt76: mt7925: extend mt7925_mcu_set_timing for per-link BSS
moore-bros Jun 13, 2024
dfcb202
wifi: mt76: mt7925: extend mt7925_mcu_bss_ifs_tlv for per-link BSS
moore-bros Jun 13, 2024
da39443
wifi: mt76: mt7925: extend mt7925_mcu_bss_color_tlv for per-link BSS
moore-bros Jun 13, 2024
883b02f
wifi: mt76: mt7925: extend mt7925_mcu_bss_he_tlv for per-link BSS
moore-bros Jun 13, 2024
1868a67
wifi: mt76: mt7925: extend mt7925_mcu_bss_qos_tlv for per-link BSS
moore-bros Jun 13, 2024
c6f20a2
wifi: mt76: mt7925: extend mt7925_mcu_bss_mld_tlv for per-link BSS
moore-bros Jun 13, 2024
56d55cc
wifi: mt76: mt7925: extend mt7925_mcu_bss_bmc_tlv for per-link BSS
moore-bros Jun 13, 2024
f5a088d
wifi: mt76: mt7925: remove unused parameters in mt7925_mcu_bss_bmc_tlv
moore-bros Jun 13, 2024
e86376f
wifi: mt76: mt7925: extend mt7925_mcu_bss_sec_tlv for per-link BSS
moore-bros Jun 13, 2024
ed011c0
wifi: mt76: mt7925: extend mt7925_mcu_bss_basic_tlv for per-link BSS
moore-bros Jun 13, 2024
9298a77
wifi: mt76: mt7925: extend mt7925_mcu_set_bss_pm for per-link BSS
moore-bros Jun 13, 2024
55bbbb2
wifi: mt76: mt7925: extend mt7925_mcu_[abort, set]_roc for per-link BSS
moore-bros Jun 13, 2024
af5f86a
wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_bcnft for per-link BSS
moore-bros Jun 13, 2024
7fc2b79
wifi: mt76: mt7925: extend mt7925_mcu_uni_bss_ps for per-link BSS
moore-bros Jun 13, 2024
e66a524
wifi: mt76: mt7925: add mt7925_mcu_bss_rlm_tlv to constitue the RLM TLV
moore-bros Jun 13, 2024
06c9bc3
wifi: mt76: mt7925: mt7925_mcu_set_chctx rely on mt7925_mcu_bss_rlm_tlv
moore-bros Jun 13, 2024
82bf86a
wifi: mt76: mt7925: extend mt7925_mcu_sta_update for per-link STA
moore-bros Jun 13, 2024
65e22d2
wifi: mt76: mt7925: extend mt7925_mcu_sta_state_v2_tlv for per-link STA
moore-bros Jun 13, 2024
199d881
wifi: mt76: mt7925: extend mt7925_mcu_sta_rate_ctrl_tlv with per-link…
moore-bros Jun 13, 2024
12bd6d3
wifi: mt76: mt7925: extend mt7925_mcu_sta_eht_tlv for per-link STA
moore-bros Jun 13, 2024
dd3859b
wifi: mt76: mt7925: extend mt7925_mcu_sta_he_6g_tlv for per-link STA
moore-bros Jun 13, 2024
8a095b2
wifi: mt76: mt7925: extend mt7925_mcu_sta_he_tlv for per-link STA
moore-bros Jun 13, 2024
fe15aca
wifi: mt76: mt7925: extend mt7925_mcu_sta_amsdu_tlv for per-link STA
moore-bros Jun 13, 2024
b497245
wifi: mt76: mt7925: extend mt7925_mcu_sta_vht_tlv for per-link STA
moore-bros Jun 13, 2024
0eef1a0
wifi: mt76: mt7925: extend mt7925_mcu_sta_ht_tlv for per-link STA
moore-bros Jun 13, 2024
f1f7192
wifi: mt76: mt7925: extend mt7925_mcu_sta_phy_tlv for per-link STA
moore-bros Jun 13, 2024
42e1e7c
wifi: mt76: mt7925: extend mt7925_get_phy_mode_ext for per-link STA
moore-bros Jun 13, 2024
a75c0db
wifi: mt76: mt7925: extend mt7925_get_phy_mode for per-link STA
moore-bros Jun 13, 2024
2de6654
wifi: mt76: mt792x: extend mt76_connac_get_phy_mode_v2 for per-link STA
moore-bros Jun 13, 2024
09bbf60
wifi: mt76: mt762x: extend mt76_connac_mcu_sta_basic_tlv for per-link…
moore-bros Jun 13, 2024
1814f49
wifi: mt76: mt7925: extend mt7925_mcu_sta_hdr_trans_tlv for per-link STA
moore-bros Jun 13, 2024
2079858
wifi: mt76: mt7925: extend mt7925_mcu_add_bss_info for per-link STA
moore-bros Jun 13, 2024
20f3ea0
wifi: mt76: mt7925: extend mt7925_mcu_bss_mld_tlv for per-link STA
moore-bros Jun 13, 2024
3deb890
wifi: mt76: mt7925: extend mt7925_mcu_bss_basic_tlv for per-link STA
moore-bros Jun 13, 2024
df4c5ff
wifi: mt76: mt7925: add mt7925_mac_link_sta_add to create per-link STA
moore-bros Jun 13, 2024
e797cce
wifi: mt76: mt7925: add mt7925_mac_link_sta_assoc to associate per-li…
moore-bros Jun 13, 2024
9f09bb0
wifi: mt76: mt7925: add mt7925_mac_link_sta_remove to remove per-link…
moore-bros Jun 13, 2024
60f761c
wifi: mt76: mt7925: add mt7925_mac_link_bss_add to create per-link BSS
moore-bros Jun 13, 2024
fca67ab
wifi: mt76: mt7925: add mt7925_mac_link_bss_remove to remove per-link…
moore-bros Jun 13, 2024
74861fb
wifi: mt76: mt7925: simpify mt7925_mcu_sta_cmd logic by removing fw_o…
moore-bros Jun 13, 2024
8e2a1ba
wifi: mt76: mt7925: update mt76_connac_mcu_uni_add_dev for MLO
moore-bros Jul 3, 2024
085cd5a
wifi: mt76: mt7925: update mt7925_mac_link_sta_[add, remove] for MLO
moore-bros Jul 3, 2024
ed0c6e2
wifi: mt76: mt7925: set Tx queue parameters according to link id
moore-bros Jul 3, 2024
8ffcd30
wifi: mt76: mt7925: set mt7925_mcu_sta_key_tlv according to link id
moore-bros Jul 3, 2024
bca10ac
wifi: mt76: mt7925: add mt7925_set_link_key
moore-bros Jul 3, 2024
9441e5f
wifi: mt76: mt7925: extend mt7925_mcu_uni_roc_event
moore-bros Jul 3, 2024
c5d11e4
wifi: mt76: mt7925: add mt7925_change_vif_links
moore-bros Jul 3, 2024
b77c764
wifi: mt76: mt7925: add mt7925_change_sta_links
moore-bros Jul 3, 2024
1d94b2e
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_add
moore-bros Jul 3, 2024
e133202
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_remove
moore-bros Jul 3, 2024
4437f2b
wifi: mt76: mt7925: add link handling to txwi
moore-bros Jul 3, 2024
53a0f41
wifi: mt76: mt7925: add link handling in mt7925_set_key
moore-bros Jul 3, 2024
72c40af
wifi: mt76: mt7925: add link handling to mt7925_change_chanctx
moore-bros Jul 3, 2024
91ba13a
wifi: mt76: mt7925: add link handling in the BSS_CHANGED_PS handler
moore-bros Jul 3, 2024
bbdb19a
wifi: mt76: mt7925: add link handling in mt7925_mcu_set_beacon_filter
moore-bros Jul 3, 2024
ef59fda
wifi: mt76: mt7925: add link handling in mt7925_txwi_free
moore-bros Jul 3, 2024
e689df7
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_assoc
moore-bros Jul 3, 2024
9808965
wifi: mt76: mt7925: add link handling in mt7925_sta_set_decap_offload
moore-bros Jul 3, 2024
05dd36b
wifi: mt76: mt7925: update rate index according to link id
moore-bros Jul 3, 2024
38e99d9
wifi: mt76: mt7925: report link information in rx status
moore-bros Jul 3, 2024
ed8a3aa
wifi: mt76: add def_wcid to struct mt76_wcid
moore-bros Jul 3, 2024
6ed7f7a
wifi: mt76: mt7925: add mt7925_[assign,unassign]_vif_chanctx
moore-bros Jul 3, 2024
158f19e
wifi: mt76: mt7925: update mt7925_mcu_sta_mld_tlv for MLO
moore-bros Jul 3, 2024
ef5f6f8
wifi: mt76: mt7925: update mt7925_mcu_bss_mld_tlv for MLO
moore-bros Jul 3, 2024
f59e708
wifi: mt76: mt7925: update mt7925_mcu_add_bss_info for MLO
moore-bros Jul 3, 2024
ad04b30
wifi: mt76: mt7925: update mt7925_mcu_sta_update for MLO
moore-bros Jul 3, 2024
99e54a5
wifi: mt76: mt7925: add mt7925_mcu_sta_eht_mld_tlv for MLO
moore-bros Jul 3, 2024
42b7e34
wifi: mt76: mt7925: update mt7925_mcu_sta_rate_ctrl_tlv for MLO
moore-bros Jul 3, 2024
d4e8825
wifi: mt76: mt7925: enabling MLO when the firmware supports it
moore-bros Jul 3, 2024
8eac58a
build(deps): bump certifi in /drivers/gpu/drm/ci/xfails
dependabot[bot] Jul 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/gpu/drm/ci/xfails/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ git+https://gitlab.freedesktop.org/gfx-ci/ci-collate@09e7142715c16f54344ddf97013
termcolor==2.3.0

# ci-collate dependencies
certifi==2023.7.22
certifi==2024.7.4
charset-normalizer==3.2.0
idna==3.4
pip==23.3
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,11 @@ mt76_rx_convert(struct mt76_dev *dev, struct sk_buff *skb,
memcpy(status->chain_signal, mstat.chain_signal,
sizeof(mstat.chain_signal));

if (mstat.wcid) {
status->link_valid = mstat.wcid->link_valid;
status->link_id = mstat.wcid->link_id;
}

*sta = wcid_to_sta(mstat.wcid);
*hw = mt76_phy_hw(dev, mstat.phy_idx);
}
Expand Down
7 changes: 7 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mt76.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ struct mt76_wcid {
u8 sta:1;
u8 amsdu:1;
u8 phy_idx:2;
u8 link_id:4;
bool link_valid;

u8 rx_check_pn;
u8 rx_key_pn[IEEE80211_NUM_TIDS + 1][6];
Expand All @@ -366,6 +368,8 @@ struct mt76_wcid {
struct mt76_sta_stats stats;

struct list_head poll_list;

struct mt76_wcid *def_wcid;
};

struct mt76_txq {
Expand Down Expand Up @@ -1256,6 +1260,9 @@ wcid_to_sta(struct mt76_wcid *wcid)
if (!wcid || !wcid->sta)
return NULL;

if (wcid->def_wcid)
ptr = wcid->def_wcid;

return container_of(ptr, struct ieee80211_sta, drv_priv);
}

Expand Down
10 changes: 6 additions & 4 deletions drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,13 +842,15 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
{
struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
struct sk_buff *skb, *sskb, *wskb = NULL;
struct ieee80211_link_sta *link_sta;
struct mt7615_dev *dev = phy->dev;
struct wtbl_req_hdr *wtbl_hdr;
struct mt7615_sta *msta;
bool new_entry = true;
int cmd, err;

msta = sta ? (struct mt7615_sta *)sta->drv_priv : &mvif->sta;
link_sta = sta ? &sta->deflink : NULL;

sskb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76,
&msta->wcid);
Expand All @@ -861,8 +863,8 @@ mt7615_mcu_wtbl_sta_add(struct mt7615_phy *phy, struct ieee80211_vif *vif,
else
mvif->sta_added = true;
}
mt76_connac_mcu_sta_basic_tlv(&dev->mt76, sskb, vif, sta, enable,
new_entry);
mt76_connac_mcu_sta_basic_tlv(&dev->mt76, sskb, vif, link_sta,
enable, new_entry);
if (enable && sta)
mt76_connac_mcu_sta_tlv(phy->mt76, sskb, sta, vif, 0,
MT76_STA_INFO_STATE_ASSOC);
Expand Down Expand Up @@ -1109,8 +1111,8 @@ mt7615_mcu_uni_add_dev(struct mt7615_phy *phy, struct ieee80211_vif *vif,
{
struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;

return mt76_connac_mcu_uni_add_dev(phy->mt76, vif, &mvif->sta.wcid,
enable);
return mt76_connac_mcu_uni_add_dev(phy->mt76, &vif->bss_conf,
&mvif->sta.wcid, enable);
}

static int
Expand Down
58 changes: 33 additions & 25 deletions drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_bss_omac_tlv);

void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct ieee80211_link_sta *link_sta,
bool enable, bool newly)
{
struct sta_rec_basic *basic;
Expand All @@ -390,7 +390,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
basic->conn_state = CONN_STATE_DISCONNECT;
}

if (!sta) {
if (!link_sta) {
basic->conn_type = cpu_to_le32(CONNECTION_INFRA_BC);

if (vif->type == NL80211_IFTYPE_STATION &&
Expand All @@ -411,7 +411,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
else
conn_type = CONNECTION_INFRA_STA;
basic->conn_type = cpu_to_le32(conn_type);
basic->aid = cpu_to_le16(sta->aid);
basic->aid = cpu_to_le16(link_sta->sta->aid);
break;
case NL80211_IFTYPE_STATION:
if (vif->p2p && !is_mt7921(dev))
Expand All @@ -423,15 +423,15 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
break;
case NL80211_IFTYPE_ADHOC:
basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
basic->aid = cpu_to_le16(sta->aid);
basic->aid = cpu_to_le16(link_sta->sta->aid);
break;
default:
WARN_ON(1);
break;
}

memcpy(basic->peer_addr, sta->addr, ETH_ALEN);
basic->qos = sta->wme;
memcpy(basic->peer_addr, link_sta->addr, ETH_ALEN);
basic->qos = link_sta->sta->wme;
}
EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_basic_tlv);

Expand Down Expand Up @@ -793,19 +793,20 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_he_tlv_v2);

u8
mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif,
enum nl80211_band band, struct ieee80211_sta *sta)
enum nl80211_band band,
struct ieee80211_link_sta *link_sta)
{
struct ieee80211_sta_ht_cap *ht_cap;
struct ieee80211_sta_vht_cap *vht_cap;
const struct ieee80211_sta_he_cap *he_cap;
const struct ieee80211_sta_eht_cap *eht_cap;
u8 mode = 0;

if (sta) {
ht_cap = &sta->deflink.ht_cap;
vht_cap = &sta->deflink.vht_cap;
he_cap = &sta->deflink.he_cap;
eht_cap = &sta->deflink.eht_cap;
if (link_sta) {
ht_cap = &link_sta->ht_cap;
vht_cap = &link_sta->vht_cap;
he_cap = &link_sta->he_cap;
eht_cap = &link_sta->eht_cap;
} else {
struct ieee80211_supported_band *sband;

Expand Down Expand Up @@ -911,7 +912,8 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,

tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_PHY, sizeof(*phy));
phy = (struct sta_rec_phy *)tlv;
phy->phy_type = mt76_connac_get_phy_mode_v2(mphy, vif, band, sta);
phy->phy_type = mt76_connac_get_phy_mode_v2(mphy, vif, band,
&sta->deflink);
phy->basic_rate = cpu_to_le16((u16)vif->bss_conf.basic_rates);
phy->rcpi = rcpi;
phy->ampdu = FIELD_PREP(IEEE80211_HT_AMPDU_PARM_FACTOR,
Expand Down Expand Up @@ -1044,6 +1046,7 @@ int mt76_connac_mcu_sta_cmd(struct mt76_phy *phy,
struct mt76_sta_cmd_info *info)
{
struct mt76_vif *mvif = (struct mt76_vif *)info->vif->drv_priv;
struct ieee80211_link_sta *link_sta;
struct mt76_dev *dev = phy->dev;
struct wtbl_req_hdr *wtbl_hdr;
struct tlv *sta_wtbl;
Expand All @@ -1053,9 +1056,11 @@ int mt76_connac_mcu_sta_cmd(struct mt76_phy *phy,
if (IS_ERR(skb))
return PTR_ERR(skb);

link_sta = info->sta ? &info->sta->deflink : NULL;
if (info->sta || !info->offload_fw)
mt76_connac_mcu_sta_basic_tlv(dev, skb, info->vif, info->sta,
info->enable, info->newly);
mt76_connac_mcu_sta_basic_tlv(dev, skb, info->vif,
link_sta, info->enable,
info->newly);
if (info->sta && info->enable)
mt76_connac_mcu_sta_tlv(phy, skb, info->sta,
info->vif, info->rcpi,
Expand Down Expand Up @@ -1132,11 +1137,11 @@ void mt76_connac_mcu_wtbl_ba_tlv(struct mt76_dev *dev, struct sk_buff *skb,
EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_ba_tlv);

int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf,
struct mt76_wcid *wcid,
bool enable)
{
struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
struct mt76_vif *mvif = (struct mt76_vif *)bss_conf->vif->drv_priv;
struct mt76_dev *dev = phy->dev;
struct {
struct {
Expand All @@ -1148,7 +1153,7 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
__le16 tag;
__le16 len;
u8 active;
u8 pad;
u8 link_idx; /* not link_id */
u8 omac_addr[ETH_ALEN];
} __packed tlv;
} dev_req = {
Expand All @@ -1160,6 +1165,7 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
.tag = cpu_to_le16(DEV_INFO_ACTIVE),
.len = cpu_to_le16(sizeof(struct req_tlv)),
.active = enable,
.link_idx = mvif->idx,
},
};
struct {
Expand All @@ -1182,12 +1188,13 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
.bmc_tx_wlan_idx = cpu_to_le16(wcid->idx),
.sta_idx = cpu_to_le16(wcid->idx),
.conn_state = 1,
.link_idx = mvif->idx,
},
};
int err, idx, cmd, len;
void *data;

switch (vif->type) {
switch (bss_conf->vif->type) {
case NL80211_IFTYPE_MESH_POINT:
case NL80211_IFTYPE_MONITOR:
case NL80211_IFTYPE_AP:
Expand All @@ -1207,7 +1214,7 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx;
basic_req.basic.hw_bss_idx = idx;

memcpy(dev_req.tlv.omac_addr, vif->addr, ETH_ALEN);
memcpy(dev_req.tlv.omac_addr, bss_conf->addr, ETH_ALEN);

cmd = enable ? MCU_UNI_CMD(DEV_INFO_UPDATE) : MCU_UNI_CMD(BSS_INFO_UPDATE);
data = enable ? (void *)&dev_req : (void *)&basic_req;
Expand Down Expand Up @@ -1305,7 +1312,8 @@ int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_ba);

u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
enum nl80211_band band, struct ieee80211_sta *sta)
enum nl80211_band band,
struct ieee80211_link_sta *link_sta)
{
struct mt76_dev *dev = phy->dev;
const struct ieee80211_sta_he_cap *he_cap;
Expand All @@ -1316,10 +1324,10 @@ u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
if (is_connac_v1(dev))
return 0x38;

if (sta) {
ht_cap = &sta->deflink.ht_cap;
vht_cap = &sta->deflink.vht_cap;
he_cap = &sta->deflink.he_cap;
if (link_sta) {
ht_cap = &link_sta->ht_cap;
vht_cap = &link_sta->vht_cap;
he_cap = &link_sta->he_cap;
} else {
struct ieee80211_supported_band *sband;

Expand Down
30 changes: 23 additions & 7 deletions drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,13 @@ struct sta_rec_muru {
} mimo_ul;
} __packed;

struct sta_rec_remove {
__le16 tag;
__le16 len;
u8 action;
u8 pad[3];
} __packed;

struct sta_phy {
u8 type;
u8 flag;
Expand Down Expand Up @@ -813,7 +820,10 @@ enum {
STA_REC_HE_6G = 0x17,
STA_REC_HE_V2 = 0x19,
STA_REC_MLD = 0x20,
STA_REC_EHT_MLD = 0x21,
STA_REC_EHT = 0x22,
STA_REC_MLD_OFF = 0x23,
STA_REC_REMOVE = 0x25,
STA_REC_PN_INFO = 0x26,
STA_REC_KEY_V3 = 0x27,
STA_REC_HDRT = 0x28,
Expand Down Expand Up @@ -1392,6 +1402,7 @@ enum {
MT_NIC_CAP_WFDMA_REALLOC,
MT_NIC_CAP_6G,
MT_NIC_CAP_CHIP_CAP = 0x20,
MT_NIC_CAP_EML_CAP = 0x22,
};

#define UNI_WOW_DETECT_TYPE_MAGIC BIT(0)
Expand Down Expand Up @@ -1443,7 +1454,7 @@ struct mt76_connac_bss_basic_tlv {
__le16 sta_idx;
__le16 nonht_basic_phy;
u8 phymode_ext; /* bit(0) AX_6G */
u8 pad[1];
u8 link_idx;
} __packed;

struct mt76_connac_bss_qos_tlv {
Expand Down Expand Up @@ -1733,7 +1744,10 @@ enum mt76_sta_info_state {
};

struct mt76_sta_cmd_info {
struct ieee80211_sta *sta;
union {
struct ieee80211_sta *sta;
struct ieee80211_link_sta *link_sta;
};
struct mt76_wcid *wcid;

struct ieee80211_vif *vif;
Expand Down Expand Up @@ -1883,8 +1897,8 @@ int mt76_connac_mcu_set_channel_domain(struct mt76_phy *phy);
int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif);
void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta, bool enable,
bool newly);
struct ieee80211_link_sta *link_sta,
bool enable, bool newly);
void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta, void *sta_wtbl,
Expand All @@ -1898,7 +1912,8 @@ int mt76_connac_mcu_sta_update_hdr_trans(struct mt76_dev *dev,
struct mt76_wcid *wcid, int cmd);
void mt76_connac_mcu_sta_he_tlv_v2(struct sk_buff *skb, struct ieee80211_sta *sta);
u8 mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif,
enum nl80211_band band, struct ieee80211_sta *sta);
enum nl80211_band band,
struct ieee80211_link_sta *link_sta);
int mt76_connac_mcu_wtbl_update_hdr_trans(struct mt76_dev *dev,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
Expand All @@ -1917,7 +1932,7 @@ void mt76_connac_mcu_sta_ba_tlv(struct sk_buff *skb,
struct ieee80211_ampdu_params *params,
bool enable, bool tx);
int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf,
struct mt76_wcid *wcid,
bool enable);
int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
Expand Down Expand Up @@ -1992,7 +2007,8 @@ mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
const struct ieee80211_sta_eht_cap *
mt76_connac_get_eht_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif);
u8 mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
enum nl80211_band band, struct ieee80211_sta *sta);
enum nl80211_band band,
struct ieee80211_link_sta *sta);
u8 mt76_connac_get_phy_mode_ext(struct mt76_phy *phy, struct ieee80211_vif *vif,
enum nl80211_band band);

Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,7 @@ mt7915_mcu_sta_rate_ctrl_tlv(struct sk_buff *skb, struct mt7915_dev *dev,

ra->valid = true;
ra->auto_rate = true;
ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, sta);
ra->phy_mode = mt76_connac_get_phy_mode(mphy, vif, band, &sta->deflink);
ra->channel = chandef->chan->hw_value;
ra->bw = sta->deflink.bandwidth;
ra->phy.bw = sta->deflink.bandwidth;
Expand Down Expand Up @@ -1656,19 +1656,21 @@ int mt7915_mcu_add_sta(struct mt7915_dev *dev, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, bool enable)
{
struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
struct ieee80211_link_sta *link_sta;
struct mt7915_sta *msta;
struct sk_buff *skb;
int ret;

msta = sta ? (struct mt7915_sta *)sta->drv_priv : &mvif->sta;
link_sta = sta ? &sta->deflink : NULL;

skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76,
&msta->wcid);
if (IS_ERR(skb))
return PTR_ERR(skb);

/* starec basic */
mt76_connac_mcu_sta_basic_tlv(&dev->mt76, skb, vif, sta, enable,
mt76_connac_mcu_sta_basic_tlv(&dev->mt76, skb, vif, link_sta, enable,
!rcu_access_pointer(dev->mt76.wcid[msta->wcid.idx]));
if (!enable)
goto out;
Expand Down
Loading