diff options
Diffstat (limited to 'include/net/llc_pdu.h')
-rw-r--r-- | include/net/llc_pdu.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index 8f6306581fa7..aa33a477c3fb 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -252,9 +252,9 @@ static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type, | |||
252 | */ | 252 | */ |
253 | static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) | 253 | static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) |
254 | { | 254 | { |
255 | if (skb->protocol == ntohs(ETH_P_802_2)) | 255 | if (skb->protocol == htons(ETH_P_802_2)) |
256 | memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); | 256 | memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); |
257 | else if (skb->protocol == ntohs(ETH_P_TR_802_2)) { | 257 | else if (skb->protocol == htons(ETH_P_TR_802_2)) { |
258 | memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); | 258 | memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); |
259 | *sa &= 0x7F; | 259 | *sa &= 0x7F; |
260 | } | 260 | } |
@@ -269,9 +269,9 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) | |||
269 | */ | 269 | */ |
270 | static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da) | 270 | static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da) |
271 | { | 271 | { |
272 | if (skb->protocol == ntohs(ETH_P_802_2)) | 272 | if (skb->protocol == htons(ETH_P_802_2)) |
273 | memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); | 273 | memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); |
274 | else if (skb->protocol == ntohs(ETH_P_TR_802_2)) | 274 | else if (skb->protocol == htons(ETH_P_TR_802_2)) |
275 | memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN); | 275 | memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN); |
276 | } | 276 | } |
277 | 277 | ||
@@ -345,7 +345,7 @@ static inline void llc_pdu_init_as_test_rsp(struct sk_buff *skb, | |||
345 | pdu->ctrl_1 = LLC_PDU_TYPE_U; | 345 | pdu->ctrl_1 = LLC_PDU_TYPE_U; |
346 | pdu->ctrl_1 |= LLC_1_PDU_CMD_TEST; | 346 | pdu->ctrl_1 |= LLC_1_PDU_CMD_TEST; |
347 | pdu->ctrl_1 |= LLC_U_PF_BIT_MASK; | 347 | pdu->ctrl_1 |= LLC_U_PF_BIT_MASK; |
348 | if (ev_skb->protocol == ntohs(ETH_P_802_2)) { | 348 | if (ev_skb->protocol == htons(ETH_P_802_2)) { |
349 | struct llc_pdu_un *ev_pdu = llc_pdu_un_hdr(ev_skb); | 349 | struct llc_pdu_un *ev_pdu = llc_pdu_un_hdr(ev_skb); |
350 | int dsize; | 350 | int dsize; |
351 | 351 | ||