Commit 34670beb authored by Johannes Berg's avatar Johannes Berg
Browse files

wifi: mac80211: use cfg80211_chandef_get_width()

parent b5c16227
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -788,7 +788,7 @@ static int ieee80211_chandef_num_subchans(const struct cfg80211_chan_def *c)
	if (c->width == NL80211_CHAN_WIDTH_80P80)
		return 4 + 4;

	return nl80211_chan_width_to_mhz(c->width) / 20;
	return cfg80211_chandef_get_width(c) / 20;
}

static int ieee80211_chandef_num_widths(const struct cfg80211_chan_def *c)
+2 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
/*
 * Wifi Band Exclusion Interface for WLAN
 * Copyright (C) 2023 Advanced Micro Devices
 * Copyright (C) 2025 Intel Corporation
 *
 */

@@ -45,7 +46,7 @@ static void get_ranges_from_chandef(struct cfg80211_chan_def *chandef,
	u64 start_freq2, end_freq2;
	int bandwidth;

	bandwidth = nl80211_chan_width_to_mhz(chandef->width);
	bandwidth = cfg80211_chandef_get_width(chandef);

	get_chan_freq_boundary(chandef->center_freq1, bandwidth, &start_freq1, &end_freq1);