Lines Matching refs:width
37 chandef->width = NL80211_CHAN_WIDTH_20_NOHT; in cfg80211_chandef_create()
41 chandef->width = NL80211_CHAN_WIDTH_20; in cfg80211_chandef_create()
45 chandef->width = NL80211_CHAN_WIDTH_40; in cfg80211_chandef_create()
49 chandef->width = NL80211_CHAN_WIDTH_40; in cfg80211_chandef_create()
93 switch (chandef->width) { in valid_puncturing_bitmap()
263 return nl80211_chan_width_to_mhz(c->width); in cfg80211_chandef_get_width()
267 enum nl80211_chan_width width) in cfg80211_valid_center_freq() argument
276 bw = nl80211_chan_width_to_mhz(width); in cfg80211_valid_center_freq()
310 switch (chandef->width) { in cfg80211_chandef_valid()
363 switch (chandef->width) { in cfg80211_chandef_valid()
408 if (!cfg80211_valid_center_freq(chandef->center_freq1, chandef->width)) in cfg80211_chandef_valid()
411 if (chandef->width == NL80211_CHAN_WIDTH_80P80 && in cfg80211_chandef_valid()
412 !cfg80211_valid_center_freq(chandef->center_freq2, chandef->width)) in cfg80211_chandef_valid()
417 chandef->width != NL80211_CHAN_WIDTH_20_NOHT) in cfg80211_chandef_valid()
433 int width = cfg80211_chandef_get_width(c); in cfg80211_chandef_primary() local
438 if (WARN_ON_ONCE(pri_width < 0 || width < 0)) in cfg80211_chandef_primary()
442 if (WARN_ON_ONCE(pri_width > width)) in cfg80211_chandef_primary()
450 while (width > pri_width) { in cfg80211_chandef_primary()
451 unsigned int bits_to_drop = width / 20 / 2; in cfg80211_chandef_primary()
454 center += width / 4; in cfg80211_chandef_primary()
457 center -= width / 4; in cfg80211_chandef_primary()
460 width /= 2; in cfg80211_chandef_primary()
483 if (c1->width == primary_chan_width) in check_chandef_primary_compat()
508 if (c1->width == c2->width) in _cfg80211_chandef_compatible()
515 #define NARROW_OR_S1G(width) ((width) == NL80211_CHAN_WIDTH_5 || \ in _cfg80211_chandef_compatible() argument
516 (width) == NL80211_CHAN_WIDTH_10 || \ in _cfg80211_chandef_compatible()
517 (width) == NL80211_CHAN_WIDTH_1 || \ in _cfg80211_chandef_compatible()
518 (width) == NL80211_CHAN_WIDTH_2 || \ in _cfg80211_chandef_compatible()
519 (width) == NL80211_CHAN_WIDTH_4 || \ in _cfg80211_chandef_compatible()
520 (width) == NL80211_CHAN_WIDTH_8 || \ in _cfg80211_chandef_compatible()
521 (width) == NL80211_CHAN_WIDTH_16) in _cfg80211_chandef_compatible()
523 if (NARROW_OR_S1G(c1->width) || NARROW_OR_S1G(c2->width)) in _cfg80211_chandef_compatible()
531 if (c1->width > c2->width) in _cfg80211_chandef_compatible()
539 if (c1->width <= NL80211_CHAN_WIDTH_20) in _cfg80211_chandef_compatible()
555 if (c1->width == NL80211_CHAN_WIDTH_80P80) in _cfg80211_chandef_compatible()
608 int width; in cfg80211_set_dfs_state() local
613 width = cfg80211_chandef_get_width(chandef); in cfg80211_set_dfs_state()
614 if (width < 0) in cfg80211_set_dfs_state()
618 width, dfs_state); in cfg80211_set_dfs_state()
623 width, dfs_state); in cfg80211_set_dfs_state()
756 int width; in cfg80211_chandef_dfs_required() local
767 width = cfg80211_chandef_get_width(chandef); in cfg80211_chandef_dfs_required()
768 if (width < 0) in cfg80211_chandef_dfs_required()
773 width, iftype); in cfg80211_chandef_dfs_required()
777 return BIT(chandef->width); in cfg80211_chandef_dfs_required()
784 width, iftype); in cfg80211_chandef_dfs_required()
788 return BIT(chandef->width); in cfg80211_chandef_dfs_required()
849 int width; in cfg80211_chandef_dfs_usable() local
855 width = cfg80211_chandef_get_width(chandef); in cfg80211_chandef_dfs_usable()
856 if (width < 0) in cfg80211_chandef_dfs_usable()
861 width); in cfg80211_chandef_dfs_usable()
866 switch (chandef->width) { in cfg80211_chandef_dfs_usable()
871 width); in cfg80211_chandef_dfs_usable()
892 int width; in cfg80211_is_sub_chan() local
904 width = cfg80211_chandef_get_width(chandef); in cfg80211_is_sub_chan()
905 if (width <= 20) in cfg80211_is_sub_chan()
908 for (freq = chandef->center_freq1 - width / 2 + 10; in cfg80211_is_sub_chan()
909 freq <= chandef->center_freq1 + width / 2 - 10; freq += 20) { in cfg80211_is_sub_chan()
917 for (freq = chandef->center_freq2 - width / 2 + 10; in cfg80211_is_sub_chan()
918 freq <= chandef->center_freq2 + width / 2 - 10; freq += 20) { in cfg80211_is_sub_chan()
1093 int width; in cfg80211_chandef_dfs_available() local
1099 width = cfg80211_chandef_get_width(chandef); in cfg80211_chandef_dfs_available()
1100 if (width < 0) in cfg80211_chandef_dfs_available()
1105 width); in cfg80211_chandef_dfs_available()
1111 switch (chandef->width) { in cfg80211_chandef_dfs_available()
1116 width); in cfg80211_chandef_dfs_available()
1159 int width; in cfg80211_chandef_dfs_cac_time() local
1165 width = cfg80211_chandef_get_width(chandef); in cfg80211_chandef_dfs_cac_time()
1166 if (width < 0) in cfg80211_chandef_dfs_cac_time()
1171 width); in cfg80211_chandef_dfs_cac_time()
1178 width); in cfg80211_chandef_dfs_cac_time()
1269 u32 width, control_freq, cap; in _cfg80211_chandef_usable() local
1294 switch (chandef->width) { in _cfg80211_chandef_usable()
1296 width = 1; in _cfg80211_chandef_usable()
1299 width = 2; in _cfg80211_chandef_usable()
1302 width = 4; in _cfg80211_chandef_usable()
1305 width = 8; in _cfg80211_chandef_usable()
1308 width = 16; in _cfg80211_chandef_usable()
1311 width = 5; in _cfg80211_chandef_usable()
1315 width = 10; in _cfg80211_chandef_usable()
1324 width = 20; in _cfg80211_chandef_usable()
1327 width = 40; in _cfg80211_chandef_usable()
1355 width = 80; in _cfg80211_chandef_usable()
1363 width = 160; in _cfg80211_chandef_usable()
1377 width = 320; in _cfg80211_chandef_usable()
1416 if (width > 20) in _cfg80211_chandef_usable()
1420 if (width < 20) in _cfg80211_chandef_usable()
1426 width, prohibited_flags, in _cfg80211_chandef_usable()
1434 width, prohibited_flags, in _cfg80211_chandef_usable()