ht_cfreq, ht_oper->primary_chan,
cbss->channel->band);
ht_oper = NULL;
- } else {
- channel_type = NL80211_CHAN_HT20;
}
}
- if (ht_oper && sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
+ if (ht_oper) {
/*
* cfg80211 already verified that the channel itself can
* be used, but it didn't check that we can do the right
channel_type = NL80211_CHAN_HT20;
- switch (ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
- case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
- if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40PLUS)
- ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
- else
- channel_type = NL80211_CHAN_HT40PLUS;
- break;
- case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
- if (cbss->channel->flags & IEEE80211_CHAN_NO_HT40MINUS)
- ifmgd->flags |= IEEE80211_STA_DISABLE_40MHZ;
- else
- channel_type = NL80211_CHAN_HT40MINUS;
- break;
+ if (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) {
+ switch (ht_oper->ht_param &
+ IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+ case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
+ if (cbss->channel->flags &
+ IEEE80211_CHAN_NO_HT40PLUS)
+ ifmgd->flags |=
+ IEEE80211_STA_DISABLE_40MHZ;
+ else
+ channel_type = NL80211_CHAN_HT40PLUS;
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
+ if (cbss->channel->flags &
+ IEEE80211_CHAN_NO_HT40MINUS)
+ ifmgd->flags |=
+ IEEE80211_STA_DISABLE_40MHZ;
+ else
+ channel_type = NL80211_CHAN_HT40MINUS;
+ break;
+ }
}
ht_cap_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,