aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 19ffc8ef1d1d..8e8ddbfcd236 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -86,8 +86,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local,
86 86
87 if (status->flag & RX_FLAG_TSFT) 87 if (status->flag & RX_FLAG_TSFT)
88 len += 8; 88 len += 8;
89 if (local->hw.flags & IEEE80211_HW_SIGNAL_DB || 89 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
90 local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
91 len += 1; 90 len += 1;
92 if (local->hw.flags & IEEE80211_HW_NOISE_DBM) 91 if (local->hw.flags & IEEE80211_HW_NOISE_DBM)
93 len += 1; 92 len += 1;
@@ -199,14 +198,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
199 *pos = status->antenna; 198 *pos = status->antenna;
200 pos++; 199 pos++;
201 200
202 /* IEEE80211_RADIOTAP_DB_ANTSIGNAL */
203 if (local->hw.flags & IEEE80211_HW_SIGNAL_DB) {
204 *pos = status->signal;
205 rthdr->it_present |=
206 cpu_to_le32(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL);
207 pos++;
208 }
209
210 /* IEEE80211_RADIOTAP_DB_ANTNOISE is not used */ 201 /* IEEE80211_RADIOTAP_DB_ANTNOISE is not used */
211 202
212 /* IEEE80211_RADIOTAP_RX_FLAGS */ 203 /* IEEE80211_RADIOTAP_RX_FLAGS */
@@ -1225,12 +1216,12 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx)
1225 1216
1226 switch (hdr->frame_control & 1217 switch (hdr->frame_control &
1227 cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) { 1218 cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) {
1228 case __constant_cpu_to_le16(IEEE80211_FCTL_TODS): 1219 case cpu_to_le16(IEEE80211_FCTL_TODS):
1229 if (unlikely(sdata->vif.type != NL80211_IFTYPE_AP && 1220 if (unlikely(sdata->vif.type != NL80211_IFTYPE_AP &&
1230 sdata->vif.type != NL80211_IFTYPE_AP_VLAN)) 1221 sdata->vif.type != NL80211_IFTYPE_AP_VLAN))
1231 return -1; 1222 return -1;
1232 break; 1223 break;
1233 case __constant_cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS): 1224 case cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS):
1234 if (unlikely(sdata->vif.type != NL80211_IFTYPE_WDS && 1225 if (unlikely(sdata->vif.type != NL80211_IFTYPE_WDS &&
1235 sdata->vif.type != NL80211_IFTYPE_MESH_POINT)) 1226 sdata->vif.type != NL80211_IFTYPE_MESH_POINT))
1236 return -1; 1227 return -1;
@@ -1244,13 +1235,13 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx)
1244 } 1235 }
1245 } 1236 }
1246 break; 1237 break;
1247 case __constant_cpu_to_le16(IEEE80211_FCTL_FROMDS): 1238 case cpu_to_le16(IEEE80211_FCTL_FROMDS):
1248 if (sdata->vif.type != NL80211_IFTYPE_STATION || 1239 if (sdata->vif.type != NL80211_IFTYPE_STATION ||
1249 (is_multicast_ether_addr(dst) && 1240 (is_multicast_ether_addr(dst) &&
1250 !compare_ether_addr(src, dev->dev_addr))) 1241 !compare_ether_addr(src, dev->dev_addr)))
1251 return -1; 1242 return -1;
1252 break; 1243 break;
1253 case __constant_cpu_to_le16(0): 1244 case cpu_to_le16(0):
1254 if (sdata->vif.type != NL80211_IFTYPE_ADHOC) 1245 if (sdata->vif.type != NL80211_IFTYPE_ADHOC)
1255 return -1; 1246 return -1;
1256 break; 1247 break;