Commit b440abef authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/ubuntu-16-compilation' into develop_integration_w11

parents b2bda949 20b420bb
......@@ -2100,11 +2100,16 @@ endforeach()
# force castxml and clang compilation with gnu89 standard
# we can't use cXX standard as pthread_rwlock_t is gnu standard
list(APPEND itti_compiler_options "-std=gnu89")
set (ITTI_H ${ITTI_DIR}/intertask_interface_types.h)
if(EXISTS /usr/bin/gccxml)
set(xml_command gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H})
else()
set(xml_command castxml --castxml-gccxml ${itti_compiler_options} ${ITTI_H} -o ${OPENAIR_BIN_DIR}/messages.xml)
endif()
add_custom_command (
OUTPUT ${OPENAIR_BIN_DIR}/messages.xml
COMMAND gccxml ${itti_compiler_options} -fxml=${OPENAIR_BIN_DIR}/messages.xml ${ITTI_H}
COMMAND ${xml_command}
DEPENDS ${S1AP_OAI_generated} ${RRC_FULL_DIR}/asn1_constants.h
)
......
......@@ -233,9 +233,12 @@ int nasmt_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
// End debug information
netif_stop_queue(dev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
#ifdef NAS_DEBUG_SEND_DETAIL
printk("nasmt_hard_start_xmit: step 1\n");
#endif
......@@ -307,7 +310,11 @@ void nasmt_tx_timeout(struct net_device *dev)
printk("nasmt_tx_timeout: begin\n");
//((struct nas_priv *)(dev->priv))->stats.tx_errors++;
(gpriv->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
netif_wake_queue(dev);
printk("nasmt_tx_timeout: transmit timed out %s\n",dev->name);
}
......
......@@ -226,7 +226,11 @@ int nasrg_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
netif_stop_queue(dev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
#ifdef NAS_DEBUG_SEND_DETAIL
printk("nasrg_hard_start_xmit: step 1\n");
#endif
......@@ -296,7 +300,11 @@ void nasrg_tx_timeout(struct net_device *dev)
printk("nasrg_tx_timeout: begin\n");
// ((struct nas_priv *)(dev->priv))->stats.tx_errors++;
(gpriv->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
netif_wake_queue(dev);
printk("nasrg_tx_timeout: transmit timed out %s\n",dev->name);
}
......
......@@ -255,7 +255,11 @@ int oai_nw_drv_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
netif_stop_queue(dev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
#ifdef OAI_DRV_DEBUG_DEVICE
printk("[OAI_IP_DRV][%s] step 1\n", __FUNCTION__);
#endif
......@@ -328,7 +332,11 @@ void oai_nw_drv_tx_timeout(struct net_device *dev)
printk("[OAI_IP_DRV][%s] begin\n", __FUNCTION__);
// (struct oai_nw_drv_priv *)(dev->priv)->stats.tx_errors++;
(priv->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
netif_wake_queue(dev);
printk("[OAI_IP_DRV][%s] transmit timed out %s\n", __FUNCTION__,dev->name);
}
......
......@@ -790,7 +790,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
dscp, sprotocol, sp->classref, sfct, sp->rab_id);
#endif
sp->fct(skb, cx, sp,inst);
sp->fct(skb, cx, sp,inst, NULL);
} // if classifier entry match found
......@@ -808,7 +808,7 @@ void nas_CLASS_send(struct sk_buff *skb,int inst)
if (no_connection == 1)
printk("NAS_CLASS_SEND: no corresponding connection, so the message is dropped\n");
#endif NAS_DEBUG_CLASS
#endif /* NAS_DEBUG_CLASS */
// } // while loop over connections
......
......@@ -321,10 +321,9 @@ void nas_COMMON_receive(uint16_t dlen,
//---------------------------------------------------------------------------
// Delete the data
void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *sp,int inst)
void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *sp,int inst,struct nas_priv *gpriv)
{
struct nas_priv *priv=netdev_priv(nasdev[inst]);
//---------------------------------------------------------------------------
++priv->stats.tx_dropped;
}
......@@ -332,7 +331,7 @@ void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct class
//---------------------------------------------------------------------------
// Request the transfer of data (QoS SAP)
void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst)
void nas_COMMON_QOS_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst, struct nas_priv *gpriv)
{
//---------------------------------------------------------------------------
struct pdcp_data_req_header_s pdcph;
......
......@@ -124,11 +124,8 @@ void *nas_interrupt(void)
int nas_open(struct net_device *dev)
{
//---------------------------------------------------------------------------
struct nas_priv *priv=netdev_priv(dev);
printk("OPEN: begin\n");
// MOD_INC_USE_COUNT;
// Address has already been set at init
#ifndef PDCP_USE_NETLINK
......@@ -250,7 +247,11 @@ int nas_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
// End debug information
netif_stop_queue(dev);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
#ifdef DEBUG_DEVICE
printk("HARD_START_XMIT: step 1\n");
#endif
......@@ -311,7 +312,11 @@ void nas_tx_timeout(struct net_device *dev)
printk("TX_TIMEOUT: begin\n");
// (struct nas_priv *)(dev->priv)->stats.tx_errors++;
(priv->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev);
#else
dev->trans_start = jiffies;
#endif
netif_wake_queue(dev);
printk("TX_TIMEOUT: transmit timed out %s\n",dev->name);
}
......@@ -406,8 +411,8 @@ void nas_init(struct net_device *dev)
nas_TOOL_imei2iid(IMEI, dev->dev_addr);// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid(IMEI, (uint8_t *)priv->cx[0].iid6);
#else
nas_TOOL_imei2iid(nas_IMEI, dev->dev_addr);// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid(nas_IMEI, (uint8_t *)priv->cx[0].iid6);
nas_TOOL_imei2iid((uint8_t *)nas_IMEI, dev->dev_addr); // IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid((uint8_t *)nas_IMEI, (uint8_t *)priv->cx[0].iid6);
#endif
// this is more appropriate for user space soft realtime emulation
#else
......@@ -478,8 +483,8 @@ int init_module (void)
if (nasdev[inst]) {
nas_mesh_init(inst);
//memcpy(nasdev[inst]->dev_addr,&nas_IMEI[0],8);
nas_TOOL_imei2iid(nas_IMEI, nasdev[inst]->dev_addr);// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid(nas_IMEI, (uint8_t *)priv->cx[0].iid6);
nas_TOOL_imei2iid((uint8_t *)nas_IMEI, nasdev[inst]->dev_addr);// IMEI to device address (for stateless autoconfiguration address)
nas_TOOL_imei2iid((uint8_t *)nas_IMEI, (uint8_t *)priv->cx[0].iid6);
// TO HAVE DIFFERENT HW @
((unsigned char*)nasdev[inst]->dev_addr)[7] = ((unsigned char*)nasdev[inst]->dev_addr)[7] + (unsigned char)inst + 1;
printk("Setting HW addr for INST %d to : %X%X\n",inst,*((unsigned int *)&nasdev[inst]->dev_addr[0]),*((unsigned int *)&nasdev[inst]->dev_addr[4]));
......
......@@ -853,7 +853,7 @@ int nas_CTL_ioctl(struct net_device *dev,
//---------------------------------------------------------------------------
void nas_CTL_send(struct sk_buff *skb,
struct cx_entity *cx,
struct classifier_entity *gc)
struct classifier_entity *gc, int inst, struct nas_priv *gpriv)
{
//---------------------------------------------------------------------------
printk("NAS_CTL_SEND - void \n");
......
......@@ -98,6 +98,26 @@ struct cx_entity {
int provider_id[MAX_MEASURE_NB];
};
//#define NAS_RETRY_LIMIT_DEFAULT 5
struct nas_priv {
int irq;
struct timer_list timer;
spinlock_t lock;
struct net_device_stats stats;
uint8_t retry_limit;
uint32_t timer_establishment;
uint32_t timer_release;
struct cx_entity cx[NAS_CX_MAX];
struct classifier_entity *rclassifier[NAS_DSCP_MAX]; // receive classifier
uint16_t nrclassifier;
int sap[NAS_SAPI_MAX];
struct sock *nl_sk;
uint8_t nlmsg[NAS_MAX_LENGTH+sizeof(struct nlmsghdr)];
uint8_t xbuffer[NAS_MAX_LENGTH]; // transmition buffer
uint8_t rbuffer[NAS_MAX_LENGTH]; // reception buffer
};
struct classifier_entity {
uint32_t classref;
......@@ -122,29 +142,7 @@ struct classifier_entity {
struct rb_entity *rb_rx; //pointer to rb_entity for receiving (in case of forwarding rule)
nasRadioBearerId_t rab_id; // RAB identification for sending
nasRadioBearerId_t rab_id_rx; // RAB identification for receiving (in case of forwarding rule)
void (*fct)(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst);
};
//#define NAS_RETRY_LIMIT_DEFAULT 5
struct nas_priv {
int irq;
struct timer_list timer;
spinlock_t lock;
struct net_device_stats stats;
uint8_t retry_limit;
uint32_t timer_establishment;
uint32_t timer_release;
struct cx_entity cx[NAS_CX_MAX];
struct classifier_entity *rclassifier[NAS_DSCP_MAX]; // receive classifier
uint16_t nrclassifier;
int sap[NAS_SAPI_MAX];
struct sock *nl_sk;
uint8_t nlmsg[NAS_MAX_LENGTH+sizeof(struct nlmsghdr)];
uint8_t xbuffer[NAS_MAX_LENGTH]; // transmition buffer
uint8_t rbuffer[NAS_MAX_LENGTH]; // reception buffer
void (*fct)(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst, struct nas_priv *gpriv);
};
struct ipversion {
......
......@@ -155,9 +155,10 @@ void nas_mesh_start_default_sclassifier(struct cx_entity *cx,struct rb_entity *r
}
//---------------------------------------------------------------------------
void nas_mesh_timer(unsigned long data,struct nas_priv *gpriv)
void nas_mesh_timer(unsigned long data)
{
//---------------------------------------------------------------------------
struct nas_priv *gpriv=(struct nas_priv *) data;
uint8_t cxi;
struct cx_entity *cx;
struct rb_entity *rb;
......@@ -168,7 +169,7 @@ void nas_mesh_timer(unsigned long data,struct nas_priv *gpriv)
(gpriv->timer).function=nas_mesh_timer;
(gpriv->timer).expires=jiffies+NAS_TIMER_TICK;
(gpriv->timer).data=0L;
(gpriv->timer).data=data;
return;
......@@ -381,6 +382,7 @@ int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx,
void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb,
struct cx_entity *cx,
struct classifier_entity *gc,
int inst,
struct nas_priv *gpriv)
{
//---------------------------------------------------------------------------
......
......@@ -96,7 +96,7 @@ void nas_COMMON_receive(unsigned short dlen,
*/
void nas_COMMON_QOS_send(struct sk_buff *skb,
struct cx_entity *cx,
struct classifier_entity *gc,int inst);
struct classifier_entity *gc,int inst, struct nas_priv *gpriv);
/**
\fn void nas_COMMON_del_send(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst)
......@@ -108,7 +108,7 @@ void nas_COMMON_QOS_send(struct sk_buff *skb,
*/
void nas_COMMON_del_send(struct sk_buff *skb,
struct cx_entity *cx,
struct classifier_entity *gc,int inst);
struct classifier_entity *gc,int inst, struct nas_priv *gpriv);
#ifndef PDCP_USE_NETLINK
/**
......@@ -195,19 +195,18 @@ void nas_mesh_init(int inst //!< Instance ID
);
void nas_mesh_timer(unsigned long data,
struct nas_priv *gpriv);
void nas_mesh_timer(unsigned long data);
int nas_mesh_DC_receive(struct cx_entity *cx,struct nas_priv *gpriv);
int nas_mesh_GC_receive(struct nas_priv *gpriv);
int nas_mesh_DC_send_cx_establish_request(struct cx_entity *cx,struct nas_priv *gpriv);
int nas_mesh_DC_send_cx_release_request(struct cx_entity *cx,struct nas_priv *gpriv);
void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,struct nas_priv *gpriv);
void nas_mesh_DC_send_sig_data_request(struct sk_buff *skb, struct cx_entity *cx, struct classifier_entity *gc,int inst, struct nas_priv *gpriv);
// iocontrol.c
void nas_CTL_send(struct sk_buff *skb,
struct cx_entity *cx,
struct classifier_entity *gc);
struct classifier_entity *gc,int inst, struct nas_priv *gpriv);
//int nas_CTL_receive_authentication(struct ipv6hdr *iph, struct cx-entity *cx, unsigned char sapi);
int nas_CTL_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd);
......
......@@ -123,9 +123,7 @@ skb_p->mark = rb_idP;
// LG TEST skb_p->ip_summed = CHECKSUM_NONE;
skb_p->ip_summed = CHECKSUM_UNNECESSARY;
ipv_p = (struct ipversion*)((void*)&(skb_p->data[hard_header_len]));
ipv_p = (ipversion_t *)((void *)&(skb_p->data[hard_header_len]));
switch (ipv_p->version) {
......
......@@ -243,7 +243,11 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
// End debug information
netif_stop_queue(dev_pP);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev_pP);
#else
dev_pP->trans_start = jiffies;
#endif
#ifdef OAI_DRV_DEBUG_DEVICE
printk("[UE_IP_DRV][%s] step 1\n", __FUNCTION__);
#endif
......@@ -315,7 +319,11 @@ void ue_ip_tx_timeout(struct net_device *dev_pP)
printk("[UE_IP_DRV][%s] begin\n", __FUNCTION__);
// (ue_ip_priv_t *)(dev_pP->priv_p)->stats.tx_errors++;
(priv_p->stats).tx_errors++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
netif_trans_update(dev_pP);
#else
dev_pP->trans_start = jiffies;
#endif
netif_wake_queue(dev_pP);
printk("[UE_IP_DRV][%s] transmit timed out %s\n", __FUNCTION__,dev_pP->name);
}
......
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