/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt7615/ |
A D | init.c | 427 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable() 428 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable() 429 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable() 482 index = dev->dbdc_support ? mphy->band_idx : mphy->leds.pin; in mt7615_led_set_config() 491 if (mphy->band_idx) in mt7615_led_set_config() 542 if (!mphy) in mt7615_register_ext_phy() 545 phy = mphy->priv; in mt7615_register_ext_phy() 547 phy->mt76 = mphy; in mt7615_register_ext_phy() 548 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy() 549 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy() [all …]
|
A D | testmode.c | 51 struct mt76_phy *mphy = phy->mt76; in mt7615_tm_set_tx_power() local 53 struct cfg80211_chan_def *chandef = &mphy->chandef; in mt7615_tm_set_tx_power() 70 if (mphy->test.state != MT76_TM_STATE_OFF) in mt7615_tm_set_tx_power() 71 tx_power = mphy->test.tx_power; in mt7615_tm_set_tx_power() 261 struct mt7615_phy *phy = mphy->priv; in mt7615_tm_set_state() 262 struct mt76_testmode_data *td = &mphy->test; in mt7615_tm_set_state() 265 mphy->test.state = state; in mt7615_tm_set_state() 299 struct mt76_testmode_data *td = &mphy->test; in mt7615_tm_set_params() 300 struct mt7615_phy *phy = mphy->priv; in mt7615_tm_set_params() 310 if (td->tx_antenna_mask & ~mphy->chainmask) in mt7615_tm_set_params() [all …]
|
A D | eeprom.c | 103 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 104 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 110 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 116 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 124 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 127 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 133 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 134 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 164 dev->mphy.antenna_mask = dev->chainmask; in mt7615_eeprom_parse_hw_cap() 165 dev->mphy.chainmask = dev->chainmask; in mt7615_eeprom_parse_hw_cap() [all …]
|
A D | mac.c | 735 struct mt76_phy *mphy = &dev->mphy; in mt7615_mac_write_txwi() local 1349 struct mt76_phy *mphy; in mt7615_fill_txs() local 1449 mphy = &dev->mphy; in mt7615_fill_txs() 1965 state = mphy->chan_state; in mt7615_phy_update_channel() 2049 struct mt76_phy *mphy; in mt7615_pm_wake_work() local 2053 mphy = dev->phy.mt76; in mt7615_pm_wake_work() 2076 ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, in mt7615_pm_wake_work() 2120 struct mt76_phy *mphy; in mt7615_mac_work() local 2125 phy = mphy->priv; in mt7615_mac_work() 2131 mphy->mac_work_count = 0; in mt7615_mac_work() [all …]
|
A D | sdio_mcu.c | 58 struct mt76_phy *mphy = &dev->mt76.phy; in __mt7663s_mcu_drv_pmctrl() local 72 clear_bit(MT76_STATE_PM, &mphy->state); in __mt7663s_mcu_drv_pmctrl() 85 struct mt76_phy *mphy = &dev->mt76.phy; in mt7663s_mcu_drv_pmctrl() local 90 if (test_bit(MT76_STATE_PM, &mphy->state)) in mt7663s_mcu_drv_pmctrl() 101 struct mt76_phy *mphy = &dev->mt76.phy; in mt7663s_mcu_fw_pmctrl() local 108 if (mt76_connac_skip_fw_pmctrl(mphy, pm)) in mt7663s_mcu_fw_pmctrl() 119 clear_bit(MT76_STATE_PM, &mphy->state); in mt7663s_mcu_fw_pmctrl() 177 set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state); in mt7663s_mcu_init()
|
A D | pci_init.c | 55 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt7615_init_hardware() 78 dev->mphy.leds.cdev.brightness_set = mt7615_led_set_brightness; in mt7615_register_device() 79 dev->mphy.leds.cdev.blink_set = mt7615_led_set_blink; in mt7615_register_device() 100 mt7615_init_txpower(dev, &dev->mphy.sband_2g.sband); in mt7615_register_device() 101 mt7615_init_txpower(dev, &dev->mphy.sband_5g.sband); in mt7615_register_device()
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt76x0/ |
A D | main.c | 19 mt76_set_channel(&dev->mphy); in mt76x0_set_channel() 31 mt76_txq_schedule_all(&dev->mphy); in mt76x0_set_channel() 39 struct mt76_phy *mphy = &dev->mphy; in mt76x0_set_sar_specs() local 42 if (!cfg80211_chandef_valid(&mphy->chandef)) in mt76x0_set_sar_specs() 49 dev->txpower_conf = mt76_get_sar_power(mphy, mphy->chandef.chan, in mt76x0_set_sar_specs() 51 if (test_bit(MT76_STATE_RUNNING, &mphy->state)) in mt76x0_set_sar_specs() 73 struct mt76_phy *mphy = &dev->mphy; in mt76x0_config() local 76 dev->txpower_conf = mt76_get_sar_power(mphy, in mt76x0_config() 77 mphy->chandef.chan, in mt76x0_config() 79 if (test_bit(MT76_STATE_RUNNING, &mphy->state)) in mt76x0_config()
|
A D | eeprom.c | 55 dev->mphy.cap.has_2ghz, dev->mphy.cap.has_5ghz); in mt76x0_set_chip_cap() 58 dev->mphy.cap.has_2ghz = false; in mt76x0_set_chip_cap() 63 dev->mphy.cap.has_5ghz = false; in mt76x0_set_chip_cap() 112 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x0_read_rx_gain() 132 struct cfg80211_chan_def *chandef = &dev->mphy.chandef; in mt76x0_get_delta() 333 memcpy(dev->mphy.macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR, in mt76x0_eeprom_init() 335 mt76_eeprom_override(&dev->mphy); in mt76x0_eeprom_init() 336 mt76x02_mac_setaddr(dev, dev->mphy.macaddr); in mt76x0_eeprom_init()
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt76x2/ |
A D | pci_main.c | 22 set_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x2_start() 31 clear_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x2_stop() 43 set_bit(MT76_RESET, &dev->mphy.state); in mt76x2_set_channel() 45 mt76_set_channel(&dev->mphy); in mt76x2_set_channel() 55 clear_bit(MT76_RESET, &dev->mphy.state); in mt76x2_set_channel() 61 mt76_txq_schedule_all(&dev->mphy); in mt76x2_set_channel() 81 struct mt76_phy *mphy = &dev->mphy; in mt76x2_config() local 84 dev->txpower_conf = mt76_get_sar_power(mphy, in mt76x2_config() 85 mphy->chandef.chan, in mt76x2_config() 124 dev->mphy.antenna_mask = tx_ant; in mt76x2_set_antenna() [all …]
|
A D | usb_main.c | 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() 29 clear_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x2u_stop() 44 set_bit(MT76_RESET, &dev->mphy.state); in mt76x2u_set_channel() 46 mt76_set_channel(&dev->mphy); in mt76x2u_set_channel() 55 clear_bit(MT76_RESET, &dev->mphy.state); in mt76x2u_set_channel() 59 mt76_txq_schedule_all(&dev->mphy); in mt76x2u_set_channel() 81 struct mt76_phy *mphy = &dev->mphy; in mt76x2u_config() local 84 dev->txpower_conf = mt76_get_sar_power(mphy, in mt76x2u_config() 85 mphy->chandef.chan, in mt76x2u_config() [all …]
|
A D | phy.c | 139 enum nl80211_chan_width width = dev->mphy.chandef.width; in mt76x2_phy_set_txpower() 140 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2_phy_set_txpower() 156 dev->mphy.txpower_cur = mt76x02_get_max_rate_power(&t); in mt76x2_phy_set_txpower() 205 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2_phy_tssi_compensate() 255 dev->mphy.chandef.width >= NL80211_CHAN_WIDTH_40) in mt76x2_phy_set_gain_val() 259 dev->mphy.chandef.chan->band == NL80211_BAND_2GHZ && in mt76x2_phy_set_gain_val() 260 dev->mphy.chandef.width < NL80211_CHAN_WIDTH_40) in mt76x2_phy_set_gain_val() 270 if (dev->mphy.chandef.chan->flags & IEEE80211_CHAN_RADAR) in mt76x2_phy_set_gain_val() 300 if (dev->mphy.chandef.width == NL80211_CHAN_WIDTH_80) { in mt76x2_phy_update_channel_gain() 318 if (dev->mphy.chandef.chan->band == NL80211_BAND_2GHZ) in mt76x2_phy_update_channel_gain() [all …]
|
A D | init.c | 16 struct mt76_phy *mphy = &dev->mphy; in mt76x2_set_sar_specs() local 19 if (!cfg80211_chandef_valid(&mphy->chandef)) in mt76x2_set_sar_specs() 26 dev->txpower_conf = mt76_get_sar_power(mphy, mphy->chandef.chan, in mt76x2_set_sar_specs() 31 if (test_bit(MT76_STATE_RUNNING, &mphy->state)) in mt76x2_set_sar_specs()
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt7915/ |
A D | init.c | 224 struct mt76_phy *mphy; in mt7915_led_set_config() local 242 if (dev->mphy.leds.al) in mt7915_led_set_config() 244 if (mphy->band_idx) in mt7915_led_set_config() 607 struct mt76_phy *mphy; in mt7915_alloc_ext_phy() local 613 if (!mphy) in mt7915_alloc_ext_phy() 616 phy = mphy->priv; in mt7915_alloc_ext_phy() 618 phy->mt76 = mphy; in mt7915_alloc_ext_phy() 644 mphy->macaddr[0] |= 2; in mt7915_register_ext_phy() 647 mt76_eeprom_override(mphy); in mt7915_register_ext_phy() 666 mt76_unregister_phy(mphy); in mt7915_register_ext_phy() [all …]
|
A D | testmode.c | 41 struct mt76_phy *mphy = phy->mt76; in mt7915_tm_set_tx_power() local 257 struct mt76_phy *mphy = phy->mt76; in mt7915_tm_set_tx_len() local 258 struct mt76_testmode_data *td = &mphy->test; in mt7915_tm_set_tx_len() 275 sband = &mphy->sband_5g.sband; in mt7915_tm_set_tx_len() 277 sband = &mphy->sband_6g.sband; in mt7915_tm_set_tx_len() 279 sband = &mphy->sband_2g.sband; in mt7915_tm_set_tx_len() 308 switch (mphy->chandef.width) { in mt7915_tm_set_tx_len() 651 struct mt7915_phy *phy = mphy->priv; in mt7915_tm_set_state() 654 mphy->test.state = state; in mt7915_tm_set_state() 694 struct mt7915_phy *phy = mphy->priv; in mt7915_tm_set_params() [all …]
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt7996/ |
A D | init.c | 48 struct mt76_phy *mphy; in mt7996_led_set_config() local 67 if (mphy->leds.al) in mt7996_led_set_config() 309 struct mt76_phy *mphy; in mt7996_register_phy() local 327 if (!mphy) in mt7996_register_phy() 330 phy = mphy->priv; in mt7996_register_phy() 332 phy->mt76 = mphy; in mt7996_register_phy() 333 mphy->dev->phys[band] = mphy; in mt7996_register_phy() 349 mphy->macaddr[0] |= 2; in mt7996_register_phy() 354 mt76_eeprom_override(mphy); in mt7996_register_phy() 385 struct mt76_phy *mphy; in mt7996_unregister_phy() local [all …]
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/ |
A D | mt76x02_util.c | 104 MT_LED_CTRL_KICK(mphy->leds.pin); in mt76x02_led_set_config() 105 if (mphy->leds.al) in mt76x02_led_set_config() 135 mt76x02_led_set_config(mphy, 0, 0xff); in mt76x02_led_set_brightness() 137 mt76x02_led_set_config(mphy, 0xff, 0); in mt76x02_led_set_brightness() 169 dev->mphy.leds.cdev.brightness_set = in mt76x02_init_device() 189 dev->mphy.sband_2g.sband.ht_cap.cap |= in mt76x02_init_device() 193 dev->mphy.chainmask = 0x202; in mt76x02_init_device() 194 dev->mphy.antenna_mask = 3; in mt76x02_init_device() 196 dev->mphy.chainmask = 0x101; in mt76x02_init_device() 197 dev->mphy.antenna_mask = 1; in mt76x02_init_device() [all …]
|
A D | mt76x02_mmio.c | 18 struct mt76_queue *q = dev->mphy.q_tx[MT_TXQ_PSD]; in mt76x02_pre_tbtt_tasklet() 141 mt76_txq_schedule_all(&dev->mphy); in mt76x02_tx_worker() 285 mt76_queue_kick(dev, dev->mphy.q_tx[MT_TXQ_PSD]); in mt76x02_irq_handler() 350 q = dev->mphy.q_tx[i]; in mt76x02_tx_hang() 392 clear_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x02_reset_state() 433 set_bit(MT76_RESET, &dev->mphy.state); in mt76x02_watchdog_reset() 494 clear_bit(MT76_RESET, &dev->mphy.state); in mt76x02_watchdog_reset() 510 set_bit(MT76_RESTART, &dev->mphy.state); in mt76x02_watchdog_reset() 515 mt76_txq_schedule_all(&dev->mphy); in mt76x02_watchdog_reset() 527 clear_bit(MT76_RESTART, &dev->mphy.state); in mt76x02_reconfig_complete() [all …]
|
A D | mt76x02_mac.c | 28 memset(dev->mphy.aggr_stats, 0, sizeof(dev->mphy.aggr_stats)); in mt76x02_mac_reset_counters() 204 int band = dev->mphy.chandef.chan->band; in mt76x02_mac_tx_rate_val() 497 dev->mphy.chandef.chan->band); in mt76x02_mac_fill_tx_status() 503 dev->mphy.chandef.chan->band); in mt76x02_mac_fill_tx_status() 507 dev->mphy.chandef.chan->band); in mt76x02_mac_fill_tx_status() 734 eth_random_addr(dev->mphy.macaddr); in mt76x02_mac_setaddr() 737 dev->mphy.macaddr); in mt76x02_mac_setaddr() 746 get_unaligned_le32(dev->mphy.macaddr)); in mt76x02_mac_setaddr() 1029 state = mphy->chan_state; in mt76x02_update_channel() 1185 mphy.mac_work.work); in mt76x02_mac_work() [all …]
|
/linux-6.3-rc2/drivers/phy/ralink/ |
A D | phy-mt7621-pci.c | 213 struct mt7621_pci_phy *mphy = phy_get_drvdata(phy); in mt7621_pci_phy_init() local 215 if (mphy->bypass_pipe_rst) in mt7621_pci_phy_init() 216 mt7621_bypass_pipe_rst(mphy); in mt7621_pci_phy_init() 218 return mt7621_set_phy_for_ssc(mphy); in mt7621_pci_phy_init() 223 struct mt7621_pci_phy *mphy = phy_get_drvdata(phy); in mt7621_pci_phy_power_on() local 226 mt7621_phy_rmw(mphy, RG_PE1_FRC_PHY_REG, in mt7621_pci_phy_power_on() 229 if (mphy->has_dual_port) { in mt7621_pci_phy_power_on() 230 mt7621_phy_rmw(mphy, RG_PE1_FRC_PHY_REG + RG_P0_TO_P1_WIDTH, in mt7621_pci_phy_power_on() 239 struct mt7621_pci_phy *mphy = phy_get_drvdata(phy); in mt7621_pci_phy_power_off() local 242 mt7621_phy_rmw(mphy, RG_PE1_FRC_PHY_REG, in mt7621_pci_phy_power_off() [all …]
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt7921/ |
A D | mac.c | 288 sband = &mphy->sband_5g.sband; in mt7921_mac_fill_rx() 837 state = mphy->chan_state; in mt7921_phy_update_channel() 1010 struct mt76_phy *mphy; in mt7921_mac_work() local 1014 phy = mphy->priv; in mt7921_mac_work() 1018 mt76_update_survey(mphy); in mt7921_mac_work() 1020 mphy->mac_work_count = 0; in mt7921_mac_work() 1035 struct mt76_phy *mphy; in mt7921_pm_wake_work() local 1039 mphy = dev->phy.mt76; in mt7921_pm_wake_work() 1057 ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, in mt7921_pm_wake_work() 1069 struct mt76_phy *mphy; in mt7921_pm_power_save_work() local [all …]
|
A D | sdio_mac.c | 63 clear_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state); in mt7921s_wfsys_reset() 76 set_bit(MT76_MCU_RESET, &dev->mphy.state); in mt7921s_init_reset() 88 clear_bit(MT76_MCU_RESET, &dev->mphy.state); in mt7921s_init_reset() 99 mt76_txq_schedule_all(&dev->mphy); in mt7921s_mac_reset() 101 set_bit(MT76_RESET, &dev->mphy.state); in mt7921s_mac_reset() 102 set_bit(MT76_MCU_RESET, &dev->mphy.state); in mt7921s_mac_reset() 120 clear_bit(MT76_MCU_RESET, &dev->mphy.state); in mt7921s_mac_reset() 137 clear_bit(MT76_RESET, &dev->mphy.state); in mt7921s_mac_reset()
|
A D | testmode.c | 43 struct mt76_phy *phy = &dev->mphy; in mt7921_tm_set() 115 struct mt76_phy *mphy = hw->priv; in mt7921_testmode_cmd() local 116 struct mt7921_phy *phy = mphy->priv; in mt7921_testmode_cmd() 119 if (!test_bit(MT76_STATE_RUNNING, &mphy->state) || in mt7921_testmode_cmd() 152 struct mt76_phy *mphy = hw->priv; in mt7921_testmode_dump() local 153 struct mt7921_phy *phy = mphy->priv; in mt7921_testmode_dump() 156 if (!test_bit(MT76_STATE_RUNNING, &mphy->state) || in mt7921_testmode_dump() 158 !mt76_testmode_enabled(mphy)) in mt7921_testmode_dump()
|
A D | sdio_mcu.c | 95 set_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state); in mt7921s_mcu_init() 103 struct mt76_phy *mphy = &dev->mt76.phy; in mt7921s_mcu_drv_pmctrl() local 115 if (!err && test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state)) in mt7921s_mcu_drv_pmctrl() 127 clear_bit(MT76_STATE_PM, &mphy->state); in mt7921s_mcu_drv_pmctrl() 139 struct mt76_phy *mphy = &dev->mt76.phy; in mt7921s_mcu_fw_pmctrl() local 146 if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state)) { in mt7921s_mcu_fw_pmctrl() 166 clear_bit(MT76_STATE_PM, &mphy->state); in mt7921s_mcu_fw_pmctrl()
|
/linux-6.3-rc2/drivers/net/wireless/mediatek/mt76/mt7603/ |
A D | init.c | 116 int rx_chains = dev->mphy.antenna_mask; in mt7603_phy_init() 287 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt7603_init_hardware() 349 val = MT_LED_CTRL_REPLAY(mphy->leds.pin) | in mt7603_led_set_config() 350 MT_LED_CTRL_KICK(mphy->leds.pin); in mt7603_led_set_config() 351 if (mphy->leds.al) in mt7603_led_set_config() 352 val |= MT_LED_CTRL_POLARITY(mphy->leds.pin); in mt7603_led_set_config() 368 mt7603_led_set_config(mphy, delta_on, delta_off); in mt7603_led_set_blink() 379 mt7603_led_set_config(mphy, 0, 0xff); in mt7603_led_set_brightness() 381 mt7603_led_set_config(mphy, 0xff, 0); in mt7603_led_set_brightness() 470 dev->mphy.txpower_cur = target_power; in mt7603_init_txpower() [all …]
|
A D | main.c | 18 dev->mphy.survey_time = ktime_get_boottime(); in mt7603_start() 19 set_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt7603_start() 20 mt7603_mac_work(&dev->mphy.mac_work.work); in mt7603_start() 31 cancel_delayed_work_sync(&dev->mphy.mac_work); in mt7603_stop() 149 set_bit(MT76_RESET, &dev->mphy.state); in mt7603_set_channel() 152 mt76_set_channel(&dev->mphy); in mt7603_set_channel() 158 dev->mphy.chandef = *def; in mt7603_set_channel() 182 clear_bit(MT76_RESET, &dev->mphy.state); in mt7603_set_channel() 184 mt76_txq_schedule_all(&dev->mphy); in mt7603_set_channel() 219 struct mt76_phy *mphy = &dev->mphy; in mt7603_set_sar_specs() local [all …]
|