aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-01-19 03:29:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-27 14:56:54 -0500
commitea086359a63bd0dd85c1d784d0425340649613fa (patch)
treee00130d16f0907bfdde4bc679e862159c058361b /net/mac80211
parentc1288b1278d00169e12495eb53ad128e09560b69 (diff)
mac80211: make CQM RSSI support per virtual interface
Similar to the previous beacon filtering patch, make CQM RSSI support depend on the flags that the driver set for virtual interfaces. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c10
-rw-r--r--net/mac80211/debugfs.c2
-rw-r--r--net/mac80211/mlme.c4
3 files changed, 4 insertions, 12 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d86730fe75c8..74c9301681e5 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1873,7 +1873,6 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
1873 s32 rssi_thold, u32 rssi_hyst) 1873 s32 rssi_thold, u32 rssi_hyst)
1874{ 1874{
1875 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1875 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1876 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
1877 struct ieee80211_vif *vif = &sdata->vif; 1876 struct ieee80211_vif *vif = &sdata->vif;
1878 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; 1877 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
1879 1878
@@ -1884,14 +1883,9 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
1884 bss_conf->cqm_rssi_thold = rssi_thold; 1883 bss_conf->cqm_rssi_thold = rssi_thold;
1885 bss_conf->cqm_rssi_hyst = rssi_hyst; 1884 bss_conf->cqm_rssi_hyst = rssi_hyst;
1886 1885
1887 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) {
1888 if (sdata->vif.type != NL80211_IFTYPE_STATION)
1889 return -EOPNOTSUPP;
1890 return 0;
1891 }
1892
1893 /* tell the driver upon association, unless already associated */ 1886 /* tell the driver upon association, unless already associated */
1894 if (sdata->u.mgd.associated) 1887 if (sdata->u.mgd.associated &&
1888 sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI)
1895 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM); 1889 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM);
1896 1890
1897 return 0; 1891 return 0;
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index e8868dae1c01..affe64be9092 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -257,8 +257,6 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
257 sf += snprintf(buf + sf, mxln - sf, "REPORTS_TX_ACK_STATUS\n"); 257 sf += snprintf(buf + sf, mxln - sf, "REPORTS_TX_ACK_STATUS\n");
258 if (local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) 258 if (local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
259 sf += snprintf(buf + sf, mxln - sf, "CONNECTION_MONITOR\n"); 259 sf += snprintf(buf + sf, mxln - sf, "CONNECTION_MONITOR\n");
260 if (local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)
261 sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_CQM_RSSI\n");
262 if (local->hw.flags & IEEE80211_HW_SUPPORTS_PER_STA_GTK) 260 if (local->hw.flags & IEEE80211_HW_SUPPORTS_PER_STA_GTK)
263 sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_PER_STA_GTK\n"); 261 sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_PER_STA_GTK\n");
264 if (local->hw.flags & IEEE80211_HW_AP_LINK_PS) 262 if (local->hw.flags & IEEE80211_HW_AP_LINK_PS)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b51eb49d8525..de3268c7be1e 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1043,7 +1043,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
1043 bss_info_changed |= BSS_CHANGED_BSSID; 1043 bss_info_changed |= BSS_CHANGED_BSSID;
1044 1044
1045 /* Tell the driver to monitor connection quality (if supported) */ 1045 /* Tell the driver to monitor connection quality (if supported) */
1046 if ((local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI) && 1046 if (sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI &&
1047 bss_conf->cqm_rssi_thold) 1047 bss_conf->cqm_rssi_thold)
1048 bss_info_changed |= BSS_CHANGED_CQM; 1048 bss_info_changed |= BSS_CHANGED_CQM;
1049 1049
@@ -1882,7 +1882,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
1882 1882
1883 if (bss_conf->cqm_rssi_thold && 1883 if (bss_conf->cqm_rssi_thold &&
1884 ifmgd->count_beacon_signal >= IEEE80211_SIGNAL_AVE_MIN_COUNT && 1884 ifmgd->count_beacon_signal >= IEEE80211_SIGNAL_AVE_MIN_COUNT &&
1885 !(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_RSSI)) { 1885 !(sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI)) {
1886 int sig = ifmgd->ave_beacon_signal / 16; 1886 int sig = ifmgd->ave_beacon_signal / 16;
1887 int last_event = ifmgd->last_cqm_event_signal; 1887 int last_event = ifmgd->last_cqm_event_signal;
1888 int thold = bss_conf->cqm_rssi_thold; 1888 int thold = bss_conf->cqm_rssi_thold;