Lines Matching +full:chan +full:- +full:name
1 // SPDX-License-Identifier: ISC
3 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name>
14 int err = -EINVAL, power = hw->conf.power_level * 2; in mt76x2_set_sar_specs()
15 struct mt76x02_dev *dev = hw->priv; in mt76x2_set_sar_specs()
16 struct mt76_phy *mphy = &dev->mphy; in mt76x2_set_sar_specs()
18 mutex_lock(&dev->mt76.mutex); in mt76x2_set_sar_specs()
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()
28 /* convert to per-chain power for 2x2 devices */ in mt76x2_set_sar_specs()
29 dev->txpower_conf -= 6; in mt76x2_set_sar_specs()
31 if (test_bit(MT76_STATE_RUNNING, &mphy->state)) in mt76x2_set_sar_specs()
34 mutex_unlock(&dev->mt76.mutex); in mt76x2_set_sar_specs()
183 struct ieee80211_channel *chan; in mt76x2_init_txpower() local
188 for (i = 0; i < sband->n_channels; i++) { in mt76x2_init_txpower()
189 chan = &sband->channels[i]; in mt76x2_init_txpower()
191 mt76x2_get_power_info(dev, &txp, chan); in mt76x2_init_txpower()
192 mt76x2_get_rate_power(dev, &t, chan); in mt76x2_init_txpower()
194 chan->orig_mpwr = mt76x02_get_max_rate_power(&t) + in mt76x2_init_txpower()
196 chan->orig_mpwr = DIV_ROUND_UP(chan->orig_mpwr, 2); in mt76x2_init_txpower()
199 chan->orig_mpwr += 3; in mt76x2_init_txpower()
200 chan->max_power = min_t(int, chan->max_reg_power, in mt76x2_init_txpower()
201 chan->orig_mpwr); in mt76x2_init_txpower()