On Saturday 26 April 2008 22:51:50 Johannes Berg wrote: > > +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? are you talking about the alignment of the radiotap header itself? no, i just took care about the alignment requirements of the radiotap fields, relative to the start of radiotap. but it would be easy to add some additional length in ieee80211_rx_radiotap_len() and just leave that empty at the end. i think i don't understand all alignment requirements though... bruno -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html