mac80211: TDLS: check reg with IR-relax on chandef upgrade
authorArik Nemtsov <arik@wizery.com>
Sat, 15 Aug 2015 19:39:48 +0000 (22:39 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 22 Sep 2015 13:21:21 +0000 (15:21 +0200)
When checking if a TDLS chandef can be upgraded, IR-relaxation can be
taken into account to allow more channels.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tdls.c

index 1bacea793c23b71667e6e44f9de9793b239a6295..52f3187f90ba7d5d577e637b423bf2f2a63cb01e 100644 (file)
@@ -333,8 +333,8 @@ ieee80211_tdls_chandef_vht_upgrade(struct ieee80211_sub_if_data *sdata,
 
        /* proceed to downgrade the chandef until usable or the same */
        while (uc.width > max_width &&
-              !cfg80211_reg_can_beacon(sdata->local->hw.wiphy,
-                                       &uc, sdata->wdev.iftype))
+              !cfg80211_reg_can_beacon_relax(sdata->local->hw.wiphy, &uc,
+                                             sdata->wdev.iftype))
                ieee80211_chandef_downgrade(&uc);
 
        if (!cfg80211_chandef_identical(&uc, &sta->tdls_chandef)) {