diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-25 14:34:01 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 20:34:56 +0200 |
commit | 5eb5a52da6ef04604cf8faca43ec670f69f417d3 (patch) | |
tree | 4d3397d83cb533ba4fa8dd47b884305c877b01d7 /net/mac80211/main.c | |
parent | p54: better rssi->dbm conversion for longbow phys (diff) | |
download | linux-5eb5a52da6ef04604cf8faca43ec670f69f417d3.tar.xz linux-5eb5a52da6ef04604cf8faca43ec670f69f417d3.zip |
mac80211: fix mesh advertisement
When a mac80211-based driver advertises mesh mode
support, this will be advertised to userspace.
However, if mac80211 was compiled without mesh
support, then that won't actually be true. Fix
this by removing the bit for mesh if mesh isn't
compiled in.
Since this synchronizes what we advertise to
cfg80211 and actually support, it means we can
now rely on cfg80211's interface type checks
and need not check again in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 28415de5f476..80db5ea02052 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -622,6 +622,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) /* mac80211 always supports monitor */ local->hw.wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR); +#ifndef CONFIG_MAC80211_MESH + /* mesh depends on Kconfig, but drivers should set it if they want */ + local->hw.wiphy->interface_modes &= ~BIT(NL80211_IFTYPE_MESH_POINT); +#endif + if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) |