summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-03-04 07:40:49 +0000
committeradrian <adrian@FreeBSD.org>2013-03-04 07:40:49 +0000
commit9b8f8df1c583114bb6442e9079e689d841ea0b80 (patch)
tree266a98663fd939b009358567a66c1ef8f3ce9874
parenta0bd41720afb55b501ddff2c3bbd7f50a7c0ba1a (diff)
downloadFreeBSD-src-9b8f8df1c583114bb6442e9079e689d841ea0b80.zip
FreeBSD-src-9b8f8df1c583114bb6442e9079e689d841ea0b80.tar.gz
add a method to set/clear the VMF field in the TX descriptor.
Obtained from: Qualcomm Atheros
-rw-r--r--sys/dev/ath/ath_hal/ah.h4
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416.h3
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_attach.c1
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c11
-rw-r--r--sys/dev/ath/if_athvar.h2
5 files changed, 19 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ah.h b/sys/dev/ath/ath_hal/ah.h
index ca2e7ca..0deb9c9 100644
--- a/sys/dev/ath/ath_hal/ah.h
+++ b/sys/dev/ath/ath_hal/ah.h
@@ -1527,11 +1527,13 @@ struct ath_hal {
struct ath_desc *, u_int);
void __ahdecl(*ah_set11nAggrLast)(struct ath_hal *,
struct ath_desc *);
-
void __ahdecl(*ah_clr11nAggr)(struct ath_hal *,
struct ath_desc *);
void __ahdecl(*ah_set11nBurstDuration)(struct ath_hal *,
struct ath_desc *, u_int);
+ void __ahdecl(*ah_set11nVirtMoreFrag)(struct ath_hal *,
+ struct ath_desc *, u_int);
+
HAL_BOOL __ahdecl(*ah_getMibCycleCounts) (struct ath_hal *,
HAL_SURVEY_SAMPLE *);
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416.h b/sys/dev/ath/ath_hal/ar5416/ar5416.h
index 98dcf5e..c5ff6ae 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416.h
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416.h
@@ -409,8 +409,9 @@ extern void ar5416Set11nAggrFirst(struct ath_hal *ah, struct ath_desc *ds,
u_int aggrLen, u_int numDelims);
extern void ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims);
extern void ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds);
-
extern void ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds);
+extern void ar5416Set11nVirtualMoreFrag(struct ath_hal *ah,
+ struct ath_desc *ds, u_int vmf);
extern void ar5416Set11nBurstDuration(struct ath_hal *ah, struct ath_desc *ds, u_int burstDuration);
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
index 9a0a479..fd00ea7 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
@@ -194,6 +194,7 @@ ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
ah->ah_set11nMac2040 = ar5416Set11nMac2040;
ah->ah_get11nRxClear = ar5416Get11nRxClear;
ah->ah_set11nRxClear = ar5416Set11nRxClear;
+ ah->ah_set11nVirtMoreFrag = ar5416Set11nVirtualMoreFrag;
/* Interrupt functions */
ah->ah_isInterruptPending = ar5416IsInterruptPending;
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c b/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
index 118a43b..f671175 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c
@@ -825,6 +825,17 @@ ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds)
ads->ds_ctl6 &= ~AR_AggrLen;
}
+void
+ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, struct ath_desc *ds,
+ u_int vmf)
+{
+ struct ar5416_desc *ads = AR5416DESC(ds);
+ if (vmf)
+ ads->ds_ctl0 |= AR_VirtMoreFrag;
+ else
+ ads->ds_ctl0 &= ~AR_VirtMoreFrag;
+}
+
/*
* Program the burst duration, with the included BA delta if it's
* applicable.
diff --git a/sys/dev/ath/if_athvar.h b/sys/dev/ath/if_athvar.h
index 42442de..06cffb6 100644
--- a/sys/dev/ath/if_athvar.h
+++ b/sys/dev/ath/if_athvar.h
@@ -1297,6 +1297,8 @@ void ath_intr(void *);
((*(_ah)->ah_set11nBurstDuration)((_ah), (_ds), (_dur)))
#define ath_hal_clr11n_aggr(_ah, _ds) \
((*(_ah)->ah_clr11nAggr)((_ah), (_ds)))
+#define ath_hal_set11n_virtmorefrag(_ah, _ds, _v) \
+ ((*(_ah)->ah_set11nVirtMoreFrag)((_ah), (_ds), (_v)))
#define ath_hal_gpioCfgOutput(_ah, _gpio, _type) \
((*(_ah)->ah_gpioCfgOutput)((_ah), (_gpio), (_type)))
OpenPOWER on IntegriCloud