diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7dd7cda75cfa..ae37270a0633 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -97,9 +97,6 @@ static int ieee80211_change_iface(struct wiphy *wiphy, | |||
97 | params->mesh_id_len, | 97 | params->mesh_id_len, |
98 | params->mesh_id); | 98 | params->mesh_id); |
99 | 99 | ||
100 | if (sdata->vif.type != NL80211_IFTYPE_MONITOR || !flags) | ||
101 | return 0; | ||
102 | |||
103 | if (type == NL80211_IFTYPE_AP_VLAN && | 100 | if (type == NL80211_IFTYPE_AP_VLAN && |
104 | params && params->use_4addr == 0) | 101 | params && params->use_4addr == 0) |
105 | rcu_assign_pointer(sdata->u.vlan.sta, NULL); | 102 | rcu_assign_pointer(sdata->u.vlan.sta, NULL); |
@@ -107,7 +104,9 @@ static int ieee80211_change_iface(struct wiphy *wiphy, | |||
107 | params && params->use_4addr >= 0) | 104 | params && params->use_4addr >= 0) |
108 | sdata->u.mgd.use_4addr = params->use_4addr; | 105 | sdata->u.mgd.use_4addr = params->use_4addr; |
109 | 106 | ||
110 | sdata->u.mntr_flags = *flags; | 107 | if (sdata->vif.type == NL80211_IFTYPE_MONITOR && flags) |
108 | sdata->u.mntr_flags = *flags; | ||
109 | |||
111 | return 0; | 110 | return 0; |
112 | } | 111 | } |
113 | 112 | ||
@@ -411,6 +410,17 @@ static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev, | |||
411 | return ret; | 410 | return ret; |
412 | } | 411 | } |
413 | 412 | ||
413 | static int ieee80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, | ||
414 | int idx, struct survey_info *survey) | ||
415 | { | ||
416 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
417 | |||
418 | if (!local->ops->get_survey) | ||
419 | return -EOPNOTSUPP; | ||
420 | |||
421 | return drv_get_survey(local, idx, survey); | ||
422 | } | ||
423 | |||
414 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, | 424 | static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev, |
415 | u8 *mac, struct station_info *sinfo) | 425 | u8 *mac, struct station_info *sinfo) |
416 | { | 426 | { |
@@ -1104,6 +1114,13 @@ static int ieee80211_change_bss(struct wiphy *wiphy, | |||
1104 | changed |= BSS_CHANGED_BASIC_RATES; | 1114 | changed |= BSS_CHANGED_BASIC_RATES; |
1105 | } | 1115 | } |
1106 | 1116 | ||
1117 | if (params->ap_isolate >= 0) { | ||
1118 | if (params->ap_isolate) | ||
1119 | sdata->flags |= IEEE80211_SDATA_DONT_BRIDGE_PACKETS; | ||
1120 | else | ||
1121 | sdata->flags &= ~IEEE80211_SDATA_DONT_BRIDGE_PACKETS; | ||
1122 | } | ||
1123 | |||
1107 | ieee80211_bss_info_change_notify(sdata, changed); | 1124 | ieee80211_bss_info_change_notify(sdata, changed); |
1108 | 1125 | ||
1109 | return 0; | 1126 | return 0; |
@@ -1388,11 +1405,11 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | |||
1388 | return -EOPNOTSUPP; | 1405 | return -EOPNOTSUPP; |
1389 | 1406 | ||
1390 | if (enabled == sdata->u.mgd.powersave && | 1407 | if (enabled == sdata->u.mgd.powersave && |
1391 | timeout == conf->dynamic_ps_timeout) | 1408 | timeout == conf->dynamic_ps_forced_timeout) |
1392 | return 0; | 1409 | return 0; |
1393 | 1410 | ||
1394 | sdata->u.mgd.powersave = enabled; | 1411 | sdata->u.mgd.powersave = enabled; |
1395 | conf->dynamic_ps_timeout = timeout; | 1412 | conf->dynamic_ps_forced_timeout = timeout; |
1396 | 1413 | ||
1397 | /* no change, but if automatic follow powersave */ | 1414 | /* no change, but if automatic follow powersave */ |
1398 | mutex_lock(&sdata->u.mgd.mtx); | 1415 | mutex_lock(&sdata->u.mgd.mtx); |
@@ -1508,6 +1525,7 @@ struct cfg80211_ops mac80211_config_ops = { | |||
1508 | .change_station = ieee80211_change_station, | 1525 | .change_station = ieee80211_change_station, |
1509 | .get_station = ieee80211_get_station, | 1526 | .get_station = ieee80211_get_station, |
1510 | .dump_station = ieee80211_dump_station, | 1527 | .dump_station = ieee80211_dump_station, |
1528 | .dump_survey = ieee80211_dump_survey, | ||
1511 | #ifdef CONFIG_MAC80211_MESH | 1529 | #ifdef CONFIG_MAC80211_MESH |
1512 | .add_mpath = ieee80211_add_mpath, | 1530 | .add_mpath = ieee80211_add_mpath, |
1513 | .del_mpath = ieee80211_del_mpath, | 1531 | .del_mpath = ieee80211_del_mpath, |