aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2014-04-28 04:22:25 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-04-28 12:11:55 -0400
commit3b1700bde4f03ca68b058257f54d744cc8c84c72 (patch)
tree999d2ca10253cbb69fdb90385e432277f2877545 /net/mac80211/cfg.c
parente16821bcfb364b0c41142db275dc74b39fa42c30 (diff)
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: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 4d15a1566cd5..7b8d3cf89574 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -3958,6 +3958,21 @@ static int ieee80211_set_qos_map(struct wiphy *wiphy,
3958 return 0; 3958 return 0;
3959} 3959}
3960 3960
3961static int ieee80211_set_ap_chanwidth(struct wiphy *wiphy,
3962 struct net_device *dev,
3963 struct cfg80211_chan_def *chandef)
3964{
3965 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
3966 int ret;
3967 u32 changed = 0;
3968
3969 ret = ieee80211_vif_change_bandwidth(sdata, chandef, &changed);
3970 if (ret == 0)
3971 ieee80211_bss_info_change_notify(sdata, changed);
3972
3973 return ret;
3974}
3975
3961const struct cfg80211_ops mac80211_config_ops = { 3976const struct cfg80211_ops mac80211_config_ops = {
3962 .add_virtual_intf = ieee80211_add_iface, 3977 .add_virtual_intf = ieee80211_add_iface,
3963 .del_virtual_intf = ieee80211_del_iface, 3978 .del_virtual_intf = ieee80211_del_iface,
@@ -4038,4 +4053,5 @@ const struct cfg80211_ops mac80211_config_ops = {
4038 .start_radar_detection = ieee80211_start_radar_detection, 4053 .start_radar_detection = ieee80211_start_radar_detection,
4039 .channel_switch = ieee80211_channel_switch, 4054 .channel_switch = ieee80211_channel_switch,
4040 .set_qos_map = ieee80211_set_qos_map, 4055 .set_qos_map = ieee80211_set_qos_map,
4056 .set_ap_chanwidth = ieee80211_set_ap_chanwidth,
4041}; 4057};