[TR]: Use tr_hdr() were appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
7c81fd8bfb
Коммит
c1a4b86e39
|
@ -1607,10 +1607,12 @@ static void streamer_arb_cmd(struct net_device *dev)
|
|||
frame_data, buffer_len);
|
||||
} while (next_ptr && (buff_off = next_ptr));
|
||||
|
||||
mac_frame->dev = dev;
|
||||
mac_frame->protocol = tr_type_trans(mac_frame, dev);
|
||||
#if STREAMER_NETWORK_MONITOR
|
||||
printk(KERN_WARNING "%s: Received MAC Frame, details: \n",
|
||||
dev->name);
|
||||
mac_hdr = (struct trh_hdr *) mac_frame->data;
|
||||
mac_hdr = tr_hdr(mac_frame);
|
||||
printk(KERN_WARNING
|
||||
"%s: MAC Frame Dest. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n",
|
||||
dev->name, mac_hdr->daddr[0], mac_hdr->daddr[1],
|
||||
|
@ -1622,8 +1624,6 @@ static void streamer_arb_cmd(struct net_device *dev)
|
|||
mac_hdr->saddr[2], mac_hdr->saddr[3],
|
||||
mac_hdr->saddr[4], mac_hdr->saddr[5]);
|
||||
#endif
|
||||
mac_frame->dev = dev;
|
||||
mac_frame->protocol = tr_type_trans(mac_frame, dev);
|
||||
netif_rx(mac_frame);
|
||||
|
||||
/* Now tell the card we have dealt with the received frame */
|
||||
|
|
|
@ -1440,16 +1440,17 @@ static void olympic_arb_cmd(struct net_device *dev)
|
|||
next_ptr=readw(buf_ptr+offsetof(struct mac_receive_buffer,next));
|
||||
} while (next_ptr && (buf_ptr=olympic_priv->olympic_lap + ntohs(next_ptr)));
|
||||
|
||||
mac_frame->dev = dev;
|
||||
mac_frame->protocol = tr_type_trans(mac_frame, dev);
|
||||
|
||||
if (olympic_priv->olympic_network_monitor) {
|
||||
struct trh_hdr *mac_hdr ;
|
||||
printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name) ;
|
||||
mac_hdr = (struct trh_hdr *)mac_frame->data ;
|
||||
mac_hdr = tr_hdr(mac_frame);
|
||||
printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", dev->name , mac_hdr->daddr[0], mac_hdr->daddr[1], mac_hdr->daddr[2], mac_hdr->daddr[3], mac_hdr->daddr[4], mac_hdr->daddr[5]) ;
|
||||
printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", dev->name , mac_hdr->saddr[0], mac_hdr->saddr[1], mac_hdr->saddr[2], mac_hdr->saddr[3], mac_hdr->saddr[4], mac_hdr->saddr[5]) ;
|
||||
}
|
||||
mac_frame->dev = dev ;
|
||||
mac_frame->protocol = tr_type_trans(mac_frame,dev);
|
||||
netif_rx(mac_frame) ;
|
||||
netif_rx(mac_frame);
|
||||
dev->last_rx = jiffies;
|
||||
|
||||
drop_frame:
|
||||
|
|
|
@ -2308,7 +2308,7 @@ qeth_rebuild_skb_fake_ll_tr(struct qeth_card *card, struct sk_buff *skb,
|
|||
QETH_DBF_TEXT(trace,5,"skbfktr");
|
||||
skb->mac.raw = skb->data - QETH_FAKE_LL_LEN_TR;
|
||||
/* this is a fake ethernet header */
|
||||
fake_hdr = (struct trh_hdr *) skb->mac.raw;
|
||||
fake_hdr = tr_hdr(skb);
|
||||
|
||||
/* the destination MAC address */
|
||||
switch (skb->pkt_type){
|
||||
|
|
|
@ -189,11 +189,12 @@ static int tr_rebuild_header(struct sk_buff *skb)
|
|||
__be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
|
||||
struct trh_hdr *trh=(struct trh_hdr *)skb->data;
|
||||
struct trh_hdr *trh;
|
||||
struct trllc *trllc;
|
||||
unsigned riflen=0;
|
||||
|
||||
skb->mac.raw = skb->data;
|
||||
trh = tr_hdr(skb);
|
||||
|
||||
if(trh->saddr[0] & TR_RII)
|
||||
riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
|
||||
|
|
Загрузка…
Ссылка в новой задаче