Commit c12bc488 authored by Luciano Coelho's avatar Luciano Coelho Committed by Johannes Berg

mac80211: return the vif's chandef in ieee80211_cfg_get_channel()

The chandef of the channel context a vif is using may be different
than the chandef of the vif itself.  For instance, the bandwidth used
by the vif may be narrower than the one configured in the channel
context.  To avoid confusion, return the vif's chandef in
ieee80211_cfg_get_channel() instead of the chandef of the channel
Signed-off-by: default avatarLuciano Coelho <>
Signed-off-by: default avatarEmmanuel Grumbach <>
Signed-off-by: default avatarJohannes Berg <>
parent 8975ae88
......@@ -3458,7 +3458,7 @@ static int ieee80211_cfg_get_channel(struct wiphy *wiphy,
chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
if (chanctx_conf) {
*chandef = chanctx_conf->def;
*chandef = sdata->vif.bss_conf.chandef;
ret = 0;
} else if (local->open_count > 0 &&
local->open_count == local->monitors &&
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment