Lines Matching refs:hh

263 static int parse_hip(const u8 *buf, const u32 buflen, struct hip_hdr *hh)
271 curp = save16bit(&hh->payload_len, curp);
272 curp = save8bit(&hh->msgid, curp);
273 curp = save8bit(&hh->msgspecific, curp);
275 padded = hh->msgid.byte & 0x80;
276 hh->msgid.byte &= 0x7F; /* 7 bits */
278 hh->extmsgid.is_present = (hh->msgid.byte == SIERRA_NET_HIP_EXTENDEDID);
279 if (hh->extmsgid.is_present) {
283 hh->payload_len.word &= 0x3FFF; /* 14 bits */
285 curp = save16bit(&hh->extmsgid, curp);
286 hh->extmsgid.word &= 0x03FF; /* 10 bits */
288 hh->hdrlen = SIERRA_NET_HIP_EXT_HDR_LEN;
290 hh->payload_len.word &= 0x07FF; /* 11 bits */
291 hh->hdrlen = SIERRA_NET_HIP_HDR_LEN;
295 hh->hdrlen++;
296 hh->payload_len.word--;
300 if (buflen < (hh->hdrlen + hh->payload_len.word))
413 struct hip_hdr *hh)
418 link_up = sierra_net_parse_lsi(dev, data + hh->hdrlen,
419 hh->payload_len.word);
425 sierra_net_set_ctx_index(priv, hh->msgspecific.byte);
491 struct hip_hdr hh;
496 err = parse_hip(buf, len, &hh);
505 if (len != hh.hdrlen + hh.payload_len.word) {
508 hh.hdrlen + hh.payload_len.word);
514 switch (hh.msgid.byte) {
517 hh.msgspecific.byte);
518 sierra_net_handle_lsi(dev, buf, &hh);
523 hh.msgspecific.byte);
538 "extmsgid 0x%04x\n", hh.extmsgid.word);
545 "msgid 0x%02x\n", hh.msgid.byte);
805 struct hip_hdr hh;
812 err = parse_hip(skb->data, skb->len, &hh);
823 if (!hh.extmsgid.is_present
824 || hh.extmsgid.word != SIERRA_NET_HIP_EXT_IP_IN_ID) {
833 skb_pull(skb, hh.hdrlen);
845 if (hh.payload_len.word == skb->len)
848 new_skb = sierra_net_skb_clone(dev, skb, hh.payload_len.word);