wifi: mt76: mt792x: add struct mt792x_link_sta

We are introducing a new structure, mt792x_link_sta, to manage per-link
configurations in preparation for future station (STA) support of
Multi-Link Operation (MLO).

This patch only includes structural changes and does not involve any
logic changes.

We have moved relevant parameters, such as the wcid from the mt76_wcid
structure, from the mt7921x_sta structure to the mt792x_link_sta structure.

For current drivers that do not support MLO, there is only one link STA,
and link information is accessed via the deflink member.

However, we have not yet created the per-link BSS configuration indexed
by link ID for Multi-Link Device (MLD) support in mt7921x_sta.
This step needs to be completed before adding MLD support for STA mode.

Co-developed-by: Sean Wang <[email protected]>
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Deren Wu <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Deren Wu
2024-07-13 15:39:30 +02:00
committed by Felix Fietkau
parent 58d187e4a9
commit eb278f9863
11 changed files with 180 additions and 166 deletions
+4 -2
View File
@@ -138,6 +138,7 @@ EXPORT_SYMBOL_GPL(mt792x_mac_update_mib_stats);
struct mt76_wcid *mt792x_rx_get_wcid(struct mt792x_dev *dev, u16 idx,
bool unicast)
{
struct mt792x_link_sta *link;
struct mt792x_sta *sta;
struct mt76_wcid *wcid;
@@ -151,11 +152,12 @@ struct mt76_wcid *mt792x_rx_get_wcid(struct mt792x_dev *dev, u16 idx,
if (!wcid->sta)
return NULL;
sta = container_of(wcid, struct mt792x_sta, wcid);
link = container_of(wcid, struct mt792x_link_sta, wcid);
sta = container_of(link, struct mt792x_sta, deflink);
if (!sta->vif)
return NULL;
return &sta->vif->sta.wcid;
return &sta->vif->sta.deflink.wcid;
}
EXPORT_SYMBOL_GPL(mt792x_rx_get_wcid);