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

Commit 6674f210 authored by Simon Wunderlich's avatar Simon Wunderlich Committed by John W. Linville
Browse files

mac80211: fix duration calculation for QoS NOACK frames

parent b53be792
Loading
Loading
Loading
Loading
+9 −5
Original line number Original line Diff line number Diff line
@@ -151,10 +151,14 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
		rate = mrate;
		rate = mrate;
	}
	}


	/* Don't calculate ACKs for QoS Frames with NoAck Policy set */
	if (ieee80211_is_data_qos(hdr->frame_control) &&
	    *(ieee80211_get_qos_ctl(hdr)) | IEEE80211_QOS_CTL_ACK_POLICY_NOACK)
		dur = 0;
	else
		/* Time needed to transmit ACK
		/* Time needed to transmit ACK
		 * (10 bytes + 4-byte FCS = 112 bits) plus SIFS; rounded up
		 * (10 bytes + 4-byte FCS = 112 bits) plus SIFS; rounded up
		 * to closest integer */
		 * to closest integer */

		dur = ieee80211_frame_duration(local, 10, rate, erp,
		dur = ieee80211_frame_duration(local, 10, rate, erp,
				tx->sdata->vif.bss_conf.use_short_preamble);
				tx->sdata->vif.bss_conf.use_short_preamble);