Lines Matching refs:sh
108 static int shaper_lock(struct shaper *sh) in shaper_lock() argument
113 while (test_and_set_bit(0, &sh->locked)) in shaper_lock()
116 sleep_on(&sh->wait_queue); in shaper_lock()
124 static void shaper_kick(struct shaper *sh);
126 static void shaper_unlock(struct shaper *sh) in shaper_unlock() argument
128 clear_bit(0, &sh->locked); in shaper_unlock()
129 wake_up(&sh->wait_queue); in shaper_unlock()
130 shaper_kick(sh); in shaper_unlock()
301 struct shaper *sh=(struct shaper *)data; in shaper_timer() local
302 shaper_kick(sh); in shaper_timer()
433 struct shaper *sh=dev->priv; in shaper_start_xmit() local
434 return shaper_qframe(sh, skb); in shaper_start_xmit()
439 struct shaper *sh=dev->priv; in shaper_get_stats() local
440 return &sh->stats; in shaper_get_stats()
446 struct shaper *sh=dev->priv; in shaper_header() local
450 skb->dev=sh->dev; in shaper_header()
451 v=sh->hard_header(skb,sh->dev,type,daddr,saddr,len); in shaper_header()
458 struct shaper *sh=skb->dev->priv; in shaper_rebuild_header() local
463 skb->dev=sh->dev; in shaper_rebuild_header()
464 v=sh->rebuild_header(skb); in shaper_rebuild_header()
472 struct shaper *sh=neigh->dev->priv;
478 neigh->dev=sh->dev;
479 ret=sh->hard_header_cache(neigh,hh);
487 struct shaper *sh=dev->priv;
490 sh->header_cache_update(hh, sh->dev, haddr);
528 static int shaper_attach(struct net_device *shdev, struct shaper *sh, struct net_device *dev) in shaper_attach() argument
530 sh->dev = dev; in shaper_attach()
531 sh->hard_start_xmit=dev->hard_start_xmit; in shaper_attach()
532 sh->get_stats=dev->get_stats; in shaper_attach()
535 sh->hard_header=dev->hard_header; in shaper_attach()
543 sh->rebuild_header = dev->rebuild_header; in shaper_attach()
552 sh->hard_header_cache = dev->hard_header_cache; in shaper_attach()
562 sh->header_cache_update = dev->header_cache_update; in shaper_attach()
577 sh->bitspersec=0; in shaper_attach()
584 struct shaper *sh=dev->priv; in shaper_ioctl() local
599 if(sh->dev) in shaper_ioctl()
604 if(sh->dev==NULL) in shaper_ioctl()
606 strcpy(ss->ss_name, sh->dev->name); in shaper_ioctl()
609 shaper_setspeed(sh,ss->ss_speed); in shaper_ioctl()
612 ss->ss_speed=sh->bitspersec; in shaper_ioctl()
621 struct shaper *sh = dev->priv; in shaper_init_priv() local
623 skb_queue_head_init(&sh->sendq); in shaper_init_priv()
624 init_timer(&sh->timer); in shaper_init_priv()
625 sh->timer.function=shaper_timer; in shaper_init_priv()
626 sh->timer.data=(unsigned long)sh; in shaper_init_priv()
627 init_waitqueue_head(&sh->wait_queue); in shaper_init_priv()