aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2007-11-26 09:14:40 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:44 -0500
commit67d620357a186adc0f4e7d1f5b095ea2c77e7072 (patch)
treed5ee39e9837d01aefdccfb8fc084b561f8fa7367 /drivers/net/wireless/iwlwifi/iwl-4965.c
parentfd105e79d19439d29a6561178fb5fe511e141f6b (diff)
iwlwifi: 802.11n comply HT add station flow with mac80211 framework
This patch conforms the addition of a new station to the iwlwifi station table according to the new mac80211's HT framework Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c28
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 2724208aca7c..55d61000e342 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4617,39 +4617,33 @@ void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info)
4617 return; 4617 return;
4618} 4618}
4619 4619
4620void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index) 4620void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
4621 struct ieee80211_ht_info *sta_ht_inf)
4621{ 4622{
4622 __le32 sta_flags; 4623 __le32 sta_flags;
4623 struct sta_ht_info *ht_info = &priv->current_assoc_ht;
4624 4624
4625 priv->current_channel_width = IWL_CHANNEL_WIDTH_20MHZ; 4625 if (!sta_ht_inf || !sta_ht_inf->ht_supported)
4626 if (!ht_info->is_ht)
4627 goto done; 4626 goto done;
4628 4627
4629 sta_flags = priv->stations[index].sta.station_flags; 4628 sta_flags = priv->stations[index].sta.station_flags;
4630 4629
4631 if (ht_info->tx_mimo_ps_mode == IWL_MIMO_PS_DYNAMIC) 4630 if (((sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS >> 2))
4631 == IWL_MIMO_PS_DYNAMIC)
4632 sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; 4632 sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK;
4633 else 4633 else
4634 sta_flags &= ~STA_FLG_RTS_MIMO_PROT_MSK; 4634 sta_flags &= ~STA_FLG_RTS_MIMO_PROT_MSK;
4635 4635
4636 sta_flags |= cpu_to_le32( 4636 sta_flags |= cpu_to_le32(
4637 (u32)ht_info->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS); 4637 (u32)sta_ht_inf->ampdu_factor << STA_FLG_MAX_AGG_SIZE_POS);
4638 4638
4639 sta_flags |= cpu_to_le32( 4639 sta_flags |= cpu_to_le32(
4640 (u32)ht_info->mpdu_density << STA_FLG_AGG_MPDU_DENSITY_POS); 4640 (u32)sta_ht_inf->ampdu_density << STA_FLG_AGG_MPDU_DENSITY_POS);
4641
4642 sta_flags &= (~STA_FLG_FAT_EN_MSK);
4643 ht_info->tx_chan_width = IWL_CHANNEL_WIDTH_20MHZ;
4644 ht_info->chan_width_cap = IWL_CHANNEL_WIDTH_20MHZ;
4645 4641
4646 if (iwl4965_is_fat_tx_allowed(priv, ht_info)) { 4642 if (iwl4965_is_fat_tx_allowed(priv, sta_ht_inf))
4647 sta_flags |= STA_FLG_FAT_EN_MSK; 4643 sta_flags |= STA_FLG_FAT_EN_MSK;
4648 ht_info->chan_width_cap = IWL_CHANNEL_WIDTH_40MHZ; 4644 else
4649 if (ht_info->supported_chan_width == IWL_CHANNEL_WIDTH_40MHZ) 4645 sta_flags &= (~STA_FLG_FAT_EN_MSK);
4650 ht_info->tx_chan_width = IWL_CHANNEL_WIDTH_40MHZ; 4646
4651 }
4652 priv->current_channel_width = ht_info->tx_chan_width;
4653 priv->stations[index].sta.station_flags = sta_flags; 4647 priv->stations[index].sta.station_flags = sta_flags;
4654 done: 4648 done:
4655 return; 4649 return;