Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa44b988 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Johannes Berg
Browse files

mac80211: skip disabled channels in VHT check



The patch "40a11ca8 mac80211: check if channels allow 80 MHz for VHT
probe requests" considered disabled channels as VHT enabled, and
mistakenly sent out probe-requests with the VHT IE.

Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 71b836ec
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1470,11 +1470,13 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,

	/* Check if any channel in this sband supports at least 80 MHz */
	for (i = 0; i < sband->n_channels; i++) {
		if (!(sband->channels[i].flags & IEEE80211_CHAN_NO_80MHZ)) {
		if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |
						IEEE80211_CHAN_NO_80MHZ))
			continue;

		have_80mhz = true;
		break;
	}
	}

	if (sband->vht_cap.vht_supported && have_80mhz) {
		if (end - pos < 2 + sizeof(struct ieee80211_vht_cap))