--- zzzz-none-000/linux-5.15.111/drivers/net/ppp/ppp_generic.c 2023-05-11 14:00:40.000000000 +0000 +++ puma7-arm-6670-761/linux-5.15.111/drivers/net/ppp/ppp_generic.c 2024-02-07 09:27:53.000000000 +0000 @@ -17,6 +17,10 @@ * * ==FILEVERSION 20041108== */ +/* + * Includes Intel Corporation's changes/modifications dated: [11/07/2011]. +* Changed/modified portions - Copyright © [2011], Intel Corporation. +*/ #include #include @@ -94,6 +98,10 @@ #define PF_TO_PPP(pf) PF_TO_X(pf, struct ppp) #define PF_TO_CHANNEL(pf) PF_TO_X(pf, struct channel) +#ifdef CONFIG_TI_PACKET_PROCESSOR +extern int ti_pp_ppp_vpid_info; +extern int ti_pp_ppp_sid; +#endif /* * Data structure to hold primary network stats for which * we want to use 64 bit storage. Other network stats @@ -3318,6 +3326,9 @@ struct net_device *dev; struct ppp *ppp; int err; +#ifdef CONFIG_TI_PACKET_PROCESSOR + int ti_pp_save_dev_padded = 0; +#endif dev = alloc_netdev(sizeof(struct ppp), "", NET_NAME_ENUM, ppp_setup); if (!dev) { @@ -3333,8 +3344,31 @@ if (err < 0) goto err_dev; ppp = netdev_priv(dev); +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Inheritance at work here. We copy the VPID Information block from the parent device + * to the new PPP Device. */ + memcpy((void *)&dev->vpid_block, (void *)ti_pp_ppp_vpid_info,sizeof(TI_PP_VPID)); + ti_pp_ppp_vpid_info = 0; +#endif //CONFIG_TI_PACKET_PROCESSOR *unit = ppp->file.index; +#ifdef CONFIG_TI_PACKET_PROCESSOR + /* Save the dev->padded temporarily while we overwrite with PPP Session + * ID and send to HIL PP. */ + ti_pp_save_dev_padded = dev->padded; + + /* Send an event to HIL PP indicating that a new PPP interface is + * being created. The HIL PP could use this info to create a VPID + * and maintain an association between the PP session and VPID data + * structures and the PPP interface */ + dev->padded = ti_pp_ppp_sid; + ti_hil_pp_event(TI_PPP_INTERFACE_CREATED, (void *)dev); + ti_pp_ppp_sid = 0; + + /* Restore the dev->padded to what we had saved. */ + dev->padded = ti_pp_save_dev_padded; +#endif //CONFIG_TI_PACKET_PROCESSOR + rtnl_unlock(); return 0;