Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135388
b: refs/heads/master
c: 2d44a22
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent 16b4e21 commit a0ee3b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c279b8c996e99a3fca7806986415263f840b2fa1
refs/heads/master: 2d44a22254c1c4ad35a58e6d9d15a547d8841efc
23 changes: 17 additions & 6 deletions trunk/drivers/net/irda/ali-ircc.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,20 @@ static void __exit ali_ircc_cleanup(void)
IRDA_DEBUG(2, "%s(), ----------------- End -----------------\n", __func__);
}

static const struct net_device_ops ali_ircc_sir_ops = {
.ndo_open = ali_ircc_net_open,
.ndo_stop = ali_ircc_net_close,
.ndo_start_xmit = ali_ircc_sir_hard_xmit,
.ndo_do_ioctl = ali_ircc_net_ioctl,
};

static const struct net_device_ops ali_ircc_fir_ops = {
.ndo_open = ali_ircc_net_open,
.ndo_stop = ali_ircc_net_close,
.ndo_start_xmit = ali_ircc_fir_hard_xmit,
.ndo_do_ioctl = ali_ircc_net_ioctl,
};

/*
* Function ali_ircc_open (int i, chipio_t *inf)
*
Expand Down Expand Up @@ -361,10 +375,7 @@ static int ali_ircc_open(int i, chipio_t *info)
self->tx_fifo.tail = self->tx_buff.head;

/* Override the network functions we need to use */
dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
dev->open = ali_ircc_net_open;
dev->stop = ali_ircc_net_close;
dev->do_ioctl = ali_ircc_net_ioctl;
dev->netdev_ops = &ali_ircc_sir_ops;

err = register_netdev(dev);
if (err) {
Expand Down Expand Up @@ -974,7 +985,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
ali_ircc_fir_change_speed(self, baud);

/* Install FIR xmit handler*/
dev->hard_start_xmit = ali_ircc_fir_hard_xmit;
dev->netdev_ops = &ali_ircc_fir_ops;

/* Enable Interuupt */
self->ier = IER_EOM; // benjamin 2000/11/20 07:24PM
Expand All @@ -988,7 +999,7 @@ static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud)
ali_ircc_sir_change_speed(self, baud);

/* Install SIR xmit handler*/
dev->hard_start_xmit = ali_ircc_sir_hard_xmit;
dev->netdev_ops = &ali_ircc_sir_ops;
}


Expand Down

0 comments on commit a0ee3b1

Please sign in to comment.