aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/hostess_sv11.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-05-12 06:29:11 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-12 06:29:11 -0400
commit4951704b4e23d71b99ac933d8e6993bc6225ac13 (patch)
treeafcc69d6ec071f5d0bb19517635e9b3cf8f668ba /drivers/net/wan/hostess_sv11.c
parentc4492586a618d18e8a5343a04bad0ec606064846 (diff)
syncppp: Fix crashes.
The syncppp layer wants a mid-level netdev private pointer. It was using netdev->priv but that only worked by accident, and thus this scheme was broken when the device private allocation strategy changed. Add a proper mid-layer private pointer for uses like this, update syncppp and all users, and remove the HDLC_PPP broken tag from drivers/net/wan/Kconfig Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan/hostess_sv11.c')
-rw-r--r--drivers/net/wan/hostess_sv11.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
index 83dbc924fcb..f3065d3473f 100644
--- a/drivers/net/wan/hostess_sv11.c
+++ b/drivers/net/wan/hostess_sv11.c
@@ -75,7 +75,7 @@ static void hostess_input(struct z8530_channel *c, struct sk_buff *skb)
75 75
76static int hostess_open(struct net_device *d) 76static int hostess_open(struct net_device *d)
77{ 77{
78 struct sv11_device *sv11=d->priv; 78 struct sv11_device *sv11=d->ml_priv;
79 int err = -1; 79 int err = -1;
80 80
81 /* 81 /*
@@ -128,7 +128,7 @@ static int hostess_open(struct net_device *d)
128 128
129static int hostess_close(struct net_device *d) 129static int hostess_close(struct net_device *d)
130{ 130{
131 struct sv11_device *sv11=d->priv; 131 struct sv11_device *sv11=d->ml_priv;
132 /* 132 /*
133 * Discard new frames 133 * Discard new frames
134 */ 134 */
@@ -159,14 +159,14 @@ static int hostess_close(struct net_device *d)
159 159
160static int hostess_ioctl(struct net_device *d, struct ifreq *ifr, int cmd) 160static int hostess_ioctl(struct net_device *d, struct ifreq *ifr, int cmd)
161{ 161{
162 /* struct sv11_device *sv11=d->priv; 162 /* struct sv11_device *sv11=d->ml_priv;
163 z8530_ioctl(d,&sv11->sync.chanA,ifr,cmd) */ 163 z8530_ioctl(d,&sv11->sync.chanA,ifr,cmd) */
164 return sppp_do_ioctl(d, ifr,cmd); 164 return sppp_do_ioctl(d, ifr,cmd);
165} 165}
166 166
167static struct net_device_stats *hostess_get_stats(struct net_device *d) 167static struct net_device_stats *hostess_get_stats(struct net_device *d)
168{ 168{
169 struct sv11_device *sv11=d->priv; 169 struct sv11_device *sv11=d->ml_priv;
170 if(sv11) 170 if(sv11)
171 return z8530_get_stats(&sv11->sync.chanA); 171 return z8530_get_stats(&sv11->sync.chanA);
172 else 172 else
@@ -179,7 +179,7 @@ static struct net_device_stats *hostess_get_stats(struct net_device *d)
179 179
180static int hostess_queue_xmit(struct sk_buff *skb, struct net_device *d) 180static int hostess_queue_xmit(struct sk_buff *skb, struct net_device *d)
181{ 181{
182 struct sv11_device *sv11=d->priv; 182 struct sv11_device *sv11=d->ml_priv;
183 return z8530_queue_xmit(&sv11->sync.chanA, skb); 183 return z8530_queue_xmit(&sv11->sync.chanA, skb);
184} 184}
185 185
@@ -325,6 +325,7 @@ static struct sv11_device *sv11_init(int iobase, int irq)
325 /* 325 /*
326 * Initialise the PPP components 326 * Initialise the PPP components
327 */ 327 */
328 d->ml_priv = sv;
328 sppp_attach(&sv->netdev); 329 sppp_attach(&sv->netdev);
329 330
330 /* 331 /*
@@ -333,7 +334,6 @@ static struct sv11_device *sv11_init(int iobase, int irq)
333 334
334 d->base_addr = iobase; 335 d->base_addr = iobase;
335 d->irq = irq; 336 d->irq = irq;
336 d->priv = sv;
337 337
338 if(register_netdev(d)) 338 if(register_netdev(d))
339 { 339 {