aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-08-04 15:02:43 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-24 16:32:02 -0400
commit172c1d112a38c8721fe1d7114e2ce1e8a91451c1 (patch)
tree253b91b42925d9c9b9d0965104b59f077d1ac1c2
parent7ccc896f4c9d5f11e449368cf520565bf2073a9b (diff)
iwlwifi: configurable ampdu factor and density
Add ampdu factor and density to .cfg, this allow both parameters can be configure per device based. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h13
3 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 7754be4463d8..346e0ad7e351 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -239,7 +239,11 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
239 ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; 239 ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU;
240 240
241 ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; 241 ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF;
242 if (priv->cfg->ampdu_factor)
243 ht_info->ampdu_factor = priv->cfg->ampdu_factor;
242 ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; 244 ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF;
245 if (priv->cfg->ampdu_density)
246 ht_info->ampdu_density = priv->cfg->ampdu_density;
243 247
244 ht_info->mcs.rx_mask[0] = 0xFF; 248 ht_info->mcs.rx_mask[0] = 0xFF;
245 if (rx_chains_num >= 2) 249 if (rx_chains_num >= 2)
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index edadca510099..3efab0e29b06 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -281,6 +281,8 @@ struct iwl_mod_params {
281 * @need_dc_calib: need to perform init dc calibration 281 * @need_dc_calib: need to perform init dc calibration
282 * @bt_statistics: use BT version of statistics notification 282 * @bt_statistics: use BT version of statistics notification
283 * @agg_time_limit: maximum number of uSec in aggregation 283 * @agg_time_limit: maximum number of uSec in aggregation
284 * @ampdu_factor: Maximum A-MPDU length factor
285 * @ampdu_density: Minimum A-MPDU spacing
284 * 286 *
285 * We enable the driver to be backward compatible wrt API version. The 287 * We enable the driver to be backward compatible wrt API version. The
286 * driver specifies which APIs it supports (with @ucode_api_max being the 288 * driver specifies which APIs it supports (with @ucode_api_max being the
@@ -352,6 +354,8 @@ struct iwl_cfg {
352 const bool need_dc_calib; 354 const bool need_dc_calib;
353 const bool bt_statistics; 355 const bool bt_statistics;
354 u16 agg_time_limit; 356 u16 agg_time_limit;
357 u8 ampdu_factor;
358 u8 ampdu_density;
355}; 359};
356 360
357/*************************** 361/***************************
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 91d9c8b3efeb..f72fbf4dc92b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -435,7 +435,13 @@ union iwl_ht_rate_supp {
435 }; 435 };
436}; 436};
437 437
438#define CFG_HT_RX_AMPDU_FACTOR_DEF (0x3) 438#define CFG_HT_RX_AMPDU_FACTOR_8K (0x0)
439#define CFG_HT_RX_AMPDU_FACTOR_16K (0x1)
440#define CFG_HT_RX_AMPDU_FACTOR_32K (0x2)
441#define CFG_HT_RX_AMPDU_FACTOR_64K (0x3)
442#define CFG_HT_RX_AMPDU_FACTOR_DEF CFG_HT_RX_AMPDU_FACTOR_64K
443#define CFG_HT_RX_AMPDU_FACTOR_MAX CFG_HT_RX_AMPDU_FACTOR_64K
444#define CFG_HT_RX_AMPDU_FACTOR_MIN CFG_HT_RX_AMPDU_FACTOR_8K
439 445
440/* 446/*
441 * Maximal MPDU density for TX aggregation 447 * Maximal MPDU density for TX aggregation
@@ -444,8 +450,13 @@ union iwl_ht_rate_supp {
444 * 6 - 8us density 450 * 6 - 8us density
445 * 7 - 16us density 451 * 7 - 16us density
446 */ 452 */
453#define CFG_HT_MPDU_DENSITY_2USEC (0x4)
447#define CFG_HT_MPDU_DENSITY_4USEC (0x5) 454#define CFG_HT_MPDU_DENSITY_4USEC (0x5)
455#define CFG_HT_MPDU_DENSITY_8USEC (0x6)
456#define CFG_HT_MPDU_DENSITY_16USEC (0x7)
448#define CFG_HT_MPDU_DENSITY_DEF CFG_HT_MPDU_DENSITY_4USEC 457#define CFG_HT_MPDU_DENSITY_DEF CFG_HT_MPDU_DENSITY_4USEC
458#define CFG_HT_MPDU_DENSITY_MAX CFG_HT_MPDU_DENSITY_16USEC
459#define CFG_HT_MPDU_DENSITY_MIN (0x1)
449 460
450struct iwl_ht_config { 461struct iwl_ht_config {
451 /* self configuration data */ 462 /* self configuration data */