Lines Matching refs:mt76

84 	mutex_lock(&phy->dev->mt76.mutex);  in mt7915_thermal_temp_store()
91 dev_err(phy->dev->mt76.dev, in mt7915_thermal_temp_store()
93 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
98 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
150 dev_err(phy->dev->mt76.dev, in mt7915_thermal_set_cur_throttle_state()
179 struct wiphy *wiphy = phy->mt76->hw->wiphy; in mt7915_unregister_thermal()
190 struct wiphy *wiphy = phy->mt76->hw->wiphy; in mt7915_thermal_init()
230 dev = container_of(mphy->dev, struct mt7915_dev, mt76); in mt7915_led_set_config()
322 memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2)); in mt7915_regd_notifier()
323 dev->mt76.region = request->dfs_region; in mt7915_regd_notifier()
325 if (dev->mt76.region == NL80211_DFS_UNSET) in mt7915_regd_notifier()
339 struct mt76_phy *mphy = phy->mt76; in mt7915_init_wiphy()
341 struct mt76_dev *mdev = &phy->dev->mt76; in mt7915_init_wiphy()
375 if (!is_mt7915(&dev->mt76)) in mt7915_init_wiphy()
392 if (phy->mt76->cap.has_2ghz) { in mt7915_init_wiphy()
393 phy->mt76->sband_2g.sband.ht_cap.cap |= in mt7915_init_wiphy()
396 phy->mt76->sband_2g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
400 if (phy->mt76->cap.has_5ghz) { in mt7915_init_wiphy()
403 vht_cap = &phy->mt76->sband_5g.sband.vht_cap; in mt7915_init_wiphy()
404 phy->mt76->sband_5g.sband.ht_cap.cap |= in mt7915_init_wiphy()
407 phy->mt76->sband_5g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
410 if (is_mt7915(&dev->mt76)) { in mt7915_init_wiphy()
430 if (!is_mt7915(&dev->mt76) || !dev->dbdc_support) in mt7915_init_wiphy()
434 mt76_set_stream_caps(phy->mt76, true); in mt7915_init_wiphy()
438 wiphy->available_antennas_rx = phy->mt76->antenna_mask; in mt7915_init_wiphy()
439 wiphy->available_antennas_tx = phy->mt76->antenna_mask; in mt7915_init_wiphy()
506 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7915_mac_init_band()
517 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
540 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
557 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
579 u32 rx_len = is_mt7915(&dev->mt76) ? 0x400 : 0x680; in mt7915_mac_init()
582 if (!is_mt7915(&dev->mt76) && dev->hif2) in mt7915_mac_init()
588 if (!is_mt7915(&dev->mt76)) in mt7915_mac_init()
633 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7915_ops, MT_BAND1); in mt7915_alloc_ext_phy()
639 phy->mt76 = mphy; in mt7915_alloc_ext_phy()
642 phy->mt76->band_idx = 1; in mt7915_alloc_ext_phy()
650 struct mt76_phy *mphy = phy->mt76; in mt7915_register_ext_phy()
657 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR2, in mt7915_register_ext_phy()
663 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7915_register_ext_phy()
709 if (is_mt7915(&dev->mt76)) { in mt7915_wfsys_reset()
735 dev_err(dev->mt76.dev, "wifi subsystem reset failure\n"); in mt7915_wfsys_reset()
743 } else if (is_mt798x(&dev->mt76)) { in mt7915_wfsys_reset()
762 dev->phy.mt76->band_idx = 0; in mt7915_band_config()
764 if (is_mt798x(&dev->mt76)) { in mt7915_band_config()
773 dev->phy.mt76->band_idx = 1; in mt7915_band_config()
777 ret = is_mt7915(&dev->mt76) ? in mt7915_band_config()
815 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA); in mt7915_init_hardware()
819 dev->mt76.global_wcid.idx = idx; in mt7915_init_hardware()
820 dev->mt76.global_wcid.hw_key_idx = -1; in mt7915_init_hardware()
821 dev->mt76.global_wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7915_init_hardware()
822 rcu_assign_pointer(dev->mt76.wcid[idx], &dev->mt76.global_wcid); in mt7915_init_hardware()
832 if (!phy->mt76->cap.has_5ghz) in mt7915_set_stream_vht_txbf_caps()
835 sts = hweight8(phy->mt76->chainmask); in mt7915_set_stream_vht_txbf_caps()
836 cap = &phy->mt76->sband_5g.sband.vht_cap.cap; in mt7915_set_stream_vht_txbf_caps()
862 int sts = hweight8(phy->mt76->chainmask); in mt7915_set_stream_he_txbf_caps()
866 if (is_mt7915(&dev->mt76)) { in mt7915_set_stream_he_txbf_caps()
893 if (!is_mt7915(&dev->mt76)) in mt7915_set_stream_he_txbf_caps()
936 if (!is_mt7915(&dev->mt76)) { in mt7915_set_stream_he_txbf_caps()
948 int i, idx = 0, nss = hweight8(phy->mt76->antenna_mask); in mt7915_init_he_caps()
953 if (!is_mt7915(&dev->mt76)) in mt7915_init_he_caps()
1125 if (phy->mt76->cap.has_2ghz) { in mt7915_set_stream_he_caps()
1129 band = &phy->mt76->sband_2g.sband; in mt7915_set_stream_he_caps()
1134 if (phy->mt76->cap.has_5ghz) { in mt7915_set_stream_he_caps()
1138 band = &phy->mt76->sband_5g.sband; in mt7915_set_stream_he_caps()
1143 if (phy->mt76->cap.has_6ghz) { in mt7915_set_stream_he_caps()
1147 band = &phy->mt76->sband_6g.sband; in mt7915_set_stream_he_caps()
1156 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7915_unregister_ext_phy()
1169 mt76_connac2_tx_token_put(&dev->mt76); in mt7915_stop_hardware()
1171 tasklet_disable(&dev->mt76.irq_tasklet); in mt7915_stop_hardware()
1173 if (is_mt798x(&dev->mt76)) in mt7915_stop_hardware()
1183 dev->phy.mt76 = &dev->mt76.phy; in mt7915_register_device()
1184 dev->mt76.phy.priv = &dev->phy; in mt7915_register_device()
1208 dev->mt76.test_ops = &mt7915_testmode_ops; in mt7915_register_device()
1211 ret = mt76_register_device(&dev->mt76, true, mt76_rates, in mt7915_register_device()
1243 mt76_unregister_device(&dev->mt76); in mt7915_register_device()
1248 ieee80211_free_hw(phy2->mt76->hw); in mt7915_register_device()
1257 mt76_unregister_device(&dev->mt76); in mt7915_unregister_device()
1260 mt76_free_device(&dev->mt76); in mt7915_unregister_device()