Commit 9a709e80 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

update to support new kernel

parent 0c08fa77
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -104,15 +104,29 @@ void *ue_ip_interrupt(void)
}
#endif //NETLINK
//---------------------------------------------------------------------------
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
void ue_ip_timer(struct timer_list *t)
#else
void ue_ip_timer(unsigned long dataP)
#endif
{
//---------------------------------------------------------------------------
ue_ip_priv_t *priv_p=(ue_ip_priv_t *)dataP;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
ue_ip_priv_t *priv_p = from_timer(priv_p, t, timer);
#else
ue_ip_priv_t *priv_p = (ue_ip_priv_t *)dataP;
#endif
spin_lock(&priv_p->lock);
(priv_p->timer).function=ue_ip_timer;
(priv_p->timer).expires=jiffies+UE_IP_TIMER_TICK;
(priv_p->timer).data=dataP;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
mod_timer(&priv_p->timer, jiffies + UE_IP_TIMER_TICK);
#else
(priv_p->timer).function = ue_ip_timer;
(priv_p->timer).expires = jiffies + UE_IP_TIMER_TICK;
(priv_p->timer).data = dataP;
add_timer(&priv_p->timer);
#endif
spin_unlock(&priv_p->lock);
return;
// add_timer(&gpriv->timer);
......@@ -144,10 +158,15 @@ int ue_ip_open(struct net_device *dev_pP)
netif_wake_queue(dev_pP);
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
timer_setup(&(priv_p->timer), ue_ip_timer, 0);
(priv_p->timer).expires = jiffies+UE_IP_TIMER_TICK;
#else
init_timer(&priv_p->timer);
(priv_p->timer).expires = jiffies+UE_IP_TIMER_TICK;
(priv_p->timer).data = (unsigned long)priv_p;
(priv_p->timer).function = ue_ip_timer;
#endif
//add_timer(&priv_p->timer);
printk("[UE_IP_DRV_PROSE][%s] name = %s\n", __FUNCTION__, dev_pP->name);
......@@ -338,7 +357,11 @@ static const struct net_device_ops ue_ip_netdev_ops = {
.ndo_set_mac_address = ue_ip_set_mac_address,
.ndo_set_config = ue_ip_set_config,
.ndo_do_ioctl = NULL,
.ndo_change_mtu = ue_ip_change_mtu,
#if RHEL_RELEASE_CODE>=1797
.extended.ndo_change_mtu = ue_ip_change_mtu,
#else
.ndo_change_mtu = ue_ip_change_mtu,
#endif
.ndo_tx_timeout = ue_ip_tx_timeout,
.ndo_change_rx_flags = ue_ip_change_rx_flags,
};
......
......@@ -56,7 +56,9 @@
#include "constant.h"
#include "platform_types.h"
#include "sap.h"
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
typedef struct ue_ip_priv_s {
int irq;
......@@ -89,6 +91,10 @@ typedef struct pdcp_data_req_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t traffic_type;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_req_header_t;
typedef struct pdcp_data_ind_header_s {
......@@ -96,6 +102,10 @@ typedef struct pdcp_data_ind_header_s {
sdu_size_t data_size;
signed int inst;
ip_traffic_type_t dummy_traffic_type;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint32_t sourceL2Id;
uint32_t destinationL2Id;
#endif
} pdcp_data_ind_header_t;
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment