aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/appletalk/ddp.c2
-rw-r--r--net/atm/br2684.c2
-rw-r--r--net/atm/lec.c34
-rw-r--r--net/atm/mpc.c10
-rw-r--r--net/bluetooth/bnep/core.c2
-rw-r--r--net/bluetooth/bnep/netdev.c6
-rw-r--r--net/bridge/br_if.c2
-rw-r--r--net/bridge/br_sysfs_br.c2
-rw-r--r--net/irda/irlan/irlan_common.c2
9 files changed, 32 insertions, 30 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index d3134e7e6ee8..c3f002717378 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1284,7 +1284,7 @@ static int handle_ip_over_ddp(struct sk_buff *skb)
1284 skb->dev = dev; 1284 skb->dev = dev;
1285 skb_reset_transport_header(skb); 1285 skb_reset_transport_header(skb);
1286 1286
1287 stats = dev->priv; 1287 stats = netdev_priv(dev);
1288 stats->rx_packets++; 1288 stats->rx_packets++;
1289 stats->rx_bytes += skb->len + 13; 1289 stats->rx_bytes += skb->len + 13;
1290 netif_rx(skb); /* Send the SKB up to a higher place. */ 1290 netif_rx(skb); /* Send the SKB up to a higher place. */
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 29ef8dc6921b..ea9438fc6855 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -101,7 +101,7 @@ static LIST_HEAD(br2684_devs);
101 101
102static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev) 102static inline struct br2684_dev *BRPRIV(const struct net_device *net_dev)
103{ 103{
104 return (struct br2684_dev *)net_dev->priv; 104 return (struct br2684_dev *)netdev_priv(net_dev);
105} 105}
106 106
107static inline struct net_device *list_entry_brdev(const struct list_head *le) 107static inline struct net_device *list_entry_brdev(const struct list_head *le)
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 1def62d17739..e5e301550e8a 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -152,7 +152,7 @@ static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev)
152 buff += 4; 152 buff += 4;
153 mesg->content.normal.flag = *buff & 0x01; /* 0x01 is topology change */ 153 mesg->content.normal.flag = *buff & 0x01; /* 0x01 is topology change */
154 154
155 priv = (struct lec_priv *)dev->priv; 155 priv = netdev_priv(dev);
156 atm_force_charge(priv->lecd, skb2->truesize); 156 atm_force_charge(priv->lecd, skb2->truesize);
157 sk = sk_atm(priv->lecd); 157 sk = sk_atm(priv->lecd);
158 skb_queue_tail(&sk->sk_receive_queue, skb2); 158 skb_queue_tail(&sk->sk_receive_queue, skb2);
@@ -218,7 +218,7 @@ static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc)
218 218
219static int lec_open(struct net_device *dev) 219static int lec_open(struct net_device *dev)
220{ 220{
221 struct lec_priv *priv = (struct lec_priv *)dev->priv; 221 struct lec_priv *priv = netdev_priv(dev);
222 222
223 netif_start_queue(dev); 223 netif_start_queue(dev);
224 memset(&priv->stats, 0, sizeof(struct net_device_stats)); 224 memset(&priv->stats, 0, sizeof(struct net_device_stats));
@@ -252,7 +252,7 @@ static void lec_tx_timeout(struct net_device *dev)
252static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) 252static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev)
253{ 253{
254 struct sk_buff *skb2; 254 struct sk_buff *skb2;
255 struct lec_priv *priv = (struct lec_priv *)dev->priv; 255 struct lec_priv *priv = netdev_priv(dev);
256 struct lecdatahdr_8023 *lec_h; 256 struct lecdatahdr_8023 *lec_h;
257 struct atm_vcc *vcc; 257 struct atm_vcc *vcc;
258 struct lec_arp_table *entry; 258 struct lec_arp_table *entry;
@@ -433,14 +433,14 @@ static int lec_close(struct net_device *dev)
433 */ 433 */
434static struct net_device_stats *lec_get_stats(struct net_device *dev) 434static struct net_device_stats *lec_get_stats(struct net_device *dev)
435{ 435{
436 return &((struct lec_priv *)dev->priv)->stats; 436 return &((struct lec_priv *)netdev_priv(dev))->stats;
437} 437}
438 438
439static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) 439static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
440{ 440{
441 unsigned long flags; 441 unsigned long flags;
442 struct net_device *dev = (struct net_device *)vcc->proto_data; 442 struct net_device *dev = (struct net_device *)vcc->proto_data;
443 struct lec_priv *priv = (struct lec_priv *)dev->priv; 443 struct lec_priv *priv = netdev_priv(dev);
444 struct atmlec_msg *mesg; 444 struct atmlec_msg *mesg;
445 struct lec_arp_table *entry; 445 struct lec_arp_table *entry;
446 int i; 446 int i;
@@ -580,7 +580,7 @@ static void lec_atm_close(struct atm_vcc *vcc)
580{ 580{
581 struct sk_buff *skb; 581 struct sk_buff *skb;
582 struct net_device *dev = (struct net_device *)vcc->proto_data; 582 struct net_device *dev = (struct net_device *)vcc->proto_data;
583 struct lec_priv *priv = (struct lec_priv *)dev->priv; 583 struct lec_priv *priv = netdev_priv(dev);
584 584
585 priv->lecd = NULL; 585 priv->lecd = NULL;
586 /* Do something needful? */ 586 /* Do something needful? */
@@ -711,7 +711,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
711{ 711{
712 unsigned long flags; 712 unsigned long flags;
713 struct net_device *dev = (struct net_device *)vcc->proto_data; 713 struct net_device *dev = (struct net_device *)vcc->proto_data;
714 struct lec_priv *priv = (struct lec_priv *)dev->priv; 714 struct lec_priv *priv = netdev_priv(dev);
715 715
716#if DUMP_PACKETS >0 716#if DUMP_PACKETS >0
717 int i = 0; 717 int i = 0;
@@ -858,7 +858,7 @@ static int lec_vcc_attach(struct atm_vcc *vcc, void __user *arg)
858 vpriv->old_pop = vcc->pop; 858 vpriv->old_pop = vcc->pop;
859 vcc->user_back = vpriv; 859 vcc->user_back = vpriv;
860 vcc->pop = lec_pop; 860 vcc->pop = lec_pop;
861 lec_vcc_added(dev_lec[ioc_data.dev_num]->priv, 861 lec_vcc_added(netdev_priv(dev_lec[ioc_data.dev_num]),
862 &ioc_data, vcc, vcc->push); 862 &ioc_data, vcc, vcc->push);
863 vcc->proto_data = dev_lec[ioc_data.dev_num]; 863 vcc->proto_data = dev_lec[ioc_data.dev_num];
864 vcc->push = lec_push; 864 vcc->push = lec_push;
@@ -870,7 +870,8 @@ static int lec_mcast_attach(struct atm_vcc *vcc, int arg)
870 if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg]) 870 if (arg < 0 || arg >= MAX_LEC_ITF || !dev_lec[arg])
871 return -EINVAL; 871 return -EINVAL;
872 vcc->proto_data = dev_lec[arg]; 872 vcc->proto_data = dev_lec[arg];
873 return (lec_mcast_make((struct lec_priv *)dev_lec[arg]->priv, vcc)); 873 return lec_mcast_make((struct lec_priv *)netdev_priv(dev_lec[arg]),
874 vcc);
874} 875}
875 876
876/* Initialize device. */ 877/* Initialize device. */
@@ -912,11 +913,11 @@ static int lecd_attach(struct atm_vcc *vcc, int arg)
912 return -EINVAL; 913 return -EINVAL;
913 } 914 }
914 915
915 priv = dev_lec[i]->priv; 916 priv = netdev_priv(dev_lec[i]);
916 priv->is_trdev = is_trdev; 917 priv->is_trdev = is_trdev;
917 lec_init(dev_lec[i]); 918 lec_init(dev_lec[i]);
918 } else { 919 } else {
919 priv = dev_lec[i]->priv; 920 priv = netdev_priv(dev_lec[i]);
920 if (priv->lecd) 921 if (priv->lecd)
921 return -EADDRINUSE; 922 return -EADDRINUSE;
922 } 923 }
@@ -1077,7 +1078,8 @@ static void *lec_itf_walk(struct lec_state *state, loff_t *l)
1077 void *v; 1078 void *v;
1078 1079
1079 dev = state->dev ? state->dev : dev_lec[state->itf]; 1080 dev = state->dev ? state->dev : dev_lec[state->itf];
1080 v = (dev && dev->priv) ? lec_priv_walk(state, l, dev->priv) : NULL; 1081 v = (dev && netdev_priv(dev)) ?
1082 lec_priv_walk(state, l, netdev_priv(dev)) : NULL;
1081 if (!v && dev) { 1083 if (!v && dev) {
1082 dev_put(dev); 1084 dev_put(dev);
1083 /* Partial state reset for the next time we get called */ 1085 /* Partial state reset for the next time we get called */
@@ -1239,7 +1241,7 @@ static void __exit lane_module_cleanup(void)
1239 1241
1240 for (i = 0; i < MAX_LEC_ITF; i++) { 1242 for (i = 0; i < MAX_LEC_ITF; i++) {
1241 if (dev_lec[i] != NULL) { 1243 if (dev_lec[i] != NULL) {
1242 priv = (struct lec_priv *)dev_lec[i]->priv; 1244 priv = netdev_priv(dev_lec[i]);
1243 unregister_netdev(dev_lec[i]); 1245 unregister_netdev(dev_lec[i]);
1244 free_netdev(dev_lec[i]); 1246 free_netdev(dev_lec[i]);
1245 dev_lec[i] = NULL; 1247 dev_lec[i] = NULL;
@@ -1263,7 +1265,7 @@ static int lane2_resolve(struct net_device *dev, const u8 *dst_mac, int force,
1263 u8 **tlvs, u32 *sizeoftlvs) 1265 u8 **tlvs, u32 *sizeoftlvs)
1264{ 1266{
1265 unsigned long flags; 1267 unsigned long flags;
1266 struct lec_priv *priv = (struct lec_priv *)dev->priv; 1268 struct lec_priv *priv = netdev_priv(dev);
1267 struct lec_arp_table *table; 1269 struct lec_arp_table *table;
1268 struct sk_buff *skb; 1270 struct sk_buff *skb;
1269 int retval; 1271 int retval;
@@ -1310,7 +1312,7 @@ static int lane2_associate_req(struct net_device *dev, const u8 *lan_dst,
1310{ 1312{
1311 int retval; 1313 int retval;
1312 struct sk_buff *skb; 1314 struct sk_buff *skb;
1313 struct lec_priv *priv = (struct lec_priv *)dev->priv; 1315 struct lec_priv *priv = netdev_priv(dev);
1314 1316
1315 if (compare_ether_addr(lan_dst, dev->dev_addr)) 1317 if (compare_ether_addr(lan_dst, dev->dev_addr))
1316 return (0); /* not our mac address */ 1318 return (0); /* not our mac address */
@@ -1347,7 +1349,7 @@ static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr,
1347#if 0 1349#if 0
1348 int i = 0; 1350 int i = 0;
1349#endif 1351#endif
1350 struct lec_priv *priv = (struct lec_priv *)dev->priv; 1352 struct lec_priv *priv = netdev_priv(dev);
1351#if 0 /* 1353#if 0 /*
1352 * Why have the TLVs in LE_ARP entries 1354 * Why have the TLVs in LE_ARP entries
1353 * since we do not use them? When you 1355 * since we do not use them? When you
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 010b1d2a5a8f..12e9ea371db1 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -785,7 +785,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg)
785 } 785 }
786 786
787 if (mpc->dev) { /* check if the lec is LANE2 capable */ 787 if (mpc->dev) { /* check if the lec is LANE2 capable */
788 priv = (struct lec_priv *)mpc->dev->priv; 788 priv = netdev_priv(mpc->dev);
789 if (priv->lane_version < 2) { 789 if (priv->lane_version < 2) {
790 dev_put(mpc->dev); 790 dev_put(mpc->dev);
791 mpc->dev = NULL; 791 mpc->dev = NULL;
@@ -845,7 +845,7 @@ static void mpoad_close(struct atm_vcc *vcc)
845 845
846 mpc->mpoad_vcc = NULL; 846 mpc->mpoad_vcc = NULL;
847 if (mpc->dev) { 847 if (mpc->dev) {
848 struct lec_priv *priv = (struct lec_priv *)mpc->dev->priv; 848 struct lec_priv *priv = netdev_priv(mpc->dev);
849 priv->lane2_ops->associate_indicator = NULL; 849 priv->lane2_ops->associate_indicator = NULL;
850 stop_mpc(mpc); 850 stop_mpc(mpc);
851 dev_put(mpc->dev); 851 dev_put(mpc->dev);
@@ -976,7 +976,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier, unsigned lo
976 976
977 switch (event) { 977 switch (event) {
978 case NETDEV_REGISTER: /* a new lec device was allocated */ 978 case NETDEV_REGISTER: /* a new lec device was allocated */
979 priv = (struct lec_priv *)dev->priv; 979 priv = netdev_priv(dev);
980 if (priv->lane_version < 2) 980 if (priv->lane_version < 2)
981 break; 981 break;
982 priv->lane2_ops->associate_indicator = lane2_assoc_ind; 982 priv->lane2_ops->associate_indicator = lane2_assoc_ind;
@@ -1324,7 +1324,7 @@ static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *m
1324 dprintk("\n"); 1324 dprintk("\n");
1325 1325
1326 if (mpc->dev) { 1326 if (mpc->dev) {
1327 priv = (struct lec_priv *)mpc->dev->priv; 1327 priv = netdev_priv(mpc->dev);
1328 retval = priv->lane2_ops->associate_req(mpc->dev, mpc->dev->dev_addr, tlv, sizeof(tlv)); 1328 retval = priv->lane2_ops->associate_req(mpc->dev, mpc->dev->dev_addr, tlv, sizeof(tlv));
1329 if (retval == 0) 1329 if (retval == 0)
1330 printk("mpoa: (%s) MPOA device type TLV association failed\n", mpc->dev->name); 1330 printk("mpoa: (%s) MPOA device type TLV association failed\n", mpc->dev->name);
@@ -1474,7 +1474,7 @@ static void __exit atm_mpoa_cleanup(void)
1474 tmp = mpc->next; 1474 tmp = mpc->next;
1475 if (mpc->dev != NULL) { 1475 if (mpc->dev != NULL) {
1476 stop_mpc(mpc); 1476 stop_mpc(mpc);
1477 priv = (struct lec_priv *)mpc->dev->priv; 1477 priv = netdev_priv(mpc->dev);
1478 if (priv->lane2_ops != NULL) 1478 if (priv->lane2_ops != NULL)
1479 priv->lane2_ops->associate_indicator = NULL; 1479 priv->lane2_ops->associate_indicator = NULL;
1480 } 1480 }
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 7a4d5303b4fe..f8efaf35293c 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -565,7 +565,7 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
565 goto failed; 565 goto failed;
566 } 566 }
567 567
568 s = dev->priv; 568 s = netdev_priv(dev);
569 569
570 /* This is rx header therefore addresses are swapped. 570 /* This is rx header therefore addresses are swapped.
571 * ie eh.h_dest is our local address. */ 571 * ie eh.h_dest is our local address. */
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
index d9fa0ab2c87f..47e179f62e82 100644
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -62,14 +62,14 @@ static int bnep_net_close(struct net_device *dev)
62 62
63static struct net_device_stats *bnep_net_get_stats(struct net_device *dev) 63static struct net_device_stats *bnep_net_get_stats(struct net_device *dev)
64{ 64{
65 struct bnep_session *s = dev->priv; 65 struct bnep_session *s = netdev_priv(dev);
66 return &s->stats; 66 return &s->stats;
67} 67}
68 68
69static void bnep_net_set_mc_list(struct net_device *dev) 69static void bnep_net_set_mc_list(struct net_device *dev)
70{ 70{
71#ifdef CONFIG_BT_BNEP_MC_FILTER 71#ifdef CONFIG_BT_BNEP_MC_FILTER
72 struct bnep_session *s = dev->priv; 72 struct bnep_session *s = netdev_priv(dev);
73 struct sock *sk = s->sock->sk; 73 struct sock *sk = s->sock->sk;
74 struct bnep_set_filter_req *r; 74 struct bnep_set_filter_req *r;
75 struct sk_buff *skb; 75 struct sk_buff *skb;
@@ -183,7 +183,7 @@ static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session
183 183
184static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev) 184static int bnep_net_xmit(struct sk_buff *skb, struct net_device *dev)
185{ 185{
186 struct bnep_session *s = dev->priv; 186 struct bnep_session *s = netdev_priv(dev);
187 struct sock *sk = s->sock->sk; 187 struct sock *sk = s->sock->sk;
188 188
189 BT_DBG("skb %p, dev %p", skb, dev); 189 BT_DBG("skb %p, dev %p", skb, dev);
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 0a09ccf68c1c..ee3a8dd13f55 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -460,7 +460,7 @@ void br_net_exit(struct net *net)
460restart: 460restart:
461 for_each_netdev(net, dev) { 461 for_each_netdev(net, dev) {
462 if (dev->priv_flags & IFF_EBRIDGE) { 462 if (dev->priv_flags & IFF_EBRIDGE) {
463 del_br(dev->priv); 463 del_br(netdev_priv(dev));
464 goto restart; 464 goto restart;
465 } 465 }
466 } 466 }
diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
index 158dee8b4965..603d89248e71 100644
--- a/net/bridge/br_sysfs_br.c
+++ b/net/bridge/br_sysfs_br.c
@@ -22,7 +22,7 @@
22#include "br_private.h" 22#include "br_private.h"
23 23
24#define to_dev(obj) container_of(obj, struct device, kobj) 24#define to_dev(obj) container_of(obj, struct device, kobj)
25#define to_bridge(cd) ((struct net_bridge *)(to_net_dev(cd)->priv)) 25#define to_bridge(cd) ((struct net_bridge *)netdev_priv(to_net_dev(cd)))
26 26
27/* 27/*
28 * Common code for storing bridge parameters. 28 * Common code for storing bridge parameters.
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 9a1cd87e7142..774d73a76852 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
207 if (!dev) 207 if (!dev)
208 return NULL; 208 return NULL;
209 209
210 self = dev->priv; 210 self = netdev_priv(dev);
211 self->dev = dev; 211 self->dev = dev;
212 212
213 /* 213 /*