diff options
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 8d17d8df3662..1a6aeac5a1c3 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c | |||
@@ -27,7 +27,8 @@ new_skb(ulong len) | |||
27 | 27 | ||
28 | skb = alloc_skb(len, GFP_ATOMIC); | 28 | skb = alloc_skb(len, GFP_ATOMIC); |
29 | if (skb) { | 29 | if (skb) { |
30 | skb->nh.raw = skb->mac.raw = skb->data; | 30 | skb_reset_mac_header(skb); |
31 | skb_reset_network_header(skb); | ||
31 | skb->protocol = __constant_htons(ETH_P_AOE); | 32 | skb->protocol = __constant_htons(ETH_P_AOE); |
32 | skb->priority = 0; | 33 | skb->priority = 0; |
33 | skb->next = skb->prev = NULL; | 34 | skb->next = skb->prev = NULL; |
@@ -118,7 +119,7 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f) | |||
118 | 119 | ||
119 | /* initialize the headers & frame */ | 120 | /* initialize the headers & frame */ |
120 | skb = f->skb; | 121 | skb = f->skb; |
121 | h = (struct aoe_hdr *) skb->mac.raw; | 122 | h = aoe_hdr(skb); |
122 | ah = (struct aoe_atahdr *) (h+1); | 123 | ah = (struct aoe_atahdr *) (h+1); |
123 | skb_put(skb, sizeof *h + sizeof *ah); | 124 | skb_put(skb, sizeof *h + sizeof *ah); |
124 | memset(h, 0, skb->len); | 125 | memset(h, 0, skb->len); |
@@ -207,7 +208,7 @@ aoecmd_cfg_pkts(ushort aoemajor, unsigned char aoeminor, struct sk_buff **tail) | |||
207 | skb->dev = ifp; | 208 | skb->dev = ifp; |
208 | if (sl_tail == NULL) | 209 | if (sl_tail == NULL) |
209 | sl_tail = skb; | 210 | sl_tail = skb; |
210 | h = (struct aoe_hdr *) skb->mac.raw; | 211 | h = aoe_hdr(skb); |
211 | memset(h, 0, sizeof *h + sizeof *ch); | 212 | memset(h, 0, sizeof *h + sizeof *ch); |
212 | 213 | ||
213 | memset(h->dst, 0xff, sizeof h->dst); | 214 | memset(h->dst, 0xff, sizeof h->dst); |
@@ -300,7 +301,7 @@ rexmit(struct aoedev *d, struct frame *f) | |||
300 | aoechr_error(buf); | 301 | aoechr_error(buf); |
301 | 302 | ||
302 | skb = f->skb; | 303 | skb = f->skb; |
303 | h = (struct aoe_hdr *) skb->mac.raw; | 304 | h = aoe_hdr(skb); |
304 | ah = (struct aoe_atahdr *) (h+1); | 305 | ah = (struct aoe_atahdr *) (h+1); |
305 | f->tag = n; | 306 | f->tag = n; |
306 | h->tag = cpu_to_be32(n); | 307 | h->tag = cpu_to_be32(n); |
@@ -529,7 +530,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
529 | char ebuf[128]; | 530 | char ebuf[128]; |
530 | u16 aoemajor; | 531 | u16 aoemajor; |
531 | 532 | ||
532 | hin = (struct aoe_hdr *) skb->mac.raw; | 533 | hin = aoe_hdr(skb); |
533 | aoemajor = be16_to_cpu(get_unaligned(&hin->major)); | 534 | aoemajor = be16_to_cpu(get_unaligned(&hin->major)); |
534 | d = aoedev_by_aoeaddr(aoemajor, hin->minor); | 535 | d = aoedev_by_aoeaddr(aoemajor, hin->minor); |
535 | if (d == NULL) { | 536 | if (d == NULL) { |
@@ -561,7 +562,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) | |||
561 | calc_rttavg(d, tsince(f->tag)); | 562 | calc_rttavg(d, tsince(f->tag)); |
562 | 563 | ||
563 | ahin = (struct aoe_atahdr *) (hin+1); | 564 | ahin = (struct aoe_atahdr *) (hin+1); |
564 | hout = (struct aoe_hdr *) f->skb->mac.raw; | 565 | hout = aoe_hdr(f->skb); |
565 | ahout = (struct aoe_atahdr *) (hout+1); | 566 | ahout = (struct aoe_atahdr *) (hout+1); |
566 | buf = f->buf; | 567 | buf = f->buf; |
567 | 568 | ||
@@ -695,7 +696,7 @@ aoecmd_ata_id(struct aoedev *d) | |||
695 | 696 | ||
696 | /* initialize the headers & frame */ | 697 | /* initialize the headers & frame */ |
697 | skb = f->skb; | 698 | skb = f->skb; |
698 | h = (struct aoe_hdr *) skb->mac.raw; | 699 | h = aoe_hdr(skb); |
699 | ah = (struct aoe_atahdr *) (h+1); | 700 | ah = (struct aoe_atahdr *) (h+1); |
700 | skb_put(skb, sizeof *h + sizeof *ah); | 701 | skb_put(skb, sizeof *h + sizeof *ah); |
701 | memset(h, 0, skb->len); | 702 | memset(h, 0, skb->len); |
@@ -726,7 +727,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb) | |||
726 | enum { MAXFRAMES = 16 }; | 727 | enum { MAXFRAMES = 16 }; |
727 | u16 n; | 728 | u16 n; |
728 | 729 | ||
729 | h = (struct aoe_hdr *) skb->mac.raw; | 730 | h = aoe_hdr(skb); |
730 | ch = (struct aoe_cfghdr *) (h+1); | 731 | ch = (struct aoe_cfghdr *) (h+1); |
731 | 732 | ||
732 | /* | 733 | /* |