| /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_cmd_data_v1() argument 126 iwl_mvm_set_chan_info_chandef(mvm, &cmd->ci, chandef); in iwl_mvm_phy_ctxt_cmd_data_v1() 140 const struct cfg80211_chan_def *chandef, in iwl_mvm_phy_ctxt_cmd_data() argument 144 chandef->chan->band)); in iwl_mvm_phy_ctxt_cmd_data() 147 iwl_mvm_set_chan_info_chandef(mvm, &cmd->ci, chandef); in iwl_mvm_phy_ctxt_cmd_data() [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() argument 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() argument 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() 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() argument 515 sta->addr, chandef->chan->center_freq, chandef->width); in iwl_mvm_tdls_channel_switch() [all …]
|
| /freebsd/sys/contrib/dev/iwlwifi/mld/ |
| H A D | phy.c | 102 u8 iwl_mld_get_fw_ctrl_pos(const struct cfg80211_chan_def *chandef) in iwl_mld_get_fw_ctrl_pos() argument 104 int offs = chandef->chan->center_freq - chandef->center_freq1; in iwl_mld_get_fw_ctrl_pos() 134 struct cfg80211_chan_def *chandef = &phy->chandef; in iwl_mld_phy_fw_action() local 138 .puncture_mask = cpu_to_le16(chandef->punctured), in iwl_mld_phy_fw_action() 140 .ci.channel = cpu_to_le32(chandef->chan->hw_value), in iwl_mld_phy_fw_action() 141 .ci.band = iwl_mld_nl80211_band_to_fw(chandef->chan->band), in iwl_mld_phy_fw_action() 142 .ci.width = iwl_mld_nl80211_width_to_fw(chandef->width), in iwl_mld_phy_fw_action() 143 .ci.ctrl_pos = iwl_mld_get_fw_ctrl_pos(chandef), in iwl_mld_phy_fw_action() 193 struct cfg80211_chan_def *chandef = in iwl_mld_update_phy_chandef() local 196 phy->chandef = *chandef; in iwl_mld_update_phy_chandef()
|
| H A D | mlo.c | 658 const struct cfg80211_chan_def *chandef, in iwl_mld_get_emlsr_rssi_thresh() argument 661 if (WARN_ON(chandef->chan->band != NL80211_BAND_2GHZ && in iwl_mld_get_emlsr_rssi_thresh() 662 chandef->chan->band != NL80211_BAND_5GHZ && in iwl_mld_get_emlsr_rssi_thresh() 663 chandef->chan->band != NL80211_BAND_6GHZ)) in iwl_mld_get_emlsr_rssi_thresh() 670 switch (chandef->width) { in iwl_mld_get_emlsr_rssi_thresh() 703 if (link->chandef->chan->band == NL80211_BAND_2GHZ && mld->bt_is_active) in iwl_mld_emlsr_disallowed_with_link() 707 iwl_mld_get_emlsr_rssi_thresh(mld, link->chandef, false)) in iwl_mld_emlsr_disallowed_with_link() 746 data[n_data].chandef = &link_conf->chanreq.oper; in iwl_mld_set_link_sel_data() 765 switch (phy->chandef.width) { in iwl_mld_get_min_chan_load_thresh() 815 if (a->chandef->width <= b->chandef->width) in iwl_mld_channel_load_allows_emlsr() [all …]
|
| H A D | phy.h | 26 struct cfg80211_chan_def chandef; 53 u8 iwl_mld_get_fw_ctrl_pos(const struct cfg80211_chan_def *chandef);
|
| H A D | ftm-initiator.c | 68 u32 freq = peer->chandef.chan->center_freq; in iwl_mld_ftm_set_target_chandef() 72 switch (peer->chandef.width) { in iwl_mld_ftm_set_target_chandef() 95 peer->chandef.width); in iwl_mld_ftm_set_target_chandef() 104 (peer->chandef.width > NL80211_CHAN_WIDTH_20) ? in iwl_mld_ftm_set_target_chandef() 105 iwl_mld_get_fw_ctrl_pos(&peer->chandef) : 0; in iwl_mld_ftm_set_target_chandef() 107 target->band = iwl_mld_nl80211_band_to_fw(peer->chandef.chan->band); in iwl_mld_ftm_set_target_chandef()
|
| /freebsd/sys/contrib/dev/iwlwifi/mld/tests/ |
| H A D | link-selection.c | 21 const struct cfg80211_chan_def *chandef; member 35 .chandef = &chandef_2ghz_20mhz, 46 .chandef = &chandef_2ghz_20mhz, 57 .chandef = &chandef_2ghz_20mhz, 69 .chandef = &chandef_2ghz_20mhz, 89 link->chanreq.oper = *test_param->input.link.chandef; in setup_link() 135 .chandef = test_param->input.link.chandef, in test_link_grading() 292 .chandef = params->chandef_a, in test_iwl_mld_link_pair_allows_emlsr() 296 .chandef = params->chandef_b, in test_iwl_mld_link_pair_allows_emlsr() 300 .chandef = params->primary_link_active ? a.chandef : b.chandef, in test_iwl_mld_link_pair_allows_emlsr()
|
| H A D | utils.c | 172 phy->chandef = *def; in iwlmld_kunit_add_chanctx() 349 chan_ctx = iwlmld_kunit_add_chanctx(assoc_link->chandef); in iwlmld_kunit_setup_assoc() 430 chan_ctx = iwlmld_kunit_add_chanctx(link2->chandef); in iwlmld_kunit_assoc_emlsr() 477 const struct cfg80211_chan_def *chandef; member 479 #define CHANDEF(c, ...) { .desc = "chandef " #c " valid", .chandef = &c, }, 484 KUNIT_ARRAY_PARAM_DESC(chandef, chandef_cases, desc); 490 KUNIT_EXPECT_EQ(test, true, cfg80211_chandef_valid(params->chandef)); in test_iwl_mld_chandef_valid()
|
| H A D | link.c | 66 .chandef = &chandef_6ghz_160mhz, in test_missed_beacon() 70 .chandef = &chandef_5ghz_80mhz, in test_missed_beacon()
|
| /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 | mt76x2.h | 33 struct ieee80211_channel *chan = dev->mphy.chandef.chan; in mt76x2_channel_silent() 56 struct cfg80211_chan_def *chandef);
|
| /freebsd/sys/compat/linuxkpi/common/include/net/ |
| H A D | cfg80211.h | 405 struct cfg80211_chan_def chandef; member 563 struct cfg80211_chan_def chandef; member 610 struct cfg80211_chan_def chandef; member 1529 cfg80211_chandef_create(struct cfg80211_chan_def *chandef, in cfg80211_chandef_create() argument 1533 KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__)); in cfg80211_chandef_create() 1536 memset(chandef, 0, sizeof(*chandef)); in cfg80211_chandef_create() 1537 chandef->chan = chan; in cfg80211_chandef_create() 1538 chandef->center_freq1 = chan->center_freq; in cfg80211_chandef_create() 1543 chandef->width = NL80211_CHAN_WIDTH_20_NOHT; in cfg80211_chandef_create() 1546 chandef->width = NL80211_CHAN_WIDTH_20; in cfg80211_chandef_create() [all …]
|
| /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/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() 517 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_tm_set_tx_cont() local 518 int freq1 = ieee80211_frequency_to_channel(chandef->center_freq1); in mt7915_tm_set_tx_cont() 531 tx_cont->control_ch = chandef->chan->hw_value; in mt7915_tm_set_tx_cont() 536 switch (chandef->width) { in mt7915_tm_set_tx_cont() 574 if (chandef->chan->band == NL80211_BAND_5GHZ) in mt7915_tm_set_tx_cont() [all …]
|
| H A D | mcu.c | 67 enum nl80211_band band = msta->vif->phy->mt76->chandef.chan->band; in mt7915_mcu_set_sta_he_mcs() 538 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_bss_rfch_tlv() local 541 int freq1 = chandef->center_freq1; in mt7915_mcu_bss_rfch_tlv() 546 ch->pri_ch = chandef->chan->hw_value; in mt7915_mcu_bss_rfch_tlv() 548 ch->bw = mt76_connac_chan_bw(chandef); in mt7915_mcu_bss_rfch_tlv() 550 if (chandef->width == NL80211_CHAN_WIDTH_80P80) { in mt7915_mcu_bss_rfch_tlv() 551 int freq2 = chandef->center_freq2; in mt7915_mcu_bss_rfch_tlv() 642 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7915_mcu_bss_bmc_tlv() local 643 enum nl80211_band band = chandef->chan->band; in mt7915_mcu_bss_bmc_tlv() 1461 struct cfg80211_chan_def *chandef = &mvif->phy->mt76->chandef; in mt7915_mcu_add_rate_ctrl_fixed() local [all …]
|
| /freebsd/sys/contrib/dev/mediatek/mt76/mt7615/ |
| H A D | mcu.c | 2075 tx_power = mt76_get_sar_power(mphy, mphy->chandef.chan, tx_power); in mt7615_mcu_set_txpower_sku() 2077 tx_power = mt76_get_rate_power_limits(mphy, mphy->chandef.chan, in mt7615_mcu_set_txpower_sku() 2099 static u8 mt7615_mcu_chan_bw(struct cfg80211_chan_def *chandef) in mt7615_mcu_chan_bw() argument 2112 if (chandef->width >= ARRAY_SIZE(width_to_bw)) in mt7615_mcu_chan_bw() 2115 return width_to_bw[chandef->width]; in mt7615_mcu_chan_bw() 2121 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7615_mcu_set_chan_info() local 2122 int freq1 = chandef->center_freq1, freq2 = chandef->center_freq2; in mt7615_mcu_set_chan_info() 2142 .control_chan = chandef->chan->hw_value, in mt7615_mcu_set_chan_info() 2154 else if (!cfg80211_reg_can_beacon(phy->mt76->hw->wiphy, chandef, in mt7615_mcu_set_chan_info() 2161 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/mt7921/ |
| H A D | mcu.c | 883 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7921_mcu_set_chan_info() local 884 int freq1 = chandef->center_freq1; in mt7921_mcu_set_chan_info() 903 .control_ch = chandef->chan->hw_value, in mt7921_mcu_set_chan_info() 905 .bw = mt76_connac_chan_bw(chandef), in mt7921_mcu_set_chan_info() 911 if (chandef->chan->band == NL80211_BAND_6GHZ) in mt7921_mcu_set_chan_info() 914 req.channel_band = chandef->chan->band; in mt7921_mcu_set_chan_info() 921 else if (!cfg80211_reg_can_beacon(dev->mt76.hw->wiphy, chandef, in mt7921_mcu_set_chan_info() 930 if (chandef->width == NL80211_CHAN_WIDTH_80P80) { in mt7921_mcu_set_chan_info() 931 int freq2 = chandef->center_freq2; in mt7921_mcu_set_chan_info() 1181 struct cfg80211_chan_def *chandef = &ctx->def; in mt7921_mcu_config_sniffer() local [all …]
|
| /freebsd/sys/contrib/dev/mediatek/mt76/ |
| H A D | scan.c | 85 struct cfg80211_chan_def chandef = {}; in mt76_scan_work() local 102 cfg80211_chandef_create(&chandef, dev->scan.chan, NL80211_CHAN_HT20); in mt76_scan_work() 103 mt76_set_channel(phy, &chandef, true); in mt76_scan_work() 106 chandef.chan->flags & (IEEE80211_CHAN_NO_IR | IEEE80211_CHAN_RADAR)) in mt76_scan_work()
|
| 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 | 424 cfg80211_chandef_create(&phy->chandef, &sband->channels[0], in mt76_check_sband() 1062 int __mt76_set_channel(struct mt76_phy *phy, struct cfg80211_chan_def *chandef, in __mt76_set_channel() argument 1075 if (phy->chandef.chan->center_freq != chandef->chan->center_freq || in __mt76_set_channel() 1076 phy->chandef.width != chandef->width) in __mt76_set_channel() 1079 phy->chandef = *chandef; in __mt76_set_channel() 1080 phy->chan_state = mt76_channel_state(phy, chandef->chan); in __mt76_set_channel() 1084 phy->main_chandef = *chandef; in __mt76_set_channel() 1086 if (chandef->chan != phy->main_chandef.chan) in __mt76_set_channel() 1098 int mt76_set_channel(struct mt76_phy *phy, struct cfg80211_chan_def *chandef, in mt76_set_channel() argument 1107 ret = __mt76_set_channel(phy, chandef, offchannel); in mt76_set_channel() [all …]
|
| /freebsd/sys/contrib/dev/mediatek/mt76/mt7996/ |
| H A D | mcu.c | 133 enum nl80211_band band = link->phy->mt76->chandef.chan->band; in mt7996_mcu_set_sta_he_mcs() 831 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7996_mcu_bss_rfch_tlv() local 834 int freq1 = chandef->center_freq1; in mt7996_mcu_bss_rfch_tlv() 839 ch->control_channel = chandef->chan->hw_value; in mt7996_mcu_bss_rfch_tlv() 841 ch->bw = mt76_connac_chan_bw(chandef); in mt7996_mcu_bss_rfch_tlv() 844 ch->band = rlm_ch_band[chandef->chan->band]; in mt7996_mcu_bss_rfch_tlv() 846 if (chandef->width == NL80211_CHAN_WIDTH_80P80) { in mt7996_mcu_bss_rfch_tlv() 847 int freq2 = chandef->center_freq2; in mt7996_mcu_bss_rfch_tlv() 920 struct cfg80211_chan_def *chandef = &phy->mt76->chandef; in mt7996_mcu_bss_bmc_tlv() local 921 enum nl80211_band band = chandef->chan->band; in mt7996_mcu_bss_bmc_tlv() [all …]
|