aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-10-29 00:44:52 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-11-10 15:14:56 -0500
commit43453b3392c1ecfdd1471383ad42ba926533a722 (patch)
tree50db0ce59a58fa899a6aa4e6a7bd815a72c13dd1
parent528f0c6b3b6bbed1328ee49bfc906543daa00866 (diff)
ath9k: Remove SM Power Save as it is not supported now
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath9k/core.h7
-rw-r--r--drivers/net/wireless/ath9k/xmit.c45
2 files changed, 6 insertions, 46 deletions
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h
index 21b572bd39c6..27ed084d85cd 100644
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -415,12 +415,6 @@ int ath_rx_subframe(struct ath_node *an, struct sk_buff *skb,
415#define WME_AC_VO 3 /* voice */ 415#define WME_AC_VO 3 /* voice */
416#define WME_NUM_AC 4 416#define WME_NUM_AC 4
417 417
418enum ATH_SM_PWRSAV{
419 ATH_SM_ENABLE,
420 ATH_SM_PWRSAV_STATIC,
421 ATH_SM_PWRSAV_DYNAMIC,
422};
423
424/* 418/*
425 * Data transmit queue state. One of these exists for each 419 * Data transmit queue state. One of these exists for each
426 * hardware transmit queue. Packets sent to us from above 420 * hardware transmit queue. Packets sent to us from above
@@ -619,7 +613,6 @@ struct ath_node {
619 struct ath_softc *an_sc; 613 struct ath_softc *an_sc;
620 struct ath_chainmask_sel an_chainmask_sel; 614 struct ath_chainmask_sel an_chainmask_sel;
621 struct ath_node_aggr an_aggr; 615 struct ath_node_aggr an_aggr;
622 u8 an_smmode; /* SM Power save mode */
623 u16 maxampdu; 616 u16 maxampdu;
624 u8 mpdudensity; 617 u8 mpdudensity;
625}; 618};
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index 84219bc61f04..4e7108a179fb 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -575,7 +575,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
575 struct ath_desc *ds = bf->bf_desc; 575 struct ath_desc *ds = bf->bf_desc;
576 struct ath_desc *lastds = bf->bf_lastbf->bf_desc; 576 struct ath_desc *lastds = bf->bf_lastbf->bf_desc;
577 struct ath9k_11n_rate_series series[4]; 577 struct ath9k_11n_rate_series series[4];
578 int i, flags, rtsctsena = 0, dynamic_mimops = 0; 578 int i, flags, rtsctsena = 0;
579 u32 ctsduration = 0; 579 u32 ctsduration = 0;
580 u8 rix = 0, cix, ctsrate = 0; 580 u8 rix = 0, cix, ctsrate = 0;
581 u32 aggr_limit_with_rts = ah->ah_caps.rts_aggr_limit; 581 u32 aggr_limit_with_rts = ah->ah_caps.rts_aggr_limit;
@@ -631,18 +631,6 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
631 */ 631 */
632 if (!rtsctsena) 632 if (!rtsctsena)
633 flags = ATH9K_TXDESC_RTSENA; 633 flags = ATH9K_TXDESC_RTSENA;
634 /*
635 * For dynamic MIMO PS, RTS needs to precede the first aggregate
636 * and the second aggregate should have any protection at all.
637 */
638 if (an && an->an_smmode == ATH_SM_PWRSAV_DYNAMIC) {
639 if (!bf_isaggrburst(bf)) {
640 flags = ATH9K_TXDESC_RTSENA;
641 dynamic_mimops = 1;
642 } else {
643 flags = 0;
644 }
645 }
646 } 634 }
647 635
648 /* 636 /*
@@ -707,33 +695,14 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
707 (bf->bf_rcs[i].flags & ATH_RC_SGI_FLAG), 695 (bf->bf_rcs[i].flags & ATH_RC_SGI_FLAG),
708 bf_isshpreamble(bf)); 696 bf_isshpreamble(bf));
709 697
710 if (an && (an->an_smmode == ATH_SM_PWRSAV_STATIC) && 698 if (bf_isht(bf))
711 (bf->bf_rcs[i].flags & ATH_RC_DS_FLAG) == 0) { 699 series[i].ChSel =
712 /* 700 ath_chainmask_sel_logic(sc, an);
713 * When sending to an HT node that has enabled static 701 else
714 * SM/MIMO power save, send at single stream rates but
715 * use maximum allowed transmit chains per user,
716 * hardware, regulatory, or country limits for
717 * better range.
718 */
719 series[i].ChSel = sc->sc_tx_chainmask; 702 series[i].ChSel = sc->sc_tx_chainmask;
720 } else {
721 if (bf_isht(bf))
722 series[i].ChSel =
723 ath_chainmask_sel_logic(sc, an);
724 else
725 series[i].ChSel = sc->sc_tx_chainmask;
726 }
727 703
728 if (rtsctsena) 704 if (rtsctsena)
729 series[i].RateFlags |= ATH9K_RATESERIES_RTS_CTS; 705 series[i].RateFlags |= ATH9K_RATESERIES_RTS_CTS;
730
731 /*
732 * Set RTS for all rates if node is in dynamic powersave
733 * mode and we are using dual stream rates.
734 */
735 if (dynamic_mimops && (bf->bf_rcs[i].flags & ATH_RC_DS_FLAG))
736 series[i].RateFlags |= ATH9K_RATESERIES_RTS_CTS;
737 } 706 }
738 707
739 /* 708 /*
@@ -2520,10 +2489,8 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
2520 if (tid->paused) /* check next tid to keep h/w busy */ 2489 if (tid->paused) /* check next tid to keep h/w busy */
2521 continue; 2490 continue;
2522 2491
2523 if (!(tid->an->an_smmode == ATH_SM_PWRSAV_DYNAMIC) || 2492 if ((txq->axq_depth % 2) == 0)
2524 ((txq->axq_depth % 2) == 0)) {
2525 ath_tx_sched_aggr(sc, txq, tid); 2493 ath_tx_sched_aggr(sc, txq, tid);
2526 }
2527 2494
2528 /* 2495 /*
2529 * add tid to round-robin queue if more frames 2496 * add tid to round-robin queue if more frames