Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150265
b: refs/heads/master
c: 9ed6bcc
h: refs/heads/master
i:
  150263: 4a58497
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 11, 2009
1 parent eaf7e2a commit e4e758d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 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: 5a9940118a616266183c53a9ee4352feadb9c2e8
refs/heads/master: 9ed6bcce77f75d98af6ee07069deac6041948bee
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2225,9 +2225,9 @@ static void iwl_ht_conf(struct iwl_priv *priv,

iwl_conf->tx_chan_width = iwl_conf->supported_chan_width != 0;
iwl_conf->ht_protection =
bss_conf->ht.operation_mode & IEEE80211_HT_OP_MODE_PROTECTION;
bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_PROTECTION;
iwl_conf->non_GF_STA_present =
!!(bss_conf->ht.operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT);
!!(bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT);

rcu_read_unlock();

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_HT) {
printk(KERN_DEBUG " %s: HT: op_mode=0x%x\n",
wiphy_name(hw->wiphy),
info->ht.operation_mode);
info->ht_operation_mode);
}

if (changed & BSS_CHANGED_BASIC_RATES) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@ static int mwl8k_cmd_set_aid(struct ieee80211_hw *hw,
if (info->use_cts_prot) {
prot_mode = MWL8K_FRAME_PROT_11G;
} else {
switch (info->ht.operation_mode &
switch (info->ht_operation_mode &
IEEE80211_HT_OP_MODE_PROTECTION) {
case IEEE80211_HT_OP_MODE_PROTECTION_20MHZ:
prot_mode = MWL8K_FRAME_PROT_11N_HT_40MHZ_ONLY;
Expand Down
12 changes: 3 additions & 9 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,6 @@ enum ieee80211_bss_change {
BSS_CHANGED_BEACON_ENABLED = 1<<9,
};

/**
* struct ieee80211_bss_ht_conf - BSS's changing HT configuration
* @operation_mode: HT operation mode (like in &struct ieee80211_ht_info)
*/
struct ieee80211_bss_ht_conf {
u16 operation_mode;
};

/**
* struct ieee80211_bss_conf - holds the BSS's changing parameters
*
Expand All @@ -203,6 +195,8 @@ struct ieee80211_bss_ht_conf {
* the current band.
* @bssid: The BSSID for this BSS
* @enable_beacon: whether beaconing should be enabled or not
* @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info).
* This field is only valid when the channel type is one of the HT types.
*/
struct ieee80211_bss_conf {
const u8 *bssid;
Expand All @@ -219,7 +213,7 @@ struct ieee80211_bss_conf {
u16 assoc_capability;
u64 timestamp;
u32 basic_rates;
struct ieee80211_bss_ht_conf ht;
u16 ht_operation_mode;
};

/**
Expand Down
11 changes: 4 additions & 7 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,14 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_bss_ht_conf ht;
struct sta_info *sta;
u32 changed = 0;
u16 ht_opmode;
bool enable_ht = true, ht_changed;
enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;

sband = local->hw.wiphy->bands[local->hw.conf.channel->band];

memset(&ht, 0, sizeof(ht));

/* HT is not supported */
if (!sband->ht_cap.ht_supported)
enable_ht = false;
Expand Down Expand Up @@ -148,19 +146,18 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
IEEE80211_RC_HT_CHANGED);

rcu_read_unlock();

}

/* disable HT */
if (!enable_ht)
return 0;

ht.operation_mode = le16_to_cpu(hti->operation_mode);
ht_opmode = le16_to_cpu(hti->operation_mode);

/* if bss configuration changed store the new one */
if (memcmp(&sdata->vif.bss_conf.ht, &ht, sizeof(ht))) {
if (sdata->vif.bss_conf.ht_operation_mode != ht_opmode) {
changed |= BSS_CHANGED_HT;
sdata->vif.bss_conf.ht = ht;
sdata->vif.bss_conf.ht_operation_mode = ht_opmode;
}

return changed;
Expand Down

0 comments on commit e4e758d

Please sign in to comment.