diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-07-12 16:10:02 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-12 16:18:17 +0200 |
commit | f53594a0d8f4b9d7bc3d3ed8062b9c428f5447a3 (patch) | |
tree | d3f0e5d6a665081c6b3d43bb26b5c38d698edba2 /net/wireless/chan.c | |
parent | 685fb72b63faf09a767cc28332545f5830b91be8 (diff) |
cfg80211: ignore channel state for stopped AP/mesh interfaces
Without this change, running AP + station on the same wiphy
does not work since the commit "cfg80211: add channel checking
for iface combinations". The stopped AP prevents the client
from connecting to an AP on a different channel.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
[line-break commit message to < 72 chars]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r-- | net/wireless/chan.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c index 1cc4b7cc737..a16cdffb24a 100644 --- a/net/wireless/chan.c +++ b/net/wireless/chan.c @@ -134,9 +134,16 @@ cfg80211_get_chan_state(struct wireless_dev *wdev, break; case NL80211_IFTYPE_AP: case NL80211_IFTYPE_P2P_GO: + if (wdev->beacon_interval) { + *chan = wdev->channel; + *chanmode = CHAN_MODE_SHARED; + } + return; case NL80211_IFTYPE_MESH_POINT: - *chan = wdev->channel; - *chanmode = CHAN_MODE_SHARED; + if (wdev->mesh_id_len) { + *chan = wdev->channel; + *chanmode = CHAN_MODE_SHARED; + } return; case NL80211_IFTYPE_MONITOR: case NL80211_IFTYPE_AP_VLAN: |