diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2007-11-26 09:14:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:05:42 -0500 |
commit | 326eeee807ca7ed4489cb21d4ebe8e52079c11c3 (patch) | |
tree | 1b43673a5b61cfe371ca35179d455e79f2282369 /drivers/net | |
parent | 9e0cc6de99792151b16dbd622b11ba6607a85b72 (diff) |
iwlwifi: 802.11n configuring hw_mode parameters to support HT in A/G
This patch fills the mac80211's ieee80211_hw_mode structures with the
needed 802.11n data needed for the new framework
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 24 |
3 files changed, 33 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index c8e7adfe414a..fbabcb0394df 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -3768,6 +3768,30 @@ static int parse_elems(u8 *start, size_t len, struct ieee802_11_elems *elems) | |||
3768 | 3768 | ||
3769 | return 0; | 3769 | return 0; |
3770 | } | 3770 | } |
3771 | |||
3772 | void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, int mode) | ||
3773 | { | ||
3774 | ht_info->cap = 0; | ||
3775 | memset(ht_info->supp_mcs_set, 0, 16); | ||
3776 | |||
3777 | ht_info->ht_supported = 1; | ||
3778 | |||
3779 | if (mode == MODE_IEEE80211A) { | ||
3780 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SUP_WIDTH; | ||
3781 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_40; | ||
3782 | ht_info->supp_mcs_set[4] = 0x01; | ||
3783 | } | ||
3784 | ht_info->cap |= (u16)IEEE80211_HT_CAP_GRN_FLD; | ||
3785 | ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_20; | ||
3786 | ht_info->cap |= (u16)(IEEE80211_HT_CAP_MIMO_PS & | ||
3787 | (IWL_MIMO_PS_NONE << 2)); | ||
3788 | |||
3789 | ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; | ||
3790 | ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; | ||
3791 | |||
3792 | ht_info->supp_mcs_set[0] = 0xFF; | ||
3793 | ht_info->supp_mcs_set[1] = 0xFF; | ||
3794 | } | ||
3771 | #endif /* CONFIG_IWL4965_HT */ | 3795 | #endif /* CONFIG_IWL4965_HT */ |
3772 | 3796 | ||
3773 | static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id) | 3797 | static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h index c0e9747ca49c..5fd01149ebfb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.h +++ b/drivers/net/wireless/iwlwifi/iwl-4965.h | |||
@@ -801,6 +801,8 @@ extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv, int phymode, | |||
801 | extern void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv); | 801 | extern void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv); |
802 | 802 | ||
803 | #ifdef CONFIG_IWL4965_HT | 803 | #ifdef CONFIG_IWL4965_HT |
804 | extern void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info, | ||
805 | int mode); | ||
804 | #ifdef CONFIG_IWL4965_HT_AGG | 806 | #ifdef CONFIG_IWL4965_HT_AGG |
805 | extern int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da, | 807 | extern int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da, |
806 | u16 tid, u16 *start_seq_num); | 808 | u16 tid, u16 *start_seq_num); |
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 4561933acb1d..d88363e766c4 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c | |||
@@ -5822,10 +5822,8 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv) | |||
5822 | A = 0, | 5822 | A = 0, |
5823 | B = 1, | 5823 | B = 1, |
5824 | G = 2, | 5824 | G = 2, |
5825 | A_11N = 3, | ||
5826 | G_11N = 4, | ||
5827 | }; | 5825 | }; |
5828 | int mode_count = 5; | 5826 | int mode_count = 3; |
5829 | 5827 | ||
5830 | if (priv->modes) { | 5828 | if (priv->modes) { |
5831 | IWL_DEBUG_INFO("Geography modes already initialized.\n"); | 5829 | IWL_DEBUG_INFO("Geography modes already initialized.\n"); |
@@ -5865,6 +5863,9 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv) | |||
5865 | modes[A].num_rates = 8; /* just OFDM */ | 5863 | modes[A].num_rates = 8; /* just OFDM */ |
5866 | modes[A].rates = &rates[4]; | 5864 | modes[A].rates = &rates[4]; |
5867 | modes[A].num_channels = 0; | 5865 | modes[A].num_channels = 0; |
5866 | #ifdef CONFIG_IWL4965_HT | ||
5867 | iwl4965_init_ht_hw_capab(&modes[A].ht_info, MODE_IEEE80211A); | ||
5868 | #endif | ||
5868 | 5869 | ||
5869 | modes[B].mode = MODE_IEEE80211B; | 5870 | modes[B].mode = MODE_IEEE80211B; |
5870 | modes[B].channels = channels; | 5871 | modes[B].channels = channels; |
@@ -5877,18 +5878,9 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv) | |||
5877 | modes[G].rates = rates; | 5878 | modes[G].rates = rates; |
5878 | modes[G].num_rates = 12; /* OFDM & CCK */ | 5879 | modes[G].num_rates = 12; /* OFDM & CCK */ |
5879 | modes[G].num_channels = 0; | 5880 | modes[G].num_channels = 0; |
5880 | 5881 | #ifdef CONFIG_IWL4965_HT | |
5881 | modes[G_11N].mode = MODE_IEEE80211G; | 5882 | iwl4965_init_ht_hw_capab(&modes[G].ht_info, MODE_IEEE80211G); |
5882 | modes[G_11N].channels = channels; | 5883 | #endif |
5883 | modes[G_11N].num_rates = 13; /* OFDM & CCK */ | ||
5884 | modes[G_11N].rates = rates; | ||
5885 | modes[G_11N].num_channels = 0; | ||
5886 | |||
5887 | modes[A_11N].mode = MODE_IEEE80211A; | ||
5888 | modes[A_11N].channels = &channels[ARRAY_SIZE(iwl4965_eeprom_band_1)]; | ||
5889 | modes[A_11N].rates = &rates[4]; | ||
5890 | modes[A_11N].num_rates = 9; /* just OFDM */ | ||
5891 | modes[A_11N].num_channels = 0; | ||
5892 | 5884 | ||
5893 | priv->ieee_channels = channels; | 5885 | priv->ieee_channels = channels; |
5894 | priv->ieee_rates = rates; | 5886 | priv->ieee_rates = rates; |
@@ -5908,11 +5900,9 @@ static int iwl4965_init_geos(struct iwl4965_priv *priv) | |||
5908 | 5900 | ||
5909 | if (is_channel_a_band(ch)) { | 5901 | if (is_channel_a_band(ch)) { |
5910 | geo_ch = &modes[A].channels[modes[A].num_channels++]; | 5902 | geo_ch = &modes[A].channels[modes[A].num_channels++]; |
5911 | modes[A_11N].num_channels++; | ||
5912 | } else { | 5903 | } else { |
5913 | geo_ch = &modes[B].channels[modes[B].num_channels++]; | 5904 | geo_ch = &modes[B].channels[modes[B].num_channels++]; |
5914 | modes[G].num_channels++; | 5905 | modes[G].num_channels++; |
5915 | modes[G_11N].num_channels++; | ||
5916 | } | 5906 | } |
5917 | 5907 | ||
5918 | geo_ch->freq = ieee80211chan2mhz(ch->channel); | 5908 | geo_ch->freq = ieee80211chan2mhz(ch->channel); |