Commit 3b1700bd authored by Jouni Malinen's avatar Jouni Malinen Committed by Johannes Berg

mac80211: Support dynamic AP mode channel width changes

Implement the new cfg80211 capability to enable mac80211-based drivers
to support for dynamic channel bandwidth changes (e.g., HT 20/40 MHz
changes).
Signed-off-by: default avatarJouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent e16821bc
...@@ -3958,6 +3958,21 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy, ...@@ -3958,6 +3958,21 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy,
return 0; return 0;
} }
static int ieee80211_set_ap_chanwidth(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_chan_def *chandef)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
int ret;
u32 changed = 0;
ret = ieee80211_vif_change_bandwidth(sdata, chandef, &changed);
if (ret == 0)
ieee80211_bss_info_change_notify(sdata, changed);
return ret;
}
const struct cfg80211_ops mac80211_config_ops = { const struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface, .add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface, .del_virtual_intf = ieee80211_del_iface,
...@@ -4038,4 +4053,5 @@ const struct cfg80211_ops mac80211_config_ops = { ...@@ -4038,4 +4053,5 @@ const struct cfg80211_ops mac80211_config_ops = {
.start_radar_detection = ieee80211_start_radar_detection, .start_radar_detection = ieee80211_start_radar_detection,
.channel_switch = ieee80211_channel_switch, .channel_switch = ieee80211_channel_switch,
.set_qos_map = ieee80211_set_qos_map, .set_qos_map = ieee80211_set_qos_map,
.set_ap_chanwidth = ieee80211_set_ap_chanwidth,
}; };
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