Fixed bug that u-plane is not transferred with multiple UEs
This commit is contained in:
@@ -304,7 +304,16 @@ ue_ip_common_ip2wireless(
|
||||
if (dst_addr) {
|
||||
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
|
||||
}
|
||||
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
|
||||
#ifdef UESIM_EXPANSION
|
||||
if ((src_addr[3] - 1)> instP) {
|
||||
pdcph.inst = src_addr[3] - 1;
|
||||
printk("[UE_IP_DRV] change INST from %d to %d\n",instP, pdcph.inst);
|
||||
instP = src_addr[3] - 1;
|
||||
priv_p=netdev_priv(ue_ip_dev[instP]);
|
||||
}
|
||||
#endif
|
||||
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
|
||||
//get Ipv4 address and pass to PCDP header
|
||||
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
|
||||
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
|
||||
|
||||
@@ -61,7 +61,7 @@ int ue_ip_find_inst(struct net_device *dev_pP)
|
||||
//---------------------------------------------------------------------------
|
||||
int i;
|
||||
|
||||
for (i=0; i<UE_IP_NB_INSTANCES_MAX; i++)
|
||||
for (i=1; i<=UE_IP_NB_INSTANCES_MAX; i++)
|
||||
if (ue_ip_dev[i] == dev_pP) {
|
||||
return(i);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ void ue_ip_teardown(struct net_device *dev_pP)
|
||||
priv_p = netdev_priv(dev_pP);
|
||||
inst = ue_ip_find_inst(dev_pP);
|
||||
|
||||
if ((inst<0) || (inst>=UE_IP_NB_INSTANCES_MAX)) {
|
||||
if ((inst<=0) || (inst>UE_IP_NB_INSTANCES_MAX)) {
|
||||
printk("[UE_IP_DRV][%s] ERROR, couldn't find instance\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
@@ -243,7 +243,7 @@ int ue_ip_hard_start_xmit(struct sk_buff *skb_pP, struct net_device *dev_pP)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((inst>=0) && (inst<UE_IP_NB_INSTANCES_MAX)) {
|
||||
if ((inst>0) && (inst<=UE_IP_NB_INSTANCES_MAX)) {
|
||||
#ifdef OAI_DRV_OAI_DRV_DEBUG_DEVICE
|
||||
printk("[UE_IP_DRV][%s] inst %d, begin\n", __FUNCTION__,inst);
|
||||
#endif
|
||||
@@ -392,7 +392,7 @@ int init_module (void)
|
||||
// Initialize parameters shared with RRC
|
||||
printk("[UE_IP_DRV][%s] Starting OAI IP driver", __FUNCTION__);
|
||||
|
||||
for (inst=0; inst<UE_IP_NB_INSTANCES_MAX; inst++) {
|
||||
for (inst=1; inst<=UE_IP_NB_INSTANCES_MAX; inst++) {
|
||||
printk("[UE_IP_DRV][%s] begin init instance %d\n", __FUNCTION__,inst);
|
||||
sprintf(devicename,"oip%d",inst);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
|
||||
@@ -434,7 +434,7 @@ void cleanup_module(void)
|
||||
|
||||
printk("[UE_IP_DRV][CLEANUP] begin\n");
|
||||
|
||||
for (inst=0; inst<UE_IP_NB_INSTANCES_MAX; inst++) {
|
||||
for (inst=1; inst<=UE_IP_NB_INSTANCES_MAX; inst++) {
|
||||
#ifdef OAI_DRV_DEBUG_DEVICE
|
||||
printk("[UE_IP_DRV][CLEANUP] unregister and free net device instance %d\n",inst);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user