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

Commit fb142f4b authored by Fred Chou's avatar Fred Chou Committed by Johannes Berg
Browse files

mac80211: correct header length calculation



HT Control field may also be present in management frames, as defined
in 8.2.4.1.10 of 802.11-2012. Account for this in calculation of header
length.

Signed-off-by: default avatarFred Chou <fred.chou.nd@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 2af81d67
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -308,6 +308,12 @@ unsigned int __attribute_const__ ieee80211_hdrlen(__le16 fc)
		goto out;
		goto out;
	}
	}


	if (ieee80211_is_mgmt(fc)) {
		if (ieee80211_has_order(fc))
			hdrlen += IEEE80211_HT_CTL_LEN;
		goto out;
	}

	if (ieee80211_is_ctl(fc)) {
	if (ieee80211_is_ctl(fc)) {
		/*
		/*
		 * ACK and CTS are 10 bytes, all others 16. To see how
		 * ACK and CTS are 10 bytes, all others 16. To see how