svn commit: r187646 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5212
Sam Leffler
sam at FreeBSD.org
Fri Jan 23 12:35:44 PST 2009
Author: sam
Date: Fri Jan 23 20:35:43 2009
New Revision: 187646
URL: http://svn.freebsd.org/changeset/base/187646
Log:
add AH_MAXCHAN tunable to set the size of the private channel table
(and indirectly the ANI state table for 5212/5416 cards); default this
to 96 which should at least 3x normal use (for ~4.5K of storage on
32-bit machines; slightly more on 64-bit machines)
Modified:
user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h
user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h
Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h
==============================================================================
--- user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Fri Jan 23 20:19:58 2009 (r187645)
+++ user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Fri Jan 23 20:35:43 2009 (r187646)
@@ -110,6 +110,17 @@ OS_DATA_SET(ah_rfs, _name##_rf)
struct ath_hal_rf *ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode);
/*
+ * Maximum number of internal channels. Entries are per unique
+ * frequency so this might be need to be increased to handle all
+ * usage cases; typically no more than 32 are really needed but
+ * dynamically allocating the data structures is a bit painful
+ * right now.
+ */
+#ifndef AH_MAXCHAN
+#define AH_MAXCHAN 96
+#endif
+
+/*
* Internal per-channel state. These are found
* using ic_devdata in the ieee80211_channel.
*/
@@ -266,8 +277,8 @@ struct ath_hal_private {
* State for regulatory domain handling.
*/
HAL_REG_DOMAIN ah_currentRD; /* EEPROM regulatory domain */
- HAL_CHANNEL_INTERNAL ah_channels[256]; /* calculated channel list */
- u_int ah_nchan; /* valid channels in list */
+ HAL_CHANNEL_INTERNAL ah_channels[AH_MAXCHAN]; /* private chan state */
+ u_int ah_nchan; /* valid items in ah_channels */
const struct regDomain *ah_rd2GHz; /* reg state for 2G band */
const struct regDomain *ah_rd5GHz; /* reg state for 5G band */
Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h
==============================================================================
--- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Fri Jan 23 20:19:58 2009 (r187645)
+++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Fri Jan 23 20:35:43 2009 (r187646)
@@ -319,7 +319,7 @@ struct ath_hal_5212 {
struct ar5212AniParams ah_aniParams24; /* 2.4GHz parameters */
struct ar5212AniParams ah_aniParams5; /* 5GHz parameters */
struct ar5212AniState *ah_curani; /* cached last reference */
- struct ar5212AniState ah_ani[64]; /* per-channel state */
+ struct ar5212AniState ah_ani[AH_MAXCHAN]; /* per-channel state */
/*
* Transmit power state. Note these are maintained
More information about the svn-src-user
mailing list