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

Commit 14cc709f authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

ath9k: Do not update frame's duration field



When AR_DurUpdateEna is set, the frame's duration field
is updated by the MAC based on the current rate.

Signed-off-by: default avatarSujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 822ceaef
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -516,7 +516,6 @@ struct ath_tx_control {
	u32 keyix;
	int min_rate;
	int mcast_rate;
	u16 nextfraglen;
	struct ath_softc *dev;
	dma_addr_t dmacontext;
};
+11 −45
Original line number Diff line number Diff line
@@ -227,7 +227,6 @@ static int ath_tx_prepare(struct ath_softc *sc,
	}

	txctl->if_id = 0;
	txctl->nextfraglen = 0;
	txctl->frmlen = skb->len + FCS_LEN - (hdrlen & 3);
	txctl->txpower = MAX_RATE_POWER; /* FIXME */

@@ -344,36 +343,6 @@ static int ath_tx_prepare(struct ath_softc *sc,
	}
	rix = rcs[0].rix;

	/*
	 * Calculate duration.  This logically belongs in the 802.11
	 * layer but it lacks sufficient information to calculate it.
	 */
	if ((txctl->flags & ATH9K_TXDESC_NOACK) == 0 && !ieee80211_is_ctl(fc)) {
		u16 dur;
		/*
		 * XXX not right with fragmentation.
		 */
		if (sc->sc_flags & SC_OP_PREAMBLE_SHORT)
			dur = rt->info[rix].spAckDuration;
		else
			dur = rt->info[rix].lpAckDuration;

		if (le16_to_cpu(hdr->frame_control) &
				IEEE80211_FCTL_MOREFRAGS) {
			dur += dur;  /* Add additional 'SIFS + ACK' */

			/*
			** Compute size of next fragment in order to compute
			** durations needed to update NAV.
			** The last fragment uses the ACK duration only.
			** Add time for next fragment.
			*/
			dur += ath9k_hw_computetxtime(sc->sc_ah, rt,
				      txctl->nextfraglen,
				      rix,
				      (sc->sc_flags & SC_OP_PREAMBLE_SHORT));
		}

	if (ieee80211_has_morefrags(fc) ||
	    (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG)) {
		/*
@@ -388,9 +357,6 @@ static int ath_tx_prepare(struct ath_softc *sc,
		rcs[0].tries = ATH_TXMAXTRY;
	}

		hdr->duration_id = cpu_to_le16(dur);
	}

	/*
	 * Determine if a tx interrupt should be generated for
	 * this descriptor.  We take a tx interrupt to reap