cfg80211: ibss: use 11a mandatory rates for 6GHz band operation
The default mandatory rates, ie. when not specified by user-space, is determined by the band. Select 11a rateset for 6GHz band. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Leon Zegers <leon.zegers@broadcom.com> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Link: https://lore.kernel.org/r/1564745465-21234-8-git-send-email-arend.vanspriel@broadcom.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Git-commit: 5ea4e7802c43144f5529d1b60c01853dc5c24797 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git Change-Id: Idcac3149e63fbe91425aad2c5a88536fde11f25b CRs-Fixed: 2536763 Signed-off-by: Liangwei Dong <liangwei@codeaurora.org>
This commit is contained in:
parent
26350ff0c6
commit
63fbb3ed1c
1 changed files with 11 additions and 5 deletions
|
@ -104,13 +104,19 @@ int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
|
|||
* use the mandatory rate set for 11b or
|
||||
* 11a for maximum compatibility.
|
||||
*/
|
||||
struct ieee80211_supported_band *sband =
|
||||
rdev->wiphy.bands[params->chandef.chan->band];
|
||||
struct ieee80211_supported_band *sband;
|
||||
enum nl80211_band band;
|
||||
u32 flag;
|
||||
int j;
|
||||
u32 flag = params->chandef.chan->band == NL80211_BAND_5GHZ ?
|
||||
IEEE80211_RATE_MANDATORY_A :
|
||||
IEEE80211_RATE_MANDATORY_B;
|
||||
|
||||
band = params->chandef.chan->band;
|
||||
if (band == NL80211_BAND_5GHZ ||
|
||||
band == NL80211_BAND_6GHZ)
|
||||
flag = IEEE80211_RATE_MANDATORY_A;
|
||||
else
|
||||
flag = IEEE80211_RATE_MANDATORY_B;
|
||||
|
||||
sband = rdev->wiphy.bands[band];
|
||||
for (j = 0; j < sband->n_bitrates; j++) {
|
||||
if (sband->bitrates[j].flags & flag)
|
||||
params->basic_rates |= BIT(j);
|
||||
|
|
Loading…
Reference in a new issue