Lines Matching refs:wcid
1002 void mt76_wcid_key_setup(struct mt76_dev *dev, struct mt76_wcid *wcid, in mt76_wcid_key_setup() argument
1008 wcid->rx_check_pn = false; in mt76_wcid_key_setup()
1016 wcid->rx_check_pn = true; in mt76_wcid_key_setup()
1021 memcpy(wcid->rx_key_pn[i], seq.ccmp.pn, sizeof(seq.ccmp.pn)); in mt76_wcid_key_setup()
1026 memcpy(wcid->rx_key_pn[i], seq.ccmp.pn, sizeof(seq.ccmp.pn)); in mt76_wcid_key_setup()
1107 *sta = wcid_to_sta(mstat.wcid); in mt76_rx_convert()
1115 struct mt76_wcid *wcid = status->wcid; in mt76_check_ccmp_pn() local
1126 if (!wcid || !wcid->rx_check_pn) in mt76_check_ccmp_pn()
1155 BUILD_BUG_ON(sizeof(status->iv) != sizeof(wcid->rx_key_pn[0])); in mt76_check_ccmp_pn()
1156 ret = memcmp(status->iv, wcid->rx_key_pn[security_idx], in mt76_check_ccmp_pn()
1163 memcpy(wcid->rx_key_pn[security_idx], status->iv, sizeof(status->iv)); in mt76_check_ccmp_pn()
1173 struct mt76_wcid *wcid = status->wcid; in mt76_airtime_report() local
1191 if (!wcid || !wcid->sta) in mt76_airtime_report()
1194 sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv); in mt76_airtime_report()
1201 struct mt76_wcid *wcid; in mt76_airtime_flush_ampdu() local
1208 if (wcid_idx < ARRAY_SIZE(dev->wcid)) in mt76_airtime_flush_ampdu()
1209 wcid = rcu_dereference(dev->wcid[wcid_idx]); in mt76_airtime_flush_ampdu()
1211 wcid = NULL; in mt76_airtime_flush_ampdu()
1212 dev->rx_ampdu_status.wcid = wcid; in mt76_airtime_flush_ampdu()
1224 struct mt76_wcid *wcid = status->wcid; in mt76_airtime_check() local
1229 if (!wcid || !wcid->sta) { in mt76_airtime_check()
1238 wcid = NULL; in mt76_airtime_check()
1249 dev->rx_ampdu_status.wcid_idx = wcid ? wcid->idx : 0xff; in mt76_airtime_check()
1267 struct mt76_wcid *wcid = status->wcid; in mt76_check_sta() local
1272 if (ieee80211_is_pspoll(hdr->frame_control) && !wcid && in mt76_check_sta()
1276 wcid = status->wcid = (struct mt76_wcid *)sta->drv_priv; in mt76_check_sta()
1281 if (!wcid || !wcid->sta) in mt76_check_sta()
1284 sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv); in mt76_check_sta()
1287 ewma_signal_add(&wcid->rssi, -status->signal); in mt76_check_sta()
1289 wcid->inactive_count = 0; in mt76_check_sta()
1294 if (!test_bit(MT_WCID_FLAG_CHECK_PS, &wcid->flags)) in mt76_check_sta()
1313 if (!!test_bit(MT_WCID_FLAG_PS, &wcid->flags) == ps) in mt76_check_sta()
1317 set_bit(MT_WCID_FLAG_PS, &wcid->flags); in mt76_check_sta()
1323 clear_bit(MT_WCID_FLAG_PS, &wcid->flags); in mt76_check_sta()
1392 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; in mt76_sta_add() local
1410 mtxq->wcid = wcid->idx; in mt76_sta_add()
1413 ewma_signal_init(&wcid->rssi); in mt76_sta_add()
1415 mt76_wcid_mask_set(dev->wcid_phy_mask, wcid->idx); in mt76_sta_add()
1416 wcid->phy_idx = phy->band_idx; in mt76_sta_add()
1417 rcu_assign_pointer(dev->wcid[wcid->idx], wcid); in mt76_sta_add()
1419 mt76_wcid_init(wcid); in mt76_sta_add()
1429 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; in __mt76_sta_remove() local
1430 int i, idx = wcid->idx; in __mt76_sta_remove()
1432 for (i = 0; i < ARRAY_SIZE(wcid->aggr); i++) in __mt76_sta_remove()
1433 mt76_rx_aggr_stop(dev, wcid, i); in __mt76_sta_remove()
1438 mt76_wcid_cleanup(dev, wcid); in __mt76_sta_remove()
1484 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv; in mt76_sta_pre_rcu_remove() local
1488 rcu_assign_pointer(dev->wcid[wcid->idx], NULL); in mt76_sta_pre_rcu_remove()
1494 void mt76_wcid_init(struct mt76_wcid *wcid) in mt76_wcid_init() argument
1496 INIT_LIST_HEAD(&wcid->tx_list); in mt76_wcid_init()
1497 skb_queue_head_init(&wcid->tx_pending); in mt76_wcid_init()
1499 INIT_LIST_HEAD(&wcid->list); in mt76_wcid_init()
1500 idr_init(&wcid->pktid); in mt76_wcid_init()
1504 void mt76_wcid_cleanup(struct mt76_dev *dev, struct mt76_wcid *wcid) in mt76_wcid_cleanup() argument
1506 struct mt76_phy *phy = mt76_dev_phy(dev, wcid->phy_idx); in mt76_wcid_cleanup()
1512 mt76_tx_status_skb_get(dev, wcid, -1, &list); in mt76_wcid_cleanup()
1515 idr_destroy(&wcid->pktid); in mt76_wcid_cleanup()
1519 if (!list_empty(&wcid->tx_list)) in mt76_wcid_cleanup()
1520 list_del_init(&wcid->tx_list); in mt76_wcid_cleanup()
1522 spin_lock(&wcid->tx_pending.lock); in mt76_wcid_cleanup()
1523 skb_queue_splice_tail_init(&wcid->tx_pending, &list); in mt76_wcid_cleanup()
1524 spin_unlock(&wcid->tx_pending.lock); in mt76_wcid_cleanup()