aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-09-10 07:07:36 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-09-11 07:37:02 -0400
commit0d8614b4b926d0f657d15d7eb5125bcb24b9fd41 (patch)
tree144edc757011a4799f32d4e27dbf5c00124dfeba /net
parentf69931748730763f8c8095fa88394cf9af75a578 (diff)
mac80211: replace SMPS hw flags with wiphy feature bits
Use the new static_smps / dynamic_smps feature bits instead of mac80211-internal hw flags. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/debugfs.c5
-rw-r--r--net/mac80211/debugfs_netdev.c4
-rw-r--r--net/mac80211/mlme.c2
3 files changed, 3 insertions, 8 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 574656174f91..54a189f0393e 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -303,11 +303,6 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
303 sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_DYNAMIC_PS\n"); 303 sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_DYNAMIC_PS\n");
304 if (local->hw.flags & IEEE80211_HW_MFP_CAPABLE) 304 if (local->hw.flags & IEEE80211_HW_MFP_CAPABLE)
305 sf += scnprintf(buf + sf, mxln - sf, "MFP_CAPABLE\n"); 305 sf += scnprintf(buf + sf, mxln - sf, "MFP_CAPABLE\n");
306 if (local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS)
307 sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_STATIC_SMPS\n");
308 if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS)
309 sf += scnprintf(buf + sf, mxln - sf,
310 "SUPPORTS_DYNAMIC_SMPS\n");
311 if (local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD) 306 if (local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)
312 sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_UAPSD\n"); 307 sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_UAPSD\n");
313 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) 308 if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index e205ebabfa50..c68896adfa96 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -226,12 +226,12 @@ static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
226 struct ieee80211_local *local = sdata->local; 226 struct ieee80211_local *local = sdata->local;
227 int err; 227 int err;
228 228
229 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) && 229 if (!(local->hw.wiphy->features & NL80211_FEATURE_STATIC_SMPS) &&
230 smps_mode == IEEE80211_SMPS_STATIC) 230 smps_mode == IEEE80211_SMPS_STATIC)
231 return -EINVAL; 231 return -EINVAL;
232 232
233 /* auto should be dynamic if in PS mode */ 233 /* auto should be dynamic if in PS mode */
234 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS) && 234 if (!(local->hw.wiphy->features & NL80211_FEATURE_DYNAMIC_SMPS) &&
235 (smps_mode == IEEE80211_SMPS_DYNAMIC || 235 (smps_mode == IEEE80211_SMPS_DYNAMIC ||
236 smps_mode == IEEE80211_SMPS_AUTOMATIC)) 236 smps_mode == IEEE80211_SMPS_AUTOMATIC))
237 return -EINVAL; 237 return -EINVAL;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index efa41fc66c1f..9d4ccb2cf3c9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3805,7 +3805,7 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
3805 ifmgd->uapsd_max_sp_len = sdata->local->hw.uapsd_max_sp_len; 3805 ifmgd->uapsd_max_sp_len = sdata->local->hw.uapsd_max_sp_len;
3806 ifmgd->p2p_noa_index = -1; 3806 ifmgd->p2p_noa_index = -1;
3807 3807
3808 if (sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS) 3808 if (sdata->local->hw.wiphy->features & NL80211_FEATURE_DYNAMIC_SMPS)
3809 ifmgd->req_smps = IEEE80211_SMPS_AUTOMATIC; 3809 ifmgd->req_smps = IEEE80211_SMPS_AUTOMATIC;
3810 else 3810 else
3811 ifmgd->req_smps = IEEE80211_SMPS_OFF; 3811 ifmgd->req_smps = IEEE80211_SMPS_OFF;