Lines Matching refs:avp
160 struct ath_vif *avp; in ath_is_go_chanctx_present() local
169 list_for_each_entry(avp, &ctx->vifs, list) { in ath_is_go_chanctx_present()
170 vif = avp->vif; in ath_is_go_chanctx_present()
251 struct ath_vif *avp; in ath_chanctx_check_active() local
280 list_for_each_entry(avp, &ctx->vifs, list) { in ath_chanctx_check_active()
281 struct ieee80211_vif *vif = avp->vif; in ath_chanctx_check_active()
286 if (avp->assoc) in ath_chanctx_check_active()
391 struct ath_vif *avp) in ath_chanctx_handle_bmiss() argument
400 avp->noa_duration = 0; in ath_chanctx_handle_bmiss()
409 avp->noa_duration = 0; in ath_chanctx_handle_bmiss()
416 struct ath_vif *avp, in ath_chanctx_offchannel_noa() argument
421 avp->noa_index++; in ath_chanctx_offchannel_noa()
422 avp->offchannel_start = tsf_time; in ath_chanctx_offchannel_noa()
423 avp->offchannel_duration = sc->sched.offchannel_duration; in ath_chanctx_offchannel_noa()
427 avp->offchannel_duration, in ath_chanctx_offchannel_noa()
428 avp->offchannel_start, in ath_chanctx_offchannel_noa()
429 avp->noa_index); in ath_chanctx_offchannel_noa()
436 if (ctx->active && avp->noa_duration) in ath_chanctx_offchannel_noa()
437 avp->noa_duration = 0; in ath_chanctx_offchannel_noa()
441 struct ath_vif *avp, in ath_chanctx_set_periodic_noa() argument
448 avp->noa_index++; in ath_chanctx_set_periodic_noa()
449 avp->noa_start = tsf_time; in ath_chanctx_set_periodic_noa()
452 avp->noa_duration = (3 * beacon_int / 2) + in ath_chanctx_set_periodic_noa()
455 avp->noa_duration = in ath_chanctx_set_periodic_noa()
461 avp->periodic_noa = false; in ath_chanctx_set_periodic_noa()
463 avp->periodic_noa = true; in ath_chanctx_set_periodic_noa()
467 avp->noa_duration, in ath_chanctx_set_periodic_noa()
468 avp->noa_start, in ath_chanctx_set_periodic_noa()
469 avp->noa_index, in ath_chanctx_set_periodic_noa()
470 avp->periodic_noa); in ath_chanctx_set_periodic_noa()
474 struct ath_vif *avp, in ath_chanctx_set_oneshot_noa() argument
480 avp->noa_index++; in ath_chanctx_set_oneshot_noa()
481 avp->noa_start = tsf_time; in ath_chanctx_set_oneshot_noa()
482 avp->periodic_noa = false; in ath_chanctx_set_oneshot_noa()
483 avp->oneshot_noa = true; in ath_chanctx_set_oneshot_noa()
484 avp->noa_duration = duration + sc->sched.channel_switch_time; in ath_chanctx_set_oneshot_noa()
488 avp->noa_duration, in ath_chanctx_set_oneshot_noa()
489 avp->noa_start, in ath_chanctx_set_oneshot_noa()
490 avp->noa_index, in ath_chanctx_set_oneshot_noa()
491 avp->periodic_noa); in ath_chanctx_set_oneshot_noa()
500 struct ath_vif *avp = NULL; in ath_chanctx_event() local
506 avp = (struct ath_vif *) vif->drv_priv; in ath_chanctx_event()
518 if (avp->offchannel_duration) in ath_chanctx_event()
519 avp->offchannel_duration = 0; in ath_chanctx_event()
521 if (avp->oneshot_noa) { in ath_chanctx_event()
522 avp->noa_duration = 0; in ath_chanctx_event()
523 avp->oneshot_noa = false; in ath_chanctx_event()
529 if (avp->chanctx != sc->cur_chan) { in ath_chanctx_event()
567 if (!ctx->active && avp->noa_duration && in ath_chanctx_event()
569 avp->noa_duration = 0; in ath_chanctx_event()
570 avp->periodic_noa = false; in ath_chanctx_event()
598 ath_chanctx_offchannel_noa(sc, ctx, avp, tsf_time); in ath_chanctx_event()
602 ath_chanctx_handle_bmiss(sc, ctx, avp); in ath_chanctx_event()
611 ath_chanctx_set_oneshot_noa(sc, avp, tsf_time, in ath_chanctx_event()
617 if (avp->noa_duration && tsf_time - avp->noa_start > BIT(30)) in ath_chanctx_event()
618 avp->noa_duration = 0; in ath_chanctx_event()
626 (!avp->noa_duration || sc->sched.force_noa_update)) in ath_chanctx_event()
627 ath_chanctx_set_periodic_noa(sc, avp, cur_conf, in ath_chanctx_event()
702 avp->chanctx != sc->cur_chan) in ath_chanctx_event()
1101 ath_chanctx_send_vif_ps_frame(struct ath_softc *sc, struct ath_vif *avp, in ath_chanctx_send_vif_ps_frame() argument
1104 struct ieee80211_vif *vif = avp->vif; in ath_chanctx_send_vif_ps_frame()
1113 if (!avp->assoc) in ath_chanctx_send_vif_ps_frame()
1150 struct ath_vif *avp; in ath_chanctx_send_ps_frame() local
1154 list_for_each_entry(avp, &sc->cur_chan->vifs, list) { in ath_chanctx_send_ps_frame()
1155 if (ath_chanctx_send_vif_ps_frame(sc, avp, powersave)) in ath_chanctx_send_ps_frame()
1426 static void ath9k_update_p2p_ps_timer(struct ath_softc *sc, struct ath_vif *avp) in ath9k_update_p2p_ps_timer() argument
1432 if (!avp || !avp->noa.has_next_tsf) in ath9k_update_p2p_ps_timer()
1439 target_tsf = avp->noa.next_tsf; in ath9k_update_p2p_ps_timer()
1440 if (!avp->noa.absent) in ath9k_update_p2p_ps_timer()
1449 __func__, avp->noa.absent, tsf, target_tsf, in ath9k_update_p2p_ps_timer()
1457 struct ath_vif *avp = (void *)vif->drv_priv; in ath9k_update_p2p_ps() local
1466 sc->p2p_ps_vif = avp; in ath9k_update_p2p_ps()
1472 ieee80211_parse_p2p_noa(&vif->bss_conf.p2p_noa_attr, &avp->noa, tsf); in ath9k_update_p2p_ps()
1473 ath9k_update_p2p_ps_timer(sc, avp); in ath9k_update_p2p_ps()
1476 static u8 ath9k_get_ctwin(struct ath_softc *sc, struct ath_vif *avp) in ath9k_get_ctwin() argument
1490 ctwin = avp->vif->bss_conf.p2p_noa_attr.oppps_ctwindow; in ath9k_get_ctwin()
1500 void ath9k_beacon_add_noa(struct ath_softc *sc, struct ath_vif *avp, in ath9k_beacon_add_noa() argument
1517 if (!avp->offchannel_duration && !avp->noa_duration) in ath9k_beacon_add_noa()
1520 noa_desc = !!avp->offchannel_duration + !!avp->noa_duration; in ath9k_beacon_add_noa()
1529 noa->index = avp->noa_index; in ath9k_beacon_add_noa()
1530 noa->oppps_ctwindow = ath9k_get_ctwin(sc, avp); in ath9k_beacon_add_noa()
1534 if (avp->noa_duration) { in ath9k_beacon_add_noa()
1535 if (avp->periodic_noa) { in ath9k_beacon_add_noa()
1543 noa->desc[i].start_time = cpu_to_le32(avp->noa_start); in ath9k_beacon_add_noa()
1544 noa->desc[i].duration = cpu_to_le32(avp->noa_duration); in ath9k_beacon_add_noa()
1548 if (avp->offchannel_duration) { in ath9k_beacon_add_noa()
1550 noa->desc[i].start_time = cpu_to_le32(avp->offchannel_start); in ath9k_beacon_add_noa()
1551 noa->desc[i].duration = cpu_to_le32(avp->offchannel_duration); in ath9k_beacon_add_noa()
1558 struct ath_vif *avp = sc->p2p_ps_vif; in ath9k_p2p_ps_timer() local
1568 if (!avp || avp->chanctx != sc->cur_chan) in ath9k_p2p_ps_timer()
1572 if (!avp->noa.absent) in ath9k_p2p_ps_timer()
1577 if (!avp->noa.has_next_tsf || in ath9k_p2p_ps_timer()
1578 avp->noa.next_tsf - tsf > BIT(31)) in ath9k_p2p_ps_timer()
1579 ieee80211_update_p2p_noa(&avp->noa, tsf); in ath9k_p2p_ps_timer()
1581 ath9k_update_p2p_ps_timer(sc, avp); in ath9k_p2p_ps_timer()
1585 vif = avp->vif; in ath9k_p2p_ps_timer()
1586 sta = ieee80211_find_sta(vif, avp->bssid); in ath9k_p2p_ps_timer()
1591 if (an->sleeping == !!avp->noa.absent) in ath9k_p2p_ps_timer()
1594 an->sleeping = avp->noa.absent; in ath9k_p2p_ps_timer()
1625 struct ath_vif *avp = (void *)vif->drv_priv; in ath9k_p2p_remove_vif() local
1628 if (avp == sc->p2p_ps_vif) { in ath9k_p2p_remove_vif()