/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7603/ |
H A D | main.c | 92 struct mt7603_sta *msta = &mvif->sta; in mt7603_remove_interface() local 94 int idx = msta->wcid.idx; in mt7603_remove_interface() 105 if (!list_empty(&msta->wcid.poll_list)) in mt7603_remove_interface() 106 list_del_init(&msta->wcid.poll_list); in mt7603_remove_interface() 346 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv; in mt7603_sta_add() local 355 INIT_LIST_HEAD(&msta->wcid.poll_list); in mt7603_sta_add() 356 __skb_queue_head_init(&msta->psq); in mt7603_sta_add() 357 msta->ps = ~0; in mt7603_sta_add() 358 msta->smps = ~0; in mt7603_sta_add() 359 msta->wcid.sta = 1; in mt7603_sta_add() [all …]
|
H A D | mac.c | 332 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv; in mt7603_wtbl_update_cap() local 333 int idx = msta->wcid.idx; in mt7603_wtbl_update_cap() 415 struct mt7603_sta *msta; in mt7603_mac_sta_poll() local 432 msta = list_first_entry(&dev->mt76.sta_poll_list, in mt7603_mac_sta_poll() 434 list_del_init(&msta->wcid.poll_list); in mt7603_mac_sta_poll() 437 addr = mt7603_wtbl4_addr(msta->wcid.idx); in mt7603_mac_sta_poll() 439 u32 airtime_last = msta->tx_airtime_ac[i]; in mt7603_mac_sta_poll() 441 msta->tx_airtime_ac[i] = mt76_rr(dev, addr + i * 8); in mt7603_mac_sta_poll() 442 airtime[i] = msta->tx_airtime_ac[i] - airtime_last; in mt7603_mac_sta_poll() 446 if (msta->tx_airtime_ac[i] & BIT(22)) in mt7603_mac_sta_poll() [all …]
|
H A D | dma.c | 30 struct mt7603_sta *msta; in mt7603_rx_loopback_skb() local 51 priv = msta = container_of(wcid, struct mt7603_sta, wcid); in mt7603_rx_loopback_skb() 83 __skb_queue_tail(&msta->psq, skb); in mt7603_rx_loopback_skb() 84 if (skb_queue_len(&msta->psq) >= 64) { in mt7603_rx_loopback_skb() 85 skb = __skb_dequeue(&msta->psq); in mt7603_rx_loopback_skb()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt7601u/ |
H A D | main.c | 213 struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv; in mt7601u_sta_add() local 226 msta->wcid.idx = idx; in mt7601u_sta_add() 227 msta->wcid.hw_key_idx = -1; in mt7601u_sta_add() 230 rcu_assign_pointer(dev->wcid[idx], &msta->wcid); in mt7601u_sta_add() 244 struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv; in mt7601u_sta_remove() local 245 int idx = msta->wcid.idx; in mt7601u_sta_remove() 298 struct mt76_sta *msta = sta ? (struct mt76_sta *) sta->drv_priv : NULL; in mt7601u_set_key() local 299 struct mt76_wcid *wcid = msta ? &msta->wcid : &mvif->group_wcid; in mt7601u_set_key() 324 if (!msta) { in mt7601u_set_key() 334 return mt76_mac_wcid_set_key(dev, msta->wcid.idx, key); in mt7601u_set_key() [all …]
|
H A D | tx.c | 197 struct mt76_sta *msta = NULL; in mt7601u_tx() local 212 msta = (struct mt76_sta *) sta->drv_priv; in mt7601u_tx() 213 wcid = &msta->wcid; in mt7601u_tx() 225 trace_mt_tx(dev, skb, msta, txwi); in mt7601u_tx()
|
H A D | mac.c | 179 void *msta; in mt76_send_tx_status() local 186 msta = container_of(wcid, struct mt76_sta, wcid); in mt76_send_tx_status() 187 sta = container_of(msta, struct ieee80211_sta, in mt76_send_tx_status() 375 void *msta; in mt7601u_mac_set_ampdu_factor() local 385 msta = container_of(wcid, struct mt76_sta, wcid); in mt7601u_mac_set_ampdu_factor() 386 sta = container_of(msta, struct ieee80211_sta, drv_priv); in mt7601u_mac_set_ampdu_factor()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7921/ |
H A D | mac.c | 41 struct mt792x_sta *msta; in mt7921_mac_sta_poll() local 63 msta = list_first_entry(&sta_poll_list, in mt7921_mac_sta_poll() 65 list_del_init(&msta->wcid.poll_list); in mt7921_mac_sta_poll() 68 idx = msta->wcid.idx; in mt7921_mac_sta_poll() 72 u32 tx_last = msta->airtime_ac[i]; in mt7921_mac_sta_poll() 73 u32 rx_last = msta->airtime_ac[i + 4]; in mt7921_mac_sta_poll() 75 msta->airtime_ac[i] = mt76_rr(dev, addr); in mt7921_mac_sta_poll() 76 msta->airtime_ac[i + 4] = mt76_rr(dev, addr + 4); in mt7921_mac_sta_poll() 78 tx_time[i] = msta->airtime_ac[i] - tx_last; in mt7921_mac_sta_poll() 79 rx_time[i] = msta->airtime_ac[i + 4] - rx_last; in mt7921_mac_sta_poll() [all …]
|
H A D | main.c | 477 struct mt792x_sta *msta = sta ? (struct mt792x_sta *)sta->drv_priv : in mt7921_set_key() local 479 struct mt76_wcid *wcid = &msta->wcid; in mt7921_set_key() 532 err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip, in mt7921_set_key() 534 &msta->wcid, cmd); in mt7921_set_key() 717 struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; in mt7921_mac_sta_add() local 725 INIT_LIST_HEAD(&msta->wcid.poll_list); in mt7921_mac_sta_add() 726 msta->vif = mvif; in mt7921_mac_sta_add() 727 msta->wcid.sta = 1; in mt7921_mac_sta_add() 728 msta->wcid.idx = idx; in mt7921_mac_sta_add() 729 msta->wcid.phy_idx = mvif->mt76.band_idx; in mt7921_mac_sta_add() [all …]
|
H A D | pci_mac.c | 35 struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; in mt7921e_tx_prepare_skb() local 37 if (time_after(jiffies, msta->last_txs + HZ / 4)) { in mt7921e_tx_prepare_skb() 39 msta->last_txs = jiffies; in mt7921e_tx_prepare_skb()
|
H A D | mcu.c | 346 struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv; in mt7921_mcu_uni_tx_ba() local 349 msta->wcid.amsdu = false; in mt7921_mcu_uni_tx_ba() 351 return mt76_connac_mcu_sta_ba(&dev->mt76, &msta->vif->mt76, params, in mt7921_mcu_uni_tx_ba() 360 struct mt792x_sta *msta = (struct mt792x_sta *)params->sta->drv_priv; in mt7921_mcu_uni_rx_ba() local 362 return mt76_connac_mcu_sta_ba(&dev->mt76, &msta->vif->mt76, params, in mt7921_mcu_uni_rx_ba() 877 struct mt792x_sta *msta; in mt7921_mcu_sta_update() local 879 msta = sta ? (struct mt792x_sta *)sta->drv_priv : NULL; in mt7921_mcu_sta_update() 880 info.wcid = msta ? &msta->wcid : &mvif->sta.wcid; in mt7921_mcu_sta_update() 881 info.newly = msta ? state != MT76_STA_INFO_STATE_ASSOC : true; in mt7921_mcu_sta_update()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
H A D | main.c | 246 struct mt7996_sta *msta = &mvif->sta; in mt7996_remove_interface() local 249 int idx = msta->wcid.idx; in mt7996_remove_interface() 267 if (!list_empty(&msta->wcid.poll_list)) in mt7996_remove_interface() 268 list_del_init(&msta->wcid.poll_list); in mt7996_remove_interface() 271 mt76_wcid_cleanup(&dev->mt76, &msta->wcid); in mt7996_remove_interface() 320 struct mt7996_sta *msta = sta ? (struct mt7996_sta *)sta->drv_priv : in mt7996_set_key() local 322 struct mt76_wcid *wcid = &msta->wcid; in mt7996_set_key() 372 err = mt7996_mcu_add_key(&dev->mt76, vif, &msta->bip, in mt7996_set_key() 374 &msta->wcid, cmd); in mt7996_set_key() 656 struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv; in mt7996_mac_sta_add() local [all …]
|
H A D | mac.c | 104 struct mt7996_sta *msta; in mt7996_mac_sta_poll() local 128 msta = list_first_entry(&sta_poll_list, in mt7996_mac_sta_poll() 130 list_del_init(&msta->wcid.poll_list); in mt7996_mac_sta_poll() 133 idx = msta->wcid.idx; in mt7996_mac_sta_poll() 139 u32 tx_last = msta->airtime_ac[i]; in mt7996_mac_sta_poll() 140 u32 rx_last = msta->airtime_ac[i + 4]; in mt7996_mac_sta_poll() 142 msta->airtime_ac[i] = mt76_rr(dev, addr); in mt7996_mac_sta_poll() 143 msta->airtime_ac[i + 4] = mt76_rr(dev, addr + 4); in mt7996_mac_sta_poll() 145 tx_time[i] = msta->airtime_ac[i] - tx_last; in mt7996_mac_sta_poll() 146 rx_time[i] = msta->airtime_ac[i + 4] - rx_last; in mt7996_mac_sta_poll() [all …]
|
H A D | debugfs.c | 602 struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv; in mt7996_sta_hw_queue_read() local 603 struct mt7996_dev *dev = msta->vif->phy->dev; in mt7996_sta_hw_queue_read() 609 u32 idx = msta->wcid.idx >> 5; in mt7996_sta_hw_queue_read() 610 u8 offs = msta->wcid.idx & GENMASK(4, 0); in mt7996_sta_hw_queue_read() 618 mt76_wr(dev, MT_FL_Q0_CTRL, ctrl | msta->wcid.idx); in mt7996_sta_hw_queue_read() 622 sta->addr, msta->wcid.idx, in mt7996_sta_hw_queue_read() 623 msta->vif->mt76.wmm_idx, ac, qlen); in mt7996_sta_hw_queue_read() 900 struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv; in mt7996_sta_fixed_rate_set() local 901 struct mt7996_dev *dev = msta->vif->phy->dev; in mt7996_sta_fixed_rate_set() 936 phy.wlan_idx = cpu_to_le16(msta->wcid.idx); in mt7996_sta_fixed_rate_set()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | main.c | 288 struct mt7915_sta *msta = &mvif->sta; in mt7915_remove_interface() local 291 int idx = msta->wcid.idx; in mt7915_remove_interface() 313 if (!list_empty(&msta->wcid.poll_list)) in mt7915_remove_interface() 314 list_del_init(&msta->wcid.poll_list); in mt7915_remove_interface() 317 mt76_wcid_cleanup(&dev->mt76, &msta->wcid); in mt7915_remove_interface() 370 struct mt7915_sta *msta = sta ? (struct mt7915_sta *)sta->drv_priv : in mt7915_set_key() local 372 struct mt76_wcid *wcid = &msta->wcid; in mt7915_set_key() 422 err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip, in mt7915_set_key() 424 &msta->wcid, cmd); in mt7915_set_key() 731 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mac_sta_add() local [all …]
|
H A D | mac.c | 102 struct mt7915_sta *msta; in mt7915_mac_sta_poll() local 126 msta = list_first_entry(&sta_poll_list, in mt7915_mac_sta_poll() 128 list_del_init(&msta->wcid.poll_list); in mt7915_mac_sta_poll() 131 idx = msta->wcid.idx; in mt7915_mac_sta_poll() 137 u32 tx_last = msta->airtime_ac[i]; in mt7915_mac_sta_poll() 138 u32 rx_last = msta->airtime_ac[i + 4]; in mt7915_mac_sta_poll() 140 msta->airtime_ac[i] = mt76_rr(dev, addr); in mt7915_mac_sta_poll() 141 msta->airtime_ac[i + 4] = mt76_rr(dev, addr + 4); in mt7915_mac_sta_poll() 143 tx_time[i] = msta->airtime_ac[i] - tx_last; in mt7915_mac_sta_poll() 144 rx_time[i] = msta->airtime_ac[i + 4] - rx_last; in mt7915_mac_sta_poll() [all …]
|
H A D | mcu.c | 61 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_set_sta_he_mcs() local 62 struct mt7915_dev *dev = msta->vif->phy->dev; in mt7915_mcu_set_sta_he_mcs() 63 enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; in mt7915_mcu_set_sta_he_mcs() 64 const u16 *mask = msta->vif->bitrate_mask.control[band].he_mcs; in mt7915_mcu_set_sta_he_mcs() 116 struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv; in mt7915_mcu_set_sta_vht_mcs() local 117 struct mt7915_dev *dev = msta->vif->phy->dev; in mt7915_mcu_set_sta_vht_mcs() 689 struct mt7915_sta *msta = (struct mt7915_sta *)params->sta->drv_priv; in mt7915_mcu_add_tx_ba() local 690 struct mt7915_vif *mvif = msta->vif; in mt7915_mcu_add_tx_ba() 695 msta->wcid.amsdu = false; in mt7915_mcu_add_tx_ba() 708 struct mt7915_sta *msta = (struct mt7915_sta *)params->sta->drv_priv; in mt7915_mcu_add_rx_ba() local [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | mt76x02_util.c | 242 struct mt76x02_sta *msta = (struct mt76x02_sta *)sta->drv_priv; in mt76x02_sta_add() local 246 memset(msta, 0, sizeof(*msta)); in mt76x02_sta_add() 252 msta->vif = mvif; in mt76x02_sta_add() 253 msta->wcid.sta = 1; in mt76x02_sta_add() 254 msta->wcid.idx = idx; in mt76x02_sta_add() 255 msta->wcid.hw_key_idx = -1; in mt76x02_sta_add() 258 ewma_pktlen_init(&msta->pktlen); in mt76x02_sta_add() 261 set_bit(MT_WCID_FLAG_CHECK_PS, &msta->wcid.flags); in mt76x02_sta_add() 359 struct mt76x02_sta *msta = (struct mt76x02_sta *)sta->drv_priv; in mt76x02_ampdu_action() local 374 mt76_rx_aggr_start(&dev->mt76, &msta->wcid, tid, in mt76x02_ampdu_action() [all …]
|
H A D | mt792x_core.c | 98 struct mt792x_sta *msta = &mvif->sta; in mt792x_remove_interface() local 101 int idx = msta->wcid.idx; in mt792x_remove_interface() 104 mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid); in mt792x_remove_interface() 114 if (!list_empty(&msta->wcid.poll_list)) in mt792x_remove_interface() 115 list_del_init(&msta->wcid.poll_list); in mt792x_remove_interface() 118 mt76_wcid_cleanup(&dev->mt76, &msta->wcid); in mt792x_remove_interface() 383 struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; in mt792x_ethtool_worker() local 386 if (msta->vif->mt76.idx != wi->idx) in mt792x_ethtool_worker() 389 mt76_ethtool_worker(wi, &msta->wcid.stats, true); in mt792x_ethtool_worker() 467 struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; in mt792x_sta_statistics() local [all …]
|
H A D | mt76x02_mac.c | 476 mt76x02_mac_fill_tx_status(struct mt76x02_dev *dev, struct mt76x02_sta *msta, in mt76x02_mac_fill_tx_status() argument 499 if (!msta) in mt76x02_mac_fill_tx_status() 502 mt76x02_mac_process_tx_rate(&rate[0], msta->wcid.tx_info, in mt76x02_mac_fill_tx_status() 554 struct mt76x02_sta *msta = NULL; in mt76x02_send_tx_status() local 573 priv = msta = container_of(wcid, struct mt76x02_sta, wcid); in mt76x02_send_tx_status() 594 if (msta && stat->aggr && !status.skb) { in mt76x02_send_tx_status() 599 stat_cache = msta->status.rate; in mt76x02_send_tx_status() 600 stat_cache |= ((u32)msta->status.retry) << 16; in mt76x02_send_tx_status() 603 stat->wcid == msta->status.wcid && msta->n_frames < 32) { in mt76x02_send_tx_status() 604 msta->n_frames++; in mt76x02_send_tx_status() [all …]
|
H A D | mt76x02_txrx.c | 20 struct mt76x02_sta *msta; in mt76x02_tx() local 22 msta = (struct mt76x02_sta *)control->sta->drv_priv; in mt76x02_tx() 23 wcid = &msta->wcid; in mt76x02_tx() 176 struct mt76x02_sta *msta = (struct mt76x02_sta *)sta->drv_priv; in mt76x02_tx_prepare_skb() local 178 ewma_pktlen_add(&msta->pktlen, tx_info->skb->len); in mt76x02_tx_prepare_skb()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7615/ |
H A D | main.c | 251 struct mt7615_sta *msta = &mvif->sta; in mt7615_remove_interface() local 254 int idx = msta->wcid.idx; in mt7615_remove_interface() 265 mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid); in mt7615_remove_interface() 278 if (!list_empty(&msta->wcid.poll_list)) in mt7615_remove_interface() 279 list_del_init(&msta->wcid.poll_list); in mt7615_remove_interface() 350 struct mt7615_sta *msta = sta ? (struct mt7615_sta *)sta->drv_priv : in mt7615_set_key() local 352 struct mt76_wcid *wcid = &msta->wcid; in mt7615_set_key() 651 struct mt7615_sta *msta = (struct mt7615_sta *)sta->drv_priv; in mt7615_mac_sta_add() local 660 INIT_LIST_HEAD(&msta->wcid.poll_list); in mt7615_mac_sta_add() 661 msta->vif = mvif; in mt7615_mac_sta_add() [all …]
|
H A D | mac.c | 256 struct mt7615_sta *msta = (struct mt7615_sta *)status->wcid; in mt7615_reverse_frag0_hdr_trans() local 270 if (!msta || !msta->vif) in mt7615_reverse_frag0_hdr_trans() 273 sta = container_of((void *)msta, struct ieee80211_sta, drv_priv); in mt7615_reverse_frag0_hdr_trans() 274 vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv); in mt7615_reverse_frag0_hdr_trans() 387 struct mt7615_sta *msta; in mt7615_mac_fill_rx() local 389 msta = container_of(status->wcid, struct mt7615_sta, wcid); in mt7615_mac_fill_rx() 391 if (list_empty(&msta->wcid.poll_list)) in mt7615_mac_fill_rx() 392 list_add_tail(&msta->wcid.poll_list, in mt7615_mac_fill_rx() 744 struct mt7615_sta *msta = (struct mt7615_sta *)sta->drv_priv; in mt7615_mac_write_txwi() local 746 tx_count = msta->rate_count; in mt7615_mac_write_txwi() [all …]
|
H A D | usb_sdio.c | 190 struct mt7615_sta *msta; in mt7663_usb_sdio_tx_prepare_skb() local 193 msta = wcid ? container_of(wcid, struct mt7615_sta, wcid) : NULL; in mt7663_usb_sdio_tx_prepare_skb() 198 msta && !msta->rate_probe) { in mt7663_usb_sdio_tx_prepare_skb() 201 mt7615_mac_set_rates(&dev->phy, msta, &info->control.rates[0], in mt7663_usb_sdio_tx_prepare_skb() 202 msta->rates); in mt7663_usb_sdio_tx_prepare_skb()
|
H A D | pci_mac.c | 71 struct mt7615_sta *msta; in mt7615_tx_prepare_skb() local 74 msta = wcid ? container_of(wcid, struct mt7615_sta, wcid) : NULL; in mt7615_tx_prepare_skb() 78 if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) && msta) { in mt7615_tx_prepare_skb() 86 mt7615_mac_set_rates(phy, msta, &info->control.rates[0], in mt7615_tx_prepare_skb() 87 msta->rates); in mt7615_tx_prepare_skb()
|
H A D | mcu.c | 773 struct mt7615_sta *msta = (struct mt7615_sta *)params->sta->drv_priv; in mt7615_mcu_wtbl_tx_ba() local 774 struct mt7615_vif *mvif = msta->vif; in mt7615_mcu_wtbl_tx_ba() 779 wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(&dev->mt76, &msta->wcid, in mt7615_mcu_wtbl_tx_ba() 793 &msta->wcid); in mt7615_mcu_wtbl_tx_ba() 808 struct mt7615_sta *msta = (struct mt7615_sta *)params->sta->drv_priv; in mt7615_mcu_wtbl_rx_ba() local 809 struct mt7615_vif *mvif = msta->vif; in mt7615_mcu_wtbl_rx_ba() 815 &msta->wcid); in mt7615_mcu_wtbl_rx_ba() 827 wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(&dev->mt76, &msta->wcid, in mt7615_mcu_wtbl_rx_ba() 847 struct mt7615_sta *msta; in mt7615_mcu_wtbl_sta_add() local 851 msta = sta ? (struct mt7615_sta *)sta->drv_priv : &mvif->sta; in mt7615_mcu_wtbl_sta_add() [all …]
|