aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-atm
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>2018-06-18 18:01:07 +0000
committerJohn Crispin <john@phrozen.org>2018-06-18 21:47:05 +0200
commit83f31b794737adff3604474f0d09135fb3359ee5 (patch)
treeddc913b2f706fbdc114ead2c73a9c46ad0297a37 /package/kernel/lantiq/ltq-atm
parent591780615b304fb4624e363135942e9ee8f6caa3 (diff)
downloadupstream-83f31b794737adff3604474f0d09135fb3359ee5.tar.gz
upstream-83f31b794737adff3604474f0d09135fb3359ee5.tar.bz2
upstream-83f31b794737adff3604474f0d09135fb3359ee5.zip
ltq_atm: burn ifx_atm_alloc_tx with fire
Drop code that was never used. Tested on: BT HomeHub 5a Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Diffstat (limited to 'package/kernel/lantiq/ltq-atm')
-rw-r--r--package/kernel/lantiq/ltq-atm/src/ltq_atm.c45
1 files changed, 1 insertions, 44 deletions
diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index a8f787fdca..b7ac81ca80 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -187,7 +187,6 @@ static inline void u64_add_u32(ppe_u64_t, unsigned int, ppe_u64_t *);
*/
static inline struct sk_buff* alloc_skb_rx(void);
static inline struct sk_buff* alloc_skb_tx(unsigned int);
-struct sk_buff* atm_alloc_tx(struct atm_vcc *, unsigned int);
static inline void atm_free_tx_skb_vcc(struct sk_buff *, struct atm_vcc *);
static inline struct sk_buff *get_skb_rx_pointer(unsigned int);
static inline int get_tx_desc(unsigned int);
@@ -261,8 +260,6 @@ EXPORT_SYMBOL(ifx_mei_atm_showtime_exit);
#endif
-static struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
-
static struct atm_priv_data g_atm_priv_data;
static struct atmdev_ops g_ifx_atm_ops = {
@@ -430,8 +427,6 @@ static int ppe_open(struct atm_vcc *vcc)
/* enable irq */
if ( f_enable_irq ) {
- ifx_atm_alloc_tx = atm_alloc_tx;
-
*MBOX_IGU1_ISRC = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
*MBOX_IGU1_IER = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
@@ -480,10 +475,8 @@ static void ppe_close(struct atm_vcc *vcc)
clear_bit(conn, &g_atm_priv_data.conn_table);
/* disable irq */
- if ( g_atm_priv_data.conn_table == 0 ) {
+ if ( g_atm_priv_data.conn_table == 0 )
disable_irq(PPE_MAILBOX_IGU1_INT);
- ifx_atm_alloc_tx = NULL;
- }
/* release bandwidth */
switch ( vcc->qos.txtp.traffic_class )
@@ -785,42 +778,6 @@ static inline struct sk_buff* alloc_skb_tx(unsigned int size)
return skb;
}
-struct sk_buff* atm_alloc_tx(struct atm_vcc *vcc, unsigned int size)
-{
- int conn;
- struct sk_buff *skb;
-
- /* oversize packet */
- if ( size > aal5s_max_packet_size ) {
- pr_err("atm_alloc_tx: oversize packet\n");
- return NULL;
- }
- /* send buffer overflow */
- if ( sk_wmem_alloc_get(sk_atm(vcc)) && !atm_may_send(vcc, size) ) {
- pr_err("atm_alloc_tx: send buffer overflow\n");
- return NULL;
- }
- conn = find_vcc(vcc);
- if ( conn < 0 ) {
- pr_err("atm_alloc_tx: unknown VCC\n");
- return NULL;
- }
-
- skb = dev_alloc_skb(size);
- if ( skb == NULL ) {
- pr_err("atm_alloc_tx: sk buffer is used up\n");
- return NULL;
- }
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
- refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-#else
- atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
-#endif
-
- return skb;
-}
-
static inline void atm_free_tx_skb_vcc(struct sk_buff *skb, struct atm_vcc *vcc)
{
if ( vcc->pop != NULL )