/freebsd/sys/contrib/dev/iwlwifi/mvm/ |
H A D | phy-ctxt.c | 12 u8 iwl_mvm_get_channel_width(const struct cfg80211_chan_def *chandef) in iwl_mvm_get_channel_width() argument 14 switch (chandef->width) { in iwl_mvm_get_channel_width() 27 WARN(1, "Invalid channel width=%u", chandef->width); in iwl_mvm_get_channel_width() 36 u8 iwl_mvm_get_ctrl_pos(const struct cfg80211_chan_def *chandef) in iwl_mvm_get_ctrl_pos() argument 38 int offs = chandef->chan->center_freq - chandef->center_freq1; in iwl_mvm_get_ctrl_pos() 119 const struct cfg80211_chan_def *chandef, in iwl_mvm_phy_ctxt_set_rxchain() 126 iwl_mvm_set_chan_info_chandef(mvm, &cmd->ci, chandef); 140 const struct cfg80211_chan_def *chandef, in iwl_mvm_phy_ctxt_cmd_data_v1() 144 chandef in iwl_mvm_phy_ctxt_cmd_data_v1() 130 iwl_mvm_phy_ctxt_cmd_data_v1(struct iwl_mvm * mvm,struct iwl_mvm_phy_ctxt * ctxt,struct iwl_phy_context_cmd_v1 * cmd,struct cfg80211_chan_def * chandef,u8 chains_static,u8 chains_dynamic) iwl_mvm_phy_ctxt_cmd_data_v1() argument 151 iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm * mvm,struct iwl_mvm_phy_ctxt * ctxt,struct iwl_phy_context_cmd * cmd,struct cfg80211_chan_def * chandef,u8 chains_static,u8 chains_dynamic) iwl_mvm_phy_ctxt_cmd_data() argument 208 iwl_mvm_phy_ctxt_apply(struct iwl_mvm * mvm,struct iwl_mvm_phy_ctxt * ctxt,struct cfg80211_chan_def * chandef,u8 chains_static,u8 chains_dynamic,u32 action) iwl_mvm_phy_ctxt_apply() argument 265 iwl_mvm_phy_ctxt_add(struct iwl_mvm * mvm,struct iwl_mvm_phy_ctxt * ctxt,struct cfg80211_chan_def * chandef,u8 chains_static,u8 chains_dynamic) iwl_mvm_phy_ctxt_add() argument 297 iwl_mvm_phy_ctxt_changed(struct iwl_mvm * mvm,struct iwl_mvm_phy_ctxt * ctxt,struct cfg80211_chan_def * chandef,u8 chains_static,u8 chains_dynamic) iwl_mvm_phy_ctxt_changed() argument 352 struct cfg80211_chan_def chandef; iwl_mvm_phy_ctxt_unref() local [all...] |
H A D | ftm-responder.c | 26 static int iwl_mvm_ftm_responder_set_bw_v1(struct cfg80211_chan_def *chandef, in iwl_mvm_ftm_responder_set_bw_v1() 29 switch (chandef->width) { in iwl_mvm_ftm_responder_set_bw_v1() 38 *ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef); in iwl_mvm_ftm_responder_set_bw_v1() 42 *ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef); in iwl_mvm_ftm_responder_set_bw_v1() 51 static int iwl_mvm_ftm_responder_set_bw_v2(struct cfg80211_chan_def *chandef, in iwl_mvm_ftm_responder_set_bw_v2() 55 switch (chandef->width) { in iwl_mvm_ftm_responder_set_bw_v2() 67 *ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef); in iwl_mvm_ftm_responder_set_bw_v2() 72 *ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef); in iwl_mvm_ftm_responder_set_bw_v2() 78 *ctrl_ch_position = iwl_mvm_get_ctrl_pos(chandef); in iwl_mvm_ftm_responder_set_bw_v2() 110 struct cfg80211_chan_def *chandef, in iwl_mvm_ftm_responder_cmd() 23 iwl_mvm_ftm_responder_set_bw_v1(struct cfg80211_chan_def * chandef,u8 * bw,u8 * ctrl_ch_position) iwl_mvm_ftm_responder_set_bw_v1() argument 48 iwl_mvm_ftm_responder_set_bw_v2(struct cfg80211_chan_def * chandef,u8 * format_bw,u8 * ctrl_ch_position,u8 cmd_ver) iwl_mvm_ftm_responder_set_bw_v2() argument 107 iwl_mvm_ftm_responder_cmd(struct iwl_mvm * mvm,struct ieee80211_vif * vif,struct cfg80211_chan_def * chandef,struct ieee80211_bss_conf * link_conf) iwl_mvm_ftm_responder_cmd() argument [all...] |
H A D | tdls.c | 335 struct cfg80211_chan_def *chandef, in iwl_mvm_tdls_config_channel_switch() argument 377 if (!chandef) { in iwl_mvm_tdls_config_channel_switch() 379 mvm->tdls_cs.peer.chandef.chan) { in iwl_mvm_tdls_config_channel_switch() 381 chandef = &mvm->tdls_cs.peer.chandef; in iwl_mvm_tdls_config_channel_switch() 393 chandef = &chanctx->def; in iwl_mvm_tdls_config_channel_switch() 397 if (chandef) in iwl_mvm_tdls_config_channel_switch() 398 iwl_mvm_set_chan_info_chandef(mvm, &cmd.ci, chandef); in iwl_mvm_tdls_config_channel_switch() 488 &mvm->tdls_cs.peer.chandef, in iwl_mvm_tdls_ch_switch_work() 504 struct cfg80211_chan_def *chandef, in iwl_mvm_tdls_channel_switch() 506 iwl_mvm_tdls_channel_switch(struct ieee80211_hw * hw,struct ieee80211_vif * vif,struct ieee80211_sta * sta,u8 oper_class,struct cfg80211_chan_def * chandef,struct sk_buff * tmpl_skb,u32 ch_sw_tm_ie) iwl_mvm_tdls_channel_switch() argument [all...] |
H A D | ftm-initiator.c | 327 u32 freq = peer->chandef.chan->center_freq; in iwl_mvm_ftm_target_chandef_v1() 331 switch (peer->chandef.width) { in iwl_mvm_ftm_target_chandef_v1() 346 peer->chandef.width); in iwl_mvm_ftm_target_chandef_v1() 350 *ctrl_ch_position = (peer->chandef.width > NL80211_CHAN_WIDTH_20) ? in iwl_mvm_ftm_target_chandef_v2() 351 iwl_mvm_get_ctrl_pos(&peer->chandef) : 0; in iwl_mvm_ftm_target_chandef_v2() 362 u32 freq = peer->chandef.chan->center_freq; in iwl_mvm_ftm_target_chandef_v2() 367 switch (peer->chandef.width) { in iwl_mvm_ftm_target_chandef_v2() 397 peer->chandef.width); in iwl_mvm_ftm_target_chandef_v2() 405 *ctrl_ch_position = (peer->chandef.width > NL80211_CHAN_WIDTH_20) ? in iwl_mvm_ftm_put_target_v2() 406 iwl_mvm_get_ctrl_pos(&peer->chandef) in iwl_mvm_ftm_put_target_v2() [all...] |
/freebsd/sys/contrib/dev/rtw89/ |
H A D | chan.c | 168 const struct cfg80211_chan_def *chandef, in rtw89_config_roc_chandef() 173 hal->sub[idx].chandef = *chandef; in rtw89_config_roc_chandef() 181 const struct cfg80211_chan_def *chandef) in rtw89_config_default_chandef() 183 __rtw89_config_entity_chandef(rtwdev, idx, chandef, true); 188 const struct cfg80211_chan_def *chandef) in rtw89_entity_init() 193 if (chandef) { in rtw89_entity_recalc() 202 hal->roc_chandef = *chandef; in rtw89_entity_recalc() 220 struct cfg80211_chan_def chandef = {0}; in rtw89_chanctx_ops_add() 222 rtw89_get_default_chandef(&chandef); in rtw89_chanctx_ops_add() 126 __rtw89_config_entity_chandef(struct rtw89_dev * rtwdev,enum rtw89_sub_entity_idx idx,const struct cfg80211_chan_def * chandef,bool from_stack) __rtw89_config_entity_chandef() argument 139 rtw89_config_entity_chandef(struct rtw89_dev * rtwdev,enum rtw89_sub_entity_idx idx,const struct cfg80211_chan_def * chandef) rtw89_config_entity_chandef() argument 146 rtw89_config_roc_chandef(struct rtw89_dev * rtwdev,enum rtw89_sub_entity_idx idx,const struct cfg80211_chan_def * chandef) rtw89_config_roc_chandef() argument 178 struct cfg80211_chan_def chandef = {0}; rtw89_config_default_chandef() local [all...] |
H A D | chan.h | 87 const struct cfg80211_chan_def *chandef); 90 const struct cfg80211_chan_def *chandef);
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt76x2/ |
H A D | usb_phy.c | 13 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2u_phy_channel_calibrate() 61 struct cfg80211_chan_def *chandef) in mt76x2u_phy_set_channel() argument 86 struct ieee80211_channel *chan = chandef->chan; in mt76x2u_phy_set_channel() 91 freq = chandef->chan->center_freq; in mt76x2u_phy_set_channel() 92 freq1 = chandef->center_freq1; in mt76x2u_phy_set_channel() 94 switch (chandef->width) { in mt76x2u_phy_set_channel() 127 mt76x02_phy_set_bw(dev, chandef->width, ch_group_index); in mt76x2u_phy_set_channel() 188 chan = dev->mphy.chandef.chan; in mt76x2u_phy_set_channel()
|
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() 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() 322 else if (dev->mphy.chandef.width == NL80211_CHAN_WIDTH_80) in mt76x2_phy_update_channel_gain()
|
H A D | pci_phy.c | 15 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2_phy_tssi_init_cal() 38 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2_phy_channel_calibrate() 118 struct cfg80211_chan_def *chandef) in mt76x2_phy_set_channel() argument 120 struct ieee80211_channel *chan = chandef->chan; in mt76x2_phy_set_channel() 153 freq = chandef->chan->center_freq; in mt76x2_phy_set_channel() 154 freq1 = chandef->center_freq1; in mt76x2_phy_set_channel() 157 switch (chandef->width) { in mt76x2_phy_set_channel() 190 mt76x02_phy_set_bw(dev, chandef->width, ch_group_index); in mt76x2_phy_set_channel()
|
H A D | usb_main.c | 36 struct cfg80211_chan_def *chandef) in mt76x2u_set_channel() argument 50 err = mt76x2u_phy_set_channel(dev, chandef); in mt76x2u_set_channel() 85 mphy->chandef.chan, in mt76x2u_config() 98 err = mt76x2u_set_channel(dev, &hw->conf.chandef); in mt76x2u_config()
|
H A D | pci_main.c | 36 mt76x2_set_channel(struct mt76x02_dev *dev, struct cfg80211_chan_def *chandef) in mt76x2_set_channel() argument 48 mt76x2_phy_set_channel(dev, chandef); in mt76x2_set_channel() 85 mphy->chandef.chan, in mt76x2_config() 100 mt76x2_set_channel(dev, &hw->conf.chandef); in mt76x2_config()
|
H A D | mt76x2.h | 33 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2_channel_silent() 54 struct cfg80211_chan_def *chandef);
|
H A D | init.c | 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()
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7603/ |
H A D | mcu.c | 353 .center_channel = dev->mphy.chandef.chan->hw_value, in mt7603_mcu_set_tx_power() 386 struct cfg80211_chan_def *chandef = &dev->mphy.chandef; in mt7603_mcu_set_channel() local 399 .control_chan = chandef->chan->hw_value, in mt7603_mcu_set_channel() 400 .center_chan = chandef->chan->hw_value, in mt7603_mcu_set_channel() 408 if (dev->mphy.chandef.width == NL80211_CHAN_WIDTH_40) { in mt7603_mcu_set_channel() 410 if (chandef->center_freq1 > chandef->chan->center_freq) in mt7603_mcu_set_channel() 416 tx_power = mt76_get_sar_power(&dev->mphy, chandef->chan, tx_power); in mt7603_mcu_set_channel()
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7921/ |
H A D | mcu.c | 688 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7921_mcu_set_chan_info() local 689 int freq1 = chandef->center_freq1; in mt7921_mcu_set_chan_info() 708 .control_ch = chandef->chan->hw_value, in mt7921_mcu_set_chan_info() 710 .bw = mt76_connac_chan_bw(chandef), in mt7921_mcu_set_chan_info() 716 if (chandef->chan->band == NL80211_BAND_6GHZ) in mt7921_mcu_set_chan_info() 719 req.channel_band = chandef->chan->band; in mt7921_mcu_set_chan_info() 726 else if (!cfg80211_reg_can_beacon(dev->mt76.hw->wiphy, chandef, in mt7921_mcu_set_chan_info() 735 if (chandef->width == NL80211_CHAN_WIDTH_80P80) { in mt7921_mcu_set_chan_info() 736 int freq2 = chandef->center_freq2; in mt7921_mcu_set_chan_info() 986 struct cfg80211_chan_def *chandef = &ctx->def; in mt7921_mcu_config_sniffer() local [all …]
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7915/ |
H A D | testmode.c | 42 struct cfg80211_chan_def *chandef = &mphy->chandef; in mt7915_tm_set_tx_power() local 43 int freq = chandef->center_freq1; in mt7915_tm_set_tx_power() 274 if (mphy->chandef.chan->band == NL80211_BAND_5GHZ) in mt7915_tm_set_tx_len() 276 else if (mphy->chandef.chan->band == NL80211_BAND_6GHZ) in mt7915_tm_set_tx_len() 308 switch (mphy->chandef.width) { in mt7915_tm_set_tx_len() 515 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_tm_set_tx_cont() local 516 int freq1 = ieee80211_frequency_to_channel(chandef->center_freq1); in mt7915_tm_set_tx_cont() 529 tx_cont->control_ch = chandef->chan->hw_value; in mt7915_tm_set_tx_cont() 534 switch (chandef->width) { in mt7915_tm_set_tx_cont() 572 if (chandef->chan->band == NL80211_BAND_5GHZ) in mt7915_tm_set_tx_cont() [all …]
|
H A D | mcu.c | 63 enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; in mt7915_mcu_set_sta_he_mcs() 466 if (!(vif->bss_conf.chandef.chan->flags & IEEE80211_CHAN_RADAR)) in mt7915_check_he_obss_narrow_bw_ru() 469 cfg80211_bss_iter(hw->wiphy, &vif->bss_conf.chandef, in mt7915_check_he_obss_narrow_bw_ru() 484 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_bss_rfch_tlv() local 487 int freq1 = chandef->center_freq1; in mt7915_mcu_bss_rfch_tlv() 492 ch->pri_ch = chandef->chan->hw_value; in mt7915_mcu_bss_rfch_tlv() 494 ch->bw = mt76_connac_chan_bw(chandef); in mt7915_mcu_bss_rfch_tlv() 496 if (chandef->width == NL80211_CHAN_WIDTH_80P80) { in mt7915_mcu_bss_rfch_tlv() 497 int freq2 = chandef->center_freq2; in mt7915_mcu_bss_rfch_tlv() 588 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_bss_bmc_tlv() local [all …]
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7996/ |
H A D | mcu.c | 99 enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; in mt7996_mcu_set_sta_he_mcs() 553 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7996_mcu_bss_rfch_tlv() local 556 int freq1 = chandef->center_freq1; in mt7996_mcu_bss_rfch_tlv() 561 ch->control_channel = chandef->chan->hw_value; in mt7996_mcu_bss_rfch_tlv() 563 ch->bw = mt76_connac_chan_bw(chandef); in mt7996_mcu_bss_rfch_tlv() 566 ch->band = rlm_ch_band[chandef->chan->band]; in mt7996_mcu_bss_rfch_tlv() 568 if (chandef->width == NL80211_CHAN_WIDTH_80P80) { in mt7996_mcu_bss_rfch_tlv() 569 int freq2 = chandef->center_freq2; in mt7996_mcu_bss_rfch_tlv() 622 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7996_mcu_bss_bmc_tlv() local 623 enum nl80211_band band = chandef->chan->band; in mt7996_mcu_bss_bmc_tlv() [all …]
|
H A D | debugfs.c | 239 struct cfg80211_chan_def *chandef = &dev->rdd2_chandef; in mt7996_rdd_monitor() local 245 if (!cfg80211_chandef_valid(chandef)) { in mt7996_rdd_monitor() 255 switch (chandef->width) { in mt7996_rdd_monitor() 274 chandef->chan->hw_value, chandef->chan->center_freq, in mt7996_rdd_monitor() 275 bw, chandef->center_freq1); in mt7996_rdd_monitor()
|
/freebsd/sys/contrib/dev/mediatek/mt76/mt7615/ |
H A D | mcu.c | 2079 tx_power = mt76_get_sar_power(mphy, mphy->chandef.chan, tx_power); in mt7615_mcu_set_txpower_sku() 2081 tx_power = mt76_get_rate_power_limits(mphy, mphy->chandef.chan, in mt7615_mcu_set_txpower_sku() 2103 static u8 mt7615_mcu_chan_bw(struct cfg80211_chan_def *chandef) in mt7615_mcu_chan_bw() argument 2116 if (chandef->width >= ARRAY_SIZE(width_to_bw)) in mt7615_mcu_chan_bw() 2119 return width_to_bw[chandef->width]; in mt7615_mcu_chan_bw() 2125 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7615_mcu_set_chan_info() local 2126 int freq1 = chandef->center_freq1, freq2 = chandef->center_freq2; in mt7615_mcu_set_chan_info() 2146 .control_chan = chandef->chan->hw_value, in mt7615_mcu_set_chan_info() 2158 else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, in mt7615_mcu_set_chan_info() 2165 req.bw = mt7615_mcu_chan_bw(chandef); in mt7615_mcu_set_chan_info() [all …]
|
H A D | testmode.c | 53 struct cfg80211_chan_def *chandef = &mphy->chandef; in mt7615_tm_set_tx_power() local 54 int freq = chandef->center_freq1, len, target_chains; in mt7615_tm_set_tx_power() 56 enum nl80211_band band = chandef->chan->band; in mt7615_tm_set_tx_power() 83 ret = mt7615_eeprom_get_target_power_index(dev, chandef->chan, i); in mt7615_tm_set_tx_power()
|
/freebsd/sys/contrib/dev/mediatek/mt76/ |
H A D | mt76x02_phy.h | 14 switch (dev->mphy.chandef.width) { in mt76x02_get_rssi_gain_thresh() 27 switch (dev->mphy.chandef.width) { in mt76x02_get_low_rssi_gain_thresh()
|
H A D | mac80211.c | 416 phy->chandef.chan = &sband->channels[0]; in mt76_check_sband() 941 struct cfg80211_chan_def *chandef = &hw->conf.chandef; in mt76_set_channel() local 948 if (phy->chandef.chan->center_freq != chandef->chan->center_freq || in mt76_set_channel() 949 phy->chandef.width != chandef->width) in mt76_set_channel() 952 phy->chandef = *chandef; in mt76_set_channel() 953 phy->chan_state = mt76_channel_state(phy, chandef->chan); in mt76_set_channel() 956 phy->main_chan = chandef->chan; in mt76_set_channel() 958 if (chandef->chan != phy->main_chan) in mt76_set_channel() 1739 if (phy->chandef.chan->band != NL80211_BAND_2GHZ) in mt76_calculate_default_rate() 1816 (phy->chandef.chan->flags & IEEE80211_CHAN_RADAR)) in mt76_phy_dfs_state() [all …]
|
H A D | mt76_connac.h | 256 static inline u8 mt76_connac_chan_bw(struct cfg80211_chan_def *chandef) in mt76_connac_chan_bw() argument 270 if (chandef->width >= ARRAY_SIZE(width_to_bw)) in mt76_connac_chan_bw() 273 return width_to_bw[chandef->width]; in mt76_connac_chan_bw()
|
/freebsd/sys/compat/linuxkpi/common/include/net/ |
H A D | cfg80211.h | 325 struct cfg80211_chan_def chandef; member 464 struct cfg80211_chan_def chandef; member 521 struct cfg80211_chan_def chandef; member 1503 cfg80211_chandef_create(struct cfg80211_chan_def *chandef, in cfg80211_chandef_create() argument 1507 KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__)); in cfg80211_chandef_create() 1511 chandef->chan = chan; in cfg80211_chandef_create() 1512 chandef->center_freq1 = chan->center_freq; in cfg80211_chandef_create() 1517 chandef->width = NL80211_CHAN_WIDTH_20_NOHT; in cfg80211_chandef_create() 1520 chandef->width = NL80211_CHAN_WIDTH_20; in cfg80211_chandef_create() 1523 chandef->width = NL80211_CHAN_WIDTH_40; in cfg80211_chandef_create() [all …]
|