mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: extend mt7925_get_phy_mode_ext for per-link STA
Extend mt7925_get_phy_mode_ext with the per-link STA configuration. The patch we created is a prerequisite to enable the MLO function in the driver. It is purely a refactoring patch so the functionality should remain unchanged. Co-developed-by: Ming Yen Hsieh <[email protected]> Signed-off-by: Ming Yen Hsieh <[email protected]> Co-developed-by: Deren Wu <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+8
-5
@@ -2035,16 +2035,17 @@ int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif *mvif,
|
||||
|
||||
static u8
|
||||
mt7925_get_phy_mode_ext(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 ieee80211_he_6ghz_capa *he_6ghz_capa;
|
||||
const struct ieee80211_sta_eht_cap *eht_cap;
|
||||
__le16 capa = 0;
|
||||
u8 mode = 0;
|
||||
|
||||
if (sta) {
|
||||
he_6ghz_capa = &sta->deflink.he_6ghz_capa;
|
||||
eht_cap = &sta->deflink.eht_cap;
|
||||
if (link_sta) {
|
||||
he_6ghz_capa = &link_sta->he_6ghz_capa;
|
||||
eht_cap = &link_sta->eht_cap;
|
||||
} else {
|
||||
struct ieee80211_supported_band *sband;
|
||||
|
||||
@@ -2090,6 +2091,7 @@ mt7925_mcu_bss_basic_tlv(struct sk_buff *skb,
|
||||
struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
|
||||
struct mt792x_sta *msta = sta ? (struct mt792x_sta *)sta->drv_priv :
|
||||
&mconf->vif->sta;
|
||||
struct ieee80211_link_sta *link_sta = sta ? &sta->deflink : NULL;
|
||||
struct cfg80211_chan_def *chandef = ctx ? &ctx->def : &phy->chandef;
|
||||
enum nl80211_band band = chandef->chan->band;
|
||||
struct mt76_connac_bss_basic_tlv *basic_req;
|
||||
@@ -2104,7 +2106,8 @@ mt7925_mcu_bss_basic_tlv(struct sk_buff *skb,
|
||||
mconf->mt76.omac_idx;
|
||||
basic_req->hw_bss_idx = idx;
|
||||
|
||||
basic_req->phymode_ext = mt7925_get_phy_mode_ext(phy, vif, band, sta);
|
||||
basic_req->phymode_ext = mt7925_get_phy_mode_ext(phy, vif, band,
|
||||
link_sta);
|
||||
|
||||
if (band == NL80211_BAND_2GHZ)
|
||||
basic_req->nonht_basic_phy = cpu_to_le16(PHY_TYPE_ERP_INDEX);
|
||||
|
||||
Reference in New Issue
Block a user