aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-07-23 06:02:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-27 15:24:14 -0400
commitf83da96564b2a2f4ae75ea971b357458e5240b61 (patch)
treee963208e7340d7c620581505f0b9b2f0d774295a /drivers
parent9e98ac65a39df54fb0520cd86d1e7373319df00f (diff)
ath9k: Cleanup return values
Cleanup aggregation start/stop function interfaces. 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.h6
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c14
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c25
3 files changed, 15 insertions, 30 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index ebcf78b1ba73..d816c9df1f63 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -363,9 +363,9 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
363void ath_tx_tasklet(struct ath_softc *sc); 363void ath_tx_tasklet(struct ath_softc *sc);
364void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb); 364void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb);
365bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno); 365bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno);
366int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, 366void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
367 u16 tid, u16 *ssn); 367 u16 tid, u16 *ssn);
368int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); 368void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
369void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); 369void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
370 370
371/********/ 371/********/
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3834678f622c..b3e07e79daec 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2669,19 +2669,11 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
2669 case IEEE80211_AMPDU_RX_STOP: 2669 case IEEE80211_AMPDU_RX_STOP:
2670 break; 2670 break;
2671 case IEEE80211_AMPDU_TX_START: 2671 case IEEE80211_AMPDU_TX_START:
2672 ret = ath_tx_aggr_start(sc, sta, tid, ssn); 2672 ath_tx_aggr_start(sc, sta, tid, ssn);
2673 if (ret < 0) 2673 ieee80211_start_tx_ba_cb_irqsafe(hw, sta->addr, tid);
2674 DPRINTF(sc, ATH_DBG_FATAL,
2675 "Unable to start TX aggregation\n");
2676 else
2677 ieee80211_start_tx_ba_cb_irqsafe(hw, sta->addr, tid);
2678 break; 2674 break;
2679 case IEEE80211_AMPDU_TX_STOP: 2675 case IEEE80211_AMPDU_TX_STOP:
2680 ret = ath_tx_aggr_stop(sc, sta, tid); 2676 ath_tx_aggr_stop(sc, sta, tid);
2681 if (ret < 0)
2682 DPRINTF(sc, ATH_DBG_FATAL,
2683 "Unable to stop TX aggregation\n");
2684
2685 ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid); 2677 ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
2686 break; 2678 break;
2687 case IEEE80211_AMPDU_TX_OPERATIONAL: 2679 case IEEE80211_AMPDU_TX_OPERATIONAL:
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index c039d0ac5ffe..2c01fda5b723 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -695,25 +695,20 @@ static void ath_tx_sched_aggr(struct ath_softc *sc, struct ath_txq *txq,
695 status != ATH_AGGR_BAW_CLOSED); 695 status != ATH_AGGR_BAW_CLOSED);
696} 696}
697 697
698int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, 698void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
699 u16 tid, u16 *ssn) 699 u16 tid, u16 *ssn)
700{ 700{
701 struct ath_atx_tid *txtid; 701 struct ath_atx_tid *txtid;
702 struct ath_node *an; 702 struct ath_node *an;
703 703
704 an = (struct ath_node *)sta->drv_priv; 704 an = (struct ath_node *)sta->drv_priv;
705 705 txtid = ATH_AN_2_TID(an, tid);
706 if (sc->sc_flags & SC_OP_TXAGGR) { 706 txtid->state |= AGGR_ADDBA_PROGRESS;
707 txtid = ATH_AN_2_TID(an, tid); 707 ath_tx_pause_tid(sc, txtid);
708 txtid->state |= AGGR_ADDBA_PROGRESS; 708 *ssn = txtid->seq_start;
709 ath_tx_pause_tid(sc, txtid);
710 *ssn = txtid->seq_start;
711 }
712
713 return 0;
714} 709}
715 710
716int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid) 711void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
717{ 712{
718 struct ath_node *an = (struct ath_node *)sta->drv_priv; 713 struct ath_node *an = (struct ath_node *)sta->drv_priv;
719 struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid); 714 struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
@@ -723,11 +718,11 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
723 INIT_LIST_HEAD(&bf_head); 718 INIT_LIST_HEAD(&bf_head);
724 719
725 if (txtid->state & AGGR_CLEANUP) 720 if (txtid->state & AGGR_CLEANUP)
726 return 0; 721 return;
727 722
728 if (!(txtid->state & AGGR_ADDBA_COMPLETE)) { 723 if (!(txtid->state & AGGR_ADDBA_COMPLETE)) {
729 txtid->state &= ~AGGR_ADDBA_PROGRESS; 724 txtid->state &= ~AGGR_ADDBA_PROGRESS;
730 return 0; 725 return;
731 } 726 }
732 727
733 ath_tx_pause_tid(sc, txtid); 728 ath_tx_pause_tid(sc, txtid);
@@ -756,8 +751,6 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
756 txtid->state &= ~AGGR_ADDBA_COMPLETE; 751 txtid->state &= ~AGGR_ADDBA_COMPLETE;
757 ath_tx_flush_tid(sc, txtid); 752 ath_tx_flush_tid(sc, txtid);
758 } 753 }
759
760 return 0;
761} 754}
762 755
763void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid) 756void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)