diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-10-29 00:48:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-10 15:17:31 -0500 |
commit | ccc75c526611e62c4c9adcb4a62bf4a164478d2c (patch) | |
tree | fe7222c8c0281f8c6bd507cbdd98673b66e3855d /drivers/net/wireless/ath9k/rc.c | |
parent | 05a1e2d111c98340fb17ec702cf09450eec3a947 (diff) |
ath9k: Remove ath_tx_aggr_resp()
Accessing mac80211's internal state machine is wrong.
Will add resumption of a TID in a later patch.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/rc.c')
-rw-r--r-- | drivers/net/wireless/ath9k/rc.c | 65 |
1 files changed, 3 insertions, 62 deletions
diff --git a/drivers/net/wireless/ath9k/rc.c b/drivers/net/wireless/ath9k/rc.c index fecc8390d4d8..aa6bfd717c20 100644 --- a/drivers/net/wireless/ath9k/rc.c +++ b/drivers/net/wireless/ath9k/rc.c | |||
@@ -1879,49 +1879,6 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
1879 | tx_info->control.vif = NULL; | 1879 | tx_info->control.vif = NULL; |
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | static void ath_tx_aggr_resp(struct ath_softc *sc, | ||
1883 | struct ieee80211_supported_band *sband, | ||
1884 | struct ieee80211_sta *sta, | ||
1885 | struct ath_node *an, | ||
1886 | u8 tidno) | ||
1887 | { | ||
1888 | struct ath_atx_tid *txtid; | ||
1889 | u16 buffersize = 0; | ||
1890 | int state; | ||
1891 | struct sta_info *si; | ||
1892 | |||
1893 | if (!(sc->sc_flags & SC_OP_TXAGGR)) | ||
1894 | return; | ||
1895 | |||
1896 | txtid = ATH_AN_2_TID(an, tidno); | ||
1897 | if (!txtid->paused) | ||
1898 | return; | ||
1899 | |||
1900 | /* | ||
1901 | * XXX: This is entirely busted, we aren't supposed to | ||
1902 | * access the sta from here because it's internal | ||
1903 | * to mac80211, and looking at the state without | ||
1904 | * locking is wrong too. | ||
1905 | */ | ||
1906 | si = container_of(sta, struct sta_info, sta); | ||
1907 | buffersize = IEEE80211_MIN_AMPDU_BUF << | ||
1908 | sband->ht_cap.ampdu_factor; /* FIXME */ | ||
1909 | state = si->ampdu_mlme.tid_state_tx[tidno]; | ||
1910 | |||
1911 | if (state & HT_ADDBA_RECEIVED_MSK) { | ||
1912 | txtid->state |= AGGR_ADDBA_COMPLETE; | ||
1913 | txtid->state &= ~AGGR_ADDBA_PROGRESS; | ||
1914 | txtid->baw_size = buffersize; | ||
1915 | |||
1916 | DPRINTF(sc, ATH_DBG_AGGR, | ||
1917 | "%s: Resuming tid, buffersize: %d\n", | ||
1918 | __func__, | ||
1919 | buffersize); | ||
1920 | |||
1921 | ath_tx_resume_tid(sc, txtid); | ||
1922 | } | ||
1923 | } | ||
1924 | |||
1925 | static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | 1882 | static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, |
1926 | struct ieee80211_tx_rate_control *txrc) | 1883 | struct ieee80211_tx_rate_control *txrc) |
1927 | { | 1884 | { |
@@ -1934,7 +1891,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
1934 | struct ath_rate_node *ath_rc_priv = priv_sta; | 1891 | struct ath_rate_node *ath_rc_priv = priv_sta; |
1935 | struct ath_node *an; | 1892 | struct ath_node *an; |
1936 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1893 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
1937 | int is_probe = FALSE, chk, ret; | 1894 | int is_probe = FALSE; |
1938 | s8 lowest_idx; | 1895 | s8 lowest_idx; |
1939 | __le16 fc = hdr->frame_control; | 1896 | __le16 fc = hdr->frame_control; |
1940 | u8 *qc, tid; | 1897 | u8 *qc, tid; |
@@ -1981,26 +1938,10 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, | |||
1981 | if (ieee80211_is_data_qos(fc)) { | 1938 | if (ieee80211_is_data_qos(fc)) { |
1982 | qc = ieee80211_get_qos_ctl(hdr); | 1939 | qc = ieee80211_get_qos_ctl(hdr); |
1983 | tid = qc[0] & 0xf; | 1940 | tid = qc[0] & 0xf; |
1984 | |||
1985 | an = (struct ath_node *)sta->drv_priv; | 1941 | an = (struct ath_node *)sta->drv_priv; |
1986 | 1942 | ||
1987 | chk = ath_tx_aggr_check(sc, an, tid); | 1943 | if(ath_tx_aggr_check(sc, an, tid)) |
1988 | if (chk == AGGR_REQUIRED) { | 1944 | ieee80211_start_tx_ba_session(hw, hdr->addr1, tid); |
1989 | ret = ieee80211_start_tx_ba_session(hw, | ||
1990 | hdr->addr1, tid); | ||
1991 | if (ret) | ||
1992 | DPRINTF(sc, ATH_DBG_AGGR, | ||
1993 | "%s: Unable to start tx " | ||
1994 | "aggr for: %pM\n", | ||
1995 | __func__, | ||
1996 | hdr->addr1); | ||
1997 | else | ||
1998 | DPRINTF(sc, ATH_DBG_AGGR, | ||
1999 | "%s: Started tx aggr for: %pM\n", | ||
2000 | __func__, | ||
2001 | hdr->addr1); | ||
2002 | } else if (chk == AGGR_EXCHANGE_PROGRESS) | ||
2003 | ath_tx_aggr_resp(sc, sband, sta, an, tid); | ||
2004 | } | 1945 | } |
2005 | } | 1946 | } |
2006 | } | 1947 | } |