Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352721
b: refs/heads/master
c: 08e6eff
h: refs/heads/master
i:
  352719: c4f3a85
v: v3
  • Loading branch information
Johannes Berg committed Feb 15, 2013
1 parent e5558af commit 8ae699b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: bee7f58699a406a4210ba9e0367bae7ac666abd0
refs/heads/master: 08e6effa1187cc5f401a1cc286ce84f0a581b35a
16 changes: 14 additions & 2 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3589,16 +3589,22 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,

if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT) &&
sband->ht_cap.ht_supported) {
const u8 *ht_oper_ie;
const u8 *ht_oper_ie, *ht_cap;

ht_oper_ie = ieee80211_bss_get_ie(cbss, WLAN_EID_HT_OPERATION);
if (ht_oper_ie && ht_oper_ie[1] >= sizeof(*ht_oper))
ht_oper = (void *)(ht_oper_ie + 2);

ht_cap = ieee80211_bss_get_ie(cbss, WLAN_EID_HT_CAPABILITY);
if (!ht_cap || ht_cap[1] < sizeof(struct ieee80211_ht_cap)) {
ifmgd->flags |= IEEE80211_STA_DISABLE_HT;
ht_oper = NULL;
}
}

if (!(ifmgd->flags & IEEE80211_STA_DISABLE_VHT) &&
sband->vht_cap.vht_supported) {
const u8 *vht_oper_ie;
const u8 *vht_oper_ie, *vht_cap;

vht_oper_ie = ieee80211_bss_get_ie(cbss,
WLAN_EID_VHT_OPERATION);
Expand All @@ -3611,6 +3617,12 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
ifmgd->flags |= IEEE80211_STA_DISABLE_HT;
ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
}

vht_cap = ieee80211_bss_get_ie(cbss, WLAN_EID_VHT_CAPABILITY);
if (!vht_cap || vht_cap[1] < sizeof(struct ieee80211_vht_cap)) {
ifmgd->flags |= IEEE80211_STA_DISABLE_VHT;
vht_oper = NULL;
}
}

ifmgd->flags |= ieee80211_determine_chantype(sdata, sband,
Expand Down

0 comments on commit 8ae699b

Please sign in to comment.