Lines Matching refs:dev

11 	struct mt76x02_dev *dev = hw->priv;  in mt76x2u_start()  local
14 ret = mt76x02u_mac_start(dev); in mt76x2u_start()
18 ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mphy.mac_work, in mt76x2u_start()
20 set_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x2u_start()
27 struct mt76x02_dev *dev = hw->priv; in mt76x2u_stop() local
29 clear_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x2u_stop()
30 mt76u_stop_tx(&dev->mt76); in mt76x2u_stop()
31 mt76x2u_stop_hw(dev); in mt76x2u_stop()
35 mt76x2u_set_channel(struct mt76x02_dev *dev, in mt76x2u_set_channel() argument
40 cancel_delayed_work_sync(&dev->cal_work); in mt76x2u_set_channel()
41 mt76x02_pre_tbtt_enable(dev, false); in mt76x2u_set_channel()
43 mutex_lock(&dev->mt76.mutex); in mt76x2u_set_channel()
44 set_bit(MT76_RESET, &dev->mphy.state); in mt76x2u_set_channel()
46 mt76_set_channel(&dev->mphy); in mt76x2u_set_channel()
48 mt76x2_mac_stop(dev, false); in mt76x2u_set_channel()
50 err = mt76x2u_phy_set_channel(dev, chandef); in mt76x2u_set_channel()
52 mt76x02_mac_cc_reset(dev); in mt76x2u_set_channel()
53 mt76x2_mac_resume(dev); in mt76x2u_set_channel()
55 clear_bit(MT76_RESET, &dev->mphy.state); in mt76x2u_set_channel()
56 mutex_unlock(&dev->mt76.mutex); in mt76x2u_set_channel()
58 mt76x02_pre_tbtt_enable(dev, true); in mt76x2u_set_channel()
59 mt76_txq_schedule_all(&dev->mphy); in mt76x2u_set_channel()
67 struct mt76x02_dev *dev = hw->priv; in mt76x2u_config() local
70 mutex_lock(&dev->mt76.mutex); in mt76x2u_config()
74 dev->mt76.rxfilter |= MT_RX_FILTR_CFG_PROMISC; in mt76x2u_config()
76 dev->mt76.rxfilter &= ~MT_RX_FILTR_CFG_PROMISC; in mt76x2u_config()
77 mt76_wr(dev, MT_RX_FILTR_CFG, dev->mt76.rxfilter); in mt76x2u_config()
81 struct mt76_phy *mphy = &dev->mphy; in mt76x2u_config()
83 dev->txpower_conf = hw->conf.power_level * 2; in mt76x2u_config()
84 dev->txpower_conf = mt76_get_sar_power(mphy, in mt76x2u_config()
86 dev->txpower_conf); in mt76x2u_config()
88 dev->txpower_conf -= 6; in mt76x2u_config()
91 mt76x2_phy_set_txpower(dev); in mt76x2u_config()
94 mutex_unlock(&dev->mt76.mutex); in mt76x2u_config()
98 err = mt76x2u_set_channel(dev, &hw->conf.chandef); in mt76x2u_config()