diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-02-23 18:02:49 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-02-23 18:02:49 +0000 |
commit | 7bd713a76dc48fb3910602a7e6c14bd8d7152486 (patch) | |
tree | 9f4a33bf32f93f72536e6b0a26a07645b110427d /package/mac80211 | |
parent | 6dbdadcaa68e79a93cae2fbaca935df5255a0b62 (diff) | |
download | mtk-20170518-7bd713a76dc48fb3910602a7e6c14bd8d7152486.zip mtk-20170518-7bd713a76dc48fb3910602a7e6c14bd8d7152486.tar.gz mtk-20170518-7bd713a76dc48fb3910602a7e6c14bd8d7152486.tar.bz2 |
mac80211: fix monitor mode channel reporting
SVN-Revision: 35761
Diffstat (limited to 'package/mac80211')
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 25 | ||||
-rw-r--r-- | package/mac80211/patches/523-mac80211_configure_antenna_gain.patch | 2 |
2 files changed, 26 insertions, 1 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index c6633af..11c9a5a 100644 --- a/package/mac80211/patches/300-pending_work.patch +++ b/package/mac80211/patches/300-pending_work.patch @@ -474,3 +474,28 @@ nla_nest_end(msg, nl_wowlan); } #endif +--- a/net/mac80211/cfg.c ++++ b/net/mac80211/cfg.c +@@ -3285,13 +3285,19 @@ static int ieee80211_cfg_get_channel(str + struct cfg80211_chan_def *chandef) + { + struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); ++ struct ieee80211_local *local = wiphy_priv(wiphy); + struct ieee80211_chanctx_conf *chanctx_conf; + int ret = -ENODATA; + + rcu_read_lock(); +- chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); +- if (chanctx_conf) { +- *chandef = chanctx_conf->def; ++ if (local->use_chanctx) { ++ chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); ++ if (chanctx_conf) { ++ *chandef = chanctx_conf->def; ++ ret = 0; ++ } ++ } else if (local->open_count == local->monitors) { ++ *chandef = local->monitor_chandef; + ret = 0; + } + rcu_read_unlock(); diff --git a/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch b/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch index dd2ff6a..99bd2e3 100644 --- a/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch +++ b/package/mac80211/patches/523-mac80211_configure_antenna_gain.patch @@ -92,7 +92,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -3369,6 +3382,7 @@ struct cfg80211_ops mac80211_config_ops +@@ -3375,6 +3388,7 @@ struct cfg80211_ops mac80211_config_ops .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, |