|
@@ -40,8 +40,6 @@
|
|
|
static struct sk_buff *remove_monitor_info(struct ieee80211_local *local,
|
|
|
struct sk_buff *skb)
|
|
|
{
|
|
|
- struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
|
|
-
|
|
|
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) {
|
|
|
if (likely(skb->len > FCS_LEN))
|
|
|
__pskb_trim(skb, skb->len - FCS_LEN);
|
|
@@ -53,9 +51,6 @@ static struct sk_buff *remove_monitor_info(struct ieee80211_local *local,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (status->vendor_radiotap_len)
|
|
|
- __pskb_pull(skb, status->vendor_radiotap_len);
|
|
|
-
|
|
|
return skb;
|
|
|
}
|
|
|
|
|
@@ -64,14 +59,13 @@ static inline int should_drop_frame(struct sk_buff *skb, int present_fcs_len)
|
|
|
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
|
|
struct ieee80211_hdr *hdr;
|
|
|
|
|
|
- hdr = (void *)(skb->data + status->vendor_radiotap_len);
|
|
|
+ hdr = (void *)(skb->data);
|
|
|
|
|
|
if (status->flag & (RX_FLAG_FAILED_FCS_CRC |
|
|
|
RX_FLAG_FAILED_PLCP_CRC |
|
|
|
RX_FLAG_AMPDU_IS_ZEROLEN))
|
|
|
return 1;
|
|
|
- if (unlikely(skb->len < 16 + present_fcs_len +
|
|
|
- status->vendor_radiotap_len))
|
|
|
+ if (unlikely(skb->len < 16 + present_fcs_len))
|
|
|
return 1;
|
|
|
if (ieee80211_is_ctl(hdr->frame_control) &&
|
|
|
!ieee80211_is_pspoll(hdr->frame_control) &&
|
|
@@ -90,8 +84,6 @@ ieee80211_rx_radiotap_space(struct ieee80211_local *local,
|
|
|
len = sizeof(struct ieee80211_radiotap_header) + 8;
|
|
|
|
|
|
/* allocate extra bitmaps */
|
|
|
- if (status->vendor_radiotap_len)
|
|
|
- len += 4;
|
|
|
if (status->chains)
|
|
|
len += 4 * hweight8(status->chains);
|
|
|
|
|
@@ -127,18 +119,6 @@ ieee80211_rx_radiotap_space(struct ieee80211_local *local,
|
|
|
len += 2 * hweight8(status->chains);
|
|
|
}
|
|
|
|
|
|
- if (status->vendor_radiotap_len) {
|
|
|
- if (WARN_ON_ONCE(status->vendor_radiotap_align == 0))
|
|
|
- status->vendor_radiotap_align = 1;
|
|
|
- /* align standard part of vendor namespace */
|
|
|
- len = ALIGN(len, 2);
|
|
|
- /* allocate standard part of vendor namespace */
|
|
|
- len += 6;
|
|
|
- /* align vendor-defined part */
|
|
|
- len = ALIGN(len, status->vendor_radiotap_align);
|
|
|
- /* vendor-defined part is already in skb */
|
|
|
- }
|
|
|
-
|
|
|
return len;
|
|
|
}
|
|
|
|
|
@@ -172,7 +152,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
|
|
|
it_present = &rthdr->it_present;
|
|
|
|
|
|
/* radiotap header, set always present flags */
|
|
|
- rthdr->it_len = cpu_to_le16(rtap_len + status->vendor_radiotap_len);
|
|
|
+ rthdr->it_len = cpu_to_le16(rtap_len);
|
|
|
it_present_val = BIT(IEEE80211_RADIOTAP_FLAGS) |
|
|
|
BIT(IEEE80211_RADIOTAP_CHANNEL) |
|
|
|
BIT(IEEE80211_RADIOTAP_RX_FLAGS);
|
|
@@ -190,14 +170,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
|
|
|
BIT(IEEE80211_RADIOTAP_DBM_ANTSIGNAL);
|
|
|
}
|
|
|
|
|
|
- if (status->vendor_radiotap_len) {
|
|
|
- it_present_val |= BIT(IEEE80211_RADIOTAP_VENDOR_NAMESPACE) |
|
|
|
- BIT(IEEE80211_RADIOTAP_EXT);
|
|
|
- put_unaligned_le32(it_present_val, it_present);
|
|
|
- it_present++;
|
|
|
- it_present_val = status->vendor_radiotap_bitmap;
|
|
|
- }
|
|
|
-
|
|
|
put_unaligned_le32(it_present_val, it_present);
|
|
|
|
|
|
pos = (void *)(it_present + 1);
|
|
@@ -383,21 +355,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
|
|
|
*pos++ = status->chain_signal[chain];
|
|
|
*pos++ = chain;
|
|
|
}
|
|
|
-
|
|
|
- if (status->vendor_radiotap_len) {
|
|
|
- /* ensure 2 byte alignment for the vendor field as required */
|
|
|
- if ((pos - (u8 *)rthdr) & 1)
|
|
|
- *pos++ = 0;
|
|
|
- *pos++ = status->vendor_radiotap_oui[0];
|
|
|
- *pos++ = status->vendor_radiotap_oui[1];
|
|
|
- *pos++ = status->vendor_radiotap_oui[2];
|
|
|
- *pos++ = status->vendor_radiotap_subns;
|
|
|
- put_unaligned_le16(status->vendor_radiotap_len, pos);
|
|
|
- pos += 2;
|
|
|
- /* align the actual payload as requested */
|
|
|
- while ((pos - (u8 *)rthdr) & (status->vendor_radiotap_align - 1))
|
|
|
- *pos++ = 0;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -428,8 +385,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
|
|
|
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)
|
|
|
present_fcs_len = FCS_LEN;
|
|
|
|
|
|
- /* ensure hdr->frame_control and vendor radiotap data are in skb head */
|
|
|
- if (!pskb_may_pull(origskb, 2 + status->vendor_radiotap_len)) {
|
|
|
+ /* ensure hdr->frame_control is in skb head */
|
|
|
+ if (!pskb_may_pull(origskb, 2)) {
|
|
|
dev_kfree_skb(origskb);
|
|
|
return NULL;
|
|
|
}
|