diff options
Diffstat (limited to 'net/mac80211/rx.c')
| -rw-r--r-- | net/mac80211/rx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index bcfe8c77c839..d64e285400aa 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -103,7 +103,7 @@ static void | |||
| 103 | ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | 103 | ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, |
| 104 | struct sk_buff *skb, | 104 | struct sk_buff *skb, |
| 105 | struct ieee80211_rate *rate, | 105 | struct ieee80211_rate *rate, |
| 106 | int rtap_len) | 106 | int rtap_len, bool has_fcs) |
| 107 | { | 107 | { |
| 108 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | 108 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |
| 109 | struct ieee80211_radiotap_header *rthdr; | 109 | struct ieee80211_radiotap_header *rthdr; |
| @@ -134,7 +134,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | |||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | /* IEEE80211_RADIOTAP_FLAGS */ | 136 | /* IEEE80211_RADIOTAP_FLAGS */ |
| 137 | if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) | 137 | if (has_fcs && (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)) |
| 138 | *pos |= IEEE80211_RADIOTAP_F_FCS; | 138 | *pos |= IEEE80211_RADIOTAP_F_FCS; |
| 139 | if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) | 139 | if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) |
| 140 | *pos |= IEEE80211_RADIOTAP_F_BADFCS; | 140 | *pos |= IEEE80211_RADIOTAP_F_BADFCS; |
| @@ -294,7 +294,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | /* prepend radiotap information */ | 296 | /* prepend radiotap information */ |
| 297 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); | 297 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom, |
| 298 | true); | ||
| 298 | 299 | ||
| 299 | skb_reset_mac_header(skb); | 300 | skb_reset_mac_header(skb); |
| 300 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 301 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
| @@ -2571,7 +2572,8 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
| 2571 | goto out_free_skb; | 2572 | goto out_free_skb; |
| 2572 | 2573 | ||
| 2573 | /* prepend radiotap information */ | 2574 | /* prepend radiotap information */ |
| 2574 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); | 2575 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom, |
| 2576 | false); | ||
| 2575 | 2577 | ||
| 2576 | skb_set_mac_header(skb, 0); | 2578 | skb_set_mac_header(skb, 0); |
| 2577 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 2579 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
