aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-07-23 06:02:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:15 -0400
commit4ef7084173e22cfdd4bb3aa3858ba8dd5d76f22f (patch)
treefba929dfe05c6ca5ea97d40de3c23e9df57ec38a /drivers
parentf83da96564b2a2f4ae75ea971b357458e5240b61 (diff)
ath9k: Remove a few redundant variables/macros
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c24
2 files changed, 10 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index d816c9df1f63..e2ebf1a56c00 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -190,7 +190,6 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
190#define ATH_AGGR_MIN_QDEPTH 2 190#define ATH_AGGR_MIN_QDEPTH 2
191#define ATH_AMPDU_SUBFRAME_DEFAULT 32 191#define ATH_AMPDU_SUBFRAME_DEFAULT 32
192#define ATH_AMPDU_LIMIT_MAX (64 * 1024 - 1) 192#define ATH_AMPDU_LIMIT_MAX (64 * 1024 - 1)
193#define ATH_AMPDU_LIMIT_DEFAULT ATH_AMPDU_LIMIT_MAX
194 193
195#define IEEE80211_SEQ_SEQ_SHIFT 4 194#define IEEE80211_SEQ_SEQ_SHIFT 4
196#define IEEE80211_SEQ_MAX 4096 195#define IEEE80211_SEQ_MAX 4096
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2c01fda5b723..6eb2927c8aec 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -455,7 +455,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
455 struct ieee80211_tx_rate *rates; 455 struct ieee80211_tx_rate *rates;
456 struct ath_tx_info_priv *tx_info_priv; 456 struct ath_tx_info_priv *tx_info_priv;
457 u32 max_4ms_framelen, frmlen; 457 u32 max_4ms_framelen, frmlen;
458 u16 aggr_limit, legacy = 0, maxampdu; 458 u16 aggr_limit, legacy = 0;
459 int i; 459 int i;
460 460
461 skb = bf->bf_mpdu; 461 skb = bf->bf_mpdu;
@@ -490,16 +490,15 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
490 if (tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE || legacy) 490 if (tx_info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE || legacy)
491 return 0; 491 return 0;
492 492
493 aggr_limit = min(max_4ms_framelen, (u32)ATH_AMPDU_LIMIT_DEFAULT); 493 aggr_limit = min(max_4ms_framelen, (u32)ATH_AMPDU_LIMIT_MAX);
494 494
495 /* 495 /*
496 * h/w can accept aggregates upto 16 bit lengths (65535). 496 * h/w can accept aggregates upto 16 bit lengths (65535).
497 * The IE, however can hold upto 65536, which shows up here 497 * The IE, however can hold upto 65536, which shows up here
498 * as zero. Ignore 65536 since we are constrained by hw. 498 * as zero. Ignore 65536 since we are constrained by hw.
499 */ 499 */
500 maxampdu = tid->an->maxampdu; 500 if (tid->an->maxampdu)
501 if (maxampdu) 501 aggr_limit = min(aggr_limit, tid->an->maxampdu);
502 aggr_limit = min(aggr_limit, maxampdu);
503 502
504 return aggr_limit; 503 return aggr_limit;
505} 504}
@@ -507,7 +506,6 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
507/* 506/*
508 * Returns the number of delimiters to be added to 507 * Returns the number of delimiters to be added to
509 * meet the minimum required mpdudensity. 508 * meet the minimum required mpdudensity.
510 * caller should make sure that the rate is HT rate .
511 */ 509 */
512static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid, 510static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
513 struct ath_buf *bf, u16 frmlen) 511 struct ath_buf *bf, u16 frmlen)
@@ -515,7 +513,7 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
515 const struct ath_rate_table *rt = sc->cur_rate_table; 513 const struct ath_rate_table *rt = sc->cur_rate_table;
516 struct sk_buff *skb = bf->bf_mpdu; 514 struct sk_buff *skb = bf->bf_mpdu;
517 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 515 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
518 u32 nsymbits, nsymbols, mpdudensity; 516 u32 nsymbits, nsymbols;
519 u16 minlen; 517 u16 minlen;
520 u8 rc, flags, rix; 518 u8 rc, flags, rix;
521 int width, half_gi, ndelim, mindelim; 519 int width, half_gi, ndelim, mindelim;
@@ -537,14 +535,12 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
537 * on highest rate in rate series (i.e. first rate) to determine 535 * on highest rate in rate series (i.e. first rate) to determine
538 * required minimum length for subframe. Take into account 536 * required minimum length for subframe. Take into account
539 * whether high rate is 20 or 40Mhz and half or full GI. 537 * whether high rate is 20 or 40Mhz and half or full GI.
540 */ 538 *
541 mpdudensity = tid->an->mpdudensity;
542
543 /*
544 * If there is no mpdu density restriction, no further calculation 539 * If there is no mpdu density restriction, no further calculation
545 * is needed. 540 * is needed.
546 */ 541 */
547 if (mpdudensity == 0) 542
543 if (tid->an->mpdudensity == 0)
548 return ndelim; 544 return ndelim;
549 545
550 rix = tx_info->control.rates[0].idx; 546 rix = tx_info->control.rates[0].idx;
@@ -554,9 +550,9 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_atx_tid *tid,
554 half_gi = (flags & IEEE80211_TX_RC_SHORT_GI) ? 1 : 0; 550 half_gi = (flags & IEEE80211_TX_RC_SHORT_GI) ? 1 : 0;
555 551
556 if (half_gi) 552 if (half_gi)
557 nsymbols = NUM_SYMBOLS_PER_USEC_HALFGI(mpdudensity); 553 nsymbols = NUM_SYMBOLS_PER_USEC_HALFGI(tid->an->mpdudensity);
558 else 554 else
559 nsymbols = NUM_SYMBOLS_PER_USEC(mpdudensity); 555 nsymbols = NUM_SYMBOLS_PER_USEC(tid->an->mpdudensity);
560 556
561 if (nsymbols == 0) 557 if (nsymbols == 0)
562 nsymbols = 1; 558 nsymbols = 1;