- Fix nasmesh driver for 64 bits architectures
[pre-ci tests passed on 32/64 bits platforms] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4101 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -97,7 +97,7 @@ void nas_COMMON_receive(u16 dlen,
|
|||||||
skb->dev = nasdev[inst];
|
skb->dev = nasdev[inst];
|
||||||
|
|
||||||
#ifdef KERNEL_VERSION_GREATER_THAN_2622
|
#ifdef KERNEL_VERSION_GREATER_THAN_2622
|
||||||
skb->mac_header = skb->data;
|
skb_reset_mac_header(skb);
|
||||||
#else
|
#else
|
||||||
skb->mac.raw = skb->data;
|
skb->mac.raw = skb->data;
|
||||||
#endif
|
#endif
|
||||||
@@ -119,7 +119,7 @@ void nas_COMMON_receive(u16 dlen,
|
|||||||
|
|
||||||
|
|
||||||
#ifdef KERNEL_VERSION_GREATER_THAN_2622
|
#ifdef KERNEL_VERSION_GREATER_THAN_2622
|
||||||
skb->network_header = skb->data;
|
skb_reset_network_header(skb);
|
||||||
#else
|
#else
|
||||||
skb->nh.ipv6h = (struct ipv6hdr *)skb->data;
|
skb->nh.ipv6h = (struct ipv6hdr *)skb->data;
|
||||||
#endif
|
#endif
|
||||||
@@ -175,10 +175,9 @@ void nas_COMMON_receive(u16 dlen,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KERNEL_VERSION_GREATER_THAN_2622
|
#ifdef KERNEL_VERSION_GREATER_THAN_2622
|
||||||
skb->network_header = skb->data;
|
skb_reset_network_header(skb);
|
||||||
network_header = (struct iphdr *)skb_network_header(skb);
|
network_header = (struct iphdr *)skb_network_header(skb);
|
||||||
protocol = network_header->protocol;
|
protocol = network_header->protocol;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
skb->nh.iph = (struct iphdr *)skb->data;
|
skb->nh.iph = (struct iphdr *)skb->data;
|
||||||
protocol=skb->nh.iph->protocol;
|
protocol=skb->nh.iph->protocol;
|
||||||
@@ -435,7 +434,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
|
|||||||
if (bytes_wrote != NAS_PDCPH_SIZE)
|
if (bytes_wrote != NAS_PDCPH_SIZE)
|
||||||
{
|
{
|
||||||
printk("NAS_COMMON_QOS_SEND: problem while writing PDCP's header (bytes wrote = %d to fifo %d)\n",bytes_wrote,NAS2PDCP_FIFO);
|
printk("NAS_COMMON_QOS_SEND: problem while writing PDCP's header (bytes wrote = %d to fifo %d)\n",bytes_wrote,NAS2PDCP_FIFO);
|
||||||
printk("rb_id %d, Wrote %d, Header Size %d \n", pdcph.rb_id , bytes_wrote, NAS_PDCPH_SIZE);
|
printk("rb_id %d, Wrote %d, Header Size %lu\n", pdcph.rb_id , bytes_wrote, NAS_PDCPH_SIZE);
|
||||||
#ifndef NAS_NETLINK
|
#ifndef NAS_NETLINK
|
||||||
rtf_reset(NAS2PDCP_FIFO);
|
rtf_reset(NAS2PDCP_FIFO);
|
||||||
#endif //NAS_NETLINK
|
#endif //NAS_NETLINK
|
||||||
@@ -449,7 +448,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct class
|
|||||||
|
|
||||||
if (bytes_wrote != skb->len+NAS_PDCPH_SIZE)
|
if (bytes_wrote != skb->len+NAS_PDCPH_SIZE)
|
||||||
{
|
{
|
||||||
printk("NAS_COMMON_QOS_SEND: Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d\n",
|
printk("NAS_COMMON_QOS_SEND: Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %lu\n",
|
||||||
inst,
|
inst,
|
||||||
pdcph.rb_id,
|
pdcph.rb_id,
|
||||||
bytes_wrote,
|
bytes_wrote,
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ int nas_ioCTL_class_add_request(struct nas_ioctl *gifr,
|
|||||||
|
|
||||||
|
|
||||||
printk("NAS_IOCTL_CLASS_ADD: Add classifier components requested\n");
|
printk("NAS_IOCTL_CLASS_ADD: Add classifier components requested\n");
|
||||||
printk("NAS_IOCTL_CLASS_ADD: size of gifr msg %d\n", sizeof(gifr->msg));
|
printk("NAS_IOCTL_CLASS_ADD: size of gifr msg %zd\n", sizeof(gifr->msg));
|
||||||
|
|
||||||
|
|
||||||
if (copy_from_user(&msgreq, gifr->msg, sizeof(msgreq))){
|
if (copy_from_user(&msgreq, gifr->msg, sizeof(msgreq))){
|
||||||
|
|||||||
@@ -564,7 +564,7 @@ void print_TOOL_pk_ipv4(struct iphdr *iph){
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void print_TOOL_pk_all(struct sk_buff *skb){
|
void print_TOOL_pk_all(struct sk_buff *skb){
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
printk("Skb:\t %u, len = %u\n", (unsigned int)skb, skb->len);
|
printk("Skb:\t %p, len = %u\n", skb, skb->len);
|
||||||
#ifdef KERNEL_VERSION_GREATER_THAN_2629
|
#ifdef KERNEL_VERSION_GREATER_THAN_2629
|
||||||
//navid: need to calculate the current used space: fixme?
|
//navid: need to calculate the current used space: fixme?
|
||||||
printk("Skb:\t available buf space = %u \n", skb->truesize);
|
printk("Skb:\t available buf space = %u \n", skb->truesize);
|
||||||
|
|||||||
Reference in New Issue
Block a user