Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09640e63 authored by Harvey Harrison's avatar Harvey Harrison Committed by David S. Miller
Browse files

net: replace uses of __constant_{endian}



Base versions handle constant folding now.

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee437770
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ static void rx(struct net_device *dev, int bufnum,

	BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx");

	skb->protocol = __constant_htons(ETH_P_ARCNET);
	skb->protocol = cpu_to_be16(ETH_P_ARCNET);
;
	netif_rx(skb);
}
+2 −2
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ static void rx(struct net_device *dev, int bufnum,

	BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx");

	skb->protocol = __constant_htons(ETH_P_ARCNET);
	skb->protocol = cpu_to_be16(ETH_P_ARCNET);
;
	netif_rx(skb);
}
@@ -282,7 +282,7 @@ static int ack_tx(struct net_device *dev, int acked)
  BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n",
	 *((int*)&ackpkt->soft.cap.cookie[0]));

  ackskb->protocol = __constant_htons(ETH_P_ARCNET);
  ackskb->protocol = cpu_to_be16(ETH_P_ARCNET);

  BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv");
  netif_rx(ackskb);
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@

// General definitions
#define BOND_ETH_P_LACPDU       0x8809
#define PKT_TYPE_LACPDU         __constant_htons(BOND_ETH_P_LACPDU)
#define PKT_TYPE_LACPDU         cpu_to_be16(BOND_ETH_P_LACPDU)
#define AD_TIMER_INTERVAL       100 /*msec*/

#define MULTICAST_LACPDU_ADDR    {0x01, 0x80, 0xC2, 0x00, 0x00, 0x02}
+2 −2
Original line number Diff line number Diff line
@@ -822,7 +822,7 @@ static int rlb_initialize(struct bonding *bond)
	_unlock_rx_hashtbl(bond);

	/*initialize packet type*/
	pk_type->type = __constant_htons(ETH_P_ARP);
	pk_type->type = cpu_to_be16(ETH_P_ARP);
	pk_type->dev = NULL;
	pk_type->func = rlb_arp_recv;

@@ -892,7 +892,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[])
	memset(&pkt, 0, size);
	memcpy(pkt.mac_dst, mac_addr, ETH_ALEN);
	memcpy(pkt.mac_src, mac_addr, ETH_ALEN);
	pkt.type = __constant_htons(ETH_P_LOOP);
	pkt.type = cpu_to_be16(ETH_P_LOOP);

	for (i = 0; i < MAX_LP_BURST; i++) {
		struct sk_buff *skb;
+2 −2
Original line number Diff line number Diff line
@@ -2860,11 +2860,11 @@ static bool e1000_tx_csum(struct e1000_adapter *adapter,
		return false;

	switch (skb->protocol) {
	case __constant_htons(ETH_P_IP):
	case cpu_to_be16(ETH_P_IP):
		if (ip_hdr(skb)->protocol == IPPROTO_TCP)
			cmd_len |= E1000_TXD_CMD_TCP;
		break;
	case __constant_htons(ETH_P_IPV6):
	case cpu_to_be16(ETH_P_IPV6):
		/* XXX not handling all IPV6 headers */
		if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
			cmd_len |= E1000_TXD_CMD_TCP;
Loading