aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-08 03:26:05 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:21:23 -0500
commit3fbd418acc264e7069483d04165633ed3bfad80c (patch)
tree21dd38111385737d35a1139705f29d008b28f0ba
parentfede70b9862635ab1bed84ab3d765e9069616b02 (diff)
[LLC]: anotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/llc_pdu.h10
-rw-r--r--net/llc/af_llc.c2
-rw-r--r--net/llc/llc_input.c4
3 files changed, 8 insertions, 8 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 */
253static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) 253static 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 */
270static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da) 270static 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
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 2652ead96c64..190bb3e05188 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -64,7 +64,7 @@ static inline u16 llc_ui_next_link_no(int sap)
64 * 64 *
65 * Given an ARP header type return the corresponding ethernet protocol. 65 * Given an ARP header type return the corresponding ethernet protocol.
66 */ 66 */
67static inline u16 llc_proto_type(u16 arphrd) 67static inline __be16 llc_proto_type(u16 arphrd)
68{ 68{
69 return arphrd == ARPHRD_IEEE802_TR ? 69 return arphrd == ARPHRD_IEEE802_TR ?
70 htons(ETH_P_TR_802_2) : htons(ETH_P_802_2); 70 htons(ETH_P_TR_802_2) : htons(ETH_P_802_2);
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
index 94d2368ade92..db82aff6e40f 100644
--- a/net/llc/llc_input.c
+++ b/net/llc/llc_input.c
@@ -115,8 +115,8 @@ static inline int llc_fixup_skb(struct sk_buff *skb)
115 skb->h.raw += llc_len; 115 skb->h.raw += llc_len;
116 skb_pull(skb, llc_len); 116 skb_pull(skb, llc_len);
117 if (skb->protocol == htons(ETH_P_802_2)) { 117 if (skb->protocol == htons(ETH_P_802_2)) {
118 u16 pdulen = eth_hdr(skb)->h_proto, 118 __be16 pdulen = eth_hdr(skb)->h_proto;
119 data_size = ntohs(pdulen) - llc_len; 119 u16 data_size = ntohs(pdulen) - llc_len;
120 120
121 if (unlikely(pskb_trim_rcsum(skb, data_size))) 121 if (unlikely(pskb_trim_rcsum(skb, data_size)))
122 return 0; 122 return 0;