//--------------------------------------------------------------------------- void nasrg_teardown(struct net_device *dev) { //--------------------------------------------------------------------------- int cxi; #ifndef PDCP_USE_NETLINK struct nas_priv *priv = netdev_priv(dev); #endif //PDCP_USE_NETLINK printk("nasrg_teardown: begin\n"); if (dev) { #ifndef PDCP_USE_NETLINK if (priv->irq!=-EBUSY) { *pt_nas_rg_irq=-1; rt_free_srq(priv->irq); } #endif //PDCP_USE_NETLINK #ifdef PDCP_USE_NETLINK nasrg_netlink_release(); #endif //PDCP_USE_NETLINK // for (sapi=0; sapi<NAS_SAPI_MAX; ++sapi) // close(priv->sap[sapi]); nasrg_CLASS_flush_rclassifier(); nasrg_CLASS_flush_mbmsclassifier(); for (cxi=0; cxi<NAS_CX_MAX; ++cxi) { nasrg_COMMON_flush_rb(gpriv->cx+cxi); nasrg_CLASS_flush_sclassifier(gpriv->cx+cxi); //for (sapi=0; sapi<NAS_SAPI_CX_MAX; ++sapi) // close(priv->cx[cxi].sap[sapi]); } } // check dev else { printk("nasmt_teardown: Device is null\n"); } printk("nasrg_teardown: end\n"); }
//--------------------------------------------------------------------------- // Decode CONN_RELEASE_IND message from RRC void nasrg_ASCTL_DC_decode_cx_release_ind(struct cx_entity *cx, struct nas_rg_dc_element *p){ //--------------------------------------------------------------------------- // Start debug information #ifdef GRAAL_DEBUG_DC printk("nasrg_ASCTL_DC_decode_cx_release - begin \n"); #endif if (!cx || !p){ printk("nasrg_ASCTL_DC_decode_cx_release - input parameter is NULL \n"); return; } // End debug information cx->state=GRAAL_IDLE; cx->iid4=0; nasrg_TOOL_imei2iid(GRAAL_NULL_IMEI, (u8 *)cx->iid6); nasrg_COMMON_flush_rb(cx); nasrg_CLASS_flush_sclassifier(cx); #ifdef GRAAL_DEBUG_DC printk("nasrg_ASCTL_DC_decode_cx_release: CONN_RELEASE_IND reception\n"); printk(" Primitive length %u\n",p->length); printk(" Local Connection reference %u\n",p->nasRGDCPrimitive.conn_release_ind.localConnectionRef); printk(" Release cause %u\n",p->nasRGDCPrimitive.conn_release_ind.releaseCause); nasrg_TOOL_print_state(cx->state); #endif }