Ejemplo n.º 1
0
//---------------------------------------------------------------------------
//void nasmt_interrupt(void){
void *nasmt_interrupt(void){
//---------------------------------------------------------------------------
  uint8_t cxi;
  char *buffer = NULL;
#ifdef NAS_DEBUG_INTERRUPT
  printk("nasmt_interrupt - begin\n");
#endif
  //spin_lock(&gpriv->lock);
  cxi=0;
  nasmt_COMMON_QOS_receive(gpriv->cx+cxi);
  nasmt_ASCTL_GC_receive(buffer);
  nasmt_ASCTL_DC_receive(gpriv->cx+cxi, buffer);
  //spin_unlock(&gpriv->lock);
#ifdef NAS_DEBUG_INTERRUPT
  printk("nasmt_interrupt: end\n");
#endif
}
//---------------------------------------------------------------------------
//  Function for transfer with RRC
static void nasmt_rrcnl_data_ready (struct sk_buff *skb)
{
  //---------------------------------------------------------------------------
  struct nlmsghdr *nlh = NULL;
  char target_sap;
  uint8_t cxi = 0;

  // Start debug information
#ifdef NAS_DEBUG_RRCNL
  printk("nasmt_rrcnl_data_ready - begin \n");
#endif

  if (!skb) {
    printk("nasmt_rrcnl_data_ready - input parameter skb is NULL \n");
    return;
  }

  // End debug information

  nlh = (struct nlmsghdr *)skb->data;
  //pdcph = (struct pdcp_data_ind_header_t *)NLMSG_DATA(nlh);
  //nasmt_TOOL_print_buffer((char *)NLMSG_DATA(nlh), 48);

  target_sap = ((char*)NLMSG_DATA(nlh))[0];
#ifdef NAS_DEBUG_RRCNL
  printk("nasmt_rrcnl_data_ready - Received on socket from RRC, SAP %d\n", target_sap);
#endif //NAS_DEBUG_RRCNL

  switch (target_sap) {
  case RRC_NAS_GC_OUT:
    //printk("nasmt_rrcnl_data_ready - Calling  nasmt_ASCTL_GC_receive\n");
    nasmt_ASCTL_GC_receive(&((char*)NLMSG_DATA(nlh))[1]);
    break;

  case RRC_NAS_DC0_OUT:
    //printk("nasmt_rrcnl_data_ready - Calling  nasmt_ASCTL_DC_receive\n");
    nasmt_ASCTL_DC_receive(gpriv->cx+cxi, &((char*)NLMSG_DATA(nlh))[1]);
    break;

  default:
    printk("nasmt_rrcnl_data_ready - Invalid SAP value received\n");
  }

}