wifi: mt76: rename struct mt76_vif to mt76_vif_link
authorFelix Fietkau <nbd@nbd.name>
Thu, 2 Jan 2025 16:34:47 +0000 (17:34 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 14 Jan 2025 12:34:37 +0000 (13:34 +0100)
Preparation to use it for private bss link data instead of the full vif
on MLO capable devices.

Link: https://patch.msgid.link/20250102163508.52945-3-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
20 files changed:
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/main.c
drivers/net/wireless/mediatek/mt76/mt7615/mt7615.h
drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c
drivers/net/wireless/mediatek/mt76/mt76_connac_mac.c
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.h
drivers/net/wireless/mediatek/mt76/mt7915/mt7915.h
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
drivers/net/wireless/mediatek/mt76/mt7925/mac.c
drivers/net/wireless/mediatek/mt76/mt7925/main.c
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
drivers/net/wireless/mediatek/mt76/mt7925/mcu.h
drivers/net/wireless/mediatek/mt76/mt792x.h
drivers/net/wireless/mediatek/mt76/mt7996/mac.c
drivers/net/wireless/mediatek/mt76/mt7996/main.c
drivers/net/wireless/mediatek/mt76/mt7996/mcu.c
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h
drivers/net/wireless/mediatek/mt76/scan.c

index aac8ca7265c255b35f707372d81dff34b3597c6d..1782ebc7085e9a4ee66f2dd569e8dcb60f6de670 100644 (file)
@@ -754,7 +754,7 @@ struct mt76_testmode_data {
        } rx_stats;
 };
 
