summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-07-19 19:22:47 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-07-19 19:22:47 +0000
commit7973fa7ae6ab4c14e686d2fe6091b16ef382b3af (patch)
tree9d87c6a2689532fca367eb98e0ce98ea27e7f0a6 /sys/dev/ic
parentd8eb22fbfec900f046aae2f9eb35fbc77963f87d (diff)
implement the ic_ampdu_rx_{start,stop} callbacks (not used yet).
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/rt2860.c43
1 files changed, 42 insertions, 1 deletions
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c
index 14ee14a3031..a1f955912f9 100644
--- a/sys/dev/ic/rt2860.c
+++ b/sys/dev/ic/rt2860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860.c,v 1.54 2010/07/19 19:08:28 damien Exp $ */
+/* $OpenBSD: rt2860.c,v 1.55 2010/07/19 19:22:46 damien Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -100,6 +100,10 @@ void rt2860_newassoc(struct ieee80211com *, struct ieee80211_node *,
int);
void rt2860_node_leave(struct ieee80211com *,
struct ieee80211_node *);
+int rt2860_ampdu_rx_start(struct ieee80211com *,
+ struct ieee80211_node *, uint8_t);
+void rt2860_ampdu_rx_stop(struct ieee80211com *,
+ struct ieee80211_node *, uint8_t);
int rt2860_newstate(struct ieee80211com *, enum ieee80211_state,
int);
uint16_t rt3090_efuse_read_2(struct rt2860_softc *, uint16_t);
@@ -333,6 +337,10 @@ rt2860_attach(void *xsc, int id)
#ifndef IEEE80211_STA_ONLY
ic->ic_node_leave = rt2860_node_leave;
#endif
+#ifndef IEEE80211_NO_HT
+ ic->ic_ampdu_rx_start = rt2860_ampdu_rx_start;
+ ic->ic_ampdu_rx_stop = rt2860_ampdu_rx_stop;
+#endif
ic->ic_updateslot = rt2860_updateslot;
ic->ic_updateedca = rt2860_updateedca;
ic->ic_set_key = rt2860_set_key;
@@ -854,6 +862,39 @@ rt2860_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
}
#endif
+#ifndef IEEE80211_NO_HT
+int
+rt2860_ampdu_rx_start(struct ieee80211com *ic, struct ieee80211_node *ni,
+ uint8_t tid)
+{
+ struct rt2860_softc *sc = ic->ic_softc;
+ uint32_t tmp;
+ uint8_t wcid;
+
+ /* update BA session mask */
+ wcid = RT2860_AID2WCID(ni->ni_associd);
+ tmp = RAL_READ(sc, RT2860_WCID_ENTRY(wcid) + 4);
+ tmp |= (1 << tid) << 16;
+ RAL_WRITE(sc, RT2860_WCID_ENTRY(wcid) + 4, tmp);
+ return 0;
+}
+
+void
+rt2860_ampdu_rx_stop(struct ieee80211com *ic, struct ieee80211_node *ni,
+ uint8_t tid)
+{
+ struct rt2860_softc *sc = ic->ic_softc;
+ uint32_t tmp;
+ uint8_t wcid;
+
+ /* update BA session mask */
+ wcid = RT2860_AID2WCID(ni->ni_associd);
+ tmp = RAL_READ(sc, RT2860_WCID_ENTRY(wcid) + 4);
+ tmp &= ~((1 << tid) << 16);
+ RAL_WRITE(sc, RT2860_WCID_ENTRY(wcid) + 4, tmp);
+}
+#endif
+
int
rt2860_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
{