/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7615/ |
H A D | init.c | 433 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable() 434 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable() 435 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable() 488 index = dev->dbdc_support ? mphy->band_idx : mphy->leds.pin; in mt7615_led_set_config() 497 if (mphy->band_idx) in mt7615_led_set_config() 548 if (!mphy) in mt7615_register_ext_phy() 551 phy = mphy->priv; in mt7615_register_ext_phy() 553 phy->mt76 = mphy; in mt7615_register_ext_phy() 554 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy() 555 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy() [all …]
|
H 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 …]
|
H A D | eeprom.c | 108 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 109 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 115 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 121 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 129 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 135 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 138 dev->mphy.cap.has_2ghz = true; in mt7615_eeprom_parse_hw_band_cap() 139 dev->mphy.cap.has_5ghz = true; in mt7615_eeprom_parse_hw_band_cap() 169 dev->mphy.antenna_mask = dev->chainmask; in mt7615_eeprom_parse_hw_cap() 170 dev->mphy.chainmask = dev->chainmask; in mt7615_eeprom_parse_hw_cap() [all …]
|
H 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()
|
H A D | mac.c | 731 struct mt76_phy *mphy = &dev->mphy; in mt7615_mac_write_txwi() local 1320 struct mt76_phy *mphy; in mt7615_fill_txs() local 1420 mphy = &dev->mphy; in mt7615_fill_txs() 1939 state = mphy->chan_state; in mt7615_phy_update_channel() 2023 struct mt76_phy *mphy; in mt7615_pm_wake_work() local 2027 mphy = dev->phy.mt76; in mt7615_pm_wake_work() 2050 ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, in mt7615_pm_wake_work() 2094 struct mt76_phy *mphy; in mt7615_mac_work() local 2099 phy = mphy->priv; in mt7615_mac_work() 2105 mphy->mac_work_count = 0; in mt7615_mac_work() [all …]
|
H 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()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt76x0/ |
H 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()
|
H A D | usb.c | 75 clear_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt76x0u_cleanup() 84 clear_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x0u_stop() 86 cancel_delayed_work_sync(&dev->mphy.mac_work); in mt76x0u_stop() 90 if (test_bit(MT76_REMOVED, &dev->mphy.state)) in mt76x0u_stop() 112 ieee80211_queue_delayed_work(dev->mt76.hw, &dev->mphy.mac_work, in mt76x0u_start() 116 set_bit(MT76_STATE_RUNNING, &dev->mphy.state); in mt76x0u_start() 200 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt76x0u_register_device() 291 bool initialized = test_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt76x0_disconnect() 311 clear_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state); in mt76x0_suspend()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt76x2/ |
H 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 …]
|
H 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 …]
|
H 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 …]
|
H 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()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/ |
H A D | mt792x_mac.c | 12 struct mt76_phy *mphy; in mt792x_mac_work() local 16 phy = mphy->priv; in mt792x_mac_work() 20 mt76_update_survey(mphy); in mt792x_mac_work() 21 if (++mphy->mac_work_count == 2) { in mt792x_mac_work() 22 mphy->mac_work_count = 0; in mt792x_mac_work() 246 state = mphy->chan_state; in mt792x_phy_update_channel() 318 struct mt76_phy *mphy; in mt792x_pm_wake_work() local 322 mphy = dev->phy.mt76; in mt792x_pm_wake_work() 340 ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, in mt792x_pm_wake_work() 353 struct mt76_phy *mphy; in mt792x_pm_power_save_work() local [all …]
|
H 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 …]
|
H 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 …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7915/ |
H A D | init.c | 228 struct mt76_phy *mphy; in mt7915_led_set_config() local 246 if (dev->mphy.leds.al) in mt7915_led_set_config() 248 if (mphy->band_idx) in mt7915_led_set_config() 631 struct mt76_phy *mphy; in mt7915_alloc_ext_phy() local 637 if (!mphy) in mt7915_alloc_ext_phy() 640 phy = mphy->priv; in mt7915_alloc_ext_phy() 642 phy->mt76 = mphy; in mt7915_alloc_ext_phy() 668 mphy->macaddr[0] |= 2; in mt7915_register_ext_phy() 671 mt76_eeprom_override(mphy); in mt7915_register_ext_phy() 690 mt76_unregister_phy(mphy); in mt7915_register_ext_phy() [all …]
|
H 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 …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7996/ |
H A D | init.c | 50 struct mt76_phy *mphy; in mt7996_led_set_config() local 69 if (mphy->leds.al) in mt7996_led_set_config() 335 struct mt76_phy *mphy; in mt7996_register_phy() local 353 if (!mphy) in mt7996_register_phy() 356 phy = mphy->priv; in mt7996_register_phy() 358 phy->mt76 = mphy; in mt7996_register_phy() 359 mphy->dev->phys[band] = mphy; in mt7996_register_phy() 375 mphy->macaddr[0] |= 2; in mt7996_register_phy() 380 mt76_eeprom_override(mphy); in mt7996_register_phy() 411 struct mt76_phy *mphy; in mt7996_unregister_phy() local [all …]
|
/openbmc/linux/drivers/phy/ralink/ |
H A D | phy-mt7621-pci.c | 212 struct mt7621_pci_phy *mphy = phy_get_drvdata(phy); in mt7621_pci_phy_init() local 214 if (mphy->bypass_pipe_rst) in mt7621_pci_phy_init() 215 mt7621_bypass_pipe_rst(mphy); in mt7621_pci_phy_init() 217 return mt7621_set_phy_for_ssc(mphy); in mt7621_pci_phy_init() 222 struct mt7621_pci_phy *mphy = phy_get_drvdata(phy); in mt7621_pci_phy_power_on() local 225 mt7621_phy_rmw(mphy, RG_PE1_FRC_PHY_REG, in mt7621_pci_phy_power_on() 228 if (mphy->has_dual_port) { in mt7621_pci_phy_power_on() 229 mt7621_phy_rmw(mphy, RG_PE1_FRC_PHY_REG + RG_P0_TO_P1_WIDTH, in mt7621_pci_phy_power_on() 238 struct mt7621_pci_phy *mphy = phy_get_drvdata(phy); in mt7621_pci_phy_power_off() local 241 mt7621_phy_rmw(mphy, RG_PE1_FRC_PHY_REG, in mt7621_pci_phy_power_off() [all …]
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7921/ |
H A D | init.c | 116 mt76_eeprom_override(&dev->mphy); in __mt7921_init_hardware() 131 set_bit(MT76_STATE_INITIALIZED, &dev->mphy.state); in mt7921_init_hardware() 159 mt76_set_stream_caps(&dev->mphy, true); in mt7921_init_work() 205 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt792x_mac_work); in mt7921_register_device() 246 dev->mphy.sband_2g.sband.ht_cap.cap |= in mt7921_register_device() 249 dev->mphy.sband_5g.sband.ht_cap.cap |= in mt7921_register_device() 252 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7921_register_device() 259 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7921_register_device() 263 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7921_register_device() 264 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7921_register_device()
|
H 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 mt792x_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 mt792x_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()
|
H 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()
|
H 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_MCU_RESET, &dev->mphy.state); in mt7921s_mac_reset() 120 clear_bit(MT76_MCU_RESET, &dev->mphy.state); in mt7921s_mac_reset()
|
/openbmc/linux/drivers/net/wireless/mediatek/mt76/mt7603/ |
H 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 …]
|
H 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() 150 set_bit(MT76_RESET, &dev->mphy.state); in mt7603_set_channel() 153 mt76_set_channel(&dev->mphy); in mt7603_set_channel() 159 dev->mphy.chandef = *def; in mt7603_set_channel() 183 clear_bit(MT76_RESET, &dev->mphy.state); in mt7603_set_channel() 185 mt76_txq_schedule_all(&dev->mphy); in mt7603_set_channel() 220 struct mt76_phy *mphy = &dev->mphy; in mt7603_set_sar_specs() local [all …]
|