Lines Matching full:phy
22 mt76_phy_update_channel(struct mt76_phy *phy, in mt76_phy_update_channel() argument
25 phy->radar_enabled = conf->radar_enabled; in mt76_phy_update_channel()
26 phy->main_chandef = conf->def; in mt76_phy_update_channel()
27 phy->chanctx = (struct mt76_chanctx *)conf->drv_priv; in mt76_phy_update_channel()
29 return __mt76_set_channel(phy, &phy->main_chandef, false); in mt76_phy_update_channel()
36 struct mt76_phy *phy = hw->priv; in mt76_add_chanctx() local
37 struct mt76_dev *dev = phy->dev; in mt76_add_chanctx()
40 phy = ctx->phy = dev->band_phys[conf->def.chan->band]; in mt76_add_chanctx()
41 if (WARN_ON_ONCE(!phy)) in mt76_add_chanctx()
44 if (dev->scan.phy == phy) in mt76_add_chanctx()
48 if (!phy->chanctx) in mt76_add_chanctx()
49 ret = mt76_phy_update_channel(phy, conf); in mt76_add_chanctx()
62 struct mt76_phy *phy = hw->priv; in mt76_remove_chanctx() local
63 struct mt76_dev *dev = phy->dev; in mt76_remove_chanctx()
65 phy = ctx->phy; in mt76_remove_chanctx()
66 if (WARN_ON_ONCE(!phy)) in mt76_remove_chanctx()
69 if (dev->scan.phy == phy) in mt76_remove_chanctx()
73 if (phy->chanctx == ctx) in mt76_remove_chanctx()
74 phy->chanctx = NULL; in mt76_remove_chanctx()
84 struct mt76_phy *phy = ctx->phy; in mt76_change_chanctx() local
85 struct mt76_dev *dev = phy->dev; in mt76_change_chanctx()
91 cancel_delayed_work_sync(&phy->mac_work); in mt76_change_chanctx()
94 mt76_phy_update_channel(phy, conf); in mt76_change_chanctx()
109 struct mt76_phy *phy = ctx->phy; in mt76_assign_vif_chanctx() local
110 struct mt76_dev *dev = phy->dev; in mt76_assign_vif_chanctx()
134 ret = dev->drv->vif_link_add(phy, vif, link_conf, mlink); in mt76_assign_vif_chanctx()
160 struct mt76_phy *phy = ctx->phy; in mt76_unassign_vif_chanctx() local
161 struct mt76_dev *dev = phy->dev; in mt76_unassign_vif_chanctx()
179 dev->drv->vif_link_remove(phy, vif, link_conf, mlink); in mt76_unassign_vif_chanctx()
198 struct mt76_phy *old_phy = old_ctx->phy; in mt76_switch_vif_chanctx()
199 struct mt76_phy *phy = hw->priv; in mt76_switch_vif_chanctx() local
200 struct mt76_dev *dev = phy->dev; in mt76_switch_vif_chanctx()
206 phy = new_ctx->phy = dev->band_phys[conf->def.chan->band]; in mt76_switch_vif_chanctx()
208 phy = new_ctx->phy; in mt76_switch_vif_chanctx()
209 if (!phy) in mt76_switch_vif_chanctx()
212 update_chan = phy->chanctx != new_ctx; in mt76_switch_vif_chanctx()
214 if (dev->scan.phy == phy) in mt76_switch_vif_chanctx()
217 cancel_delayed_work_sync(&phy->mac_work); in mt76_switch_vif_chanctx()
223 phy != old_phy && old_phy->chanctx == old_ctx) in mt76_switch_vif_chanctx()
227 ret = mt76_phy_update_channel(phy, vifs->new_ctx); in mt76_switch_vif_chanctx()
232 if (old_phy == phy) in mt76_switch_vif_chanctx()
243 ret = dev->drv->vif_link_add(phy, vifs[i].vif, in mt76_switch_vif_chanctx()
266 struct mt76_vif_link *mt76_get_vif_phy_link(struct mt76_phy *phy, in mt76_get_vif_phy_link() argument
271 struct mt76_dev *dev = phy->dev; in mt76_get_vif_phy_link()
279 if (mt76_vif_link_phy(mlink) == phy) in mt76_get_vif_phy_link()
291 ret = dev->drv->vif_link_add(phy, vif, &vif->bss_conf, mlink); in mt76_get_vif_phy_link()
300 void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif, in mt76_put_vif_phy_link() argument
303 struct mt76_dev *dev = phy->dev; in mt76_put_vif_phy_link()
308 dev->drv->vif_link_remove(phy, vif, &vif->bss_conf, mlink); in mt76_put_vif_phy_link()
312 static void mt76_roc_complete(struct mt76_phy *phy) in mt76_roc_complete() argument
314 struct mt76_vif_link *mlink = phy->roc_link; in mt76_roc_complete()
316 if (!phy->roc_vif) in mt76_roc_complete()
321 if (phy->main_chandef.chan) in mt76_roc_complete()
322 mt76_set_channel(phy, &phy->main_chandef, false); in mt76_roc_complete()
323 mt76_put_vif_phy_link(phy, phy->roc_vif, phy->roc_link); in mt76_roc_complete()
324 phy->roc_vif = NULL; in mt76_roc_complete()
325 phy->roc_link = NULL; in mt76_roc_complete()
326 ieee80211_remain_on_channel_expired(phy->hw); in mt76_roc_complete()
331 struct mt76_phy *phy = container_of(work, struct mt76_phy, roc_work.work); in mt76_roc_complete_work() local
332 struct mt76_dev *dev = phy->dev; in mt76_roc_complete_work()
335 mt76_roc_complete(phy); in mt76_roc_complete_work()
339 void mt76_abort_roc(struct mt76_phy *phy) in mt76_abort_roc() argument
341 struct mt76_dev *dev = phy->dev; in mt76_abort_roc()
343 cancel_delayed_work_sync(&phy->roc_work); in mt76_abort_roc()
346 mt76_roc_complete(phy); in mt76_abort_roc()
355 struct mt76_phy *phy = hw->priv; in mt76_remain_on_channel() local
356 struct mt76_dev *dev = phy->dev; in mt76_remain_on_channel()
360 phy = dev->band_phys[chan->band]; in mt76_remain_on_channel()
361 if (!phy) in mt76_remain_on_channel()
366 if (phy->roc_vif || dev->scan.phy == phy) { in mt76_remain_on_channel()
371 mlink = mt76_get_vif_phy_link(phy, vif); in mt76_remain_on_channel()
377 mlink->mvif->roc_phy = phy; in mt76_remain_on_channel()
378 phy->roc_vif = vif; in mt76_remain_on_channel()
379 phy->roc_link = mlink; in mt76_remain_on_channel()
381 mt76_set_channel(phy, &chandef, true); in mt76_remain_on_channel()
383 ieee80211_queue_delayed_work(phy->hw, &phy->roc_work, in mt76_remain_on_channel()
397 struct mt76_phy *phy = mvif->roc_phy; in mt76_cancel_remain_on_channel() local
399 if (!phy) in mt76_cancel_remain_on_channel()
402 mt76_abort_roc(phy); in mt76_cancel_remain_on_channel()