diff options
Diffstat (limited to 'net/atm/mpc.c')
-rw-r--r-- | net/atm/mpc.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 11b16d16661c..039d5cc72c3d 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c | |||
@@ -232,8 +232,8 @@ void atm_mpoa_disp_qos(struct seq_file *m) | |||
232 | seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); | 232 | seq_printf(m, "IP address\n TX:max_pcr pcr min_pcr max_cdv max_sdu\n RX:max_pcr pcr min_pcr max_cdv max_sdu\n"); |
233 | 233 | ||
234 | while (qos != NULL) { | 234 | while (qos != NULL) { |
235 | seq_printf(m, "%u.%u.%u.%u\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", | 235 | seq_printf(m, "%pI4\n %-7d %-7d %-7d %-7d %-7d\n %-7d %-7d %-7d %-7d %-7d\n", |
236 | NIPQUAD(qos->ipaddr), | 236 | &qos->ipaddr, |
237 | qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, | 237 | qos->qos.txtp.max_pcr, qos->qos.txtp.pcr, qos->qos.txtp.min_pcr, qos->qos.txtp.max_cdv, qos->qos.txtp.max_sdu, |
238 | qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); | 238 | qos->qos.rxtp.max_pcr, qos->qos.rxtp.pcr, qos->qos.rxtp.min_pcr, qos->qos.rxtp.max_cdv, qos->qos.rxtp.max_sdu); |
239 | qos = qos->next; | 239 | qos = qos->next; |
@@ -341,8 +341,8 @@ static const char *mpoa_device_type_string(char type) | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /* | 343 | /* |
344 | * lec device calls this via its dev->priv->lane2_ops->associate_indicator() | 344 | * lec device calls this via its netdev_priv(dev)->lane2_ops |
345 | * when it sees a TLV in LE_ARP packet. | 345 | * ->associate_indicator() when it sees a TLV in LE_ARP packet. |
346 | * We fill in the pointer above when we see a LANE2 lec initializing | 346 | * We fill in the pointer above when we see a LANE2 lec initializing |
347 | * See LANE2 spec 3.1.5 | 347 | * See LANE2 spec 3.1.5 |
348 | * | 348 | * |
@@ -595,8 +595,8 @@ static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg) | |||
595 | if (in_entry != NULL) mpc->in_ops->put(in_entry); | 595 | if (in_entry != NULL) mpc->in_ops->put(in_entry); |
596 | return -EINVAL; | 596 | return -EINVAL; |
597 | } | 597 | } |
598 | printk("mpoa: (%s) mpc_vcc_attach: attaching ingress SVC, entry = %u.%u.%u.%u\n", | 598 | printk("mpoa: (%s) mpc_vcc_attach: attaching ingress SVC, entry = %pI4\n", |
599 | mpc->dev->name, NIPQUAD(in_entry->ctrl_info.in_dst_ip)); | 599 | mpc->dev->name, &in_entry->ctrl_info.in_dst_ip); |
600 | in_entry->shortcut = vcc; | 600 | in_entry->shortcut = vcc; |
601 | mpc->in_ops->put(in_entry); | 601 | mpc->in_ops->put(in_entry); |
602 | } else { | 602 | } else { |
@@ -627,8 +627,8 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev) | |||
627 | dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name); | 627 | dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name); |
628 | in_entry = mpc->in_ops->get_by_vcc(vcc, mpc); | 628 | in_entry = mpc->in_ops->get_by_vcc(vcc, mpc); |
629 | if (in_entry) { | 629 | if (in_entry) { |
630 | dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %u.%u.%u.%u\n", | 630 | dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %pI4\n", |
631 | mpc->dev->name, NIPQUAD(in_entry->ctrl_info.in_dst_ip)); | 631 | mpc->dev->name, &in_entry->ctrl_info.in_dst_ip); |
632 | in_entry->shortcut = NULL; | 632 | in_entry->shortcut = NULL; |
633 | mpc->in_ops->put(in_entry); | 633 | mpc->in_ops->put(in_entry); |
634 | } | 634 | } |
@@ -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; |
@@ -1098,7 +1098,8 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien | |||
1098 | entry->shortcut = eg_entry->shortcut; | 1098 | entry->shortcut = eg_entry->shortcut; |
1099 | } | 1099 | } |
1100 | if(entry->shortcut){ | 1100 | if(entry->shortcut){ |
1101 | dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip)); | 1101 | dprintk("mpoa: (%s) using egress SVC to reach %pI4\n", |
1102 | client->dev->name, &dst_ip); | ||
1102 | client->eg_ops->put(eg_entry); | 1103 | client->eg_ops->put(eg_entry); |
1103 | return; | 1104 | return; |
1104 | } | 1105 | } |
@@ -1123,7 +1124,8 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc) | |||
1123 | __be32 dst_ip = msg->content.in_info.in_dst_ip; | 1124 | __be32 dst_ip = msg->content.in_info.in_dst_ip; |
1124 | in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); | 1125 | in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc); |
1125 | 1126 | ||
1126 | dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(dst_ip)); | 1127 | dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %pI4\n", |
1128 | mpc->dev->name, &dst_ip); | ||
1127 | ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); | 1129 | ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry); |
1128 | if(entry == NULL){ | 1130 | if(entry == NULL){ |
1129 | printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); | 1131 | printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); |
@@ -1171,14 +1173,14 @@ static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc) | |||
1171 | in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); | 1173 | in_cache_entry *entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); |
1172 | 1174 | ||
1173 | if(entry == NULL){ | 1175 | if(entry == NULL){ |
1174 | printk("mpoa: (%s) ingress_purge_rcvd: purge for a non-existing entry, ", mpc->dev->name); | 1176 | printk("mpoa: (%s) ingress_purge_rcvd: purge for a non-existing entry, ip = %pI4\n", |
1175 | printk("ip = %u.%u.%u.%u\n", NIPQUAD(dst_ip)); | 1177 | mpc->dev->name, &dst_ip); |
1176 | return; | 1178 | return; |
1177 | } | 1179 | } |
1178 | 1180 | ||
1179 | do { | 1181 | do { |
1180 | dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %u.%u.%u.%u\n" , | 1182 | dprintk("mpoa: (%s) ingress_purge_rcvd: removing an ingress entry, ip = %pI4\n", |
1181 | mpc->dev->name, NIPQUAD(dst_ip)); | 1183 | mpc->dev->name, &dst_ip); |
1182 | write_lock_bh(&mpc->ingress_lock); | 1184 | write_lock_bh(&mpc->ingress_lock); |
1183 | mpc->in_ops->remove_entry(entry, mpc); | 1185 | mpc->in_ops->remove_entry(entry, mpc); |
1184 | write_unlock_bh(&mpc->ingress_lock); | 1186 | write_unlock_bh(&mpc->ingress_lock); |
@@ -1322,7 +1324,7 @@ static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, struct mpoa_client *m | |||
1322 | dprintk("\n"); | 1324 | dprintk("\n"); |
1323 | 1325 | ||
1324 | if (mpc->dev) { | 1326 | if (mpc->dev) { |
1325 | priv = (struct lec_priv *)mpc->dev->priv; | 1327 | priv = netdev_priv(mpc->dev); |
1326 | 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)); |
1327 | if (retval == 0) | 1329 | if (retval == 0) |
1328 | 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); |
@@ -1472,7 +1474,7 @@ static void __exit atm_mpoa_cleanup(void) | |||
1472 | tmp = mpc->next; | 1474 | tmp = mpc->next; |
1473 | if (mpc->dev != NULL) { | 1475 | if (mpc->dev != NULL) { |
1474 | stop_mpc(mpc); | 1476 | stop_mpc(mpc); |
1475 | priv = (struct lec_priv *)mpc->dev->priv; | 1477 | priv = netdev_priv(mpc->dev); |
1476 | if (priv->lane2_ops != NULL) | 1478 | if (priv->lane2_ops != NULL) |
1477 | priv->lane2_ops->associate_indicator = NULL; | 1479 | priv->lane2_ops->associate_indicator = NULL; |
1478 | } | 1480 | } |