-struct mt76_vif {
+struct mt76_vif_link {
        u8 idx;
        u8 omac_idx;
        u8 band_idx;
index 27c3857bcd7b862615eab6c004310e3fb10696ff..3ca4fae7c4b0feb6e8dbf2a7b8a39c1e0417ad24 100644 (file)
@@ -730,7 +730,7 @@ int mt7615_mac_write_txwi(struct mt7615_dev *dev, __le32 *txwi,
        u16 seqno = 0;
 
        if (vif) {
-               struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+               struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
 
                omac_idx = mvif->omac_idx;
                wmm_idx = mvif->wmm_idx;
index 646474aa828df75cc8ae1bd830854194739ccd6f..e883cf4e10950b371b8c370a540b1de62fe414a5 100644 (file)
@@ -464,7 +464,7 @@ mt7615_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
               unsigned int link_id, u16 queue,
               const struct ieee80211_tx_queue_params *params)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt7615_dev *dev = mt7615_hw_dev(hw);
        int err;
 
index 530da48ce3ea9f451380906faefd3ef77f9971fc..9bdd29e8d25e945d3d44c9d63cb3cf24d4e23ea7 100644 (file)
@@ -139,7 +139,7 @@ struct mt7615_sta {
 };
 
 struct mt7615_vif {
-       struct mt76_vif mt76; /* must be first */
+       struct mt76_vif_link mt76; /* must be first */
        struct mt7615_sta sta;
        bool sta_added;
 };
index fbb1181c58ff3c3ab3a2389b57fe1dc10d14cf07..a0ca3bbdfcafb3c480a64be9174fa941881ea292 100644 (file)
@@ -48,7 +48,7 @@ mt7615_write_fw_txp(struct mt7615_dev *dev, struct mt76_tx_info *tx_info,
                txp->flags |= cpu_to_le16(MT_CT_INFO_MGMT_FRAME);
 
        if (vif) {
-               struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+               struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
 
                txp->bss_idx = mvif->idx;
        }
index f719457e39b2f924f701c5073fa4756759f42c48..5170af3e342851c8b31f28114dd3474f5f68c2cd 100644 (file)
@@ -294,7 +294,7 @@ u16 mt76_connac2_mac_tx_rate_val(struct mt76_phy *mphy,
                                 struct ieee80211_vif *vif,
                                 bool beacon, bool mcast)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_chan_def *chandef = mvif->ctx ?
                                            &mvif->ctx->def : &mphy->chandef;
        u8 nss = 0, mode = 0, band = chandef->chan->band;
@@ -505,7 +505,7 @@ void mt76_connac2_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
        bool amsdu_en = wcid->amsdu;
 
        if (vif) {
-               struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+               struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
 
                omac_idx = mvif->omac_idx;
                wmm_idx = mvif->wmm_idx;
index 4171710d645c9303ce49f6eb254c7b5ab90e3753..5c76a0885278acfb93c3e361bc4f3d3a9072e8db 100644 (file)
@@ -189,7 +189,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_mac_enable);
 
 int mt76_connac_mcu_set_vif_ps(struct mt76_dev *dev, struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                u8 bss_idx;
                u8 ps_state; /* 0: device awake
@@ -232,7 +232,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_rts_thresh);
 void mt76_connac_mcu_beacon_loss_iter(void *priv, u8 *mac,
                                      struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_connac_beacon_loss_event *event = priv;
 
        if (mvif->idx != event->bss_idx)
@@ -273,7 +273,7 @@ mt76_connac_mcu_add_nested_tlv(struct sk_buff *skb, int tag, int len,
 EXPORT_SYMBOL_GPL(mt76_connac_mcu_add_nested_tlv);
 
 struct sk_buff *
-__mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif,
+__mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                                struct mt76_wcid *wcid, int len)
 {
        struct sta_req_hdr hdr = {
@@ -329,7 +329,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_alloc_wtbl_req);
 void mt76_connac_mcu_bss_omac_tlv(struct sk_buff *skb,
                                  struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        u8 omac_idx = mvif->omac_idx;
        struct bss_info_omac *omac;
        struct tlv *tlv;
@@ -497,7 +497,7 @@ int mt76_connac_mcu_sta_update_hdr_trans(struct mt76_dev *dev,
                                         struct ieee80211_vif *vif,
                                         struct mt76_wcid *wcid, int cmd)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct wtbl_req_hdr *wtbl_hdr;
        struct tlv *sta_wtbl;
        struct sk_buff *skb;
@@ -545,7 +545,7 @@ void mt76_connac_mcu_wtbl_generic_tlv(struct mt76_dev *dev,
                                      struct ieee80211_sta *sta,
                                      void *sta_wtbl, void *wtbl_tlv)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct wtbl_generic *generic;
        struct wtbl_rx *rx;
        struct wtbl_spe *spe;
@@ -849,7 +849,7 @@ void mt76_connac_mcu_sta_tlv(struct mt76_phy *mphy, struct sk_buff *skb,
                             struct ieee80211_vif *vif,
                             u8 rcpi, u8 sta_state)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_chan_def *chandef = mvif->ctx ?
                                            &mvif->ctx->def : &mphy->chandef;
        enum nl80211_band band = chandef->chan->band;
@@ -1041,7 +1041,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_ht_tlv);
 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 mt76_vif_link *mvif = (struct mt76_vif_link *)info->vif->drv_priv;
        struct ieee80211_link_sta *link_sta;
        struct mt76_dev *dev = phy->dev;
        struct wtbl_req_hdr *wtbl_hdr;
@@ -1137,7 +1137,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_wtbl_ba_tlv);
 
 int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
                                struct ieee80211_bss_conf *bss_conf,
-                               struct mt76_vif *mvif,
+                               struct mt76_vif_link *mvif,
                                struct mt76_wcid *wcid,
                                bool enable)
 {
@@ -1266,7 +1266,7 @@ int mt76_connac_mcu_sta_wed_update(struct mt76_dev *dev, struct sk_buff *skb)
 }
 EXPORT_SYMBOL_GPL(mt76_connac_mcu_sta_wed_update);
 
-int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
+int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                           struct ieee80211_ampdu_params *params,
                           int cmd, bool enable, bool tx)
 {
@@ -1404,7 +1404,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_get_phy_mode_ext);
 const struct ieee80211_sta_he_cap *
 mt76_connac_get_he_phy_cap(struct mt76_phy *phy, struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_chan_def *chandef = mvif->ctx ?
                                            &mvif->ctx->def : &phy->chandef;
        enum nl80211_band band = chandef->chan->band;
@@ -1453,7 +1453,7 @@ mt76_connac_mcu_uni_bss_he_tlv(struct mt76_phy *phy, struct ieee80211_vif *vif,
        he->max_nss_mcs[CMD_HE_MCS_BW8080] = cap->he_mcs_nss_supp.tx_mcs_80p80;
 }
 
-int mt76_connac_mcu_uni_set_chctx(struct mt76_phy *phy, struct mt76_vif *mvif,
+int mt76_connac_mcu_uni_set_chctx(struct mt76_phy *phy, struct mt76_vif_link *mvif,
                                  struct ieee80211_chanctx_conf *ctx)
 {
        struct cfg80211_chan_def *chandef = ctx ? &ctx->def : &phy->chandef;
@@ -1541,7 +1541,7 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
                                bool enable,
                                struct ieee80211_chanctx_conf *ctx)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_chan_def *chandef = ctx ? &ctx->def : &phy->chandef;
        enum nl80211_band band = chandef->chan->band;
        struct mt76_dev *mdev = phy->dev;
@@ -1667,7 +1667,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_uni_add_bss);
 int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
                            struct ieee80211_scan_request *scan_req)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_scan_request *sreq = &scan_req->req;
        int n_ssids = 0, err, i, duration;
        int ext_channels_num = max_t(int, sreq->n_channels - 32, 0);
@@ -1773,7 +1773,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_hw_scan);
 int mt76_connac_mcu_cancel_hw_scan(struct mt76_phy *phy,
                                   struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                u8 seq_num;
                u8 is_ext_channel;
@@ -1799,7 +1799,7 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
                                   struct ieee80211_vif *vif,
                                   struct cfg80211_sched_scan_request *sreq)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct ieee80211_channel **scan_list = sreq->channels;
        struct mt76_connac_mcu_scan_channel *chan;
        struct mt76_connac_sched_scan_req *req;
@@ -2211,7 +2211,7 @@ int mt76_connac_mcu_set_rate_txpower(struct mt76_phy *phy)
 EXPORT_SYMBOL_GPL(mt76_connac_mcu_set_rate_txpower);
 
 int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
-                                     struct mt76_vif *vif,
+                                     struct mt76_vif_link *vif,
                                      struct ieee80211_bss_conf *info)
 {
        struct ieee80211_vif *mvif = container_of(info, struct ieee80211_vif,
@@ -2254,7 +2254,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_update_arp_filter);
 int mt76_connac_mcu_set_p2p_oppps(struct ieee80211_hw *hw,
                                  struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        int ct_window = vif->bss_conf.p2p_noa_attr.oppps_ctwindow;
        struct mt76_phy *phy = hw->priv;
        struct {
@@ -2321,7 +2321,7 @@ int mt76_connac_mcu_update_gtk_rekey(struct ieee80211_hw *hw,
                                     struct ieee80211_vif *vif,
                                     struct cfg80211_gtk_rekey_data *key)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_connac_gtk_rekey_tlv *gtk_tlv;
        struct mt76_phy *phy = hw->priv;
        struct sk_buff *skb;
@@ -2362,7 +2362,7 @@ static int
 mt76_connac_mcu_set_arp_filter(struct mt76_dev *dev, struct ieee80211_vif *vif,
                               bool suspend)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                struct {
                        u8 bss_idx;
@@ -2388,7 +2388,7 @@ int
 mt76_connac_mcu_set_gtk_rekey(struct mt76_dev *dev, struct ieee80211_vif *vif,
                              bool suspend)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                struct {
                        u8 bss_idx;
@@ -2417,7 +2417,7 @@ mt76_connac_mcu_set_suspend_mode(struct mt76_dev *dev,
                                 bool enable, u8 mdtim,
                                 bool wow_suspend)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                struct {
                        u8 bss_idx;
@@ -2448,7 +2448,7 @@ mt76_connac_mcu_set_wow_pattern(struct mt76_dev *dev,
                                u8 index, bool enable,
                                struct cfg80211_pkt_pattern *pattern)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_connac_wow_pattern_tlv *ptlv;
        struct sk_buff *skb;
        struct req_hdr {
@@ -2480,7 +2480,7 @@ int
 mt76_connac_mcu_set_wow_ctrl(struct mt76_phy *phy, struct ieee80211_vif *vif,
                             bool suspend, struct cfg80211_wowlan *wowlan)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_dev *dev = phy->dev;
        struct {
                struct {
@@ -2689,7 +2689,7 @@ int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
                            struct ieee80211_key_conf *key, int mcu_cmd,
                            struct mt76_wcid *wcid, enum set_key_cmd cmd)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct sk_buff *skb;
        int ret;
 
@@ -2711,7 +2711,7 @@ EXPORT_SYMBOL_GPL(mt76_connac_mcu_add_key);
 
 /* SIFS 20us + 512 byte beacon transmitted by 1Mbps (3906us) */
 #define BCN_TX_ESTIMATE_TIME (4096 + 20)
-void mt76_connac_mcu_bss_ext_tlv(struct sk_buff *skb, struct mt76_vif *mvif)
+void mt76_connac_mcu_bss_ext_tlv(struct sk_buff *skb, struct mt76_vif_link *mvif)
 {
        struct bss_info_ext_bss *ext;
        int ext_bss_idx, tsf_offset;
@@ -2735,7 +2735,7 @@ int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
                                  struct mt76_phy *phy, u16 wlan_idx,
                                  bool enable)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        u32 type = vif->p2p ? NETWORK_P2P : NETWORK_INFRA;
        struct bss_info_basic *bss;
        struct tlv *tlv;
index 919194ab6265e92ec067ccb45af592a4055f7e5d..8f23b9e58d2af9a7aeff9aaec6a3e6f7cde84236 100644 (file)
@@ -1878,10 +1878,10 @@ mt76_connac_mcu_get_wlan_idx(struct mt76_dev *dev, struct mt76_wcid *wcid,
 }
 
 struct sk_buff *
-__mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif,
+__mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                                struct mt76_wcid *wcid, int len);
 static inline struct sk_buff *
-mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif,
+mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                              struct mt76_wcid *wcid)
 {
        return __mt76_connac_mcu_alloc_sta_req(dev, mvif, wcid,
@@ -1940,14 +1940,14 @@ void mt76_connac_mcu_sta_ba_tlv(struct sk_buff *skb,
                                bool enable, bool tx);
 int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
                                struct ieee80211_bss_conf *bss_conf,
-                               struct mt76_vif *mvif,
+                               struct mt76_vif_link *mvif,
                                struct mt76_wcid *wcid,
                                bool enable);
-int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
+int mt76_connac_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                           struct ieee80211_ampdu_params *params,
                           int cmd, bool enable, bool tx);
 int mt76_connac_mcu_uni_set_chctx(struct mt76_phy *phy,
-                                 struct mt76_vif *vif,
+                                 struct mt76_vif_link *vif,
                                  struct ieee80211_chanctx_conf *ctx);
 int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
                                struct ieee80211_vif *vif,
@@ -1978,7 +1978,7 @@ int mt76_connac_mcu_sched_scan_enable(struct mt76_phy *phy,
                                      struct ieee80211_vif *vif,
                                      bool enable);
 int mt76_connac_mcu_update_arp_filter(struct mt76_dev *dev,
-                                     struct mt76_vif *vif,
+                                     struct mt76_vif_link *vif,
                                      struct ieee80211_bss_conf *info);
 int mt76_connac_mcu_set_gtk_rekey(struct mt76_dev *dev, struct ieee80211_vif *vif,
                                  bool suspend);
@@ -2025,7 +2025,7 @@ int mt76_connac_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
                            struct ieee80211_key_conf *key, int mcu_cmd,
                            struct mt76_wcid *wcid, enum set_key_cmd cmd);
 
-void mt76_connac_mcu_bss_ext_tlv(struct sk_buff *skb, struct mt76_vif *mvif);
+void mt76_connac_mcu_bss_ext_tlv(struct sk_buff *skb, struct mt76_vif_link *mvif);
 void mt76_connac_mcu_bss_omac_tlv(struct sk_buff *skb,
                                  struct ieee80211_vif *vif);
 int mt76_connac_mcu_bss_basic_tlv(struct sk_buff *skb,
index 5fe872ef2e939bf87fec2fd3494cc5dcd0885751..533939f2b7ed4d07d94689acd60ba0a0ad7f62d7 100644 (file)
@@ -166,7 +166,7 @@ struct mt7915_vif_cap {
 };
 
 struct mt7915_vif {
-       struct mt76_vif mt76; /* must be first */
+       struct mt76_vif_link mt76; /* must be first */
 
        struct mt7915_vif_cap cap;
        struct mt7915_sta sta;
index 3f45221d00e81f7403323c8a1a1690dbf8c90d86..86bd33b916a9de5c5e17d3259f0430932d3d4ccf 100644 (file)
@@ -180,7 +180,7 @@ static void
 mt7921_mcu_connection_loss_iter(void *priv, u8 *mac,
                                struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_connac_beacon_loss_event *event = priv;
 
        if (mvif->idx != event->bss_idx)
@@ -1131,7 +1131,7 @@ int mt7921_get_txpwr_info(struct mt792x_dev *dev, struct mt7921_txpwr *txpwr)
 int mt7921_mcu_set_sniffer(struct mt792x_dev *dev, struct ieee80211_vif *vif,
                           bool enable)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                struct {
                        u8 band_idx;
index 187770537a1af776a5e0140829d81cb1c47c6b65..91e854e3d0e8381631148e900b455b178a201805 100644 (file)
@@ -730,7 +730,7 @@ mt7925_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
        u8 p_fmt, q_idx, omac_idx = 0, wmm_idx = 0, band_idx = 0;
        u32 val, sz_txd = mt76_is_mmio(dev) ? MT_TXD_SIZE : MT_SDIO_TXD_SIZE;
        bool is_8023 = info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP;
-       struct mt76_vif *mvif;
+       struct mt76_vif_link *mvif;
        bool beacon = !!(changed & (BSS_CHANGED_BEACON |
                                    BSS_CHANGED_BEACON_ENABLED));
        bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |
@@ -739,7 +739,7 @@ mt7925_mac_write_txwi(struct mt76_dev *dev, __le32 *txwi,
 
        mconf = vif ? mt792x_vif_to_link((struct mt792x_vif *)vif->drv_priv,
                                         wcid->link_id) : NULL;
-       mvif = mconf ? (struct mt76_vif *)&mconf->mt76 : NULL;
+       mvif = mconf ? (struct mt76_vif_link *)&mconf->mt76 : NULL;
 
        if (mvif) {
                omac_idx = mvif->omac_idx;
index ddc67423efe2cb8d53875cc8927c32a90c33f3f1..230e4d20c88553c85e2739653cb1aff88fd9e3e7 100644 (file)
@@ -803,7 +803,7 @@ static u8
 mt7925_get_rates_table(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                       bool beacon, bool mcast)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_phy *mphy = hw->priv;
        u16 rate;
        u8 i, idx, ht;
index d4d3ecf863c40b4aeaecc52355859c743f9cd58f..6bd5322bcf149abb613288aac6fa4b3449b37949 100644 (file)
@@ -164,7 +164,7 @@ static int
 mt7925_connac_mcu_set_wow_ctrl(struct mt76_phy *phy, struct ieee80211_vif *vif,
                               bool suspend, struct cfg80211_wowlan *wowlan)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_dev *dev = phy->dev;
        struct {
                struct {
@@ -219,7 +219,7 @@ mt7925_mcu_set_wow_pattern(struct mt76_dev *dev,
                           u8 index, bool enable,
                           struct cfg80211_pkt_pattern *pattern)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt7925_wow_pattern_tlv *tlv;
        struct sk_buff *skb;
        struct {
@@ -274,7 +274,7 @@ static void
 mt7925_mcu_connection_loss_iter(void *priv, u8 *mac,
                                struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt7925_uni_beacon_loss_event *event = priv;
 
        if (mvif->idx != event->hdr.bss_idx)
@@ -304,7 +304,7 @@ mt7925_mcu_connection_loss_event(struct mt792x_dev *dev, struct sk_buff *skb)
 static void
 mt7925_mcu_roc_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt7925_roc_grant_tlv *grant = priv;
 
        if (ieee80211_vif_is_mld(vif) && vif->type == NL80211_IFTYPE_STATION)
@@ -528,7 +528,7 @@ void mt7925_mcu_rx_event(struct mt792x_dev *dev, struct sk_buff *skb)
 }
 
 static int
-mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif *mvif,
+mt7925_mcu_sta_ba(struct mt76_dev *dev, struct mt76_vif_link *mvif,
                  struct mt76_wcid *wcid,
                  struct ieee80211_ampdu_params *params,
                  bool enable, bool tx)
@@ -1807,7 +1807,7 @@ static int
 mt7925_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 mt76_vif_link *mvif = (struct mt76_vif_link *)info->vif->drv_priv;
        struct mt76_dev *dev = phy->dev;
        struct sk_buff *skb;
        int conn_state;
@@ -2264,7 +2264,7 @@ void mt7925_mcu_bss_rlm_tlv(struct sk_buff *skb, struct mt76_phy *phy,
 }
 
 static struct sk_buff *
-__mt7925_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif *mvif, int len)
+__mt7925_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif_link *mvif, int len)
 {
        struct bss_req_hdr hdr = {
                .bss_idx = mvif->idx,
@@ -2280,7 +2280,7 @@ __mt7925_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif *mvif, int len)
        return skb;
 }
 
-int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif *mvif,
+int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif_link *mvif,
                         struct ieee80211_bss_conf *link_conf,
                         struct ieee80211_chanctx_conf *ctx)
 {
@@ -2433,7 +2433,7 @@ mt7925_mcu_bss_sec_tlv(struct sk_buff *skb,
                       struct ieee80211_bss_conf *link_conf)
 {
        struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
-       struct mt76_vif *mvif = &mconf->mt76;
+       struct mt76_vif_link *mvif = &mconf->mt76;
        struct bss_sec_tlv {
                __le16 tag;
                __le16 len;
@@ -2484,7 +2484,7 @@ mt7925_mcu_bss_bmc_tlv(struct sk_buff *skb, struct mt792x_phy *phy,
                                                  &link_conf->chanreq.oper;
        struct mt792x_bss_conf *mconf = mt792x_link_conf_to_mconf(link_conf);
        enum nl80211_band band = chandef->chan->band;
-       struct mt76_vif *mvif = &mconf->mt76;
+       struct mt76_vif_link *mvif = &mconf->mt76;
        struct bss_rate_tlv *bmc;
        struct tlv *tlv;
        u8 idx = mvif->mcast_rates_idx ?
@@ -2692,7 +2692,7 @@ int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable)
 int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
                       struct ieee80211_scan_request *scan_req)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_scan_request *sreq = &scan_req->req;
        int n_ssids = 0, err, i;
        struct ieee80211_channel **scan_list = sreq->channels;
@@ -2801,7 +2801,7 @@ int mt7925_mcu_sched_scan_req(struct mt76_phy *phy,
                              struct ieee80211_vif *vif,
                              struct cfg80211_sched_scan_request *sreq)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct ieee80211_channel **scan_list = sreq->channels;
        struct mt76_connac_mcu_scan_channel *chan;
        struct mt76_dev *mdev = phy->dev;
@@ -2937,7 +2937,7 @@ mt7925_mcu_sched_scan_enable(struct mt76_phy *phy,
 int mt7925_mcu_cancel_hw_scan(struct mt76_phy *phy,
                              struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct {
                struct scan_hdr {
                        u8 seq_num;
index fe6a613ba008899533f1213e3504fb88e4c0732b..1e47d2c61b5453577dbb370d807af4c2901ad8ef 100644 (file)
@@ -637,7 +637,7 @@ int mt7925_mcu_set_timing(struct mt792x_phy *phy,
 int mt7925_mcu_set_deep_sleep(struct mt792x_dev *dev, bool enable);
 int mt7925_mcu_set_channel_domain(struct mt76_phy *phy);
 int mt7925_mcu_set_radio_en(struct mt792x_phy *phy, bool enable);
-int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif *mvif,
+int mt7925_mcu_set_chctx(struct mt76_phy *phy, struct mt76_vif_link *mvif,
                         struct ieee80211_bss_conf *link_conf,
                         struct ieee80211_chanctx_conf *ctx);
 int mt7925_mcu_set_rate_txpower(struct mt76_phy *phy);
index 3f989e83f252009454b9502a74cb079d1e0aeab0..e331a056950f25e30520a59323228a314dfa1d0f 100644 (file)
@@ -117,7 +117,7 @@ struct mt792x_chanctx {
 };
 
 struct mt792x_bss_conf {
-       struct mt76_vif mt76; /* must be first */
+       struct mt76_vif_link mt76; /* must be first */
        struct mt792x_vif *vif;
        struct ewma_rssi rssi;
        struct ieee80211_tx_queue_params queue_params[IEEE80211_NUM_ACS];
index 8e3620d8a7c896624e198a306420347494424017..fb6ab96cdeabf472e4eeb0301c9a84d6d0992538 100644 (file)
@@ -831,7 +831,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
        u8 band_idx = (info->hw_queue & MT_TX_HW_QUEUE_PHY) >> 2;
        u8 p_fmt, q_idx, omac_idx = 0, wmm_idx = 0;
        bool is_8023 = info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP;
-       struct mt76_vif *mvif;
+       struct mt76_vif_link *mvif;
        u16 tx_count = 15;
        u32 val;
        bool inband_disc = !!(changed & (BSS_CHANGED_UNSOL_BCAST_PROBE_RESP |
@@ -839,7 +839,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
        bool beacon = !!(changed & (BSS_CHANGED_BEACON |
                                    BSS_CHANGED_BEACON_ENABLED)) && (!inband_disc);
 
-       mvif = vif ? (struct mt76_vif *)vif->drv_priv : NULL;
+       mvif = vif ? (struct mt76_vif_link *)vif->drv_priv : NULL;
        if (mvif) {
                omac_idx = mvif->omac_idx;
                wmm_idx = mvif->wmm_idx;
index f3ca01899503b6ae34ea9e98d41cb2903c8778bb..e0589b02916716a2ed1e836b38ed8be03571919c 100644 (file)
@@ -532,7 +532,7 @@ static u8
 mt7996_get_rates_table(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                       bool beacon, bool mcast)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt76_phy *mphy = hw->priv;
        u16 rate;
        u8 i, idx;
@@ -583,7 +583,7 @@ static void mt7996_bss_info_changed(struct ieee80211_hw *hw,
                                    struct ieee80211_bss_conf *info,
                                    u64 changed)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct mt7996_phy *phy = mt7996_hw_phy(hw);
        struct mt7996_dev *dev = mt7996_hw_dev(hw);
 
index b3c7f4196ab4a7e11d74b05e6452228f16121578..d25afd1f67fc2933b26a939a219e5f8cce300cf6 100644 (file)
@@ -852,7 +852,7 @@ static void
 mt7996_mcu_bss_bmc_tlv(struct sk_buff *skb, struct ieee80211_vif *vif,
                       struct mt7996_phy *phy)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct bss_rate_tlv *bmc;
        struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
        enum nl80211_band band = chandef->chan->band;
@@ -899,7 +899,7 @@ mt7996_mcu_bss_mld_tlv(struct sk_buff *skb, struct ieee80211_vif *vif)
 static void
 mt7996_mcu_bss_sec_tlv(struct sk_buff *skb, struct ieee80211_vif *vif)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct bss_sec_tlv *sec;
        struct tlv *tlv;
 
@@ -988,7 +988,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
                         struct mt76_phy *phy, u16 wlan_idx,
                         bool enable)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct cfg80211_chan_def *chandef = &phy->chandef;
        struct mt76_connac_bss_basic_tlv *bss;
        u32 type = CONNECTION_INFRA_AP;
@@ -1060,7 +1060,7 @@ mt7996_mcu_bss_basic_tlv(struct sk_buff *skb,
 }
 
 static struct sk_buff *
-__mt7996_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif *mvif, int len)
+__mt7996_mcu_alloc_bss_req(struct mt76_dev *dev, struct mt76_vif_link *mvif, int len)
 {
        struct bss_req_hdr hdr = {
                .bss_idx = mvif->idx,
@@ -1140,7 +1140,7 @@ int mt7996_mcu_set_timing(struct mt7996_phy *phy, struct ieee80211_vif *vif)
 }
 
 static int
-mt7996_mcu_sta_ba(struct mt7996_dev *dev, struct mt76_vif *mvif,
+mt7996_mcu_sta_ba(struct mt7996_dev *dev, struct mt76_vif_link *mvif,
                  struct ieee80211_ampdu_params *params,
                  bool enable, bool tx)
 {
@@ -2283,7 +2283,7 @@ int mt7996_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
                       struct ieee80211_key_conf *key, int mcu_cmd,
                       struct mt76_wcid *wcid, enum set_key_cmd cmd)
 {
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        struct sk_buff *skb;
        int ret;
 
index d2bc968777970bea0e27bfce12ed87892377d66d..465e3d9fd26dc8c6bf685dd0a68dbb25e0c8b4b6 100644 (file)
@@ -200,7 +200,7 @@ struct mt7996_sta {
 };
 
 struct mt7996_vif {
-       struct mt76_vif mt76; /* must be first */
+       struct mt76_vif_link mt76; /* must be first */
 
        struct mt7996_sta sta;
        struct mt7996_phy *phy;
index 79172ad3fa6e16dbe0b0a17698785e482646da78..70884faab90505ec2376f7a060ad15188413136c 100644 (file)
@@ -33,7 +33,7 @@ mt76_scan_send_probe(struct mt76_dev *dev, struct cfg80211_ssid *ssid)
 {
        struct cfg80211_scan_request *req = dev->scan.req;
        struct ieee80211_vif *vif = dev->scan.vif;
-       struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
+       struct mt76_vif_link *mvif = (struct mt76_vif_link *)vif->drv_priv;
        enum nl80211_band band = dev->scan.chan->band;
        struct mt76_phy *phy = dev->scan.phy;
        struct ieee80211_tx_info *info;