diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-06-19 00:53:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-06-19 00:53:20 +0000 |
commit | 2771a8ce168b94e443f44edc97eeb2dce6b096eb (patch) | |
tree | 7e63fd0d1ad0fa3dbba5b0f64765275806140332 /package | |
parent | dacb6839c04fe00ed0efd3c5dfa117a74d5a7bc9 (diff) | |
download | upstream-2771a8ce168b94e443f44edc97eeb2dce6b096eb.tar.gz upstream-2771a8ce168b94e443f44edc97eeb2dce6b096eb.tar.bz2 upstream-2771a8ce168b94e443f44edc97eeb2dce6b096eb.zip |
mac80211: fix AP multi-BSSID support (#11698)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32448 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 58 | ||||
-rw-r--r-- | package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch | 4 |
2 files changed, 60 insertions, 2 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index cb219c9147..4f96a013f4 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -1544,3 +1544,61 @@ } u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate) +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -2246,6 +2246,33 @@ static int nl80211_parse_beacon(struct g + return 0; + } + ++static bool nl80211_get_ap_channel(struct cfg80211_registered_device *rdev, ++ struct cfg80211_ap_settings *params) ++{ ++ struct wireless_dev *wdev; ++ bool ret = false; ++ ++ mutex_lock(&rdev->devlist_mtx); ++ ++ list_for_each_entry(wdev, &rdev->netdev_list, list) { ++ if (wdev->iftype != NL80211_IFTYPE_AP && ++ wdev->iftype != NL80211_IFTYPE_P2P_GO) ++ continue; ++ ++ if (!wdev->preset_chan) ++ continue; ++ ++ params->channel = wdev->preset_chan; ++ params->channel_type = wdev->preset_chantype; ++ ret = true; ++ break; ++ } ++ ++ mutex_unlock(&rdev->devlist_mtx); ++ ++ return ret; ++} ++ + static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) + { + struct cfg80211_registered_device *rdev = info->user_ptr[0]; +@@ -2348,7 +2375,7 @@ static int nl80211_start_ap(struct sk_bu + } else if (wdev->preset_chan) { + params.channel = wdev->preset_chan; + params.channel_type = wdev->preset_chantype; +- } else ++ } else if (!nl80211_get_ap_channel(rdev, ¶ms)) + return -EINVAL; + + if (!cfg80211_can_beacon_sec_chan(&rdev->wiphy, params.channel, +@@ -2356,8 +2383,11 @@ static int nl80211_start_ap(struct sk_bu + return -EINVAL; + + err = rdev->ops->start_ap(&rdev->wiphy, dev, ¶ms); +- if (!err) ++ if (!err) { ++ wdev->preset_chan = params.channel; ++ wdev->preset_chantype = params.channel_type; + wdev->beacon_interval = params.beacon_interval; ++ } + return err; + } + diff --git a/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch b/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch index 40f4e62c7e..3b9cfe8752 100644 --- a/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch +++ b/package/mac80211/patches/522-ath9k_per_chain_signal_strength.patch @@ -270,7 +270,7 @@ __NL80211_STA_INFO_AFTER_LAST, --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -2523,6 +2523,33 @@ nla_put_failure: +@@ -2553,6 +2553,33 @@ nla_put_failure: return false; } @@ -304,7 +304,7 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, int flags, struct cfg80211_registered_device *rdev, -@@ -2584,6 +2611,18 @@ static int nl80211_send_station(struct s +@@ -2614,6 +2641,18 @@ static int nl80211_send_station(struct s default: break; } |