//void interrupt(void){ void *nas_interrupt(void){ //--------------------------------------------------------------------------- u8 cxi; // struct nas_priv *priv=netdev_priv(dev_id); // unsigned int flags; // priv->lock = SPIN_LOCK_UNLOCKED; #ifdef DEBUG_INTERRUPT printk("INTERRUPT - begin\n"); #endif // spin_lock_irqsave(&priv->lock,flags); cxi=0; // mesh_GC_receive(); // mesh_DC_receive(naspriv->cx+cxi); #ifndef NAS_NETLINK nas_COMMON_QOS_receive(); #endif // spin_unlock_irqrestore(&priv->lock,flags); #ifdef DEBUG_INTERRUPT printk("INTERRUPT: end\n"); #endif // return 0; }
// This can also be implemented using thread to get the data from PDCP without blocking. static void nas_nl_data_ready (struct sk_buff *skb) { // wake_up_interruptible(skb->sk->sk_sleep); //nasmesh_lock(); //netlink_rcv_skb(skb, &my_rcv_msg);// my_rcv_msg is the call back func> //nasmesh_unlock(); struct nlmsghdr *nlh = NULL; int j; if (skb) { #ifdef NETLINK_DEBUG printk("[NAS][NETLINK] Received socket from PDCP\n"); #endif //NETLINK_DEBUG nlh = (struct nlmsghdr *)skb->data; nas_COMMON_QOS_receive(nlh); //kfree_skb(skb); // not required, } }