/* This routine is called when a Clear Request is needed outside of the context of a connected socket.  */
void rose_transmit_clear_request(struct rose_neigh *neigh, unsigned int lci, unsigned char cause, unsigned char diagnostic)
/* This routine is called when a Clear Request is needed outside of the context of a connected socket.  */
void rose_transmit_clear_request(struct rose_neigh *neigh, unsigned int lci, unsigned char cause, unsigned char diagnostic)
{
	struct sk_buff *skb;
	unsigned char *dptr;
	int len;
	len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 3;
	if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)
		return;
	skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN);
	dptr = skb_put(skb, ROSE_MIN_LEN + 3);
	*dptr++ = AX25_P_ROSE;
	*dptr++ = ((lci >> 8) & 0x0F) | ROSE_GFI;
	*dptr++ = ((lci >> 0) & 0xFF);
	*dptr++ = ROSE_CLEAR_REQUEST;
	*dptr++ = cause;
	*dptr++ = diagnostic;
	if (!rose_send_frame(skb, neigh))
		kfree_skb(skb);
}