Hi Phoebe, On Mon, Mar 03, 2014 at 11:07:52PM +0100, Phoebe Buckheister wrote: > Add a generic set of 802.15.4 header operations on sk_buffs: push header > onto skb, pull header from skb, and peek address fields from the mac_hdr > part of an skb. > > These routines support the full 802.15.4 header as described in the > standard, including the security header. They are useful for everything > that must create, modify or read 802.15.4 headers, which of course > includes the wpan rx/tx path, but also 6lowpan. In the future, > link-layer security will also require means to modify packet headers. > > Signed-off-by: Phoebe Buckheister <phoebe.buckheister@xxxxxxxxxxxxxxxxxx> > Tested-by: Alexander Aring <alex.aring@xxxxxxxxx> > --- > +static int > +ieee802154_hdr_get_addrs(const u8 *buf, struct ieee802154_hdr *hdr) > +{ > + int pos = 0; > + > + pos += ieee802154_hdr_get_addr(buf + pos, > + IEEE802154_FC_DAMODE(hdr->fc), > + false, &hdr->dest); > + pos += ieee802154_hdr_get_addr(buf + pos, > + IEEE802154_FC_SAMODE(hdr->fc), > + hdr->fc & IEEE802154_FC_INTRA_PAN, > + &hdr->source); > + > + if (hdr->fc && IEEE802154_FC_INTRA_PAN) I think this should be: if (hdr->fc & IEEE802154_FC_INTRA_PAN) - Alex -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html