mac80211: add VHT support for IBSS

Add VHT support for IBSS. Drivers could activate
this feature by setting NL80211_EXT_FEATURE_VHT_IBSS
flag.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Janusz.Dziedzic@tieto.com
2015-03-20 06:37:01 +01:00
committed by Johannes Berg
parent 76bed0f43b
commit abcff6ef01
5 changed files with 80 additions and 11 deletions

View File

@@ -2440,6 +2440,39 @@ void ieee80211_ht_oper_to_chandef(struct ieee80211_channel *control_chan,
cfg80211_chandef_create(chandef, control_chan, channel_type);
}
void ieee80211_vht_oper_to_chandef(struct ieee80211_channel *control_chan,
const struct ieee80211_vht_operation *oper,
struct cfg80211_chan_def *chandef)
{
if (!oper)
return;
chandef->chan = control_chan;
switch (oper->chan_width) {
case IEEE80211_VHT_CHANWIDTH_USE_HT:
break;
case IEEE80211_VHT_CHANWIDTH_80MHZ:
chandef->width = NL80211_CHAN_WIDTH_80;
break;
case IEEE80211_VHT_CHANWIDTH_160MHZ:
chandef->width = NL80211_CHAN_WIDTH_160;
break;
case IEEE80211_VHT_CHANWIDTH_80P80MHZ:
chandef->width = NL80211_CHAN_WIDTH_80P80;
break;
default:
break;
}
chandef->center_freq1 =
ieee80211_channel_to_frequency(oper->center_freq_seg1_idx,
control_chan->band);
chandef->center_freq2 =
ieee80211_channel_to_frequency(oper->center_freq_seg2_idx,
control_chan->band);
}
int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef,
const struct ieee80211_supported_band *sband,
const u8 *srates, int srates_len, u32 *rates)