aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding
diff options
context:
space:
mode:
authorBrian Haley <brian.haley@hp.com>2008-09-02 10:08:08 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-09-03 10:03:07 -0400
commitf14c4e4e3651b76ae09082fa66cda37e10ac2b43 (patch)
treec9441dc387517914b0434e880245f8d824895413 /drivers/net/bonding
parenta816f75ac5caa79b08325e35317f964f03841d52 (diff)
bonding: change some __constant_htons() to htons()
Resending since I didn't see any responses from the first try. Change __constant_htons() to htons() in the bonding driver, it should only be used for initializers. -Brian Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r--drivers/net/bonding/bond_alb.c4
-rw-r--r--drivers/net/bonding/bond_main.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index b211486a0ca3..3d39278a63e3 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -710,7 +710,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
710 struct arp_pkt *arp = arp_pkt(skb); 710 struct arp_pkt *arp = arp_pkt(skb);
711 struct slave *tx_slave = NULL; 711 struct slave *tx_slave = NULL;
712 712
713 if (arp->op_code == __constant_htons(ARPOP_REPLY)) { 713 if (arp->op_code == htons(ARPOP_REPLY)) {
714 /* the arp must be sent on the selected 714 /* the arp must be sent on the selected
715 * rx channel 715 * rx channel
716 */ 716 */
@@ -719,7 +719,7 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
719 memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN); 719 memcpy(arp->mac_src,tx_slave->dev->dev_addr, ETH_ALEN);
720 } 720 }
721 dprintk("Server sent ARP Reply packet\n"); 721 dprintk("Server sent ARP Reply packet\n");
722 } else if (arp->op_code == __constant_htons(ARPOP_REQUEST)) { 722 } else if (arp->op_code == htons(ARPOP_REQUEST)) {
723 /* Create an entry in the rx_hashtbl for this client as a 723 /* Create an entry in the rx_hashtbl for this client as a
724 * place holder. 724 * place holder.
725 * When the arp reply is received the entry will be updated 725 * When the arp reply is received the entry will be updated
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index c792138511e6..babe4610c39a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3702,7 +3702,7 @@ static int bond_xmit_hash_policy_l23(struct sk_buff *skb,
3702 struct ethhdr *data = (struct ethhdr *)skb->data; 3702 struct ethhdr *data = (struct ethhdr *)skb->data;
3703 struct iphdr *iph = ip_hdr(skb); 3703 struct iphdr *iph = ip_hdr(skb);
3704 3704
3705 if (skb->protocol == __constant_htons(ETH_P_IP)) { 3705 if (skb->protocol == htons(ETH_P_IP)) {
3706 return ((ntohl(iph->saddr ^ iph->daddr) & 0xffff) ^ 3706 return ((ntohl(iph->saddr ^ iph->daddr) & 0xffff) ^
3707 (data->h_dest[5] ^ bond_dev->dev_addr[5])) % count; 3707 (data->h_dest[5] ^ bond_dev->dev_addr[5])) % count;
3708 } 3708 }
@@ -3723,8 +3723,8 @@ static int bond_xmit_hash_policy_l34(struct sk_buff *skb,
3723 __be16 *layer4hdr = (__be16 *)((u32 *)iph + iph->ihl); 3723 __be16 *layer4hdr = (__be16 *)((u32 *)iph + iph->ihl);
3724 int layer4_xor = 0; 3724 int layer4_xor = 0;
3725 3725
3726 if (skb->protocol == __constant_htons(ETH_P_IP)) { 3726 if (skb->protocol == htons(ETH_P_IP)) {
3727 if (!(iph->frag_off & __constant_htons(IP_MF|IP_OFFSET)) && 3727 if (!(iph->frag_off & htons(IP_MF|IP_OFFSET)) &&
3728 (iph->protocol == IPPROTO_TCP || 3728 (iph->protocol == IPPROTO_TCP ||
3729 iph->protocol == IPPROTO_UDP)) { 3729 iph->protocol == IPPROTO_UDP)) {
3730 layer4_xor = ntohs((*layer4hdr ^ *(layer4hdr + 1))); 3730 layer4_xor = ntohs((*layer4hdr ^ *(layer4hdr + 1)));