> +static void > +ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, > + struct sk_buff *skb, > + struct ieee80211_rx_status *status, > + struct ieee80211_rate *rate, > + int rtap_len) > +{ > + struct ieee80211_radiotap_header *rthdr; > + unsigned char *pos; > + > + rthdr = (struct ieee80211_radiotap_header *)skb_push(skb, rtap_len); > + memset(rthdr, 0, rtap_len); > + > + /* radiotap header, set always present flags */ > + rthdr->it_present = > + cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | > + (1 << IEEE80211_RADIOTAP_RATE) | > + (1 << IEEE80211_RADIOTAP_CHANNEL) | > + (1 << IEEE80211_RADIOTAP_ANTENNA) | > + (1 << IEEE80211_RADIOTAP_RX_FLAGS)); Is all this alignment-safe now? Not sure it was before but it'd be nice if we could fix it up. Radiotap explicitly allows you to have a longer length than you need so maybe we should just make sure to align things? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part