| /linux/drivers/net/wireless/mediatek/mt76/ |
| H A D | tx.c | 65 struct mt76_wcid *wcid; in mt76_tx_status_unlock() local 67 wcid = __mt76_wcid_ptr(dev, cb->wcid); in mt76_tx_status_unlock() 68 if (wcid) { in mt76_tx_status_unlock() 69 status.sta = wcid_to_sta(wcid); in mt76_tx_status_unlock() 70 if (status.sta && (wcid->rate.flags || wcid->rate.legacy)) { in mt76_tx_status_unlock() 71 rs.rate_idx = wcid->rate; in mt76_tx_status_unlock() 122 mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid, in mt76_tx_status_skb_add() argument 132 if (!wcid || !rcu_access_pointer(dev->wcid[wcid->idx])) in mt76_tx_status_skb_add() 150 pid = idr_alloc(&wcid->pktid, skb, MT_PACKET_ID_FIRST, in mt76_tx_status_skb_add() 157 cb->wcid = wcid->idx; in mt76_tx_status_skb_add() [all …]
|
| H A D | mac80211.c | 851 for (i = 0; i < ARRAY_SIZE(dev->wcid); i++) { in mt76_reset_device() 852 struct mt76_wcid *wcid; in mt76_reset_device() local 854 wcid = rcu_dereference(dev->wcid[i]); in mt76_reset_device() 855 if (!wcid) in mt76_reset_device() 858 wcid->sta = 0; in mt76_reset_device() 859 mt76_wcid_cleanup(dev, wcid); in mt76_reset_device() 860 rcu_assign_pointer(dev->wcid[i], NULL); in mt76_reset_device() 1197 void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid, in mt76_wcid_key_setup() argument 1203 wcid->rx_check_pn = false; in mt76_wcid_key_setup() 1211 wcid->rx_check_pn = true; in mt76_wcid_key_setup() [all …]
|
| H A D | agg-rx.c | 123 struct mt76_wcid *wcid = status->wcid; in mt76_rx_aggr_check_ctl() local 136 tid = rcu_dereference(wcid->aggr[tidno]); in mt76_rx_aggr_check_ctl() 151 struct mt76_wcid *wcid = status->wcid; in mt76_rx_aggr_reorder() local 161 sta = wcid_to_sta(wcid); in mt76_rx_aggr_reorder() 176 if (wcid->def_wcid) in mt76_rx_aggr_reorder() 177 wcid = wcid->def_wcid; in mt76_rx_aggr_reorder() 178 tid = rcu_dereference(wcid->aggr[tidno]); in mt76_rx_aggr_reorder() 244 int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno, in mt76_rx_aggr_start() argument 249 mt76_rx_aggr_stop(dev, wcid, tidno); in mt76_rx_aggr_start() 262 rcu_assign_pointer(wcid->aggr[tidno], tid); in mt76_rx_aggr_start() [all …]
|
| H A D | mt76_connac_mac.c | 86 struct mt76_wcid *wcid) in mt76_connac_free_pending_tx_skbs() argument 92 if (wcid && pm->tx_q[i].wcid != wcid) in mt76_connac_free_pending_tx_skbs() 104 struct mt76_wcid *wcid, in mt76_connac_pm_queue_skb() argument 113 pm->tx_q[qid].wcid = wcid; in mt76_connac_pm_queue_skb() 130 struct mt76_wcid *wcid = pm->tx_q[i].wcid; in mt76_connac_pm_dequeue_skbs() local 136 if (wcid && wcid->sta) in mt76_connac_pm_dequeue_skbs() 137 sta = container_of((void *)wcid, struct ieee80211_sta, in mt76_connac_pm_dequeue_skbs() 140 mt76_tx(phy, sta, wcid, pm->tx_q[i].skb); in mt76_connac_pm_dequeue_skbs() 158 mt76_tx_complete_skb(mdev, e->wcid, e->skb); in mt76_connac_tx_complete_skb() 371 struct mt76_wcid *wcid) in mt76_connac2_mac_write_txwi_8023() argument [all …]
|
| H A D | mt76x02_mac.c | 228 void mt76x02_mac_wcid_set_rate(struct mt76x02_dev *dev, struct mt76_wcid *wcid, in mt76x02_mac_wcid_set_rate() argument 241 wcid->tx_info = tx_info; in mt76x02_mac_wcid_set_rate() 267 stat->wcid = FIELD_GET(MT_TX_STAT_FIFO_WCID, stat1); in mt76x02_mac_load_tx_status() 336 struct sk_buff *skb, struct mt76_wcid *wcid, in mt76x02_mac_write_txwi() argument 354 if (!info->control.hw_key && wcid && wcid->hw_key_idx != 0xff && in mt76x02_mac_write_txwi() 356 wcid = NULL; in mt76x02_mac_write_txwi() 361 if (wcid) in mt76x02_mac_write_txwi() 362 txwi->wcid = wcid->idx; in mt76x02_mac_write_txwi() 364 txwi->wcid = 0xff; in mt76x02_mac_write_txwi() 366 if (wcid && wcid->sw_iv && key) { in mt76x02_mac_write_txwi() [all …]
|
| /linux/drivers/net/wireless/mediatek/mt7601u/ |
| H A D | main.c | 50 unsigned int wcid = GROUP_WCID(idx); in mt7601u_add_interface() local 62 if (dev->wcid_mask[wcid / BITS_PER_LONG] & BIT(wcid % BITS_PER_LONG)) in mt7601u_add_interface() 64 dev->wcid_mask[wcid / BITS_PER_LONG] |= BIT(wcid % BITS_PER_LONG); in mt7601u_add_interface() 65 mvif->group_wcid.idx = wcid; in mt7601u_add_interface() 76 unsigned int wcid = mvif->group_wcid.idx; in mt7601u_remove_interface() local 78 dev->wcid_mask[wcid / BITS_PER_LONG] &= ~BIT(wcid % BITS_PER_LONG); in mt7601u_remove_interface() 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() 245 int idx = msta->wcid.idx; in mt7601u_sta_remove() [all …]
|
| H A D | mac.c | 146 void mt76_mac_wcid_set_rate(struct mt7601u_dev *dev, struct mt76_wcid *wcid, in mt76_mac_wcid_set_rate() argument 152 wcid->tx_rate = mt76_mac_tx_rate_val(dev, rate, &wcid->tx_rate_nss); in mt76_mac_wcid_set_rate() 153 wcid->tx_rate_set = true; in mt76_mac_wcid_set_rate() 168 stat.wcid = FIELD_GET(MT_TX_STAT_FIFO_WCID, val); in mt7601u_mac_fetch_tx_status() 178 struct mt76_wcid *wcid = NULL; in mt76_send_tx_status() local 182 if (stat->wcid < ARRAY_SIZE(dev->wcid)) in mt76_send_tx_status() 183 wcid = rcu_dereference(dev->wcid[stat->wcid]); in mt76_send_tx_status() 185 if (wcid) { in mt76_send_tx_status() 186 msta = container_of(wcid, struct mt76_sta, wcid); in mt76_send_tx_status() 374 struct mt76_wcid *wcid; in mt7601u_mac_set_ampdu_factor() local [all …]
|
| H A D | tx.c | 131 struct ieee80211_sta *sta, struct mt76_wcid *wcid, in mt7601u_push_txwi() argument 146 if (!wcid->tx_rate_set) in mt7601u_push_txwi() 152 rate_ctl = wcid->tx_rate; in mt7601u_push_txwi() 180 txwi->wcid = wcid->idx; in mt7601u_push_txwi() 198 struct mt76_wcid *wcid = dev->mon_wcid; in mt7601u_tx() local 213 wcid = &msta->wcid; in mt7601u_tx() 217 wcid = &mvif->group_wcid; in mt7601u_tx() 220 txwi = mt7601u_push_txwi(dev, skb, sta, wcid, pkt_len); in mt7601u_tx() 222 if (mt7601u_dma_enqueue_tx(dev, skb, wcid, hw_q)) in mt7601u_tx()
|
| /linux/drivers/net/wireless/mediatek/mt76/mt7925/ |
| H A D | mac.c | 59 struct mt792x_link_sta, wcid.poll_list); in mt7925_mac_sta_poll() 62 list_del_init(&mlink->wcid.poll_list); in mt7925_mac_sta_poll() 65 idx = mlink->wcid.idx; in mt7925_mac_sta_poll() 90 if (!mlink->wcid.sta) in mt7925_mac_sta_poll() 113 rate = &mlink->wcid.rate; in mt7925_mac_sta_poll() 187 struct mt792x_sta *msta = (struct mt792x_sta *)status->wcid; in mt7925_reverse_frag0_hdr_trans() 414 status->wcid = mt792x_rx_get_wcid(dev, idx, unicast); in mt7925_mac_fill_rx() 416 if (status->wcid) { in mt7925_mac_fill_rx() 417 mlink = container_of(status->wcid, struct mt792x_link_sta, wcid); in mt7925_mac_fill_rx() 418 mt76_wcid_add_poll(&dev->mt76, &mlink->wcid); in mt7925_mac_fill_rx() [all …]
|
| H A D | main.c | 429 mlink->wcid.idx = idx; in mt7925_mac_link_bss_add() 430 mlink->wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7925_mac_link_bss_add() 431 mt76_wcid_init(&mlink->wcid, 0); in mt7925_mac_link_bss_add() 438 rcu_assign_pointer(dev->mt76.wcid[idx], &mlink->wcid); in mt7925_mac_link_bss_add() 441 &mlink->wcid, true); in mt7925_mac_link_bss_add() 447 mtxq->wcid = idx; in mt7925_mac_link_bss_add() 664 struct mt76_wcid *wcid; in mt7925_set_link_key() local 670 wcid = &mlink->wcid; in mt7925_set_link_key() 671 wcid_keyidx = &wcid->hw_key_idx; in mt7925_set_link_key() 677 wcid_keyidx = &wcid->hw_key_idx2; in mt7925_set_link_key() [all …]
|
| H A D | mac.h | 15 static inline u32 mt7925_mac_wtbl_lmac_addr(struct mt792x_dev *dev, u16 wcid, u8 dw) in mt7925_mac_wtbl_lmac_addr() argument 25 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7925_mac_wtbl_lmac_addr() 27 return MT_WTBL_LMAC_OFFS(wcid, dw); in mt7925_mac_wtbl_lmac_addr()
|
| H A D | pci_mac.c | 10 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7925e_tx_prepare_skb() argument 25 if (!wcid) in mt7925e_tx_prepare_skb() 26 wcid = &dev->mt76.global_wcid; in mt7925e_tx_prepare_skb() 44 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt7925e_tx_prepare_skb() 45 mt7925_mac_write_txwi(mdev, txwi_ptr, tx_info->skb, wcid, key, in mt7925e_tx_prepare_skb()
|
| /linux/drivers/net/wireless/mediatek/mt76/mt7921/ |
| H A D | mac.c | 67 wcid.poll_list); in mt7921_mac_sta_poll() 69 list_del_init(&mlink->wcid.poll_list); in mt7921_mac_sta_poll() 72 idx = mlink->wcid.idx; in mt7921_mac_sta_poll() 97 if (!mlink->wcid.sta) in mt7921_mac_sta_poll() 120 rate = &mlink->wcid.rate; in mt7921_mac_sta_poll() 215 status->wcid = mt792x_rx_get_wcid(dev, idx, unicast); in mt7921_mac_fill_rx() 217 if (status->wcid) { in mt7921_mac_fill_rx() 218 mlink = container_of(status->wcid, struct mt792x_link_sta, wcid); in mt7921_mac_fill_rx() 220 mt76_wcid_add_poll(&dev->mt76, &mlink->wcid); in mt7921_mac_fill_rx() 437 if (!status->wcid || !ieee80211_is_data_qos(fc)) in mt7921_mac_fill_rx() [all …]
|
| H A D | main.c | 325 &mvif->sta.deflink.wcid, true); in mt7921_add_interface() 334 INIT_LIST_HEAD(&mvif->sta.deflink.wcid.poll_list); in mt7921_add_interface() 335 mvif->sta.deflink.wcid.idx = idx; in mt7921_add_interface() 336 mvif->sta.deflink.wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7921_add_interface() 337 mt76_wcid_init(&mvif->sta.deflink.wcid, mvif->bss_conf.mt76.band_idx); in mt7921_add_interface() 344 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.deflink.wcid); in mt7921_add_interface() 347 mtxq->wcid = idx; in mt7921_add_interface() 510 struct mt76_wcid *wcid = &msta->deflink.wcid; in mt7921_set_key() local 511 u8 *wcid_keyidx = &wcid->hw_key_idx; in mt7921_set_key() 528 wcid_keyidx = &wcid->hw_key_idx2; in mt7921_set_key() [all …]
|
| H A D | pci_mac.c | 9 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7921e_tx_prepare_skb() argument 24 if (!wcid) in mt7921e_tx_prepare_skb() 25 wcid = &dev->mt76.global_wcid; in mt7921e_tx_prepare_skb() 43 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt7921e_tx_prepare_skb() 44 mt76_connac2_mac_write_txwi(mdev, txwi_ptr, tx_info->skb, wcid, key, in mt7921e_tx_prepare_skb()
|
| /linux/drivers/net/wireless/mediatek/mt76/mt7603/ |
| H A D | main.c | 69 mvif->sta.wcid.idx = idx; in mt7603_add_interface() 71 mt76_wcid_init(&mvif->sta.wcid, 0); in mt7603_add_interface() 77 mtxq->wcid = idx; in mt7603_add_interface() 78 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7603_add_interface() 92 int idx = msta->wcid.idx; in mt7603_remove_interface() 100 rcu_assign_pointer(dev->mt76.wcid[idx], NULL); in mt7603_remove_interface() 103 if (!list_empty(&msta->wcid.poll_list)) in mt7603_remove_interface() 104 list_del_init(&msta->wcid.poll_list); in mt7603_remove_interface() 111 mt76_wcid_cleanup(&dev->mt76, &mvif->sta.wcid); in mt7603_remove_interface() 340 INIT_LIST_HEAD(&msta->wcid.poll_list); in mt7603_sta_add() [all …]
|
| H A D | mac.c | 229 u32 addr = mt7603_wtbl1_addr(sta->wcid.idx); in mt7603_wtbl_set_smps() 242 int idx = sta->wcid.idx; in __mt7603_wtbl_set_ps() 360 int idx = msta->wcid.idx; in mt7603_wtbl_update_cap() 406 void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid, in mt7603_mac_tx_ba_reset() argument 409 u32 addr = mt7603_wtbl2_addr(wcid); in mt7603_mac_tx_ba_reset() 460 struct mt7603_sta, wcid.poll_list); in mt7603_mac_sta_poll() 461 list_del_init(&msta->wcid.poll_list); in mt7603_mac_sta_poll() 464 addr = mt7603_wtbl4_addr(msta->wcid.idx); in mt7603_mac_sta_poll() 478 mt7603_wtbl_update(dev, msta->wcid.idx, in mt7603_mac_sta_poll() 484 if (!msta->wcid.sta) in mt7603_mac_sta_poll() [all …]
|
| /linux/drivers/net/wireless/mediatek/mt76/mt7615/ |
| H A D | usb_sdio.c | 44 mt7663_usb_sdio_write_txwi(struct mt7615_dev *dev, struct mt76_wcid *wcid, in mt7663_usb_sdio_write_txwi() argument 52 mt7615_mac_write_txwi(dev, txwi, skb, wcid, sta, pid, key, qid, false); in mt7663_usb_sdio_write_txwi() 72 addr = mt7615_mac_wtbl_addr(dev, sta->wcid.idx); in mt7663_usb_sdio_set_rates() 106 FIELD_PREP(MT_WTBL_UPDATE_WLAN_IDX, sta->wcid.idx) | in mt7663_usb_sdio_set_rates() 122 if (!(sta->wcid.tx_info & MT_WCID_TX_INFO_SET)) in mt7663_usb_sdio_set_rates() 126 sta->wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7663_usb_sdio_set_rates() 177 mt76_tx_complete_skb(mdev, e->wcid, e->skb); in mt7663_usb_sdio_tx_complete_skb() 182 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7663_usb_sdio_tx_prepare_skb() argument 193 if (wcid && wcid->sta) in mt7663_usb_sdio_tx_prepare_skb() 194 msta = container_of(wcid, struct mt7615_sta, wcid); in mt7663_usb_sdio_tx_prepare_skb() [all …]
|
| H A D | main.c | 212 mvif->mt76.wcid = &mvif->sta.wcid; in mt7615_add_interface() 226 INIT_LIST_HEAD(&mvif->sta.wcid.poll_list); in mt7615_add_interface() 227 mvif->sta.wcid.idx = idx; in mt7615_add_interface() 228 mt76_wcid_init(&mvif->sta.wcid, mvif->mt76.band_idx); in mt7615_add_interface() 233 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7615_add_interface() 236 mtxq->wcid = idx; in mt7615_add_interface() 253 int idx = msta->wcid.idx; in mt7615_remove_interface() 264 mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid); in mt7615_remove_interface() 268 rcu_assign_pointer(dev->mt76.wcid[idx], NULL); in mt7615_remove_interface() 277 if (!list_empty(&msta->wcid.poll_list)) in mt7615_remove_interface() [all …]
|
| H A D | mac.c | 91 struct mt76_wcid *wcid; in mt7615_rx_get_wcid() local 93 wcid = mt76_wcid_ptr(dev, idx); in mt7615_rx_get_wcid() 94 if (unicast || !wcid) in mt7615_rx_get_wcid() 95 return wcid; in mt7615_rx_get_wcid() 97 if (!wcid->sta) in mt7615_rx_get_wcid() 100 sta = container_of(wcid, struct mt7615_sta, wcid); in mt7615_rx_get_wcid() 104 return &sta->vif->sta.wcid; in mt7615_rx_get_wcid() 253 struct mt7615_sta *msta = (struct mt7615_sta *)status->wcid; in mt7615_reverse_frag0_hdr_trans() 381 status->wcid = mt7615_rx_get_wcid(dev, idx, unicast); in mt7615_mac_fill_rx() 383 if (status->wcid) { in mt7615_mac_fill_rx() [all …]
|
| H A D | pci_mac.c | 61 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7615_tx_prepare_skb() argument 74 if (wcid && wcid->sta) in mt7615_tx_prepare_skb() 75 msta = container_of(wcid, struct mt7615_sta, wcid); in mt7615_tx_prepare_skb() 76 if (!wcid) in mt7615_tx_prepare_skb() 77 wcid = &dev->mt76.global_wcid; in mt7615_tx_prepare_skb() 99 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt7615_tx_prepare_skb() 100 mt7615_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, sta, in mt7615_tx_prepare_skb()
|
| /linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
| H A D | main.c | 214 if (!msta_link->wcid.sta) in mt7996_set_hw_key() 219 wcid_keyidx = &msta_link->wcid.hw_key_idx; in mt7996_set_hw_key() 228 wcid_keyidx = &msta_link->wcid.hw_key_idx2; in mt7996_set_hw_key() 259 mt76_wcid_key_setup(&dev->mt76, &msta_link->wcid, key); in mt7996_set_hw_key() 263 &msta_link->wcid, cmd); in mt7996_set_hw_key() 332 mlink->wcid = &msta_link->wcid; in mt7996_vif_link_add() 333 mlink->wcid->offchannel = mlink->offchannel; in mt7996_vif_link_add() 346 msta_link->wcid.idx = idx; in mt7996_vif_link_add() 347 msta_link->wcid.link_id = link_conf->link_id; in mt7996_vif_link_add() 348 msta_link->wcid.link_valid = ieee80211_vif_is_mld(vif); in mt7996_vif_link_add() [all …]
|
| H A D | mac.c | 22 struct mt76_wcid *wcid; in mt7996_rx_get_wcid() local 25 wcid = mt76_wcid_ptr(dev, idx); in mt7996_rx_get_wcid() 26 if (!wcid || !wcid->sta) in mt7996_rx_get_wcid() 32 if (wcid->phy_idx == band_idx) in mt7996_rx_get_wcid() 33 return wcid; in mt7996_rx_get_wcid() 35 msta_link = container_of(wcid, struct mt7996_sta_link, wcid); in mt7996_rx_get_wcid() 55 return &msta_link->wcid; in mt7996_rx_get_wcid() 67 u32 mt7996_mac_wtbl_lmac_addr(struct mt7996_dev *dev, u16 wcid, u8 dw) in mt7996_mac_wtbl_lmac_addr() argument 70 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7996_mac_wtbl_lmac_addr() 72 return MT_WTBL_LMAC_OFFS(wcid, dw); in mt7996_mac_wtbl_lmac_addr() [all …]
|
| /linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
| H A D | main.c | 236 mvif->mt76.wcid = &mvif->sta.wcid; in mt7915_add_interface() 256 mvif->sta.wcid.idx = idx; in mt7915_add_interface() 257 mvif->sta.wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7915_add_interface() 258 mt76_wcid_init(&mvif->sta.wcid, phy->mt76->band_idx); in mt7915_add_interface() 265 mtxq->wcid = idx; in mt7915_add_interface() 278 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7915_add_interface() 303 int idx = msta->wcid.idx; in mt7915_remove_interface() 317 rcu_assign_pointer(dev->mt76.wcid[idx], NULL); in mt7915_remove_interface() 322 mt76_wcid_mask_clear(dev->mt76.wcid_mask, mvif->sta.wcid.idx); in mt7915_remove_interface() 326 if (!list_empty(&msta->wcid.poll_list)) in mt7915_remove_interface() [all …]
|
| H A D | mac.c | 57 struct mt76_wcid *wcid; in mt7915_rx_get_wcid() local 59 wcid = mt76_wcid_ptr(dev, idx); in mt7915_rx_get_wcid() 60 if (unicast || !wcid) in mt7915_rx_get_wcid() 61 return wcid; in mt7915_rx_get_wcid() 63 if (!wcid->sta) in mt7915_rx_get_wcid() 66 sta = container_of(wcid, struct mt7915_sta, wcid); in mt7915_rx_get_wcid() 70 return &sta->vif->sta.wcid; in mt7915_rx_get_wcid() 82 u32 mt7915_mac_wtbl_lmac_addr(struct mt7915_dev *dev, u16 wcid, u8 dw) in mt7915_mac_wtbl_lmac_addr() argument 85 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7915_mac_wtbl_lmac_addr() 87 return MT_WTBL_LMAC_OFFS(wcid, dw); in mt7915_mac_wtbl_lmac_addr() [all …]
|