/drivers/net/wireless/mediatek/mt76/ |
D | tx.c | 64 struct mt76_wcid *wcid; in mt76_tx_status_unlock() local 66 wcid = rcu_dereference(dev->wcid[cb->wcid]); in mt76_tx_status_unlock() 67 if (wcid) in mt76_tx_status_unlock() 68 status.sta = wcid_to_sta(wcid); in mt76_tx_status_unlock() 114 mt76_tx_status_skb_add(struct mt76_dev *dev, struct mt76_wcid *wcid, in mt76_tx_status_skb_add() argument 121 if (!wcid) in mt76_tx_status_skb_add() 134 pid = mt76_get_next_pkt_id(wcid); in mt76_tx_status_skb_add() 135 cb->wcid = wcid->idx; in mt76_tx_status_skb_add() 147 mt76_tx_status_skb_get(struct mt76_dev *dev, struct mt76_wcid *wcid, int pktid, in mt76_tx_status_skb_get() argument 155 if (wcid && cb->wcid != wcid->idx) in mt76_tx_status_skb_get() [all …]
|
D | mt76_connac_mac.c | 56 struct mt76_wcid *wcid) in mt76_connac_free_pending_tx_skbs() argument 62 if (wcid && pm->tx_q[i].wcid != wcid) in mt76_connac_free_pending_tx_skbs() 74 struct mt76_wcid *wcid, in mt76_connac_pm_queue_skb() argument 83 pm->tx_q[qid].wcid = wcid; in mt76_connac_pm_queue_skb() 100 struct mt76_wcid *wcid = pm->tx_q[i].wcid; in mt76_connac_pm_dequeue_skbs() local 106 if (wcid && wcid->sta) in mt76_connac_pm_dequeue_skbs() 107 sta = container_of((void *)wcid, struct ieee80211_sta, in mt76_connac_pm_dequeue_skbs() 110 mt76_tx(phy, sta, wcid, pm->tx_q[i].skb); in mt76_connac_pm_dequeue_skbs()
|
D | mac80211.c | 767 void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid, in mt76_wcid_key_setup() argument 773 wcid->rx_check_pn = false; in mt76_wcid_key_setup() 781 wcid->rx_check_pn = true; in mt76_wcid_key_setup() 784 memcpy(wcid->rx_key_pn[i], seq.ccmp.pn, sizeof(seq.ccmp.pn)); in mt76_wcid_key_setup() 823 *sta = wcid_to_sta(mstat.wcid); in mt76_rx_convert() 831 struct mt76_wcid *wcid = status->wcid; in mt76_check_ccmp_pn() local 839 if (!wcid || !wcid->rx_check_pn) in mt76_check_ccmp_pn() 853 BUILD_BUG_ON(sizeof(status->iv) != sizeof(wcid->rx_key_pn[0])); in mt76_check_ccmp_pn() 854 ret = memcmp(status->iv, wcid->rx_key_pn[tidno], in mt76_check_ccmp_pn() 859 memcpy(wcid->rx_key_pn[tidno], status->iv, sizeof(status->iv)); in mt76_check_ccmp_pn() [all …]
|
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()
|
D | mt76x02_util.c | 252 msta->wcid.sta = 1; in mt76x02_sta_add() 253 msta->wcid.idx = idx; in mt76x02_sta_add() 254 msta->wcid.hw_key_idx = -1; in mt76x02_sta_add() 260 set_bit(MT_WCID_FLAG_CHECK_PS, &msta->wcid.flags); in mt76x02_sta_add() 270 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; in mt76x02_sta_remove() local 271 int idx = wcid->idx; in mt76x02_sta_remove() 291 rcu_assign_pointer(dev->mt76.wcid[MT_VIF_WCID(idx)], &mvif->group_wcid); in mt76x02_vif_init() 292 mtxq->wcid = MT_VIF_WCID(idx); in mt76x02_vif_init() 345 rcu_assign_pointer(dev->mt76.wcid[mvif->group_wcid.idx], NULL); in mt76x02_remove_interface() 370 mt76_rx_aggr_start(&dev->mt76, &msta->wcid, tid, in mt76x02_ampdu_action() [all …]
|
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)
|
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() 177 tid = rcu_dereference(wcid->aggr[tidno]); in mt76_rx_aggr_reorder() 243 int mt76_rx_aggr_start(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno, in mt76_rx_aggr_start() argument 248 mt76_rx_aggr_stop(dev, wcid, tidno); in mt76_rx_aggr_start() 261 rcu_assign_pointer(wcid->aggr[tidno], tid); in mt76_rx_aggr_start() 291 void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno) in mt76_rx_aggr_stop() argument 295 tid = rcu_replace_pointer(wcid->aggr[tidno], tid, in mt76_rx_aggr_stop()
|
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 …]
|
D | util.c | 69 struct mt76_wcid *wcid; in mt76_get_min_avg_rssi() local 90 wcid = rcu_dereference(dev->wcid[j]); in mt76_get_min_avg_rssi() 91 if (!wcid) in mt76_get_min_avg_rssi() 95 if (wcid->inactive_count++ < 5) in mt76_get_min_avg_rssi() 96 cur_rssi = -ewma_signal_read(&wcid->rssi); in mt76_get_min_avg_rssi()
|
D | mt76.h | 131 u16 wcid; member 199 struct mt76_wcid *wcid, struct ieee80211_sta *sta); 266 u16 wcid; member 313 u16 wcid; member 359 enum mt76_txq_id qid, struct mt76_wcid *wcid, 518 struct mt76_wcid *wcid; member 695 struct mt76_wcid __rcu *wcid[MT76_N_WCIDS]; member 810 mt76_wcid_hw(struct mt76_dev *dev, u16 wcid) in mt76_wcid_hw() argument 812 if (wcid <= MT76_N_WCIDS && in mt76_wcid_hw() 813 mt76_wcid_mask_test(dev->wcid_phy_mask, wcid)) in mt76_wcid_hw() [all …]
|
D | mt76x02.h | 181 enum mt76_txq_id qid, struct mt76_wcid *wcid, 247 struct mt76_wcid *wcid; in mt76x02_rx_get_sta() local 252 wcid = rcu_dereference(dev->wcid[idx]); in mt76x02_rx_get_sta() 253 if (!wcid) in mt76x02_rx_get_sta() 256 return container_of(wcid, struct mt76x02_sta, wcid); in mt76x02_rx_get_sta() 266 return &sta->wcid; in mt76x02_rx_get_sta_wcid()
|
D | mt76x02_mmio.c | 371 struct mt76_wcid *wcid; in mt76x02_key_sync() local 376 wcid = (struct mt76_wcid *)sta->drv_priv; in mt76x02_key_sync() 378 if (wcid->hw_key_idx != key->keyidx || wcid->sw_iv) in mt76x02_key_sync() 381 mt76x02_mac_wcid_sync_pn(dev, wcid->idx, key); in mt76x02_key_sync() 400 struct mt76_wcid *wcid; in mt76x02_reset_state() local 403 wcid = rcu_dereference_protected(dev->mt76.wcid[i], in mt76x02_reset_state() 405 if (!wcid) in mt76x02_reset_state() 408 rcu_assign_pointer(dev->mt76.wcid[i], NULL); in mt76x02_reset_state() 410 priv = msta = container_of(wcid, struct mt76x02_sta, wcid); in mt76x02_reset_state()
|
/drivers/net/wireless/mediatek/mt7601u/ |
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 …]
|
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 …]
|
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()
|
/drivers/net/wireless/mediatek/mt76/mt7603/ |
D | main.c | 70 mvif->sta.wcid.idx = idx; in mt7603_add_interface() 71 mvif->sta.wcid.hw_key_idx = -1; 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() 337 msta->wcid.sta = 1; in mt7603_sta_add() 338 msta->wcid.idx = idx; in mt7603_sta_add() 343 set_bit(MT_WCID_FLAG_CHECK_PS, &msta->wcid.flags); in mt7603_sta_add() 363 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; in mt7603_sta_remove() local [all …]
|
D | mac.c | 217 u32 addr = mt7603_wtbl1_addr(sta->wcid.idx); in mt7603_wtbl_set_smps() 229 int idx = sta->wcid.idx; in mt7603_wtbl_set_ps() 321 int idx = msta->wcid.idx; in mt7603_wtbl_update_cap() 365 void mt7603_mac_tx_ba_reset(struct mt7603_dev *dev, int wcid, int tid, in mt7603_mac_tx_ba_reset() argument 368 u32 addr = mt7603_wtbl2_addr(wcid); in mt7603_mac_tx_ba_reset() 423 addr = mt7603_wtbl4_addr(msta->wcid.idx); in mt7603_mac_sta_poll() 437 mt7603_wtbl_update(dev, msta->wcid.idx, in mt7603_mac_sta_poll() 443 if (!msta->wcid.sta) in mt7603_mac_sta_poll() 474 struct mt76_wcid *wcid; in mt7603_rx_get_wcid() local 479 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7603_rx_get_wcid() [all …]
|
/drivers/net/wireless/mediatek/mt76/mt7615/ |
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 53 if (!wcid) in mt7663_usb_sdio_write_txwi() 54 wcid = &dev->mt76.global_wcid; in mt7663_usb_sdio_write_txwi() 56 pid = mt76_tx_status_skb_add(&dev->mt76, wcid, skb); in mt7663_usb_sdio_write_txwi() 60 mt7615_mac_write_txwi(dev, txwi, skb, wcid, sta, pid, key, false); in mt7663_usb_sdio_write_txwi() 80 addr = mt7615_mac_wtbl_addr(dev, sta->wcid.idx); in mt7663_usb_sdio_set_rates() 114 FIELD_PREP(MT_WTBL_UPDATE_WLAN_IDX, sta->wcid.idx) | in mt7663_usb_sdio_set_rates() 130 if (!(sta->wcid.tx_info & MT_WCID_TX_INFO_SET)) in mt7663_usb_sdio_set_rates() 134 sta->wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7663_usb_sdio_set_rates() 185 mt76_tx_complete_skb(mdev, e->wcid, e->skb); in mt7663_usb_sdio_tx_complete_skb() [all …]
|
D | main.c | 229 mvif->sta.wcid.idx = idx; in mt7615_add_interface() 230 mvif->sta.wcid.ext_phy = mvif->mt76.band_idx; in mt7615_add_interface() 231 mvif->sta.wcid.hw_key_idx = -1; in mt7615_add_interface() 235 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7615_add_interface() 238 mtxq->wcid = idx; in mt7615_add_interface() 255 int idx = msta->wcid.idx; in mt7615_remove_interface() 266 mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid); in mt7615_remove_interface() 270 rcu_assign_pointer(dev->mt76.wcid[idx], NULL); in mt7615_remove_interface() 371 struct mt76_wcid *wcid = &msta->wcid; in mt7615_set_key() local 373 u8 *wcid_keyidx = &wcid->hw_key_idx; in mt7615_set_key() [all …]
|
D | mac.c | 91 struct mt76_wcid *wcid; in mt7615_rx_get_wcid() local 96 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7615_rx_get_wcid() 97 if (unicast || !wcid) in mt7615_rx_get_wcid() 98 return wcid; in mt7615_rx_get_wcid() 100 if (!wcid->sta) in mt7615_rx_get_wcid() 103 sta = container_of(wcid, struct mt7615_sta, wcid); in mt7615_rx_get_wcid() 107 return &sta->vif->sta.wcid; in mt7615_rx_get_wcid() 299 status->wcid = mt7615_rx_get_wcid(dev, idx, unicast); in mt7615_mac_fill_rx() 301 if (status->wcid) { in mt7615_mac_fill_rx() 304 msta = container_of(status->wcid, struct mt7615_sta, wcid); in mt7615_mac_fill_rx() [all …]
|
D | pci_mac.c | 45 mt76_tx_complete_skb(mdev, e->wcid, e->skb); in mt7615_tx_complete_skb() 129 enum mt76_txq_id qid, struct mt76_wcid *wcid, in mt7615_tx_prepare_skb() argument 142 msta = wcid ? container_of(wcid, struct mt7615_sta, wcid) : NULL; in mt7615_tx_prepare_skb() 143 if (!wcid) in mt7615_tx_prepare_skb() 144 wcid = &dev->mt76.global_wcid; in mt7615_tx_prepare_skb() 146 pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb); in mt7615_tx_prepare_skb() 167 mt7615_mac_write_txwi(dev, txwi_ptr, tx_info->skb, wcid, sta, in mt7615_tx_prepare_skb()
|
/drivers/net/wireless/mediatek/mt76/mt7921/ |
D | main.c | 262 ret = mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, in mt7921_add_interface() 274 mvif->sta.wcid.idx = idx; in mt7921_add_interface() 275 mvif->sta.wcid.ext_phy = mvif->mt76.band_idx; in mt7921_add_interface() 276 mvif->sta.wcid.hw_key_idx = -1; in mt7921_add_interface() 277 mvif->sta.wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7921_add_interface() 283 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7921_add_interface() 286 mtxq->wcid = idx; in mt7921_add_interface() 302 int idx = msta->wcid.idx; in mt7921_remove_interface() 308 mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->wcid); in mt7921_remove_interface() 309 mt76_connac_mcu_uni_add_dev(&dev->mphy, vif, &mvif->sta.wcid, false); in mt7921_remove_interface() [all …]
|
D | mac.c | 20 struct mt76_wcid *wcid; in mt7921_rx_get_wcid() local 22 if (idx >= ARRAY_SIZE(dev->mt76.wcid)) in mt7921_rx_get_wcid() 25 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7921_rx_get_wcid() 26 if (unicast || !wcid) in mt7921_rx_get_wcid() 27 return wcid; in mt7921_rx_get_wcid() 29 if (!wcid->sta) in mt7921_rx_get_wcid() 32 sta = container_of(wcid, struct mt7921_sta, wcid); in mt7921_rx_get_wcid() 36 return &sta->vif->sta.wcid; in mt7921_rx_get_wcid() 87 idx = msta->wcid.idx; in mt7921_mac_sta_poll() 112 if (!msta->wcid.sta) in mt7921_mac_sta_poll() [all …]
|
/drivers/net/wireless/mediatek/mt76/mt7915/ |
D | mac.c | 59 struct mt76_wcid *wcid; in mt7915_rx_get_wcid() local 61 if (idx >= ARRAY_SIZE(dev->mt76.wcid)) in mt7915_rx_get_wcid() 64 wcid = rcu_dereference(dev->mt76.wcid[idx]); in mt7915_rx_get_wcid() 65 if (unicast || !wcid) in mt7915_rx_get_wcid() 66 return wcid; in mt7915_rx_get_wcid() 68 if (!wcid->sta) in mt7915_rx_get_wcid() 71 sta = container_of(wcid, struct mt7915_sta, wcid); in mt7915_rx_get_wcid() 75 return &sta->vif->sta.wcid; in mt7915_rx_get_wcid() 91 static u32 mt7915_mac_wtbl_lmac_addr(struct mt7915_dev *dev, u16 wcid) in mt7915_mac_wtbl_lmac_addr() argument 94 FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7))); in mt7915_mac_wtbl_lmac_addr() [all …]
|
D | main.c | 236 mvif->sta.wcid.idx = idx; in mt7915_add_interface() 237 mvif->sta.wcid.ext_phy = mvif->band_idx; in mt7915_add_interface() 238 mvif->sta.wcid.hw_key_idx = -1; in mt7915_add_interface() 239 mvif->sta.wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7915_add_interface() 243 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid); in mt7915_add_interface() 246 mtxq->wcid = idx; in mt7915_add_interface() 269 int idx = msta->wcid.idx; in mt7915_remove_interface() 283 rcu_assign_pointer(dev->mt76.wcid[idx], NULL); in mt7915_remove_interface() 368 struct mt76_wcid *wcid = &msta->wcid; in mt7915_set_key() local 369 u8 *wcid_keyidx = &wcid->hw_key_idx; in mt7915_set_key() [all …]
|