Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79080
b: refs/heads/master
c: 8fb8803
h: refs/heads/master
v: v3
  • Loading branch information
Ron Rindjunsky authored and David S. Miller committed Jan 28, 2008
1 parent 2bfe74e commit b1034dc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 326eeee807ca7ed4489cb21d4ebe8e52079c11c3
refs/heads/master: 8fb8803239debda77b90f7e4a5098067187d865e
62 changes: 28 additions & 34 deletions trunk/drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,8 +1875,8 @@ static u16 iwl4965_supported_rate_to_ie(u8 *ie, u16 supported_rate,

#ifdef CONFIG_IWL4965_HT
void static iwl4965_set_ht_capab(struct ieee80211_hw *hw,
struct ieee80211_ht_capability *ht_cap,
u8 use_wide_chan);
struct ieee80211_ht_cap *ht_cap,
u8 use_current_config);
#endif

/**
Expand All @@ -1889,6 +1889,9 @@ static u16 iwl4965_fill_probe_req(struct iwl4965_priv *priv,
int len = 0;
u8 *pos = NULL;
u16 active_rates, ret_rates, cck_rates, active_rate_basic;
#ifdef CONFIG_IWL4965_HT
struct ieee80211_hw_mode *mode;
#endif /* CONFIG_IWL4965_HT */

/* Make sure there is enough space for the probe request,
* two mandatory IEs and the data */
Expand Down Expand Up @@ -1972,17 +1975,14 @@ static u16 iwl4965_fill_probe_req(struct iwl4965_priv *priv,
len += 2 + *pos;

#ifdef CONFIG_IWL4965_HT
if (is_direct && priv->is_ht_enabled) {
u8 use_wide_chan = 1;

if (priv->channel_width != IWL_CHANNEL_WIDTH_40MHZ)
use_wide_chan = 0;
mode = priv->hw->conf.mode;
if (mode->ht_info.ht_supported) {
pos += (*pos) + 1;
*pos++ = WLAN_EID_HT_CAPABILITY;
*pos++ = sizeof(struct ieee80211_ht_capability);
iwl4965_set_ht_capab(NULL, (struct ieee80211_ht_capability *)pos,
use_wide_chan);
len += 2 + sizeof(struct ieee80211_ht_capability);
*pos++ = sizeof(struct ieee80211_ht_cap);
iwl4965_set_ht_capab(priv->hw,
(struct ieee80211_ht_cap *)pos, 0);
len += 2 + sizeof(struct ieee80211_ht_cap);
}
#endif /*CONFIG_IWL4965_HT */

Expand Down Expand Up @@ -8379,31 +8379,25 @@ static int iwl4965_mac_conf_ht(struct ieee80211_hw *hw,
}

static void iwl4965_set_ht_capab(struct ieee80211_hw *hw,
struct ieee80211_ht_capability *ht_cap,
u8 use_wide_chan)
struct ieee80211_ht_cap *ht_cap,
u8 use_current_config)
{
union ht_cap_info cap;
union ht_param_info param_info;
struct ieee80211_conf *conf = &hw->conf;
struct ieee80211_hw_mode *mode = conf->mode;

memset(&cap, 0, sizeof(union ht_cap_info));
memset(&param_info, 0, sizeof(union ht_param_info));

cap.maximal_amsdu_size = HT_IE_MAX_AMSDU_SIZE_4K;
cap.green_field = 1;
cap.short_GI20 = 1;
cap.short_GI40 = 1;
cap.supported_chan_width_set = use_wide_chan;
cap.mimo_power_save_mode = 0x3;

param_info.max_rx_ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF;
param_info.mpdu_density = CFG_HT_MPDU_DENSITY_DEF;
ht_cap->capabilities_info = (__le16) cpu_to_le16(cap.val);
ht_cap->mac_ht_params_info = (u8) param_info.val;

ht_cap->supported_mcs_set[0] = 0xff;
ht_cap->supported_mcs_set[1] = 0xff;
ht_cap->supported_mcs_set[4] =
(cap.supported_chan_width_set) ? 0x1: 0x0;
if (use_current_config) {
ht_cap->cap_info = cpu_to_le16(conf->ht_conf.cap);
memcpy(ht_cap->supp_mcs_set,
conf->ht_conf.supp_mcs_set, 16);
} else {
ht_cap->cap_info = cpu_to_le16(mode->ht_info.cap);
memcpy(ht_cap->supp_mcs_set,
mode->ht_info.supp_mcs_set, 16);
}
ht_cap->ampdu_params_info =
(mode->ht_info.ampdu_factor & IEEE80211_HT_CAP_AMPDU_FACTOR) |
((mode->ht_info.ampdu_density << 2) &
IEEE80211_HT_CAP_AMPDU_DENSITY);
}

static void iwl4965_mac_get_ht_capab(struct ieee80211_hw *hw,
Expand Down

0 comments on commit b1034dc

Please sign in to comment.