if_ath.c (c43feede8b1d9b4a97125557868889a2af51b421) if_ath.c (4df6277969f6306228467d34d3bfd3d5825d3777)
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4624 unchanged lines hidden (view full) ---

4633 } else {
4634 shortPreamble = AH_FALSE;
4635 }
4636
4637 an = ATH_NODE(ni);
4638 flags = HAL_TXDESC_CLRDMASK; /* XXX needed for crypto errs */
4639 ismrr = 0; /* default no multi-rate retry*/
4640 pri = M_WME_GETAC(m0); /* honor classification */
1/*-
2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 4624 unchanged lines hidden (view full) ---

4633 } else {
4634 shortPreamble = AH_FALSE;
4635 }
4636
4637 an = ATH_NODE(ni);
4638 flags = HAL_TXDESC_CLRDMASK; /* XXX needed for crypto errs */
4639 ismrr = 0; /* default no multi-rate retry*/
4640 pri = M_WME_GETAC(m0); /* honor classification */
4641 /* XXX use txparams instead of fixed values */
4641 /*
4642 * Calculate Atheros packet type from IEEE80211 packet header,
4643 * setup for rate calculations, and select h/w transmit queue.
4644 */
4645 switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) {
4646 case IEEE80211_FC0_TYPE_MGT:
4647 subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
4648 if (subtype == IEEE80211_FC0_SUBTYPE_BEACON)

--- 19 unchanged lines hidden (view full) ---

4668 txrate |= rt->info[rix].shortPreamble;
4669 try0 = ATH_TXMGTTRY;
4670 flags |= HAL_TXDESC_INTREQ; /* force interrupt */
4671 break;
4672 case IEEE80211_FC0_TYPE_DATA:
4673 atype = HAL_PKT_TYPE_NORMAL; /* default */
4674 /*
4675 * Data frames: multicast frames go out at a fixed rate,
4642 /*
4643 * Calculate Atheros packet type from IEEE80211 packet header,
4644 * setup for rate calculations, and select h/w transmit queue.
4645 */
4646 switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) {
4647 case IEEE80211_FC0_TYPE_MGT:
4648 subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
4649 if (subtype == IEEE80211_FC0_SUBTYPE_BEACON)

--- 19 unchanged lines hidden (view full) ---

4669 txrate |= rt->info[rix].shortPreamble;
4670 try0 = ATH_TXMGTTRY;
4671 flags |= HAL_TXDESC_INTREQ; /* force interrupt */
4672 break;
4673 case IEEE80211_FC0_TYPE_DATA:
4674 atype = HAL_PKT_TYPE_NORMAL; /* default */
4675 /*
4676 * Data frames: multicast frames go out at a fixed rate,
4676 * otherwise consult the rate control module for the
4677 * rate to use.
4677 * EAPOL frames use the mgmt frame rate; otherwise consult
4678 * the rate control module for the rate to use.
4678 */
4679 if (ismcast) {
4680 rix = an->an_mcastrix;
4681 txrate = rt->info[rix].rateCode;
4682 if (shortPreamble)
4683 txrate |= rt->info[rix].shortPreamble;
4684 try0 = 1;
4679 */
4680 if (ismcast) {
4681 rix = an->an_mcastrix;
4682 txrate = rt->info[rix].rateCode;
4683 if (shortPreamble)
4684 txrate |= rt->info[rix].shortPreamble;
4685 try0 = 1;
4686 } else if (m0->m_flags & M_EAPOL) {
4687 /* XXX? maybe always use long preamble? */
4688 rix = an->an_mgmtrix;
4689 txrate = rt->info[rix].rateCode;
4690 if (shortPreamble)
4691 txrate |= rt->info[rix].shortPreamble;
4692 try0 = ATH_TXMAXTRY; /* XXX?too many? */
4685 } else {
4686 ath_rate_findrate(sc, an, shortPreamble, pktlen,
4687 &rix, &try0, &txrate);
4688 sc->sc_txrate = txrate; /* for LED blinking */
4689 sc->sc_lastdatarix = rix; /* for fast frames */
4690 if (try0 != ATH_TXMAXTRY)
4691 ismrr = 1;
4692 }

--- 2281 unchanged lines hidden ---
4693 } else {
4694 ath_rate_findrate(sc, an, shortPreamble, pktlen,
4695 &rix, &try0, &txrate);
4696 sc->sc_txrate = txrate; /* for LED blinking */
4697 sc->sc_lastdatarix = rix; /* for fast frames */
4698 if (try0 != ATH_TXMAXTRY)
4699 ismrr = 1;
4700 }

--- 2281 unchanged lines hidden ---