/* rix - rate index pktlen - total bytes (delims + data + fcs + pads + pad delims) width - 0 for 20 MHz, 1 for 40 MHz half_gi - to use 4us v/s 3.6 us for symbol time  */
static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf, int width, int half_gi, bool shortPreamble)
/* rix - rate index pktlen - total bytes (delims + data + fcs + pads + pad delims) width - 0 for 20 MHz, 1 for 40 MHz half_gi - to use 4us v/s 3.6 us for symbol time  */
static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, struct ath_buf *bf, int width, int half_gi, bool shortPreamble)
{
	u32 nbits, nsymbits, duration, nsymbols;
	int streams, pktlen;
	pktlen = bf_isaggr(bf) ? bf->bf_al : bf->bf_frmlen;
	nbits = (pktlen << 3) + OFDM_PLCP_BITS;
	nsymbits = bits_per_symbol[rix][width];
	nsymbols = (nbits + nsymbits - 1) / nsymbits;
	if (!half_gi)
		duration = SYMBOL_TIME(nsymbols);
	else
		duration = SYMBOL_TIME_HALFGI(nsymbols);
	streams = HT_RC_2_STREAMS(rix);
	duration += L_STF + L_LTF + L_SIG + HT_SIG + HT_STF + HT_LTF(streams);
	return duration;
}