Lines Matching full:mt76

56 		mutex_lock(&phy->dev->mt76.mutex);  in mt7915_thermal_temp_show()
58 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_show()
86 mutex_lock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
93 dev_err(phy->dev->mt76.dev, in mt7915_thermal_temp_store()
95 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
101 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
151 dev_err(phy->dev->mt76.dev, in mt7915_thermal_set_cur_throttle_state()
163 mutex_lock(&phy->dev->mt76.mutex); in mt7915_thermal_set_cur_throttle_state()
165 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_set_cur_throttle_state()
182 struct wiphy *wiphy = phy->mt76->hw->wiphy; in mt7915_unregister_thermal()
193 struct wiphy *wiphy = phy->mt76->hw->wiphy; in mt7915_thermal_init()
232 dev = container_of(mphy->dev, struct mt7915_dev, mt76); in mt7915_led_set_config()
287 int i, n_chains = hweight16(phy->mt76->chainmask); in __mt7915_init_txpower()
305 target_power = mt76_get_rate_power_limits(phy->mt76, chan, in __mt7915_init_txpower()
321 if (phy->mt76->cap.has_2ghz) in mt7915_init_txpower()
322 __mt7915_init_txpower(phy, &phy->mt76->sband_2g.sband); in mt7915_init_txpower()
323 if (phy->mt76->cap.has_5ghz) in mt7915_init_txpower()
324 __mt7915_init_txpower(phy, &phy->mt76->sband_5g.sband); in mt7915_init_txpower()
325 if (phy->mt76->cap.has_6ghz) in mt7915_init_txpower()
326 __mt7915_init_txpower(phy, &phy->mt76->sband_6g.sband); in mt7915_init_txpower()
338 memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2)); in mt7915_regd_notifier()
339 dev->mt76.region = request->dfs_region; in mt7915_regd_notifier()
341 if (dev->mt76.region == NL80211_DFS_UNSET) in mt7915_regd_notifier()
353 struct mt76_phy *mphy = phy->mt76; in mt7915_init_wiphy()
355 struct mt76_dev *mdev = &phy->dev->mt76; in mt7915_init_wiphy()
392 if (!is_mt7915(&dev->mt76)) in mt7915_init_wiphy()
410 if (phy->mt76->cap.has_2ghz) { in mt7915_init_wiphy()
411 phy->mt76->sband_2g.sband.ht_cap.cap |= in mt7915_init_wiphy()
414 if (is_mt7915(&dev->mt76)) in mt7915_init_wiphy()
415 phy->mt76->sband_2g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
418 phy->mt76->sband_2g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
422 if (phy->mt76->cap.has_5ghz) { in mt7915_init_wiphy()
425 vht_cap = &phy->mt76->sband_5g.sband.vht_cap; in mt7915_init_wiphy()
426 phy->mt76->sband_5g.sband.ht_cap.cap |= in mt7915_init_wiphy()
430 if (is_mt7915(&dev->mt76)) { in mt7915_init_wiphy()
431 phy->mt76->sband_5g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
443 phy->mt76->sband_5g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
456 if (!is_mt7915(&dev->mt76) || !dev->dbdc_support) in mt7915_init_wiphy()
460 mt76_set_stream_caps(phy->mt76, true); in mt7915_init_wiphy()
465 wiphy->available_antennas_rx = phy->mt76->antenna_mask; in mt7915_init_wiphy()
466 wiphy->available_antennas_tx = phy->mt76->antenna_mask; in mt7915_init_wiphy()
523 if (is_mt7915(&dev->mt76)) in mt7915_mac_init_band()
542 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7915_mac_init_band()
553 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
576 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
593 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
615 u32 rx_len = is_mt7915(&dev->mt76) ? 0x400 : 0x680; in mt7915_mac_init()
618 if (!is_mt7915(&dev->mt76) && dev->hif2) in mt7915_mac_init()
624 if (!is_mt7915(&dev->mt76)) in mt7915_mac_init()
669 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7915_ops, MT_BAND1); in mt7915_alloc_ext_phy()
675 phy->mt76 = mphy; in mt7915_alloc_ext_phy()
678 phy->mt76->band_idx = 1; in mt7915_alloc_ext_phy()
686 struct mt76_phy *mphy = phy->mt76; in mt7915_register_ext_phy()
693 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR2, in mt7915_register_ext_phy()
699 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7915_register_ext_phy()
742 if (is_mt7915(&dev->mt76)) { in mt7915_wfsys_reset()
768 dev_err(dev->mt76.dev, "wifi subsystem reset failure\n"); in mt7915_wfsys_reset()
776 } else if (is_mt798x(&dev->mt76)) { in mt7915_wfsys_reset()
795 dev->phy.mt76->band_idx = 0; in mt7915_band_config()
797 if (is_mt798x(&dev->mt76)) { in mt7915_band_config()
806 dev->phy.mt76->band_idx = 1; in mt7915_band_config()
810 ret = is_mt7915(&dev->mt76) ? in mt7915_band_config()
848 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA); in mt7915_init_hardware()
852 dev->mt76.global_wcid.idx = idx; in mt7915_init_hardware()
853 dev->mt76.global_wcid.hw_key_idx = -1; in mt7915_init_hardware()
854 dev->mt76.global_wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7915_init_hardware()
855 rcu_assign_pointer(dev->mt76.wcid[idx], &dev->mt76.global_wcid); in mt7915_init_hardware()
865 if (!phy->mt76->cap.has_5ghz) in mt7915_set_stream_vht_txbf_caps()
868 sts = hweight8(phy->mt76->chainmask); in mt7915_set_stream_vht_txbf_caps()
869 cap = &phy->mt76->sband_5g.sband.vht_cap.cap; in mt7915_set_stream_vht_txbf_caps()
895 int sts = hweight8(phy->mt76->chainmask); in mt7915_set_stream_he_txbf_caps()
899 if (is_mt7915(&dev->mt76)) { in mt7915_set_stream_he_txbf_caps()
926 if (!is_mt7915(&dev->mt76)) in mt7915_set_stream_he_txbf_caps()
973 if (!is_mt7915(&dev->mt76)) { in mt7915_set_stream_he_txbf_caps()
985 int i, idx = 0, nss = hweight8(phy->mt76->antenna_mask); in mt7915_init_he_caps()
990 if (!is_mt7915(&dev->mt76)) in mt7915_init_he_caps()
1162 if (phy->mt76->cap.has_2ghz) { in mt7915_set_stream_he_caps()
1166 band = &phy->mt76->sband_2g.sband; in mt7915_set_stream_he_caps()
1170 if (phy->mt76->cap.has_5ghz) { in mt7915_set_stream_he_caps()
1174 band = &phy->mt76->sband_5g.sband; in mt7915_set_stream_he_caps()
1178 if (phy->mt76->cap.has_6ghz) { in mt7915_set_stream_he_caps()
1182 band = &phy->mt76->sband_6g.sband; in mt7915_set_stream_he_caps()
1190 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7915_unregister_ext_phy()
1203 mt76_connac2_tx_token_put(&dev->mt76); in mt7915_stop_hardware()
1205 tasklet_disable(&dev->mt76.irq_tasklet); in mt7915_stop_hardware()
1207 if (is_mt798x(&dev->mt76)) in mt7915_stop_hardware()
1217 dev->phy.mt76 = &dev->mt76.phy; in mt7915_register_device()
1218 dev->mt76.phy.priv = &dev->phy; in mt7915_register_device()
1242 dev->mt76.test_ops = &mt7915_testmode_ops; in mt7915_register_device()
1245 ret = mt76_register_device(&dev->mt76, true, mt76_rates, in mt7915_register_device()
1277 mt76_unregister_device(&dev->mt76); in mt7915_register_device()
1282 ieee80211_free_hw(phy2->mt76->hw); in mt7915_register_device()
1291 mt76_unregister_device(&dev->mt76); in mt7915_unregister_device()
1294 mt76_free_device(&dev->mt76); in mt7915_unregister_device()