mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
cfg80211/mac80211: move combination check to mac80211 for ibss
Now that mac80211 can check the interface combinations itself, move the combinations check from cfg80211 to mac80211 when joining an IBSS. Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
73de86a389
commit
71965c1d04
2 changed files with 29 additions and 31 deletions
|
|
@ -88,8 +88,6 @@ static int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
|
|||
struct cfg80211_cached_keys *connkeys)
|
||||
{
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct ieee80211_channel *check_chan;
|
||||
u8 radar_detect_width = 0;
|
||||
int err;
|
||||
|
||||
ASSERT_WDEV_LOCK(wdev);
|
||||
|
|
@ -126,32 +124,6 @@ static int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
|
|||
#ifdef CONFIG_CFG80211_WEXT
|
||||
wdev->wext.ibss.chandef = params->chandef;
|
||||
#endif
|
||||
check_chan = params->chandef.chan;
|
||||
if (params->userspace_handles_dfs) {
|
||||
/* Check for radar even if the current channel is not
|
||||
* a radar channel - it might decide to change to DFS
|
||||
* channel later.
|
||||
*/
|
||||
radar_detect_width = BIT(params->chandef.width);
|
||||
}
|
||||
|
||||
/* TODO: We need to check the combinations at this point, we
|
||||
* probably must move this call down to join_ibss() in
|
||||
* mac80211.
|
||||
*/
|
||||
err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
|
||||
check_chan,
|
||||
(params->channel_fixed &&
|
||||
!radar_detect_width)
|
||||
? CHAN_MODE_SHARED
|
||||
: CHAN_MODE_EXCLUSIVE,
|
||||
radar_detect_width);
|
||||
|
||||
if (err) {
|
||||
wdev->connect_keys = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
err = rdev_join_ibss(rdev, dev, params);
|
||||
if (err) {
|
||||
wdev->connect_keys = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue