diff options
Diffstat (limited to 'include/net/llc_pdu.h')
-rw-r--r-- | include/net/llc_pdu.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h index aa33a477c3fb..4a8f58b17e43 100644 --- a/include/net/llc_pdu.h +++ b/include/net/llc_pdu.h | |||
@@ -203,7 +203,7 @@ struct llc_pdu_sn { | |||
203 | 203 | ||
204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) | 204 | static inline struct llc_pdu_sn *llc_pdu_sn_hdr(struct sk_buff *skb) |
205 | { | 205 | { |
206 | return (struct llc_pdu_sn *)skb->nh.raw; | 206 | return (struct llc_pdu_sn *)skb_network_header(skb); |
207 | } | 207 | } |
208 | 208 | ||
209 | /* Un-numbered PDU format (3 bytes in length) */ | 209 | /* Un-numbered PDU format (3 bytes in length) */ |
@@ -215,12 +215,7 @@ struct llc_pdu_un { | |||
215 | 215 | ||
216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) | 216 | static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb) |
217 | { | 217 | { |
218 | return (struct llc_pdu_un *)skb->nh.raw; | 218 | return (struct llc_pdu_un *)skb_network_header(skb); |
219 | } | ||
220 | |||
221 | static inline void *llc_set_pdu_hdr(struct sk_buff *skb, void *ptr) | ||
222 | { | ||
223 | return skb->nh.raw = ptr; | ||
224 | } | 219 | } |
225 | 220 | ||
226 | /** | 221 | /** |
@@ -237,7 +232,11 @@ static inline void llc_pdu_header_init(struct sk_buff *skb, u8 type, | |||
237 | u8 ssap, u8 dsap, u8 cr) | 232 | u8 ssap, u8 dsap, u8 cr) |
238 | { | 233 | { |
239 | const int hlen = type == LLC_PDU_TYPE_U ? 3 : 4; | 234 | const int hlen = type == LLC_PDU_TYPE_U ? 3 : 4; |
240 | struct llc_pdu_un *pdu = llc_set_pdu_hdr(skb, skb_push(skb, hlen)); | 235 | struct llc_pdu_un *pdu; |
236 | |||
237 | skb_push(skb, hlen); | ||
238 | skb_reset_network_header(skb); | ||
239 | pdu = llc_pdu_un_hdr(skb); | ||
241 | pdu->dsap = dsap; | 240 | pdu->dsap = dsap; |
242 | pdu->ssap = ssap; | 241 | pdu->ssap = ssap; |
243 | pdu->ssap |= cr; | 242 | pdu->ssap |= cr; |