Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135387
b: refs/heads/master
c: c279b8c
h: refs/heads/master
i:
  135385: 129d843
  135383: 450e72a
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Mar 22, 2009
1 parent 2f876f8 commit 16b4e21
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: 4113a1a672e5b3f03fc99e7240d4c47e689af2c6
refs/heads/master: c279b8c996e99a3fca7806986415263f840b2fa1
23 changes: 17 additions & 6 deletions trunk/drivers/net/irda/nsc-ircc.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,20 @@ static void __exit nsc_ircc_cleanup(void)
pnp_registered = 0;
}

static const struct net_device_ops nsc_ircc_sir_ops = {
.ndo_open = nsc_ircc_net_open,
.ndo_stop = nsc_ircc_net_close,
.ndo_start_xmit = nsc_ircc_hard_xmit_sir,
.ndo_do_ioctl = nsc_ircc_net_ioctl,
};

static const struct net_device_ops nsc_ircc_fir_ops = {
.ndo_open = nsc_ircc_net_open,
.ndo_stop = nsc_ircc_net_close,
.ndo_start_xmit = nsc_ircc_hard_xmit_fir,
.ndo_do_ioctl = nsc_ircc_net_ioctl,
};

/*
* Function nsc_ircc_open (iobase, irq)
*
Expand Down Expand Up @@ -441,10 +455,7 @@ static int __init nsc_ircc_open(chipio_t *info)
self->tx_fifo.tail = self->tx_buff.head;

/* Override the network functions we need to use */
dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
dev->open = nsc_ircc_net_open;
dev->stop = nsc_ircc_net_close;
dev->do_ioctl = nsc_ircc_net_ioctl;
dev->netdev_ops = &nsc_ircc_sir_ops;

err = register_netdev(dev);
if (err) {
Expand Down Expand Up @@ -1320,12 +1331,12 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)
switch_bank(iobase, BANK0);
if (speed > 115200) {
/* Install FIR xmit handler */
dev->hard_start_xmit = nsc_ircc_hard_xmit_fir;
dev->netdev_ops = &nsc_ircc_fir_ops;
ier = IER_SFIF_IE;
nsc_ircc_dma_receive(self);
} else {
/* Install SIR xmit handler */
dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
dev->netdev_ops = &nsc_ircc_sir_ops;
ier = IER_RXHDL_IE;
}
/* Set our current interrupt mask */
Expand Down

0 comments on commit 16b4e21

Please sign in to comment.