Home
last modified time | relevance | path

Searched refs:mphy (Results 1 – 25 of 97) sorted by relevance

1234

/freebsd/sys/contrib/dev/mediatek/mt76/mt7615/
H A Dinit.c430 dev->mphy.chainmask = dev->mphy.antenna_mask; in mt7615_cap_dbdc_enable()
431 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
432 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7615_cap_dbdc_enable()
485 index = dev->dbdc_support ? mphy->band_idx : mphy->leds.pin; in mt7615_led_set_config()
494 if (mphy->band_idx) in mt7615_led_set_config()
545 if (!mphy) in mt7615_register_ext_phy()
548 phy = mphy->priv; in mt7615_register_ext_phy()
550 phy->mt76 = mphy; in mt7615_register_ext_phy()
551 mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask; in mt7615_register_ext_phy()
552 mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1; in mt7615_register_ext_phy()
[all …]
H A Dtestmode.c51 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 Deeprom.c108 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 Dmac.c731 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 Dpci_init.c55 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()
/freebsd/sys/contrib/dev/mediatek/mt76/
H A Dmt792x_mac.c15 struct mt76_phy *mphy; in mt792x_mac_work() local
19 phy = mphy->priv; in mt792x_mac_work()
23 mt76_update_survey(mphy); in mt792x_mac_work()
24 if (++mphy->mac_work_count == 2) { in mt792x_mac_work()
25 mphy->mac_work_count = 0; in mt792x_mac_work()
249 state = mphy->chan_state; in mt792x_phy_update_channel()
321 struct mt76_phy *mphy; in mt792x_pm_wake_work() local
325 mphy = dev->phy.mt76; in mt792x_pm_wake_work()
343 ieee80211_queue_delayed_work(mphy->hw, &mphy->mac_work, in mt792x_pm_wake_work()
356 struct mt76_phy *mphy; in mt792x_pm_power_save_work() local
[all …]
H A Dmt76x02_util.c104 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 Dmt76x02_mmio.c18 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 …]
H A Dmt76x02_mac.c28 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()
737 eth_random_addr(dev->mphy.macaddr); in mt76x02_mac_setaddr()
740 dev->mphy.macaddr); in mt76x02_mac_setaddr()
749 get_unaligned_le32(dev->mphy.macaddr)); in mt76x02_mac_setaddr()
1033 state = mphy->chan_state; in mt76x02_update_channel()
1189 mphy.mac_work.work); in mt76x02_mac_work()
[all …]
/freebsd/sys/contrib/dev/mediatek/mt76/mt76x2/
H A Dpci_main.c22 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 Dusb_main.c18 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 Dphy.c139 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 Dinit.c16 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()
/freebsd/sys/contrib/dev/mediatek/mt76/mt7996/
H A Dinit.c53 struct mt76_phy *mphy; in mt7996_led_set_config() local
72 if (mphy->leds.al) in mt7996_led_set_config()
342 struct mt76_phy *mphy; in mt7996_register_phy() local
360 if (!mphy) in mt7996_register_phy()
363 phy = mphy->priv; in mt7996_register_phy()
365 phy->mt76 = mphy; in mt7996_register_phy()
366 mphy->dev->phys[band] = mphy; in mt7996_register_phy()
390 mphy->macaddr[0] |= 2; in mt7996_register_phy()
395 mt76_eeprom_override(mphy); in mt7996_register_phy()
426 struct mt76_phy *mphy; in mt7996_unregister_phy() local
[all …]
H A Deeprom.c153 struct mt76_phy *mphy = phy->mt76; in mt7996_eeprom_parse_hw_cap() local
182 mphy->antenna_mask = BIT(nss) - 1; in mt7996_eeprom_parse_hw_cap()
183 mphy->chainmask = (BIT(path) - 1) << dev->chainshift[band_idx]; in mt7996_eeprom_parse_hw_cap()
184 dev->chainmask |= mphy->chainmask; in mt7996_eeprom_parse_hw_cap()
187 hweight16(mphy->chainmask); in mt7996_eeprom_parse_hw_cap()
216 memcpy(dev->mphy.macaddr, dev->mt76.eeprom.data + MT_EE_MAC_ADDR, ETH_ALEN); in mt7996_eeprom_init()
218 memcpy(dev->mphy.macaddr, (u8 *)dev->mt76.eeprom.data + MT_EE_MAC_ADDR, ETH_ALEN); in mt7996_eeprom_init()
220 mt76_eeprom_override(&dev->mphy); in mt7996_eeprom_init()
H A Dmac.c484 phy = mphy->priv; in mt7996_mac_fill_rx()
519 sband = &mphy->sband_5g.sband; in mt7996_mac_fill_rx()
521 sband = &mphy->sband_6g.sband; in mt7996_mac_fill_rx()
523 sband = &mphy->sband_2g.sband; in mt7996_mac_fill_rx()
1169 struct mt76_phy *mphy; in mt7996_mac_add_txs_skb() local
1774 &dev->mphy.mac_work, in mt7996_mac_full_reset()
2188 struct mt76_phy *mphy; in mt7996_mac_work() local
2192 phy = mphy->priv; in mt7996_mac_work()
2196 mt76_update_survey(mphy); in mt7996_mac_work()
2198 mphy->mac_work_count = 0; in mt7996_mac_work()
[all …]
/freebsd/sys/contrib/dev/mediatek/mt76/mt7915/
H A Dinit.c234 struct mt76_phy *mphy; in mt7915_led_set_config() local
252 if (dev->mphy.leds.al) in mt7915_led_set_config()
254 if (mphy->band_idx) in mt7915_led_set_config()
645 struct mt76_phy *mphy; in mt7915_alloc_ext_phy() local
651 if (!mphy) in mt7915_alloc_ext_phy()
654 phy = mphy->priv; in mt7915_alloc_ext_phy()
656 phy->mt76 = mphy; in mt7915_alloc_ext_phy()
690 mphy->macaddr[0] |= 2; in mt7915_register_ext_phy()
693 mt76_eeprom_override(mphy); in mt7915_register_ext_phy()
714 mt76_unregister_phy(mphy); in mt7915_register_ext_phy()
[all …]
H A Dtestmode.c41 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 …]
/freebsd/sys/contrib/dev/mediatek/mt76/mt7921/
H A Dinit.c116 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()
209 INIT_DELAYED_WORK(&dev->mphy.mac_work, mt792x_mac_work); in mt7921_register_device()
250 dev->mphy.sband_2g.sband.ht_cap.cap |= in mt7921_register_device()
253 dev->mphy.sband_5g.sband.ht_cap.cap |= in mt7921_register_device()
256 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7921_register_device()
263 dev->mphy.sband_5g.sband.vht_cap.cap |= in mt7921_register_device()
267 dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask; in mt7921_register_device()
268 dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask; in mt7921_register_device()
H A Dsdio_mac.c63 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()
H A Dtestmode.c43 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 Dsdio_mcu.c95 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()
/freebsd/sys/contrib/dev/mediatek/mt76/mt7603/
H A Dinit.c116 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 Dmain.c18 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 …]
H A Dbeacon.c27 mt76_tx_queue_skb(dev, dev->mphy.q_tx[MT_TXQ_BEACON], in mt7603_update_beacon_iter()
34 dev->mphy.q_tx[MT_TXQ_CAB]->hw_idx) | in mt7603_update_beacon_iter()
84 q = dev->mphy.q_tx[MT_TXQ_BEACON]; in mt7603_pre_tbtt_tasklet()
95 mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[MT_TXQ_CAB], false); in mt7603_pre_tbtt_tasklet()
101 q = dev->mphy.q_tx[MT_TXQ_CAB]; in mt7603_pre_tbtt_tasklet()
141 mt76_queue_tx_cleanup(dev, dev->mphy.q_tx[MT_TXQ_BEACON], false); in mt7603_pre_tbtt_tasklet()
142 if (dev->mphy.q_tx[MT_TXQ_BEACON]->queued > hweight8(mdev->beacon_mask)) in mt7603_pre_tbtt_tasklet()

1234