aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-06-02 14:15:49 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-06-02 14:28:58 -0400
commitea1b2b45f513c6f9ee49b465b1a9281feb783532 (patch)
tree068a6b1a14034c6b38df0823780d860bd0d9cf6f /net/mac80211
parent3b79af973cf42de059d0e90e20fd145d7ed8c5c1 (diff)
mac80211: remove short slot/short preamble incapable flags
There are no drivers setting IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE or IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE, so any code using the two flags is dead; it's also exceedingly unlikely that any new driver could ever need to set these flags. The wcn36xx code is almost certainly broken, but this preserves the previous behaviour. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/debugfs.c7
-rw-r--r--net/mac80211/mesh_plink.c4
-rw-r--r--net/mac80211/mlme.c6
-rw-r--r--net/mac80211/tdls.c17
4 files changed, 8 insertions, 26 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index b17206db49b4..1b94d2704c27 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -1,4 +1,3 @@
1
2/* 1/*
3 * mac80211 debugfs for wireless PHYs 2 * mac80211 debugfs for wireless PHYs
4 * 3 *
@@ -112,12 +111,6 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
112 if (local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING) 111 if (local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING)
113 sf += scnprintf(buf + sf, mxln - sf, 112 sf += scnprintf(buf + sf, mxln - sf,
114 "HOST_BCAST_PS_BUFFERING\n"); 113 "HOST_BCAST_PS_BUFFERING\n");
115 if (local->hw.flags & IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE)
116 sf += scnprintf(buf + sf, mxln - sf,
117 "2GHZ_SHORT_SLOT_INCAPABLE\n");
118 if (local->hw.flags & IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE)
119 sf += scnprintf(buf + sf, mxln - sf,
120 "2GHZ_SHORT_PREAMBLE_INCAPABLE\n");
121 if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) 114 if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)
122 sf += scnprintf(buf + sf, mxln - sf, "SIGNAL_UNSPEC\n"); 115 sf += scnprintf(buf + sf, mxln - sf, "SIGNAL_UNSPEC\n");
123 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) 116 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index ac843fc88745..72a127e8a1b6 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -106,9 +106,7 @@ static u32 mesh_set_short_slot_time(struct ieee80211_sub_if_data *sdata)
106 /* (IEEE 802.11-2012 19.4.5) */ 106 /* (IEEE 802.11-2012 19.4.5) */
107 short_slot = true; 107 short_slot = true;
108 goto out; 108 goto out;
109 } else if (band != IEEE80211_BAND_2GHZ || 109 } else if (band != IEEE80211_BAND_2GHZ)
110 (band == IEEE80211_BAND_2GHZ &&
111 local->hw.flags & IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE))
112 goto out; 110 goto out;
113 111
114 for (i = 0; i < sband->n_bitrates; i++) 112 for (i = 0; i < sband->n_bitrates; i++)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 853cfa71b96a..94274ef569fa 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -669,10 +669,8 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
669 capab = WLAN_CAPABILITY_ESS; 669 capab = WLAN_CAPABILITY_ESS;
670 670
671 if (sband->band == IEEE80211_BAND_2GHZ) { 671 if (sband->band == IEEE80211_BAND_2GHZ) {
672 if (!(local->hw.flags & IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE)) 672 capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
673 capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME; 673 capab |= WLAN_CAPABILITY_SHORT_PREAMBLE;
674 if (!(local->hw.flags & IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE))
675 capab |= WLAN_CAPABILITY_SHORT_PREAMBLE;
676 } 674 }
677 675
678 if (assoc_data->capability & WLAN_CAPABILITY_PRIVACY) 676 if (assoc_data->capability & WLAN_CAPABILITY_PRIVACY)
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index 75e8e3bba538..28298cc50326 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -167,23 +167,16 @@ static void ieee80211_tdls_add_bss_coex_ie(struct sk_buff *skb)
167static u16 ieee80211_get_tdls_sta_capab(struct ieee80211_sub_if_data *sdata, 167static u16 ieee80211_get_tdls_sta_capab(struct ieee80211_sub_if_data *sdata,
168 u16 status_code) 168 u16 status_code)
169{ 169{
170 struct ieee80211_local *local = sdata->local;
171 u16 capab;
172
173 /* The capability will be 0 when sending a failure code */ 170 /* The capability will be 0 when sending a failure code */
174 if (status_code != 0) 171 if (status_code != 0)
175 return 0; 172 return 0;
176 173
177 capab = 0; 174 if (ieee80211_get_sdata_band(sdata) == IEEE80211_BAND_2GHZ) {
178 if (ieee80211_get_sdata_band(sdata) != IEEE80211_BAND_2GHZ) 175 return WLAN_CAPABILITY_SHORT_SLOT_TIME |
179 return capab; 176 WLAN_CAPABILITY_SHORT_PREAMBLE;
180 177 }
181 if (!(local->hw.flags & IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE))
182 capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
183 if (!(local->hw.flags & IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE))
184 capab |= WLAN_CAPABILITY_SHORT_PREAMBLE;
185 178
186 return capab; 179 return 0;
187} 180}
188 181
189static void ieee80211_tdls_add_link_ie(struct ieee80211_sub_if_data *sdata, 182static void ieee80211_tdls_add_link_ie(struct ieee80211_sub_if_data *sdata,