Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360800
b: refs/heads/master
c: cb601ff
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Feb 26, 2013
1 parent 4fa25a5 commit 280f9b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b759f4ddcafb6414056cf3e49f2ab12359101c2e
refs/heads/master: cb601ffa326bc5c74a6ecd8e72ae9631e5f12f75
12 changes: 9 additions & 3 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3285,13 +3285,19 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
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();
Expand Down

0 comments on commit 280f9b8

Please sign in to comment.