Lines Matching full:mt76

60 		mutex_lock(&phy->dev->mt76.mutex);  in mt7915_thermal_temp_show()
62 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_show()
90 mutex_lock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
97 dev_err(phy->dev->mt76.dev, in mt7915_thermal_temp_store()
99 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
105 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_temp_store()
155 dev_err(phy->dev->mt76.dev, in mt7915_thermal_set_cur_throttle_state()
167 mutex_lock(&phy->dev->mt76.mutex); in mt7915_thermal_set_cur_throttle_state()
169 mutex_unlock(&phy->dev->mt76.mutex); in mt7915_thermal_set_cur_throttle_state()
186 struct wiphy *wiphy = phy->mt76->hw->wiphy; in mt7915_unregister_thermal()
199 struct wiphy *wiphy = phy->mt76->hw->wiphy; in mt7915_thermal_init()
242 dev = container_of(mphy->dev, struct mt7915_dev, mt76); in mt7915_led_set_config()
302 int i, n_chains = hweight16(phy->mt76->chainmask); in __mt7915_init_txpower()
320 target_power = mt76_get_rate_power_limits(phy->mt76, chan, in __mt7915_init_txpower()
336 if (phy->mt76->cap.has_2ghz) in mt7915_init_txpower()
337 __mt7915_init_txpower(phy, &phy->mt76->sband_2g.sband); in mt7915_init_txpower()
338 if (phy->mt76->cap.has_5ghz) in mt7915_init_txpower()
339 __mt7915_init_txpower(phy, &phy->mt76->sband_5g.sband); in mt7915_init_txpower()
340 if (phy->mt76->cap.has_6ghz) in mt7915_init_txpower()
341 __mt7915_init_txpower(phy, &phy->mt76->sband_6g.sband); in mt7915_init_txpower()
353 memcpy(dev->mt76.alpha2, request->alpha2, sizeof(dev->mt76.alpha2)); in mt7915_regd_notifier()
354 dev->mt76.region = request->dfs_region; in mt7915_regd_notifier()
356 if (dev->mt76.region == NL80211_DFS_UNSET) in mt7915_regd_notifier()
368 struct mt76_phy *mphy = phy->mt76; in mt7915_init_wiphy()
370 struct mt76_dev *mdev = &phy->dev->mt76; in mt7915_init_wiphy()
407 if (!is_mt7915(&dev->mt76)) in mt7915_init_wiphy()
427 if (phy->mt76->cap.has_2ghz) { in mt7915_init_wiphy()
428 phy->mt76->sband_2g.sband.ht_cap.cap |= in mt7915_init_wiphy()
431 if (is_mt7915(&dev->mt76)) in mt7915_init_wiphy()
432 phy->mt76->sband_2g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
435 phy->mt76->sband_2g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
439 if (phy->mt76->cap.has_5ghz) { in mt7915_init_wiphy()
442 vht_cap = &phy->mt76->sband_5g.sband.vht_cap; in mt7915_init_wiphy()
443 phy->mt76->sband_5g.sband.ht_cap.cap |= in mt7915_init_wiphy()
447 if (is_mt7915(&dev->mt76)) { in mt7915_init_wiphy()
448 phy->mt76->sband_5g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
460 phy->mt76->sband_5g.sband.ht_cap.ampdu_density = in mt7915_init_wiphy()
473 if (!is_mt7915(&dev->mt76) || !dev->dbdc_support) in mt7915_init_wiphy()
477 mt76_set_stream_caps(phy->mt76, true); in mt7915_init_wiphy()
482 wiphy->available_antennas_rx = phy->mt76->antenna_mask; in mt7915_init_wiphy()
483 wiphy->available_antennas_tx = phy->mt76->antenna_mask; in mt7915_init_wiphy()
540 if (is_mt7915(&dev->mt76)) in mt7915_mac_init_band()
559 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7915_mac_init_band()
570 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
593 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
610 switch (mt76_chip(&dev->mt76)) { in mt7915_init_led_mux()
632 u32 rx_len = is_mt7915(&dev->mt76) ? 0x400 : 0x680; in mt7915_mac_init()
635 if (!is_mt7915(&dev->mt76) && dev->hif2) in mt7915_mac_init()
641 if (!is_mt7915(&dev->mt76)) in mt7915_mac_init()
686 mphy = mt76_alloc_phy(&dev->mt76, sizeof(*phy), &mt7915_ops, MT_BAND1); in mt7915_alloc_ext_phy()
692 phy->mt76 = mphy; in mt7915_alloc_ext_phy()
695 phy->mt76->band_idx = 1; in mt7915_alloc_ext_phy()
703 struct mt76_phy *mphy = phy->mt76; in mt7915_register_ext_phy()
711 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR2, in mt7915_register_ext_phy()
713 memcpy(mphy->macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR2, in mt7915_register_ext_phy()
721 memcpy(mphy->macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7915_register_ext_phy()
723 memcpy(mphy->macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt7915_register_ext_phy()
769 if (is_mt7915(&dev->mt76)) { in mt7915_wfsys_reset()
795 dev_err(dev->mt76.dev, "wifi subsystem reset failure\n"); in mt7915_wfsys_reset()
803 } else if (is_mt798x(&dev->mt76)) { in mt7915_wfsys_reset()
822 dev->phy.mt76->band_idx = 0; in mt7915_band_config()
824 if (is_mt798x(&dev->mt76)) { in mt7915_band_config()
833 dev->phy.mt76->band_idx = 1; in mt7915_band_config()
837 ret = is_mt7915(&dev->mt76) ? in mt7915_band_config()
875 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7915_WTBL_STA); in mt7915_init_hardware()
879 dev->mt76.global_wcid.idx = idx; in mt7915_init_hardware()
880 dev->mt76.global_wcid.hw_key_idx = -1; in mt7915_init_hardware()
881 dev->mt76.global_wcid.tx_info |= MT_WCID_TX_INFO_SET; in mt7915_init_hardware()
882 rcu_assign_pointer(dev->mt76.wcid[idx], &dev->mt76.global_wcid); in mt7915_init_hardware()
892 if (!phy->mt76->cap.has_5ghz) in mt7915_set_stream_vht_txbf_caps()
895 sts = hweight8(phy->mt76->chainmask); in mt7915_set_stream_vht_txbf_caps()
896 cap = &phy->mt76->sband_5g.sband.vht_cap.cap; in mt7915_set_stream_vht_txbf_caps()
922 int sts = hweight8(phy->mt76->chainmask); in mt7915_set_stream_he_txbf_caps()
926 if (is_mt7915(&dev->mt76)) { in mt7915_set_stream_he_txbf_caps()
953 if (!is_mt7915(&dev->mt76)) in mt7915_set_stream_he_txbf_caps()
1000 if (!is_mt7915(&dev->mt76)) { in mt7915_set_stream_he_txbf_caps()
1012 int i, idx = 0, nss = hweight8(phy->mt76->antenna_mask); in mt7915_init_he_caps()
1017 if (!is_mt7915(&dev->mt76)) in mt7915_init_he_caps()
1189 if (phy->mt76->cap.has_2ghz) { in mt7915_set_stream_he_caps()
1193 band = &phy->mt76->sband_2g.sband; in mt7915_set_stream_he_caps()
1197 if (phy->mt76->cap.has_5ghz) { in mt7915_set_stream_he_caps()
1201 band = &phy->mt76->sband_5g.sband; in mt7915_set_stream_he_caps()
1205 if (phy->mt76->cap.has_6ghz) { in mt7915_set_stream_he_caps()
1209 band = &phy->mt76->sband_6g.sband; in mt7915_set_stream_he_caps()
1217 struct mt76_phy *mphy = dev->mt76.phys[MT_BAND1]; in mt7915_unregister_ext_phy()
1232 mt76_connac2_tx_token_put(&dev->mt76); in mt7915_stop_hardware()
1234 tasklet_disable(&dev->mt76.irq_tasklet); in mt7915_stop_hardware()
1236 if (is_mt798x(&dev->mt76)) in mt7915_stop_hardware()
1246 dev->phy.mt76 = &dev->mt76.phy; in mt7915_register_device()
1247 dev->mt76.phy.priv = &dev->phy; in mt7915_register_device()
1271 dev->mt76.test_ops = &mt7915_testmode_ops; in mt7915_register_device()
1274 ret = mt76_register_device(&dev->mt76, true, mt76_rates, in mt7915_register_device()
1310 mt76_unregister_device(&dev->mt76); in mt7915_register_device()
1315 ieee80211_free_hw(phy2->mt76->hw); in mt7915_register_device()
1326 mt76_unregister_device(&dev->mt76); in mt7915_unregister_device()
1329 mt76_free_device(&dev->mt76); in mt7915_unregister_device()