diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index b7116ef84a3b..7dd7cda75cfa 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/ieee80211.h> | 9 | #include <linux/ieee80211.h> |
10 | #include <linux/nl80211.h> | 10 | #include <linux/nl80211.h> |
11 | #include <linux/rtnetlink.h> | 11 | #include <linux/rtnetlink.h> |
12 | #include <linux/slab.h> | ||
12 | #include <net/net_namespace.h> | 13 | #include <net/net_namespace.h> |
13 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
14 | #include <net/cfg80211.h> | 15 | #include <net/cfg80211.h> |
@@ -1136,6 +1137,10 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy, | |||
1136 | return -EINVAL; | 1137 | return -EINVAL; |
1137 | } | 1138 | } |
1138 | 1139 | ||
1140 | /* enable WMM or activate new settings */ | ||
1141 | local->hw.conf.flags |= IEEE80211_CONF_QOS; | ||
1142 | drv_config(local, IEEE80211_CONF_CHANGE_QOS); | ||
1143 | |||
1139 | return 0; | 1144 | return 0; |
1140 | } | 1145 | } |
1141 | 1146 | ||
@@ -1402,6 +1407,35 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | |||
1402 | return 0; | 1407 | return 0; |
1403 | } | 1408 | } |
1404 | 1409 | ||
1410 | static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy, | ||
1411 | struct net_device *dev, | ||
1412 | s32 rssi_thold, u32 rssi_hyst) | ||
1413 | { | ||
1414 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
1415 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
1416 | struct ieee80211_vif *vif = &sdata->vif; | ||
1417 | struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; | ||
1418 | |||
1419 | if (rssi_thold == bss_conf->cqm_rssi_thold && | ||
1420 | rssi_hyst == bss_conf->cqm_rssi_hyst) | ||
1421 | return 0; | ||
1422 | |||
1423 | bss_conf->cqm_rssi_thold = rssi_thold; | ||
1424 | bss_conf->cqm_rssi_hyst = rssi_hyst; | ||
1425 | |||
1426 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) { | ||
1427 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
1428 | return -EOPNOTSUPP; | ||
1429 | return 0; | ||
1430 | } | ||
1431 | |||
1432 | /* tell the driver upon association, unless already associated */ | ||
1433 | if (sdata->u.mgd.associated) | ||
1434 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM); | ||
1435 | |||
1436 | return 0; | ||
1437 | } | ||
1438 | |||
1405 | static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, | 1439 | static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, |
1406 | struct net_device *dev, | 1440 | struct net_device *dev, |
1407 | const u8 *addr, | 1441 | const u8 *addr, |
@@ -1506,4 +1540,5 @@ struct cfg80211_ops mac80211_config_ops = { | |||
1506 | .remain_on_channel = ieee80211_remain_on_channel, | 1540 | .remain_on_channel = ieee80211_remain_on_channel, |
1507 | .cancel_remain_on_channel = ieee80211_cancel_remain_on_channel, | 1541 | .cancel_remain_on_channel = ieee80211_cancel_remain_on_channel, |
1508 | .action = ieee80211_action, | 1542 | .action = ieee80211_action, |
1543 | .set_cqm_rssi_config = ieee80211_set_cqm_rssi_config, | ||
1509 | }; | 1544 | }; |