Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152518837
D48240.id148589.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D48240.id148589.diff
View Options
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c
@@ -2751,7 +2751,7 @@
/* FreeBSD: Update number of TX/RX streams */
p_cap->halTxStreams = owl_get_ntxchains(p_cap->halTxChainMask);
p_cap->halRxStreams = owl_get_ntxchains(p_cap->halRxChainMask);
-
+#undef owl_get_ntxchains
/*
* This being a newer chip supports TKIP non-splitmic mode.
diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c
@@ -968,7 +968,7 @@
u_int32_t capability, u_int32_t setting, HAL_STATUS *status)
{
struct ath_hal_9300 *ahp = AH9300(ah);
- const HAL_CAPABILITIES *p_cap = &AH_PRIVATE(ah)->ah_caps;
+ HAL_CAPABILITIES *p_cap = &AH_PRIVATE(ah)->ah_caps;
u_int32_t v;
switch (type) {
@@ -1079,6 +1079,33 @@
return AH_TRUE;
}
return AH_FALSE;
+
+#define owl_get_ntxchains(_txchainmask) \
+ (((_txchainmask >> 2) & 1) + ((_txchainmask >> 1) & 1) + \
+ (_txchainmask & 1))
+
+ case HAL_CAP_RX_CHAINMASK:
+ setting &= ar9300_eeprom_get(ahp, EEP_RX_MASK);
+ p_cap->halRxChainMask = setting;
+ p_cap->halRxStreams = owl_get_ntxchains(setting);
+ if (p_cap->halRxStreams > 3)
+ p_cap->halRxStreams = 3;
+ else if (p_cap->halRxStreams < 1)
+ p_cap->halRxStreams = 1;
+ return AH_TRUE;
+
+ case HAL_CAP_TX_CHAINMASK:
+ setting &= ar9300_eeprom_get(ahp, EEP_TX_MASK);
+ p_cap->halTxChainMask = setting;
+ p_cap->halTxStreams = owl_get_ntxchains(setting);
+ if (p_cap->halTxStreams > 3)
+ p_cap->halTxStreams = 3;
+ else if (p_cap->halTxStreams < 1)
+ p_cap->halTxStreams = 1;
+ return AH_TRUE;
+
+#undef owl_get_ntxchains
+
/* fall thru... */
default:
return ath_hal_setcapability(ah, type, capability, setting, status);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 11:19 AM (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31536950
Default Alt Text
D48240.id148589.diff (2 KB)
Attached To
Mode
D48240: ath_hal_ar9300: implement the TX/RX chainmask override for AR9300 HAL
Attached
Detach File
Event Timeline
Log In to Comment