cfg80211: pass the actual iftype when calling cfg80211_chandef_dfs_required()
authorLuciano Coelho <luciano.coelho@intel.com>
Thu, 15 May 2014 10:05:39 +0000 (13:05 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 15 May 2014 12:50:34 +0000 (14:50 +0200)
commit00ec75fc5a6499d8fdeb6ec9f8f5df68b9291c74
tree39a045532237ff61d58f7dc8e12ad593722cfa58
parent67ae07a109f3d518085e3b81aa48740e8c5cc3f7
cfg80211: pass the actual iftype when calling cfg80211_chandef_dfs_required()

There is no need to pass NL80211_IFTYPE_UNSPECIFIED when calling
cfg80211_chandef_dfs_required() since we always already have the
interface type.  So, pass the actual interface type instead.

Additionally, have cfg80211_chandef_dfs_required() WARN if the passed
interface type is NL80211_IFTYPE_UNSPECIFIED, so we can detect
problems more easily.

Tested-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Reported-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/chan.c
net/wireless/nl80211.c