cfg80211/mac80211: get mandatory rates based on scan width
Mandatory rates for 5 and 10 MHz are different from the rates used for 20 MHz in 2.4 GHz mode, as they use OFDM only. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
This commit is contained in:

committed by
Johannes Berg

parent
2103dec147
commit
74608aca4d
@@ -33,7 +33,8 @@ ieee80211_get_response_rate(struct ieee80211_supported_band *sband,
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_get_response_rate);
|
||||
|
||||
u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband)
|
||||
u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband,
|
||||
enum nl80211_bss_scan_width scan_width)
|
||||
{
|
||||
struct ieee80211_rate *bitrates;
|
||||
u32 mandatory_rates = 0;
|
||||
@@ -43,10 +44,15 @@ u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband)
|
||||
if (WARN_ON(!sband))
|
||||
return 1;
|
||||
|
||||
if (sband->band == IEEE80211_BAND_2GHZ)
|
||||
mandatory_flag = IEEE80211_RATE_MANDATORY_B;
|
||||
else
|
||||
if (sband->band == IEEE80211_BAND_2GHZ) {
|
||||
if (scan_width == NL80211_BSS_CHAN_WIDTH_5 ||
|
||||
scan_width == NL80211_BSS_CHAN_WIDTH_10)
|
||||
mandatory_flag = IEEE80211_RATE_MANDATORY_G;
|
||||
else
|
||||
mandatory_flag = IEEE80211_RATE_MANDATORY_B;
|
||||
} else {
|
||||
mandatory_flag = IEEE80211_RATE_MANDATORY_A;
|
||||
}
|
||||
|
||||
bitrates = sband->bitrates;
|
||||
for (i = 0; i < sband->n_bitrates; i++)
|
||||
|
Reference in New Issue
Block a user