mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 12:53:04 -04:00
wifi: mt76: rename struct mt76_vif to mt76_vif_link
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user