Lines Matching refs:chandef
3197 const struct cfg80211_chan_def *chandef, in nl80211_parse_punct_bitmap() argument
3204 if (!cfg80211_valid_disable_subchannel_bitmap(punct_bitmap, chandef)) in nl80211_parse_punct_bitmap()
3212 struct cfg80211_chan_def *chandef) in nl80211_parse_chandef() argument
3227 memset(chandef, 0, sizeof(*chandef)); in nl80211_parse_chandef()
3228 chandef->chan = ieee80211_get_channel_khz(&rdev->wiphy, control_freq); in nl80211_parse_chandef()
3229 chandef->width = NL80211_CHAN_WIDTH_20_NOHT; in nl80211_parse_chandef()
3230 chandef->center_freq1 = KHZ_TO_MHZ(control_freq); in nl80211_parse_chandef()
3231 chandef->freq1_offset = control_freq % 1000; in nl80211_parse_chandef()
3232 chandef->center_freq2 = 0; in nl80211_parse_chandef()
3235 if (!chandef->chan || chandef->chan->flags & IEEE80211_CHAN_DISABLED) { in nl80211_parse_chandef()
3251 cfg80211_chandef_create(chandef, chandef->chan, in nl80211_parse_chandef()
3255 chandef->center_freq1 != nla_get_u32(attrs[NL80211_ATTR_CENTER_FREQ1])) { in nl80211_parse_chandef()
3277 chandef->width = in nl80211_parse_chandef()
3279 if (chandef->chan->band == NL80211_BAND_S1GHZ) { in nl80211_parse_chandef()
3281 if (chandef->width != ieee80211_s1g_channel_width(chandef->chan)) { in nl80211_parse_chandef()
3289 chandef->center_freq1 = in nl80211_parse_chandef()
3292 chandef->freq1_offset = nla_get_u32( in nl80211_parse_chandef()
3295 chandef->freq1_offset = 0; in nl80211_parse_chandef()
3298 chandef->center_freq2 = in nl80211_parse_chandef()
3303 chandef->edmg.channels = in nl80211_parse_chandef()
3307 chandef->edmg.bw_config = in nl80211_parse_chandef()
3310 chandef->edmg.bw_config = 0; in nl80211_parse_chandef()
3311 chandef->edmg.channels = 0; in nl80211_parse_chandef()
3314 if (!cfg80211_chandef_valid(chandef)) { in nl80211_parse_chandef()
3319 if (!cfg80211_chandef_usable(&rdev->wiphy, chandef, in nl80211_parse_chandef()
3325 if ((chandef->width == NL80211_CHAN_WIDTH_5 || in nl80211_parse_chandef()
3326 chandef->width == NL80211_CHAN_WIDTH_10) && in nl80211_parse_chandef()
3340 struct cfg80211_chan_def chandef; in __nl80211_set_channel() local
3359 result = nl80211_parse_chandef(rdev, info, &chandef); in __nl80211_set_channel()
3366 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, in __nl80211_set_channel()
3378 cur_chan = wdev->links[link_id].ap.chandef.chan; in __nl80211_set_channel()
3379 if (chandef.chan != cur_chan) in __nl80211_set_channel()
3383 &chandef); in __nl80211_set_channel()
3386 wdev->links[link_id].ap.chandef = chandef; in __nl80211_set_channel()
3388 wdev->u.ap.preset_chandef = chandef; in __nl80211_set_channel()
3392 return cfg80211_set_mesh_channel(rdev, wdev, &chandef); in __nl80211_set_channel()
3394 return cfg80211_set_monitor_channel(rdev, &chandef); in __nl80211_set_channel()
3771 const struct cfg80211_chan_def *chandef) in nl80211_send_chandef() argument
3773 if (WARN_ON(!cfg80211_chandef_valid(chandef))) in nl80211_send_chandef()
3777 chandef->chan->center_freq)) in nl80211_send_chandef()
3780 chandef->chan->freq_offset)) in nl80211_send_chandef()
3782 switch (chandef->width) { in nl80211_send_chandef()
3787 cfg80211_get_chandef_type(chandef))) in nl80211_send_chandef()
3793 if (nla_put_u32(msg, NL80211_ATTR_CHANNEL_WIDTH, chandef->width)) in nl80211_send_chandef()
3795 if (nla_put_u32(msg, NL80211_ATTR_CENTER_FREQ1, chandef->center_freq1)) in nl80211_send_chandef()
3797 if (chandef->center_freq2 && in nl80211_send_chandef()
3798 nla_put_u32(msg, NL80211_ATTR_CENTER_FREQ2, chandef->center_freq2)) in nl80211_send_chandef()
3836 struct cfg80211_chan_def chandef = {}; in nl80211_send_iface() local
3839 ret = rdev_get_channel(rdev, wdev, 0, &chandef); in nl80211_send_iface()
3840 if (ret == 0 && nl80211_send_chandef(msg, &chandef)) in nl80211_send_iface()
3902 struct cfg80211_chan_def chandef = {}; in nl80211_send_iface() local
3914 ret = rdev_get_channel(rdev, wdev, link_id, &chandef); in nl80211_send_iface()
3915 if (ret == 0 && nl80211_send_chandef(msg, &chandef)) in nl80211_send_iface()
5058 struct cfg80211_chan_def *chandef; in he_get_txmcsmap() local
5061 chandef = wdev_chandef(wdev, link_id); in he_get_txmcsmap()
5062 if (!chandef) { in he_get_txmcsmap()
5070 switch (chandef->width) { in he_get_txmcsmap()
5748 params->chandef = wdev->u.ap.preset_chandef; in nl80211_get_ap_channel()
5941 err = nl80211_parse_chandef(rdev, info, ¶ms->chandef); in nl80211_start_ap()
5949 params->chandef = wdev->u.ap.preset_chandef; in nl80211_start_ap()
5957 ¶ms->chandef, in nl80211_start_ap()
5963 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms->chandef, in nl80211_start_ap()
5979 err = validate_beacon_tx_rate(rdev, params->chandef.chan->band, in nl80211_start_ap()
6088 wdev->links[link_id].ap.chandef = params->chandef; in nl80211_start_ap()
8874 struct cfg80211_chan_def *chandef; in cfg80211_off_channel_oper_allowed() local
8876 chandef = wdev_chandef(wdev, link_id); in cfg80211_off_channel_oper_allowed()
8877 if (!chandef || !chandef->chan) in cfg80211_off_channel_oper_allowed()
8887 if (chandef->chan->flags & IEEE80211_CHAN_RADAR) in cfg80211_off_channel_oper_allowed()
9799 struct cfg80211_chan_def chandef; in nl80211_start_radar_detection() local
9812 err = nl80211_parse_chandef(rdev, info, &chandef); in nl80211_start_radar_detection()
9816 err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype); in nl80211_start_radar_detection()
9825 if (!cfg80211_chandef_dfs_usable(wiphy, &chandef)) { in nl80211_start_radar_detection()
9832 &chandef); in nl80211_start_radar_detection()
9857 cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef); in nl80211_start_radar_detection()
9861 err = rdev_start_radar_detection(rdev, dev, &chandef, cac_time_ms); in nl80211_start_radar_detection()
9863 wdev->links[0].ap.chandef = chandef; in nl80211_start_radar_detection()
9881 struct cfg80211_chan_def chandef; in nl80211_notify_radar_detection() local
9892 err = nl80211_parse_chandef(rdev, info, &chandef); in nl80211_notify_radar_detection()
9898 err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype); in nl80211_notify_radar_detection()
9913 if (chandef.chan->dfs_state == NL80211_DFS_UNAVAILABLE) in nl80211_notify_radar_detection()
9916 cfg80211_set_dfs_state(wiphy, &chandef, NL80211_DFS_UNAVAILABLE); in nl80211_notify_radar_detection()
9920 rdev->radar_chandef = chandef; in nl80211_notify_radar_detection()
10090 err = nl80211_parse_chandef(rdev, info, ¶ms.chandef); in nl80211_channel_switch()
10094 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms.chandef, in nl80211_channel_switch()
10101 ¶ms.chandef, in nl80211_channel_switch()
10120 ¶ms.chandef, in nl80211_channel_switch()
11224 err = nl80211_parse_chandef(rdev, info, &ibss.chandef); in nl80211_join_ibss()
11228 if (!cfg80211_reg_can_beacon(&rdev->wiphy, &ibss.chandef, in nl80211_join_ibss()
11232 switch (ibss.chandef.width) { in nl80211_join_ibss()
11266 wiphy->bands[ibss.chandef.chan->band]; in nl80211_join_ibss()
11299 if ((ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT) && in nl80211_join_ibss()
12170 struct cfg80211_chan_def chandef; in nl80211_remain_on_channel() local
12195 err = nl80211_parse_chandef(rdev, info, &chandef); in nl80211_remain_on_channel()
12200 if (!cfg80211_off_channel_oper_allowed(wdev, chandef.chan)) { in nl80211_remain_on_channel()
12213 compat_chandef = cfg80211_chandef_compatible(&chandef, in nl80211_remain_on_channel()
12216 if (compat_chandef != &chandef) { in nl80211_remain_on_channel()
12234 err = rdev_remain_on_channel(rdev, wdev, chandef.chan, in nl80211_remain_on_channel()
12353 struct cfg80211_chan_def chandef; in nl80211_tx_mgmt() local
12415 chandef.chan = NULL; in nl80211_tx_mgmt()
12417 err = nl80211_parse_chandef(rdev, info, &chandef); in nl80211_tx_mgmt()
12422 if (!chandef.chan && params.offchan) in nl80211_tx_mgmt()
12427 !cfg80211_off_channel_oper_allowed(wdev, chandef.chan)) { in nl80211_tx_mgmt()
12479 params.chan = chandef.chan; in nl80211_tx_mgmt()
12824 err = nl80211_parse_chandef(rdev, info, &setup.chandef); in nl80211_join_ocb()
12899 err = nl80211_parse_chandef(rdev, info, &setup.chandef); in nl80211_join_mesh()
12904 setup.chandef.chan = NULL; in nl80211_join_mesh()
12913 if (!setup.chandef.chan) in nl80211_join_mesh()
12916 sband = rdev->wiphy.bands[setup.chandef.chan->band]; in nl80211_join_mesh()
12932 if (!setup.chandef.chan) in nl80211_join_mesh()
12935 err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band, in nl80211_join_mesh()
15213 struct cfg80211_chan_def chandef = {}; in nl80211_tdls_channel_switch() local
15234 err = nl80211_parse_chandef(rdev, info, &chandef); in nl80211_tdls_channel_switch()
15243 if (chandef.chan->band == NL80211_BAND_2GHZ && in nl80211_tdls_channel_switch()
15244 chandef.width != NL80211_CHAN_WIDTH_20_NOHT && in nl80211_tdls_channel_switch()
15245 chandef.width != NL80211_CHAN_WIDTH_20) in nl80211_tdls_channel_switch()
15249 if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &chandef, in nl80211_tdls_channel_switch()
15254 if (cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, wdev->iftype)) in nl80211_tdls_channel_switch()
15261 err = rdev_tdls_channel_switch(rdev, dev, addr, oper_class, &chandef); in nl80211_tdls_channel_switch()
19034 struct cfg80211_chan_def *chandef, in nl80211_ch_switch_notify() argument
19060 if (nl80211_send_chandef(msg, chandef)) in nl80211_ch_switch_notify()
19085 struct cfg80211_chan_def *chandef, in cfg80211_ch_switch_notify() argument
19095 trace_cfg80211_ch_switch_notify(dev, chandef, link_id, punct_bitmap); in cfg80211_ch_switch_notify()
19102 chandef->chan); in cfg80211_ch_switch_notify()
19105 wdev->u.mesh.chandef = *chandef; in cfg80211_ch_switch_notify()
19106 wdev->u.mesh.preset_chandef = *chandef; in cfg80211_ch_switch_notify()
19110 wdev->links[link_id].ap.chandef = *chandef; in cfg80211_ch_switch_notify()
19113 wdev->u.ibss.chandef = *chandef; in cfg80211_ch_switch_notify()
19122 nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL, in cfg80211_ch_switch_notify()
19129 struct cfg80211_chan_def *chandef, in cfg80211_ch_switch_started_notify() argument
19140 trace_cfg80211_ch_switch_started_notify(dev, chandef, link_id, in cfg80211_ch_switch_started_notify()
19144 nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL, in cfg80211_ch_switch_started_notify()
19197 const struct cfg80211_chan_def *chandef, in nl80211_radar_notify() argument
19230 if (nl80211_send_chandef(msg, chandef)) in nl80211_radar_notify()