diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2012-04-22 02:47:50 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-18 12:01:01 -0400 |
commit | 3e2f1a1bb528df14065a9287f37378ca453c52f9 (patch) | |
tree | 54b3a801c31592330cc2795c30593d9a369dc798 /net/batman-adv | |
parent | 1a5852d81a664e5a6456f82dff6f31b06dc2bede (diff) |
batman-adv: trivial endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 6 | ||||
-rw-r--r-- | net/batman-adv/packet.h | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 89e2b1cda182..0355c48db282 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -258,7 +258,7 @@ static void bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac, | |||
258 | struct net_device *soft_iface; | 258 | struct net_device *soft_iface; |
259 | uint8_t *hw_src; | 259 | uint8_t *hw_src; |
260 | struct bla_claim_dst local_claim_dest; | 260 | struct bla_claim_dst local_claim_dest; |
261 | uint32_t zeroip = 0; | 261 | __be32 zeroip = 0; |
262 | 262 | ||
263 | primary_if = primary_if_get_selected(bat_priv); | 263 | primary_if = primary_if_get_selected(bat_priv); |
264 | if (!primary_if) | 264 | if (!primary_if) |
@@ -506,7 +506,7 @@ static void bla_send_announce(struct bat_priv *bat_priv, | |||
506 | struct backbone_gw *backbone_gw) | 506 | struct backbone_gw *backbone_gw) |
507 | { | 507 | { |
508 | uint8_t mac[ETH_ALEN]; | 508 | uint8_t mac[ETH_ALEN]; |
509 | uint16_t crc; | 509 | __be16 crc; |
510 | 510 | ||
511 | memcpy(mac, announce_mac, 4); | 511 | memcpy(mac, announce_mac, 4); |
512 | crc = htons(backbone_gw->crc); | 512 | crc = htons(backbone_gw->crc); |
@@ -627,7 +627,7 @@ static int handle_announce(struct bat_priv *bat_priv, | |||
627 | 627 | ||
628 | /* handle as ANNOUNCE frame */ | 628 | /* handle as ANNOUNCE frame */ |
629 | backbone_gw->lasttime = jiffies; | 629 | backbone_gw->lasttime = jiffies; |
630 | crc = ntohs(*((uint16_t *)(&an_addr[4]))); | 630 | crc = ntohs(*((__be16 *)(&an_addr[4]))); |
631 | 631 | ||
632 | bat_dbg(DBG_BLA, bat_priv, | 632 | bat_dbg(DBG_BLA, bat_priv, |
633 | "handle_announce(): ANNOUNCE vid %d (sent by %pM)... CRC = %04x\n", | 633 | "handle_announce(): ANNOUNCE vid %d (sent by %pM)... CRC = %04x\n", |
diff --git a/net/batman-adv/packet.h b/net/batman-adv/packet.h index 0ee1af770798..eaa602863fd2 100644 --- a/net/batman-adv/packet.h +++ b/net/batman-adv/packet.h | |||
@@ -105,7 +105,7 @@ enum bla_claimframe { | |||
105 | struct bla_claim_dst { | 105 | struct bla_claim_dst { |
106 | uint8_t magic[3]; /* FF:43:05 */ | 106 | uint8_t magic[3]; /* FF:43:05 */ |
107 | uint8_t type; /* bla_claimframe */ | 107 | uint8_t type; /* bla_claimframe */ |
108 | uint16_t group; /* group id */ | 108 | __be16 group; /* group id */ |
109 | } __packed; | 109 | } __packed; |
110 | 110 | ||
111 | struct batman_header { | 111 | struct batman_header { |
@@ -134,7 +134,7 @@ struct icmp_packet { | |||
134 | uint8_t msg_type; /* see ICMP message types above */ | 134 | uint8_t msg_type; /* see ICMP message types above */ |
135 | uint8_t dst[ETH_ALEN]; | 135 | uint8_t dst[ETH_ALEN]; |
136 | uint8_t orig[ETH_ALEN]; | 136 | uint8_t orig[ETH_ALEN]; |
137 | uint16_t seqno; | 137 | __be16 seqno; |
138 | uint8_t uid; | 138 | uint8_t uid; |
139 | uint8_t reserved; | 139 | uint8_t reserved; |
140 | } __packed; | 140 | } __packed; |
@@ -148,7 +148,7 @@ struct icmp_packet_rr { | |||
148 | uint8_t msg_type; /* see ICMP message types above */ | 148 | uint8_t msg_type; /* see ICMP message types above */ |
149 | uint8_t dst[ETH_ALEN]; | 149 | uint8_t dst[ETH_ALEN]; |
150 | uint8_t orig[ETH_ALEN]; | 150 | uint8_t orig[ETH_ALEN]; |
151 | uint16_t seqno; | 151 | __be16 seqno; |
152 | uint8_t uid; | 152 | uint8_t uid; |
153 | uint8_t rr_cur; | 153 | uint8_t rr_cur; |
154 | uint8_t rr[BAT_RR_LEN][ETH_ALEN]; | 154 | uint8_t rr[BAT_RR_LEN][ETH_ALEN]; |
@@ -167,20 +167,20 @@ struct unicast_frag_packet { | |||
167 | uint8_t flags; | 167 | uint8_t flags; |
168 | uint8_t align; | 168 | uint8_t align; |
169 | uint8_t orig[ETH_ALEN]; | 169 | uint8_t orig[ETH_ALEN]; |
170 | uint16_t seqno; | 170 | __be16 seqno; |
171 | } __packed; | 171 | } __packed; |
172 | 172 | ||
173 | struct bcast_packet { | 173 | struct bcast_packet { |
174 | struct batman_header header; | 174 | struct batman_header header; |
175 | uint8_t reserved; | 175 | uint8_t reserved; |
176 | uint32_t seqno; | 176 | __be32 seqno; |
177 | uint8_t orig[ETH_ALEN]; | 177 | uint8_t orig[ETH_ALEN]; |
178 | } __packed; | 178 | } __packed; |
179 | 179 | ||
180 | struct vis_packet { | 180 | struct vis_packet { |
181 | struct batman_header header; | 181 | struct batman_header header; |
182 | uint8_t vis_type; /* which type of vis-participant sent this? */ | 182 | uint8_t vis_type; /* which type of vis-participant sent this? */ |
183 | uint32_t seqno; /* sequence number */ | 183 | __be32 seqno; /* sequence number */ |
184 | uint8_t entries; /* number of entries behind this struct */ | 184 | uint8_t entries; /* number of entries behind this struct */ |
185 | uint8_t reserved; | 185 | uint8_t reserved; |
186 | uint8_t vis_orig[ETH_ALEN]; /* originator reporting its neighbors */ | 186 | uint8_t vis_orig[ETH_ALEN]; /* originator reporting its neighbors */ |