Lines Matching full:mt76

12 	switch (mt76_chip(&(_dev)->mt76)) {			\
56 enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; in mt7915_mcu_set_sta_he_mcs()
97 if (is_mt7915(&dev->mt76) && nss > 1 && in mt7915_mcu_set_sta_he_mcs()
133 if (is_mt7915(&dev->mt76) && nss > 1 && in mt7915_mcu_set_sta_vht_mcs()
183 struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76); in mt7915_mcu_send_message()
213 return mt76_mcu_send_msg(&dev->mt76, cmd, &req, sizeof(req), false); in mt7915_mcu_wa_cmd()
226 struct mt76_phy *mphy = &dev->mt76.phy; in mt7915_mcu_rx_csa_notify()
231 if ((c->band_idx && !dev->phy.band_idx) && dev->mt76.phys[MT_BAND1]) in mt7915_mcu_rx_csa_notify()
232 mphy = dev->mt76.phys[MT_BAND1]; in mt7915_mcu_rx_csa_notify()
242 struct mt76_phy *mphy = &dev->mt76.phy; in mt7915_mcu_rx_thermal_notify()
250 if ((t->ctrl.band_idx && !dev->phy.band_idx) && dev->mt76.phys[MT_BAND1]) in mt7915_mcu_rx_thermal_notify()
251 mphy = dev->mt76.phys[MT_BAND1]; in mt7915_mcu_rx_thermal_notify()
260 struct mt76_phy *mphy = &dev->mt76.phy; in mt7915_mcu_rx_radar_detected()
265 if ((r->band_idx && !dev->phy.band_idx) && dev->mt76.phys[MT_BAND1]) in mt7915_mcu_rx_radar_detected()
266 mphy = dev->mt76.phys[MT_BAND1]; in mt7915_mcu_rx_radar_detected()
317 struct mt76_phy *mphy = &dev->mt76.phy; in mt7915_mcu_rx_bcc_notify()
322 if ((b->band_idx && !dev->phy.band_idx) && dev->mt76.phys[MT_BAND1]) in mt7915_mcu_rx_bcc_notify()
323 mphy = dev->mt76.phys[MT_BAND1]; in mt7915_mcu_rx_bcc_notify()
386 mt76_mcu_rx_event(&dev->mt76, skb); in mt7915_mcu_rx_event()
455 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_bss_rfch_tlv()
474 struct mt76_phy *mphy = phy->mt76; in mt7915_mcu_bss_rfch_tlv()
488 int max_nss = hweight8(phy->mt76->chainmask); in mt7915_mcu_bss_ra_tlv()
520 cap = mt76_connac_get_he_phy_cap(phy->mt76, vif); in mt7915_mcu_bss_he_tlv()
559 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_bss_bmc_tlv()
580 u32 idx = mvif->mt76.omac_idx - REPEATER_BSSID_START; in mt7915_mcu_muar_config()
608 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MUAR_UPDATE), &req, in mt7915_mcu_muar_config()
619 if (mvif->mt76.omac_idx >= REPEATER_BSSID_START) { in mt7915_mcu_add_bss_info()
624 skb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, NULL, in mt7915_mcu_add_bss_info()
633 mt76_connac_mcu_bss_basic_tlv(skb, vif, NULL, phy->mt76, in mt7915_mcu_add_bss_info()
648 if (mvif->mt76.omac_idx >= EXT_BSSID_START && in mt7915_mcu_add_bss_info()
649 mvif->mt76.omac_idx < REPEATER_BSSID_START) in mt7915_mcu_add_bss_info()
650 mt76_connac_mcu_bss_ext_tlv(skb, &mvif->mt76); in mt7915_mcu_add_bss_info()
653 return mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_add_bss_info()
668 return mt76_connac_mcu_sta_ba(&dev->mt76, &mvif->mt76, params, in mt7915_mcu_add_tx_ba()
680 return mt76_connac_mcu_sta_ba(&dev->mt76, &mvif->mt76, params, in mt7915_mcu_add_rx_ba()
848 if (!is_mt7915(&dev->mt76)) in mt7915_mcu_sta_muru_tlv()
939 if (!is_mt7915(&dev->mt76)) { in mt7915_mcu_sta_amsdu_tlv()
969 wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(&dev->mt76, &msta->wcid, in mt7915_mcu_sta_wtbl_tlv()
975 mt76_connac_mcu_wtbl_generic_tlv(&dev->mt76, skb, vif, sta, tlv, in mt7915_mcu_sta_wtbl_tlv()
979 mt76_connac_mcu_wtbl_ht_tlv(&dev->mt76, skb, sta, tlv, in mt7915_mcu_sta_wtbl_tlv()
991 int tx_ant = hweight8(phy->mt76->chainmask) - 1; in mt7915_is_ebf_supported()
1054 bf->nrow = hweight8(phy->mt76->chainmask) - 1; in mt7915_mcu_sta_bfer_ht()
1064 struct ieee80211_sta_vht_cap *vc = &phy->mt76->sband_5g.sband.vht_cap; in mt7915_mcu_sta_bfer_vht()
1067 u8 tx_ant = hweight8(phy->mt76->chainmask) - 1; in mt7915_mcu_sta_bfer_vht()
1103 mt76_connac_get_he_phy_cap(phy->mt76, vif); in mt7915_mcu_sta_bfer_he()
1162 int tx_ant = hweight8(phy->mt76->chainmask) - 1; in mt7915_mcu_sta_bfer_tlv()
1231 int tx_ant = hweight8(phy->mt76->chainmask) - 1; in mt7915_mcu_sta_bfee_tlv()
1288 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, in mt7915_mcu_set_fixed_rate_ctrl()
1314 return mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_set_fixed_rate_ctrl()
1328 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, in mt7915_mcu_add_smps()
1335 wtbl_hdr = mt76_connac_mcu_alloc_wtbl_req(&dev->mt76, &msta->wcid, in mt7915_mcu_add_smps()
1342 ret = mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_add_smps()
1357 struct cfg80211_chan_def *chandef = &mvif->phy->mt76->chandef; in mt7915_mcu_add_rate_ctrl_fixed()
1446 struct mt76_phy *mphy = mvif->phy->mt76; in mt7915_mcu_sta_rate_ctrl_tlv()
1552 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, in mt7915_mcu_add_rate_ctrl()
1569 ret = mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_add_rate_ctrl()
1598 .val = cpu_to_le32(mvif->mt76.idx % 16), in mt7915_mcu_add_group()
1605 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_DRR_CTRL), &req, in mt7915_mcu_add_group()
1619 skb = mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, in mt7915_mcu_add_sta()
1626 !rcu_access_pointer(dev->mt76.wcid[msta->wcid.idx])); in mt7915_mcu_add_sta()
1665 return mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_add_sta()
1691 .omac_idx = mvif->mt76.omac_idx, in mt7915_mcu_add_dev_info()
1692 .dbdc_idx = mvif->mt76.band_idx, in mt7915_mcu_add_dev_info()
1700 .dbdc_idx = mvif->mt76.band_idx, in mt7915_mcu_add_dev_info()
1704 if (mvif->mt76.omac_idx >= REPEATER_BSSID_START) in mt7915_mcu_add_dev_info()
1708 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(DEV_INFO_UPDATE), in mt7915_mcu_add_dev_info()
1792 struct mt76_wcid *wcid = &dev->mt76.global_wcid; in mt7915_mcu_beacon_cont()
1816 mt7915_mac_write_txwi(&dev->mt76, (__le32 *)buf, skb, wcid, 0, NULL, in mt7915_mcu_beacon_cont()
1856 u32 pc = phy->mt76->sband_5g.sband.vht_cap.cap; in mt7915_mcu_beacon_check_caps()
1880 mt76_connac_get_he_phy_cap(phy->mt76, vif); in mt7915_mcu_beacon_check_caps()
1909 struct cfg80211_chan_def *chandef = &mvif->phy->mt76->chandef; in mt7915_mcu_beacon_inband_discov()
1911 struct mt76_wcid *wcid = &dev->mt76.global_wcid; in mt7915_mcu_beacon_inband_discov()
1943 dev_err(dev->mt76.dev, "inband discovery size limit exceed\n"); in mt7915_mcu_beacon_inband_discov()
1960 mt7915_mac_write_txwi(&dev->mt76, (__le32 *)buf, skb, wcid, 0, NULL, in mt7915_mcu_beacon_inband_discov()
1984 rskb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, in mt7915_mcu_add_beacon()
2001 dev_err(dev->mt76.dev, "Bcn size limit exceed\n"); in mt7915_mcu_add_beacon()
2022 return mt76_mcu_skb_send_msg(&phy->dev->mt76, rskb, in mt7915_mcu_add_beacon()
2031 dev_err(dev->mt76.dev, "Timeout for driver own\n"); in mt7915_driver_own()
2050 dev_err(dev->mt76.dev, "Timeout for initializing firmware\n"); in mt7915_firmware_state()
2063 __mt76_mcu_restart(&dev->mt76); in mt7915_load_firmware()
2066 dev_err(dev->mt76.dev, in mt7915_load_firmware()
2072 ret = mt76_connac2_load_patch(&dev->mt76, fw_name_var(dev, ROM_PATCH)); in mt7915_load_firmware()
2076 ret = mt76_connac2_load_ram(&dev->mt76, fw_name_var(dev, FIRMWARE_WM), in mt7915_load_firmware()
2085 mt76_queue_tx_cleanup(dev, dev->mt76.q_mcu[MT_MCUQ_FWDL], false); in mt7915_load_firmware()
2087 dev_dbg(dev->mt76.dev, "Firmware init done\n"); in mt7915_load_firmware()
2102 return mt76_mcu_send_msg(&dev->mt76, MCU_WA_EXT_CMD(FW_LOG_2_HOST), in mt7915_mcu_fw_log_2_host()
2105 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(FW_LOG_2_HOST), &data, in mt7915_mcu_fw_log_2_host()
2123 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(FW_DBG_CTRL), &data, in mt7915_mcu_fw_dbg_ctrl()
2137 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MURU_CTRL), &data, in mt7915_mcu_muru_debug_set()
2157 ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(MURU_CTRL), in mt7915_mcu_muru_debug_get()
2177 return mt76_mcu_send_msg(&dev->mt76, MCU_WA_EXT_CMD(MWDS_SUPPORT), &req, in mt7915_mcu_set_mwds()
2192 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MURU_CTRL), &req, in mt7915_mcu_set_muru_ctrl()
2224 ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RX_AIRTIME_CTRL), &req, in mt7915_mcu_init_rx_airtime()
2233 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RX_AIRTIME_CTRL), &req, in mt7915_mcu_init_rx_airtime()
2247 dev->mt76.mcu_ops = &mt7915_mcu_ops; in mt7915_mcu_init()
2277 if (mtk_wed_device_active(&dev->mt76.mmio.wed)) in mt7915_mcu_init()
2299 __mt76_mcu_restart(&dev->mt76); in mt7915_mcu_exit()
2301 dev_err(dev->mt76.dev, "Failed to exit mcu\n"); in mt7915_mcu_exit()
2309 skb_queue_purge(&dev->mt76.mcu.res_q); in mt7915_mcu_exit()
2329 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RX_HDR_TRANS), in mt7915_mcu_set_rx_hdr_trans_blacklist()
2358 ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RX_HDR_TRANS), in mt7915_mcu_set_mac()
2366 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(MAC_INIT_CTRL), in mt7915_mcu_set_mac()
2377 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EDCA_UPDATE), req, in mt7915_mcu_update_edca()
2397 e->queue = ac + mvif->mt76.wmm_idx * MT76_CONNAC_MAX_WMM_SETS; in mt7915_mcu_set_tx()
2426 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RDD_TH), &req, in mt7915_mcu_set_fcc5_lpn()
2457 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RDD_TH), &req, in mt7915_mcu_set_pulse_th()
2509 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_RDD_TH), &req, in mt7915_mcu_set_radar_th()
2519 struct mt76_phy *mphy = phy->mt76; in mt7915_mcu_background_chain_ctrl()
2564 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(OFFCH_SCAN_CTRL), in mt7915_mcu_background_chain_ctrl()
2575 err = mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_STOP, MT_RX_SEL2, in mt7915_mcu_rdd_background_enable()
2589 switch (dev->mt76.region) { in mt7915_mcu_rdd_background_enable()
2602 return mt76_connac_mcu_rdd_cmd(&dev->mt76, RDD_START, MT_RX_SEL2, in mt7915_mcu_rdd_background_enable()
2614 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_set_chan_info()
2637 .tx_streams_num = hweight8(phy->mt76->antenna_mask), in mt7915_mcu_set_chan_info()
2638 .rx_streams = phy->mt76->antenna_mask, in mt7915_mcu_set_chan_info()
2644 if (phy->mt76->test.tx_antenna_mask && in mt7915_mcu_set_chan_info()
2645 (phy->mt76->test.state == MT76_TM_STATE_TX_FRAMES || in mt7915_mcu_set_chan_info()
2646 phy->mt76->test.state == MT76_TM_STATE_RX_FRAMES || in mt7915_mcu_set_chan_info()
2647 phy->mt76->test.state == MT76_TM_STATE_TX_CONT)) { in mt7915_mcu_set_chan_info()
2648 req.tx_streams_num = fls(phy->mt76->test.tx_antenna_mask); in mt7915_mcu_set_chan_info()
2649 req.rx_streams = phy->mt76->test.tx_antenna_mask; in mt7915_mcu_set_chan_info()
2657 dev->mt76.hw->conf.flags & IEEE80211_CONF_MONITOR) in mt7915_mcu_set_chan_info()
2659 else if (phy->mt76->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) in mt7915_mcu_set_chan_info()
2661 else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, in mt7915_mcu_set_chan_info()
2676 return mt76_mcu_send_msg(&dev->mt76, cmd, &req, sizeof(req), true); in mt7915_mcu_set_chan_info()
2687 u8 *eep = (u8 *)dev->mt76.eeprom.data; in mt7915_mcu_set_eeprom_flash()
2700 skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, in mt7915_mcu_set_eeprom_flash()
2712 ret = mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_set_eeprom_flash()
2731 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(EFUSE_BUFFER_MODE), in mt7915_mcu_set_eeprom()
2746 ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_QUERY(EFUSE_ACCESS), &req, in mt7915_mcu_get_eeprom()
2752 buf = dev->mt76.eeprom.data + le32_to_cpu(res->addr); in mt7915_mcu_get_eeprom()
2772 ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_QUERY(EFUSE_FREE_BLOCK), &req, in mt7915_mcu_get_eeprom_free_block()
2799 skb = mt76_mcu_msg_alloc(&dev->mt76, NULL, sizeof(req) + len); in mt7915_mcu_set_pre_cal()
2808 return mt76_mcu_skb_send_msg(&dev->mt76, skb, cmd, false); in mt7915_mcu_set_pre_cal()
2813 u8 idx = 0, *cal = dev->cal, *eep = dev->mt76.eeprom.data; in mt7915_mcu_apply_group_cal()
2895 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_apply_tx_dpd()
2897 u8 *cal = dev->cal, *eep = dev->mt76.eeprom.data; in mt7915_mcu_apply_tx_dpd()
2934 struct mt76_channel_state *state = phy->mt76->chan_state; in mt7915_mcu_get_chan_mib_info()
2941 if (!is_mt7915(&dev->mt76)) { in mt7915_mcu_get_chan_mib_info()
2951 ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(GET_MIB_INFO), in mt7915_mcu_get_chan_mib_info()
2992 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(THERMAL_CTRL), &req, in mt7915_mcu_get_temperature()
3027 ret = mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(THERMAL_PROT), in mt7915_mcu_set_thermal_throttling()
3044 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(THERMAL_PROT), in mt7915_mcu_set_thermal_throttling()
3051 struct mt76_phy *mphy = phy->mt76; in mt7915_mcu_set_txpower_sku()
3094 return mt76_mcu_send_msg(&dev->mt76, in mt7915_mcu_set_txpower_sku()
3117 ret = mt76_mcu_send_and_get_msg(&dev->mt76, in mt7915_mcu_get_txpower_sku()
3150 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(ATE_CTRL), &req, in mt7915_mcu_set_test_param()
3168 return mt76_mcu_send_msg(&dev->mt76, in mt7915_mcu_set_sku_en()
3186 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_SER_TRIGGER), in mt7915_mcu_set_ser()
3235 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(TXBF_ACTION), &req, in mt7915_mcu_set_txbf()
3256 .band_idx = mvif->mt76.band_idx, in mt7915_mcu_add_obss_spr()
3260 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(SET_SPR), &req, in mt7915_mcu_add_obss_spr()
3270 struct mt76_phy *mphy = phy->mt76; in mt7915_mcu_get_rx_rate()
3277 .band = mvif->mt76.band_idx, in mt7915_mcu_get_rx_rate()
3286 ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_CMD(PHY_STAT_INFO), in mt7915_mcu_get_rx_rate()
3308 rate->mcs = mt76_get_rate(&dev->mt76, sband, rate->mcs, cck); in mt7915_mcu_get_rx_rate()
3378 skb = __mt76_connac_mcu_alloc_sta_req(&dev->mt76, &mvif->mt76, in mt7915_mcu_update_bss_color()
3389 return mt76_mcu_skb_send_msg(&dev->mt76, skb, in mt7915_mcu_update_bss_color()
3421 .own_mac_idx = mvif->mt76.omac_idx, in mt7915_mcu_twt_agrt_update()
3425 .bss_idx = mvif->mt76.idx, in mt7915_mcu_twt_agrt_update()
3439 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(TWT_AGRT_UPDATE), in mt7915_mcu_twt_agrt_update()
3458 return mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD(RF_REG_ACCESS), in mt7915_mcu_rf_regval()
3461 ret = mt76_mcu_send_and_get_msg(&dev->mt76, MCU_EXT_QUERY(RF_REG_ACCESS), in mt7915_mcu_rf_regval()