//--------------------------------------------------------------------------- void nasmt_COMMON_QOS_receive(struct nlmsghdr *nlh) { //--------------------------------------------------------------------------- struct pdcp_data_ind_header_t *pdcph; // Start debug information #ifdef NAS_DEBUG_RECEIVE printk("nasmt_COMMON_QOS_receive - begin \n"); #endif if (!nlh) { printk("nasmt_COMMON_QOS_receive - input parameter nlh is NULL \n"); return; } // End debug information pdcph = (struct pdcp_data_ind_header_t *)NLMSG_DATA(nlh); #ifdef NAS_DEBUG_RECEIVE printk("nasmt_COMMON_QOS_receive - receive from PDCP, size %d, rab %d\\n", pdcph->data_size, pdcph->rb_id); #endif //NAS_DEBUG_RECEIVE //void nasmt_COMMON_receive(uint16_t bytes_read, uint16_t payload_length, void *data_buffer, int rb_id, int sap); nasmt_COMMON_receive(NAS_PDCPH_SIZE + pdcph->data_size, pdcph->data_size, (unsigned char *)NLMSG_DATA(nlh) + NAS_PDCPH_SIZE, pdcph->rb_id, 0); }
//--------------------------------------------------------------------------- void nasmt_COMMON_QOS_receive(struct cx_entity *cx){ //--------------------------------------------------------------------------- u8 sapi; struct pdcp_data_ind pdcph; // Start debug information #ifdef GRAAL_DEBUG_RECEIVE printk("nasmt_COMMON_QOS_receive - begin \n"); #endif if (!cx){ printk("nasmt_COMMON_QOS_receive - input parameter cx is NULL \n"); return; } // End debug information // LG force the use of only 1 rt fifo sapi = GRAAL_CO_OUTPUT_SAPI; // LG for (sapi = GRAAL_CO_OUTPUT_SAPI; sapi <= GRAAL_BA_OUTPUT_SAPI; ++sapi) { bytes_read = rtf_get(gpriv->sap[sapi], &pdcph, NAS_PDCPH_SIZE); while (bytes_read>0) { if (bytes_read != NAS_PDCPH_SIZE) { printk("nasmt_COMMON_QOS_receive: problem while reading PDCP header\n"); return; } nasmt_COMMON_receive(NAS_PDCPH_SIZE, pdcph.data_size, gpriv->sap[sapi]); bytes_read = rtf_get(gpriv->sap[sapi], &pdcph, NAS_PDCPH_SIZE); } } #ifdef GRAAL_DEBUG_RECEIVE printk("nasmt_COMMON_QOS_receive - end \n"); #endif }
//--------------------------------------------------------------------------- void nasmt_COMMON_QOS_receive(struct cx_entity *cx) { //--------------------------------------------------------------------------- uint8_t sapi; //struct pdcp_data_ind pdcph; struct pdcp_data_ind_header_t pdcph; int bytes_read = 0; // Start debug information #ifdef NAS_DEBUG_RECEIVE printk("nasmt_COMMON_QOS_receive - begin \n"); #endif if (!cx) { printk("nasmt_COMMON_QOS_receive - input parameter cx is NULL \n"); return; } // End debug information // LG force the use of only 1 rt fifo sapi = NAS_DRB_OUTPUT_SAPI; bytes_read = rtf_get(gpriv->sap[sapi], &pdcph, NAS_PDCPH_SIZE); while (bytes_read>0) { if (bytes_read != NAS_PDCPH_SIZE) { printk("nasmt_COMMON_QOS_receive: problem while reading PDCP header\n"); return; } //void nasmt_COMMON_receive(uint16_t bytes_read, uint16_t payload_length, void *data_buffer, int rb_id, int sap); // data_buffer is NULL because FIFO should be read directly in the skbuff (LITE has an intermediary buffer) nasmt_COMMON_receive(NAS_PDCPH_SIZE, pdcph.data_size, NULL, pdcph->rb_id, gpriv->sap[sapi]); // check if another frame is in the FIFO, otherwise return bytes_read = rtf_get(gpriv->sap[sapi], &pdcph, NAS_PDCPH_SIZE); } #ifdef NAS_DEBUG_RECEIVE printk("nasmt_COMMON_QOS_receive - end \n"); #endif }