mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
{nl,mac,cfg}80211: Allow user to configure basic rates for mesh
Currently mesh uses mandatory rates as the default basic rates. Allow basic rates to be configured during mesh join. Basic rates are applied only if channel is also provided with mesh join command. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> [some whitespace fixes, refuse basic rates w/o channel] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
66de671374
commit
ffb3cf3000
5 changed files with 30 additions and 4 deletions
|
@ -162,6 +162,16 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
|
|||
setup->chandef.center_freq1 = setup->chandef.chan->center_freq;
|
||||
}
|
||||
|
||||
/*
|
||||
* check if basic rates are available otherwise use mandatory rates as
|
||||
* basic rates
|
||||
*/
|
||||
if (!setup->basic_rates) {
|
||||
struct ieee80211_supported_band *sband =
|
||||
rdev->wiphy.bands[setup->chandef.chan->band];
|
||||
setup->basic_rates = ieee80211_mandatory_rates(sband);
|
||||
}
|
||||
|
||||
if (!cfg80211_reg_can_beacon(&rdev->wiphy, &setup->chandef))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue