/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()
|
H A D | mac.h | 16 u8 wcid; member 114 u8 wcid; member 159 void mt76_mac_wcid_set_rate(struct mt7601u_dev *dev, struct mt76_wcid *wcid,
|
H A D | mt7601u.h | 174 struct mt76_wcid __rcu *wcid[N_WCIDS]; member 268 struct mt76_wcid wcid; member 391 struct mt76_wcid *wcid, int hw_q);
|
/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | mt76x02_txrx.c | 17 struct mt76_wcid *wcid = &dev->mt76.global_wcid; in mt76x02_tx() local 23 wcid = &msta->wcid; in mt76x02_tx() 28 wcid = &mvif->group_wcid; in mt76x02_tx() 31 mt76_tx(&dev->mphy, control->sta, wcid, skb); in mt76x02_tx() 138 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt76x02_tx_prepare_skb() argument 148 if (qid == MT_TXQ_PSD && wcid && wcid->idx < 128) in mt76x02_tx_prepare_skb() 149 mt76x02_mac_wcid_set_drop(dev, wcid->idx, false); in mt76x02_tx_prepare_skb() 153 mt76x02_mac_write_txwi(dev, txwi, tx_info->skb, wcid, sta, len); in mt76x02_tx_prepare_skb() 155 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt76x02_tx_prepare_skb() 172 if (!wcid || wcid->hw_key_idx == 0xff || wcid->sw_iv) in mt76x02_tx_prepare_skb()
|
H A D | trace.h | 27 #define TXID_ENTRY __field(u8, wcid) __field(u8, pktid) 28 #define TXID_ASSIGN __entry->wcid = wcid; __entry->pktid = pktid 30 #define TXID_PR_ARG __entry->wcid, __entry->pktid 83 TP_PROTO(struct mt76_dev *dev, u8 wcid, u8 pktid), 84 TP_ARGS(dev, wcid, pktid), 100 TP_PROTO(struct mt76_dev *dev, u8 wcid, u8 pktid), 101 TP_ARGS(dev, wcid, pktid)
|
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 tid = rcu_dereference(wcid->aggr[tidno]); in mt76_rx_aggr_reorder() 242 int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno, in mt76_rx_aggr_start() argument 247 mt76_rx_aggr_stop(dev, wcid, tidno); in mt76_rx_aggr_start() 260 rcu_assign_pointer(wcid->aggr[tidno], tid); in mt76_rx_aggr_start() 290 void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno) in mt76_rx_aggr_stop() argument 294 tid = rcu_replace_pointer(wcid->aggr[tidno], tid, in mt76_rx_aggr_stop()
|
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 …]
|
H A D | mt76x02_usb_core.c | 21 mt76_tx_complete_skb(mdev, e->wcid, e->skb); in mt76x02u_tx_complete_skb() 65 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt76x02u_tx_prepare_skb() argument 80 mt76x02_mac_write_txwi(dev, txwi, tx_info->skb, wcid, sta, len); in mt76x02u_tx_prepare_skb() 83 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt76x02u_tx_prepare_skb() 101 if (!wcid || wcid->hw_key_idx == 0xff || wcid->sw_iv) in mt76x02u_tx_prepare_skb() 111 if (err && wcid) in mt76x02u_tx_prepare_skb() 113 idr_remove(&wcid->pktid, pid); in mt76x02u_tx_prepare_skb()
|
H A D | mt76x02.h | 197 enum mt76_txq_id qid, struct mt76_wcid *wcid, 263 struct mt76_wcid *wcid; in mt76x02_rx_get_sta() local 268 wcid = rcu_dereference(dev->wcid[idx]); in mt76x02_rx_get_sta() 269 if (!wcid) in mt76x02_rx_get_sta() 272 return container_of(wcid, struct mt76x02_sta, wcid); in mt76x02_rx_get_sta() 282 return &sta->wcid; in mt76x02_rx_get_sta_wcid()
|
H A D | mt76x02_trace.h | 22 #define TXID_ENTRY __field(u8, wcid) __field(u8, pktid) 24 #define TXID_PR_ARG __entry->wcid, __entry->pktid 64 __entry->wcid = stat->wcid;
|
H A D | mt76x02_mmio.c | 381 struct mt76_wcid *wcid; in mt76x02_key_sync() local 386 wcid = (struct mt76_wcid *)sta->drv_priv; in mt76x02_key_sync() 388 if (wcid->hw_key_idx != key->keyidx || wcid->sw_iv) in mt76x02_key_sync() 391 mt76x02_mac_wcid_sync_pn(dev, wcid->idx, key); in mt76x02_key_sync() 410 struct mt76_wcid *wcid; in mt76x02_reset_state() local 413 wcid = rcu_dereference_protected(dev->mt76.wcid[i], in mt76x02_reset_state() 415 if (!wcid) in mt76x02_reset_state() 418 rcu_assign_pointer(dev->mt76.wcid[i], NULL); in mt76x02_reset_state() 420 priv = msta = container_of(wcid, struct mt76x02_sta, wcid); in mt76x02_reset_state()
|
H A D | mt76x02_mac.h | 17 u8 wcid; member 37 struct mt76_wcid wcid; /* must be first */ member 139 u8 wcid; member 181 void mt76x02_mac_wcid_set_rate(struct mt76x02_dev *dev, struct mt76_wcid *wcid, 194 struct sk_buff *skb, struct mt76_wcid *wcid,
|
H A D | mt76x02_usb.h | 19 enum mt76_txq_id qid, struct mt76_wcid *wcid,
|
/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 msta = wcid ? container_of(wcid, struct mt7615_sta, wcid) : NULL; in mt7663_usb_sdio_tx_prepare_skb() 194 if (!wcid) in mt7663_usb_sdio_tx_prepare_skb() [all …]
|
H A D | pci_mac.c | 61 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7615_tx_prepare_skb() argument 74 msta = wcid ? container_of(wcid, struct mt7615_sta, wcid) : NULL; in mt7615_tx_prepare_skb() 75 if (!wcid) in mt7615_tx_prepare_skb() 76 wcid = &dev->mt76.global_wcid; in mt7615_tx_prepare_skb() 98 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt7615_tx_prepare_skb() 99 mt7615_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, sta, in mt7615_tx_prepare_skb()
|
/linux/drivers/net/wireless/mediatek/mt76/mt7603/ |
H A D | mac.c | 229 u32 addr = mt7603_wtbl1_addr(sta->wcid.idx); in mt7603_wtbl_set_smps() 241 int idx = sta->wcid.idx; in mt7603_wtbl_set_ps() 333 int idx = msta->wcid.idx; in mt7603_wtbl_update_cap() 379 void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid, in mt7603_mac_tx_ba_reset() argument 382 u32 addr = mt7603_wtbl2_addr(wcid); in mt7603_mac_tx_ba_reset() 433 struct mt7603_sta, wcid.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() 451 mt7603_wtbl_update(dev, msta->wcid.idx, in mt7603_mac_sta_poll() 457 if (!msta->wcid.sta) in mt7603_mac_sta_poll() [all …]
|
H A D | dma.c | 31 struct mt76_wcid *wcid; in mt7603_rx_loopback_skb() local 47 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7603_rx_loopback_skb() 48 if (!wcid) in mt7603_rx_loopback_skb() 51 priv = msta = container_of(wcid, struct mt7603_sta, wcid); in mt7603_rx_loopback_skb()
|
H A D | mt7603.h | 63 struct mt76_wcid wcid; /* must be first */ member 210 void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid, 228 int mt7603_wtbl_set_key(struct mt7603_dev *dev, int wcid, 237 enum mt76_txq_id qid, struct mt76_wcid *wcid,
|
/linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
H A D | mac.c | 59 struct mt76_wcid *wcid; in mt7996_rx_get_wcid() local 61 if (idx >= ARRAY_SIZE(dev->mt76.wcid)) in mt7996_rx_get_wcid() 64 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7996_rx_get_wcid() 65 if (unicast || !wcid) in mt7996_rx_get_wcid() 66 return wcid; in mt7996_rx_get_wcid() 68 if (!wcid->sta) in mt7996_rx_get_wcid() 71 sta = container_of(wcid, struct mt7996_sta, wcid); in mt7996_rx_get_wcid() 75 return &sta->vif->deflink.sta.wcid; in mt7996_rx_get_wcid() 87 u32 mt7996_mac_wtbl_lmac_addr(struct mt7996_dev *dev, u16 wcid, u8 dw) in mt7996_mac_wtbl_lmac_addr() argument 90 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7996_mac_wtbl_lmac_addr() [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | mac.c | 57 struct mt76_wcid *wcid; in mt7915_rx_get_wcid() local 59 if (idx >= ARRAY_SIZE(dev->mt76.wcid)) in mt7915_rx_get_wcid() 62 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7915_rx_get_wcid() 63 if (unicast || !wcid) in mt7915_rx_get_wcid() 64 return wcid; in mt7915_rx_get_wcid() 66 if (!wcid->sta) in mt7915_rx_get_wcid() 69 sta = container_of(wcid, struct mt7915_sta, wcid); in mt7915_rx_get_wcid() 73 return &sta->vif->sta.wcid; in mt7915_rx_get_wcid() 85 u32 mt7915_mac_wtbl_lmac_addr(struct mt7915_dev *dev, u16 wcid, u8 dw) in mt7915_mac_wtbl_lmac_addr() argument 88 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7915_mac_wtbl_lmac_addr() [all …]
|
/linux/drivers/net/wireless/mediatek/mt76/mt7925/ |
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 18 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7925_mac_wtbl_lmac_addr() 20 return MT_WTBL_LMAC_OFFS(wcid, dw); in mt7925_mac_wtbl_lmac_addr()
|
H A D | pci_mac.c | 9 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7925e_tx_prepare_skb() argument 24 if (!wcid) in mt7925e_tx_prepare_skb() 25 wcid = &dev->mt76.global_wcid; in mt7925e_tx_prepare_skb() 43 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt7925e_tx_prepare_skb() 44 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 | 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()
|