diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index d357b9adcf49..4c4c22f54e99 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -230,31 +230,20 @@ static int ath9k_compute_qual(struct ieee80211_hw *hw, | |||
230 | return qual; | 230 | return qual; |
231 | } | 231 | } |
232 | 232 | ||
233 | /* | 233 | static void ath9k_process_rssi(struct ath_common *common, |
234 | * For Decrypt or Demic errors, we only mark packet status here and always push | 234 | struct ieee80211_hw *hw, |
235 | * up the frame up to let mac80211 handle the actual error case, be it no | 235 | struct sk_buff *skb, |
236 | * decryption key or real decryption error. This let us keep statistics there. | 236 | struct ath_rx_status *rx_stats) |
237 | */ | ||
238 | static int ath_rx_prepare(struct ath_common *common, | ||
239 | struct ieee80211_hw *hw, | ||
240 | struct sk_buff *skb, struct ath_rx_status *rx_stats, | ||
241 | struct ieee80211_rx_status *rx_status, | ||
242 | bool *decrypt_error) | ||
243 | { | 237 | { |
244 | struct ath_hw *ah = common->ah; | 238 | struct ath_hw *ah = common->ah; |
245 | struct ieee80211_hdr *hdr; | ||
246 | __le16 fc; | ||
247 | struct ieee80211_sta *sta; | 239 | struct ieee80211_sta *sta; |
240 | struct ieee80211_hdr *hdr; | ||
248 | struct ath_node *an; | 241 | struct ath_node *an; |
249 | int last_rssi = ATH_RSSI_DUMMY_MARKER; | 242 | int last_rssi = ATH_RSSI_DUMMY_MARKER; |
243 | __le16 fc; | ||
250 | 244 | ||
251 | hdr = (struct ieee80211_hdr *)skb->data; | 245 | hdr = (struct ieee80211_hdr *)skb->data; |
252 | fc = hdr->frame_control; | 246 | fc = hdr->frame_control; |
253 | memset(rx_status, 0, sizeof(struct ieee80211_rx_status)); | ||
254 | |||
255 | if (!ath9k_rx_accept(common, skb, rx_status, rx_stats, decrypt_error)) | ||
256 | goto rx_next; | ||
257 | |||
258 | 247 | ||
259 | rcu_read_lock(); | 248 | rcu_read_lock(); |
260 | /* XXX: use ieee80211_find_sta! */ | 249 | /* XXX: use ieee80211_find_sta! */ |
@@ -279,6 +268,27 @@ static int ath_rx_prepare(struct ath_common *common, | |||
279 | /* Update Beacon RSSI, this is used by ANI. */ | 268 | /* Update Beacon RSSI, this is used by ANI. */ |
280 | if (ieee80211_is_beacon(fc)) | 269 | if (ieee80211_is_beacon(fc)) |
281 | ah->stats.avgbrssi = rx_stats->rs_rssi; | 270 | ah->stats.avgbrssi = rx_stats->rs_rssi; |
271 | } | ||
272 | |||
273 | /* | ||
274 | * For Decrypt or Demic errors, we only mark packet status here and always push | ||
275 | * up the frame up to let mac80211 handle the actual error case, be it no | ||
276 | * decryption key or real decryption error. This let us keep statistics there. | ||
277 | */ | ||
278 | static int ath_rx_prepare(struct ath_common *common, | ||
279 | struct ieee80211_hw *hw, | ||
280 | struct sk_buff *skb, struct ath_rx_status *rx_stats, | ||
281 | struct ieee80211_rx_status *rx_status, | ||
282 | bool *decrypt_error) | ||
283 | { | ||
284 | struct ath_hw *ah = common->ah; | ||
285 | |||
286 | memset(rx_status, 0, sizeof(struct ieee80211_rx_status)); | ||
287 | |||
288 | if (!ath9k_rx_accept(common, skb, rx_status, rx_stats, decrypt_error)) | ||
289 | goto rx_next; | ||
290 | |||
291 | ath9k_process_rssi(common, hw, skb, rx_stats); | ||
282 | 292 | ||
283 | rx_status->rate_idx = ath9k_process_rate(common, hw, | 293 | rx_status->rate_idx = ath9k_process_rate(common, hw, |
284 | rx_stats, rx_status, skb); | 294 | rx_stats, rx_status, skb); |