|
@@ -159,7 +159,6 @@ struct n_hdlc {
|
|
/*
|
|
/*
|
|
* HDLC buffer list manipulation functions
|
|
* HDLC buffer list manipulation functions
|
|
*/
|
|
*/
|
|
-static void n_hdlc_buf_list_init(struct n_hdlc_buf_list *list);
|
|
|
|
static void n_hdlc_buf_put(struct n_hdlc_buf_list *list,
|
|
static void n_hdlc_buf_put(struct n_hdlc_buf_list *list,
|
|
struct n_hdlc_buf *buf);
|
|
struct n_hdlc_buf *buf);
|
|
static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *list);
|
|
static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *list);
|
|
@@ -853,10 +852,10 @@ static struct n_hdlc *n_hdlc_alloc(void)
|
|
if (!n_hdlc)
|
|
if (!n_hdlc)
|
|
return NULL;
|
|
return NULL;
|
|
|
|
|
|
- n_hdlc_buf_list_init(&n_hdlc->rx_free_buf_list);
|
|
|
|
- n_hdlc_buf_list_init(&n_hdlc->tx_free_buf_list);
|
|
|
|
- n_hdlc_buf_list_init(&n_hdlc->rx_buf_list);
|
|
|
|
- n_hdlc_buf_list_init(&n_hdlc->tx_buf_list);
|
|
|
|
|
|
+ spin_lock_init(&n_hdlc->rx_free_buf_list.spinlock);
|
|
|
|
+ spin_lock_init(&n_hdlc->tx_free_buf_list.spinlock);
|
|
|
|
+ spin_lock_init(&n_hdlc->rx_buf_list.spinlock);
|
|
|
|
+ spin_lock_init(&n_hdlc->tx_buf_list.spinlock);
|
|
|
|
|
|
/* allocate free rx buffer list */
|
|
/* allocate free rx buffer list */
|
|
for(i=0;i<DEFAULT_RX_BUF_COUNT;i++) {
|
|
for(i=0;i<DEFAULT_RX_BUF_COUNT;i++) {
|
|
@@ -884,16 +883,6 @@ static struct n_hdlc *n_hdlc_alloc(void)
|
|
|
|
|
|
} /* end of n_hdlc_alloc() */
|
|
} /* end of n_hdlc_alloc() */
|
|
|
|
|
|
-/**
|
|
|
|
- * n_hdlc_buf_list_init - initialize specified HDLC buffer list
|
|
|
|
- * @list - pointer to buffer list
|
|
|
|
- */
|
|
|
|
-static void n_hdlc_buf_list_init(struct n_hdlc_buf_list *list)
|
|
|
|
-{
|
|
|
|
- memset(list, 0, sizeof(*list));
|
|
|
|
- spin_lock_init(&list->spinlock);
|
|
|
|
-} /* end of n_hdlc_buf_list_init() */
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* n_hdlc_buf_put - add specified HDLC buffer to tail of specified list
|
|
* n_hdlc_buf_put - add specified HDLC buffer to tail of specified list
|
|
* @list - pointer to buffer list
|
|
* @list - pointer to buffer list
|